From c00edf171d7373eceb59b103bed155323f05df43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B5=A9?= <1308369732@qq.com> Date: Mon, 9 Jul 2018 11:30:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=90=88=E6=B7=BB=E5=8A=A0uat=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build-uat.js | 35 ++++++++ build/webpack.uat.conf.js | 127 +++++++++++++++++++++++++++ config/dev.env.js | 5 +- config/uat.env.js | 8 ++ package.json | 1 + src/api/stock/initStock.js | 10 ++- src/store/modules/account.js | 5 +- src/styles/index.scss | 5 +- src/views/inbound/inboundPutaway.vue | 47 +++++----- src/views/layout/Layout.vue | 2 +- 10 files changed, 220 insertions(+), 25 deletions(-) create mode 100644 build/build-uat.js create mode 100644 build/webpack.uat.conf.js create mode 100644 config/uat.env.js diff --git a/build/build-uat.js b/build/build-uat.js new file mode 100644 index 0000000..b0840eb --- /dev/null +++ b/build/build-uat.js @@ -0,0 +1,35 @@ +require('./check-versions')() + +process.env.NODE_ENV = 'uat' + +var ora = require('ora') +var rm = require('rimraf') +var path = require('path') +var chalk = require('chalk') +var webpack = require('webpack') +var config = require('../config') +var webpackConfig = require('./webpack.uat.conf') + +var spinner = ora('building for uat...') +spinner.start() + +rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { + if (err) throw err + webpack(webpackConfig, function (err, stats) { + spinner.stop() + if (err) throw err + process.stdout.write(stats.toString({ + colors: true, + modules: false, + children: false, + chunks: false, + chunkModules: false + }) + '\n\n') + + console.log(chalk.cyan(' Build complete.\n')) + console.log(chalk.yellow( + ' Tip: built files are meant to be served over an HTTP server.\n' + + ' Opening index.html over file:// won\'t work.\n' + )) + }) +}) diff --git a/build/webpack.uat.conf.js b/build/webpack.uat.conf.js new file mode 100644 index 0000000..74142d0 --- /dev/null +++ b/build/webpack.uat.conf.js @@ -0,0 +1,127 @@ +var path = require('path') +var utils = require('./utils') +var webpack = require('webpack') +var config = require('../config') +var merge = require('webpack-merge') +var baseWebpackConfig = require('./webpack.base.conf') +var CopyWebpackPlugin = require('copy-webpack-plugin') +var HtmlWebpackPlugin = require('html-webpack-plugin') +var ExtractTextPlugin = require('extract-text-webpack-plugin') +var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') + +var env = require('../config/uat.env') + +function resolveApp(relativePath) { + return path.resolve(relativePath); +} + +var webpackConfig = merge(baseWebpackConfig, { + module: { + rules: utils.styleLoaders({ + sourceMap: config.build.productionSourceMap, + extract: true + }) + }, + devtool: config.build.productionSourceMap ? '#source-map' : false, + output: { + path: config.build.assetsRoot, + filename: utils.assetsPath('js/[name].[chunkhash].js'), + chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') + }, + plugins: [ + // http://vuejs.github.io/vue-loader/en/workflow/production.html + new webpack.DefinePlugin({ + 'process.env': env + }), + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + }, + sourceMap: true + }), + // extract css into its own file + new ExtractTextPlugin({ + filename: utils.assetsPath('css/[name].[contenthash].css') + }), + // Compress extracted CSS. We are using this plugin so that possible + // duplicated CSS from different components can be deduped. + new OptimizeCSSPlugin({ + cssProcessorOptions: { + safe: true + } + }), + // generate dist index.html with correct asset hash for caching. + // you can customize output by editing /index.html + // see https://github.com/ampedandwired/html-webpack-plugin + new HtmlWebpackPlugin({ + filename: config.build.index, + template: 'index.html', + inject: true, + favicon: resolveApp('favicon.ico'), + minify: { + removeComments: true, + collapseWhitespace: true, + removeAttributeQuotes: true + // more options: + // https://github.com/kangax/html-minifier#options-quick-reference + }, + // necessary to consistently work with multiple chunks via CommonsChunkPlugin + chunksSortMode: 'dependency' + }), + // cache Module Identifiers + new webpack.HashedModuleIdsPlugin(), + // split vendor js into its own file + new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + minChunks: function (module, count) { + // any required modules inside node_modules are extracted to vendor + return ( + module.resource && + /\.js$/.test(module.resource) && + module.resource.indexOf( + path.join(__dirname, '../node_modules') + ) === 0 + ) + } + }), + // extract webpack runtime and module manifest to its own file in order to + // prevent vendor hash from being updated whenever app bundle is updated + new webpack.optimize.CommonsChunkPlugin({ + name: 'manifest', + chunks: ['vendor'] + }), + // copy custom static assets + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname, '../static'), + to: config.build.assetsSubDirectory, + ignore: ['.*'] + } + ]) + ] +}) + +if (config.build.productionGzip) { + var CompressionWebpackPlugin = require('compression-webpack-plugin') + + webpackConfig.plugins.push( + new CompressionWebpackPlugin({ + asset: '[path].gz[query]', + algorithm: 'gzip', + test: new RegExp( + '\\.(' + + config.build.productionGzipExtensions.join('|') + + ')$' + ), + threshold: 10240, + minRatio: 0.8 + }) + ) +} + +if (config.build.bundleAnalyzerReport) { + var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin + webpackConfig.plugins.push(new BundleAnalyzerPlugin()) +} + +module.exports = webpackConfig diff --git a/config/dev.env.js b/config/dev.env.js index 964a7ed..88f629d 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -4,6 +4,9 @@ var prodEnv = require('./prod.env') module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://113.105.88.142:8580/wms-admin"', - BASE_API: '"http://localhost:8090"', + // BASE_API: '"http://10.20.30.111/wms-admin/"', + BASE_API: '"http://10.2.4.40:8090/admin/"', + // BASE_API: '"http://10.2.6.12:8090"', + // BASE_API: '"http://localhost:8090"', BASE_API_LOGIN:'"http://10.20.30.111:8090/uaa"' }) diff --git a/config/uat.env.js b/config/uat.env.js new file mode 100644 index 0000000..72985e5 --- /dev/null +++ b/config/uat.env.js @@ -0,0 +1,8 @@ +var merge = require('webpack-merge') +var prodEnv = require('./prod.env') + +module.exports = merge(prodEnv, { + NODE_ENV: '"development"', + BASE_API: '"http://113.105.88.142:8580/wms-admin"', + BASE_API_LOGIN:'"http://10.20.30.111:8090/uaa"' +}) diff --git a/package.json b/package.json index 261fc22..264841a 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "dev": "node build/dev-server.js", "start": "node build/dev-server.js", "build": "node build/build.js", + "build-uat": "node build/build-uat.js", "lint": "eslint --ext .js,.vue src" }, "dependencies": { diff --git a/src/api/stock/initStock.js b/src/api/stock/initStock.js index 6688155..a2e5fa2 100644 --- a/src/api/stock/initStock.js +++ b/src/api/stock/initStock.js @@ -1,6 +1,6 @@ import fetch from '@/utils/fetch' -// 获取供应商信息 +// 导入excel export function importStockInit(data) { return fetch({ url: '/stockInit/importStockInit', @@ -8,3 +8,11 @@ export function importStockInit(data) { data: data }) } +// 列表查询 +export function getStockInitList(data) { + return fetch({ + url: '/stockInit/getStockInitList', + method: 'post', + data: data + }) +} diff --git a/src/store/modules/account.js b/src/store/modules/account.js index 778fbf2..c1b5f80 100644 --- a/src/store/modules/account.js +++ b/src/store/modules/account.js @@ -25,6 +25,9 @@ const account = { }, SET_ENTITYNAME: (state, entityName) => { state.entityName = entityName + }, + SET_WAREHOUSE: (state, warehouse) => { + state.warehouse = warehouse } }, @@ -52,7 +55,6 @@ const account = { }, // 刷新token RefreshToken({ commit }) { - console.log('刷新token') return new Promise((resolve, reject) => { const formData = new FormData() formData.append('grant_type', 'refresh_token') @@ -97,6 +99,7 @@ const account = { commit('SET_NAME', data.userName) commit('SET_AVATAR', data.avatar) commit('SET_ENTITYNAME', data.entityName) + commit('SET_WAREHOUSE', data.warehouse) resolve(response) }).catch(error => { reject(error) diff --git a/src/styles/index.scss b/src/styles/index.scss index a2eb3e3..ac29bdd 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -67,7 +67,7 @@ a:hover { //main-container全局样式 .app-main{ - overflow-y: scroll; + //overflow-y: scroll; } .app-container { @@ -196,3 +196,6 @@ a:hover { .height-auto{ height: auto; } +.cell{ + white-space:nowrap!important; +} diff --git a/src/views/inbound/inboundPutaway.vue b/src/views/inbound/inboundPutaway.vue index e0f31d9..20f2457 100644 --- a/src/views/inbound/inboundPutaway.vue +++ b/src/views/inbound/inboundPutaway.vue @@ -83,6 +83,7 @@ + :label="forArea.storeAreaName" :value="forArea.storeAreaId" :key="forArea.storeAreaId"> 库位 + :label="forLoaction.name" :value="forLoaction.id" :key="forLoaction.id"> @@ -137,24 +138,24 @@ const defaultColumn = [ { key: 'ownerId', title: '货主', width: 106 }, { key: 'ownerOrderNo', title: '订单号', width: 106 }, - { key: 'noticeNo', title: '通知单号', width: 106 }, - { key: 'dataSources', title: '数据来源', width: 106 }, - { key: 'status', title: '状态', width: 106 }, - { key: 'storeHouseName', title: '入货仓库', width: 106 }, - { key: 'origin', title: '起始地', width: 106 }, - { key: 'destination', title: '目的地', width: 106 }, - { key: 'materielId', title: '车型', width: 106 }, - { key: 'materielName', title: '车型描述', width: 106 }, - { key: 'lotNo1', title: '底盘号(VIN号)', width: 106 }, - { key: 'carrierName', title: '承运商', width: 106 }, - { key: 'driverName', title: '承运商联系人', width: 106 }, - { key: 'driverPhone', title: '承运商联系人手机号', width: 106 }, - { key: 'consignee', title: '收货员工', width: 106 }, - { key: 'gmtCreate', title: '收货日期', width: 106 }, - { key: 'inspectStatus', title: '质检状态', width: 106 }, - { key: 'inspectRemark', title: '检验描述', width: 106 }, - { key: 'transferDriver', title: '移库司机', width: 106 }, - { key: 'createDate', title: '入库时间', width: 106 }, + { key: 'noticeNo', title: '通知单号', width: 136 }, + { key: 'dataSources', title: '数据来源', width: '' }, + { key: 'status', title: '状态', width: '140' }, + { key: 'storeHouseName', title: '入货仓库', width: '200' }, + { key: 'origin', title: '起始地', width: '' }, + { key: 'destination', title: '目的地', width: '' }, + { key: 'materielId', title: '车型', width: '240' }, + { key: 'materielName', title: '车型描述', width: '200' }, + { key: 'lotNo1', title: '底盘号(VIN号)', width: '200' }, + { key: 'carrierName', title: '承运商', width: '220' }, + { key: 'driverName', title: '承运商联系人', width: '140' }, + { key: 'driverPhone', title: '承运商联系人手机号', width: '240' }, + { key: 'consignee', title: '收货员工', width: '' }, + { key: 'gmtCreate', title: '收货日期', width: '' }, + { key: 'inspectStatus', title: '质检状态', width: '' }, + { key: 'inspectRemark', title: '检验描述', width: '' }, + { key: 'transferDriver', title: '移库司机', width: '' }, + { key: 'createDate', title: '入库时间', width: '180' }, { key: 'remarks', title: '备注', width: '', fixed: 'right' } ] export default { @@ -265,6 +266,12 @@ } }, methods: { + // 行选中 + rowClick(row, event, column) { + // 标记当前选中行 + // this.$refs.stockInitTable.clearSelection() + // this.$refs.stockInitTable.toggleRowSelection(row) + }, list() { const that = this // 更多 diff --git a/src/views/layout/Layout.vue b/src/views/layout/Layout.vue index f4ca15c..58bfc04 100644 --- a/src/views/layout/Layout.vue +++ b/src/views/layout/Layout.vue @@ -15,7 +15,7 @@
- +
-- Gitee From a52477fcd48fbc03027af21191858527bfb0a2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B5=A9?= <1308369732@qq.com> Date: Mon, 9 Jul 2018 16:16:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/dev.env.js | 4 +- src/main.js | 4 +- src/store/getters.js | 2 + src/store/modules/account.js | 14 ++- src/styles/index.scss | 15 +++ src/styles/printCss/index.css | 8 ++ src/views/inbound/inboundPutaway.vue | 159 ++++++++++++++++++++++----- src/views/login/index.vue | 2 +- static/printCss/index.css | 9 ++ 9 files changed, 181 insertions(+), 36 deletions(-) diff --git a/config/dev.env.js b/config/dev.env.js index 88f629d..1e23e20 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,8 +5,8 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://113.105.88.142:8580/wms-admin"', // BASE_API: '"http://10.20.30.111/wms-admin/"', - BASE_API: '"http://10.2.4.40:8090/admin/"', - // BASE_API: '"http://10.2.6.12:8090"', + // BASE_API: '"http://10.2.4.40:8090/admin/"', + BASE_API: '"http://10.2.6.12:8090"', // BASE_API: '"http://localhost:8090"', BASE_API_LOGIN:'"http://10.20.30.111:8090/uaa"' }) diff --git a/src/main.js b/src/main.js index f4a3804..6c18787 100644 --- a/src/main.js +++ b/src/main.js @@ -11,7 +11,9 @@ import '@/filter/customFilters' // 自定义过滤器 import LODOP from 'static/plugIn/LodopFuncs' // import './mock' -Vue.use(ElementUI) +Vue.use(ElementUI, { + size: 'small' +}) Vue.config.productionTip = false diff --git a/src/store/getters.js b/src/store/getters.js index 8cbe96a..19cfed9 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -4,6 +4,8 @@ const getters = { avatar: state => state.account.avatar, name: state => state.account.name, roles: state => state.account.roles, + storehouses: state => state.account.storehouses, + currentStorehouse: state => state.account.currentStorehouse, entityName: state => state.account.entityName, allrouter: state => state.navs.routers, nav_routers: state => state.navs.addRouters, diff --git a/src/store/modules/account.js b/src/store/modules/account.js index c1b5f80..7c9b1db 100644 --- a/src/store/modules/account.js +++ b/src/store/modules/account.js @@ -7,7 +7,9 @@ const account = { token: getToken(), name: '', avatar: '', - roles: [] + roles: [], + storehouses: [], + currentStorehouse: {} }, mutations: { @@ -26,8 +28,11 @@ const account = { SET_ENTITYNAME: (state, entityName) => { state.entityName = entityName }, - SET_WAREHOUSE: (state, warehouse) => { - state.warehouse = warehouse + SET_STOREHOUSES: (state, storehouses) => { + state.storehouses = storehouses + }, + SET_CURRENT_STOREHOUSE: (state, storehouse) => { + state.currentStorehouse = storehouse } }, @@ -99,7 +104,8 @@ const account = { commit('SET_NAME', data.userName) commit('SET_AVATAR', data.avatar) commit('SET_ENTITYNAME', data.entityName) - commit('SET_WAREHOUSE', data.warehouse) + commit('SET_STOREHOUSES', data.storehouses) + commit('SET_CURRENT_STOREHOUSE', data.storehouses[0]) resolve(response) }).catch(error => { reject(error) diff --git a/src/styles/index.scss b/src/styles/index.scss index baab7c7..6c2ebd1 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -193,6 +193,9 @@ a:hover { .w400{ width: 400px; } +.w200{ + width: 200px!important; +} .fsc-keep div{ word-break:keep-all !important; } @@ -202,3 +205,15 @@ a:hover { .cell{ white-space:nowrap!important; } +.el-dialog{ + hr{ + border: 0.5px solid #d8dce5; + margin-bottom: 14px; + } +} +.el-dialog__body{ + padding: 0 0 10px 10px; +} +.el-dialog__header{ + padding: 15px 15px 2px; +} diff --git a/src/styles/printCss/index.css b/src/styles/printCss/index.css index 8256dc7..4fd541a 100644 --- a/src/styles/printCss/index.css +++ b/src/styles/printCss/index.css @@ -1,3 +1,11 @@ #big{ font-size: 65px; } +.print-QR-img{ + width: 160px; + height: 170px; + border: 1px solid #000; +} +.print-QR-row{ + margin-bottom: 50px; +} diff --git a/src/views/inbound/inboundPutaway.vue b/src/views/inbound/inboundPutaway.vue index c20cc49..05912c0 100644 --- a/src/views/inbound/inboundPutaway.vue +++ b/src/views/inbound/inboundPutaway.vue @@ -100,43 +100,85 @@ layout="total, sizes, prev, pager, next, jumper"> +
- + - - + + 入库确认 + 打印二维码 + + + + +
{{columnDetailDialogList.ownerOrderNo}}
- - + +
{{columnDetailDialogList.lotNo1}}
- - + +
{{columnDetailDialogList.materielName}}
- - + +
{{columnDetailDialogList.ownerId}}
- - + +
{{columnDetailDialogList.storeHouseName}}
- - + +
{{columnDetailDialogList.gmtCreate}}
- - + + - - + +
- - 取 消 - 入库确认 - + +
+
+ + + + + + + + 底盘号: + {{columnDetailDialogList.lotNo1}} + + + + + 库位号: + {{getStoreArea(columnDetailDialogList.storeAreaId)}} + {{getLocationName(columnDetailDialogList.storeAreaId, columnDetailDialogList.locationId)}} + + + + + 运单号: + {{columnDetailDialogList.ownerOrderNo}} + + + + +
+ + + 打印 + 取消 + + +
@@ -159,7 +201,7 @@ { key: 'driverName', title: '承运商联系人', width: '140' }, { key: 'driverPhone', title: '承运商联系人手机号', width: '240' }, { key: 'consignee', title: '收货员工', width: '' }, - { key: 'gmtCreate', title: '收货日期', width: '' }, + { key: 'gmtCreate', title: '收货日期', width: '180' }, { key: 'inspectStatus', title: '质检状态', width: '' }, { key: 'inspectRemark', title: '检验描述', width: '' }, { key: 'transferDriver', title: '移库司机', width: '' }, @@ -203,7 +245,10 @@ 'createDate', 'remarks' ], - columnDetailDialogList: {}, + columnDetailDialogList: { + storeAreaId: '', + locationId: '' + }, houseId: '100030', moreSearchVisible: false, page: { @@ -211,17 +256,24 @@ pageSize: 10, totalRecord: 0 }, - areas: [], + areas: [{ storeLocationList: [] }], + storeLocationList: [], loactions: [], dialogVisible: false, stockInitList: [], detailDialogList: [], - listLoading: false + listLoading: false, + printQRFlag: false, + temp: { + id: 1 + } } }, created() { this.list() this.queryUsableLocation() + console.log('当前库', this.$store.getters.currentStorehouse) + console.log('所有库', this.$store.getters.storehouses) }, watch: { columnCheckList(valArr) { @@ -241,6 +293,34 @@ // this.$refs.stockInitTable.clearSelection() // this.$refs.stockInitTable.toggleRowSelection(row) }, + // 打印二维码 + printQR() { + this.printQRFlag = true + }, + // 确认打印 + printQRConfirm() { + if (this.tools.checkPrintInstall()) { + this.tools.printHTML(document.getElementById('printQRBox').innerHTML, 790, 1) + } + }, + // 取消打印 + printQRCancel() { + this.printQRFlag = false + }, + // 获取库位名字 + getStoreArea(id) { + const t = this.areas.filter(i => i.storeAreaId === id)[0] + if (t) { + return t.storeAreaName + } else { + return '' + } + }, + getLocationName(id, id1) { + const t = this.areas.filter(i => i.storeAreaId === id)[0] + const s = t.storeLocationList.filter(i => i.id === id1) + return s[0].name + }, list() { const that = this // 更多 @@ -295,9 +375,9 @@ queryParam.houseId = this.houseId inbounAPI.inboundTaskSeachDetail(queryParam).then(result => { if (result.code === 0) { - this.queryUsableLocation() this.columnDetailDialogList = result.data this.columnDetailDialogList.lotNo1in = queryParam.key + this.queryUsableLocation() } else { this.$notify({ title: '信息提示', @@ -313,6 +393,9 @@ queryParam.houseId = this.houseId inbounAPI.queryUsableLocation(queryParam).then(result => { if (result.code === 0) { + this.storeLocationList = result.data[0].storeLocationList + this.columnDetailDialogList.storeAreaId = result.data[0].storeAreaId + this.columnDetailDialogList.locationId = result.data[0].storeLocationList[0].id this.areas = result.data console.log('Area:' + result.data) } else { @@ -383,20 +466,40 @@ this.page.pageNo = val this.list() }, - areasChange() { + areasChange(val) { const areaid = this.columnDetailDialogList.storeAreaId for (let i = 0; i < this.areas.length; i++) { if (this.areas[i].storeAreaId === areaid) { this.loactions = this.areas[i].storeLocationList + this.storeLocationList = this.areas[i].storeLocationList break } else { this.loactions = [] + this.storeLocationList = [] } } + + // 过滤路径 + const t = this.areas.filter(i => i.storeAreaId === val) + console.log('选择的路径ttt', t) + this.storeLocationList = t[0].storeLocationList + this.columnDetailDialogList.locationId = t[0].storeLocationList[0].id + console.log('选择的路径', this.storeLocationList) } } } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 25734d0..a32f699 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -50,7 +50,7 @@ export default { } return { loginForm: { - userKey: '15110288389', + userKey: '13049352358', password: '123456' }, loginRules: { diff --git a/static/printCss/index.css b/static/printCss/index.css index 8256dc7..911687d 100644 --- a/static/printCss/index.css +++ b/static/printCss/index.css @@ -1,3 +1,12 @@ #big{ font-size: 65px; } +.print-QR-img{ + border: 1px solid #000; + justify-content:center; + align-items: center; + height: 170px; +} +.print-QR-row{ + margin-bottom: 50px; +} -- Gitee From 432421e8ec569cf16cae711af2314e11079905a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B5=A9?= <1308369732@qq.com> Date: Mon, 9 Jul 2018 18:28:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8D=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/dev.env.js | 4 +- src/api/inbound/inboundPutaway.js | 9 ++++ src/utils/tools.js | 6 +-- src/views/inbound/inboundPutaway.vue | 79 ++++++++++++++++++---------- src/views/layout/AppMain.vue | 8 +-- static/printCss/index.css | 17 ++++-- 6 files changed, 82 insertions(+), 41 deletions(-) diff --git a/config/dev.env.js b/config/dev.env.js index 1e23e20..4b5832f 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,7 +6,9 @@ module.exports = merge(prodEnv, { // BASE_API: '"http://113.105.88.142:8580/wms-admin"', // BASE_API: '"http://10.20.30.111/wms-admin/"', // BASE_API: '"http://10.2.4.40:8090/admin/"', - BASE_API: '"http://10.2.6.12:8090"', + // BASE_API: '"http://10.2.6.12:8090"', + BASE_API: '"http://10.2.6.6:8090"', + // BASE_API: '"http://10.2.6.250:8090/"', // BASE_API: '"http://localhost:8090"', BASE_API_LOGIN:'"http://10.20.30.111:8090/uaa"' }) diff --git a/src/api/inbound/inboundPutaway.js b/src/api/inbound/inboundPutaway.js index e757884..7faaa5c 100644 --- a/src/api/inbound/inboundPutaway.js +++ b/src/api/inbound/inboundPutaway.js @@ -35,3 +35,12 @@ export function queryUsableLocation(data) { }) } +// 生成二维码 /inboundTask/printBarcode +export function printBarcode(data) { + return fetch({ + url: '/inboundTask/printBarcode', + method: 'post', + data: data + }) +} + diff --git a/src/utils/tools.js b/src/utils/tools.js index 9d17ab4..a3c44e5 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -23,11 +23,7 @@ export function checkPrintInstall(obj) { a.click() // window.open('static/plugin/Lodop6.220_CLodop3.020.zip') }).catch(() => { - Message({ - type: 'warning', - message: '未安装插件', - duration: 2 * 1000 - }); + // }); return false } diff --git a/src/views/inbound/inboundPutaway.vue b/src/views/inbound/inboundPutaway.vue index 05912c0..78330aa 100644 --- a/src/views/inbound/inboundPutaway.vue +++ b/src/views/inbound/inboundPutaway.vue @@ -12,7 +12,7 @@ + v-model="search.condition.key" @keyup.enter.native.prevent="list"> 搜索 @@ -99,17 +99,16 @@ :page-size="page.pageSize" :total="page.totalRecord" layout="total, sizes, prev, pager, next, jumper"> - +
- - - - + + 车架号(vin) + 入库确认 - 打印二维码 + 打印二维码 - +
{{columnDetailDialogList.ownerOrderNo}}
@@ -146,7 +145,7 @@ @@ -249,7 +248,6 @@ storeAreaId: '', locationId: '' }, - houseId: '100030', moreSearchVisible: false, page: { pageNo: 1, @@ -266,7 +264,8 @@ printQRFlag: false, temp: { id: 1 - } + }, + img_src_QR: '' } }, created() { @@ -295,6 +294,14 @@ }, // 打印二维码 printQR() { + inbounAPI.printBarcode({ + key: this.columnDetailDialogList.lotNo1, + houseId: this.$store.getters.currentStorehouse.id + }).then(res => { + if (res.code === 0) { + this.img_src_QR = 'data:image/png;base64,' + res.data + } + }) this.printQRFlag = true }, // 确认打印 @@ -307,19 +314,31 @@ printQRCancel() { this.printQRFlag = false }, + dialogVisibleClose() { + this.columnDetailDialogList = { + storeAreaId: '', + locationId: '' + } + }, // 获取库位名字 getStoreArea(id) { - const t = this.areas.filter(i => i.storeAreaId === id)[0] - if (t) { - return t.storeAreaName - } else { - return '' + if (id !== '' && id === null) { + const t = this.areas.filter(i => i.storeAreaId === id)[0] + if (t) { + return t.storeAreaName + } else { + return '' + } } + return '' }, getLocationName(id, id1) { - const t = this.areas.filter(i => i.storeAreaId === id)[0] - const s = t.storeLocationList.filter(i => i.id === id1) - return s[0].name + if (id && id1) { + const t = this.areas.filter(i => i.storeAreaId === id)[0] + const s = t.storeLocationList.filter(i => i.id === id1) + return s[0].name + } + return '' }, list() { const that = this @@ -335,7 +354,7 @@ // 分页 queryParam.current = this.page.pageNo queryParam.size = this.page.pageSize - queryParam.condition.houseId = this.houseId + queryParam.condition.houseId = this.$store.getters.currentStorehouse.id this.listLoading = true inbounAPI.inboundTaskQueryPage(queryParam).then(result => { if (result.code === 0) { @@ -355,7 +374,7 @@ ids.push(row.id) }) queryParam.lineIds = ids - queryParam.houseId = this.houseId + queryParam.houseId = this.$store.getters.currentStorehouse.id inbounAPI.inboundTaskPutAwayList(queryParam).then(result => { if (result.code === 0) { this.list() @@ -372,7 +391,7 @@ seachDetail() { const queryParam = {} queryParam.key = this.columnDetailDialogList.lotNo1in - queryParam.houseId = this.houseId + queryParam.houseId = this.$store.getters.currentStorehouse.id inbounAPI.inboundTaskSeachDetail(queryParam).then(result => { if (result.code === 0) { this.columnDetailDialogList = result.data @@ -390,7 +409,7 @@ }, queryUsableLocation() { const queryParam = {} - queryParam.houseId = this.houseId + queryParam.houseId = this.$store.getters.currentStorehouse.id inbounAPI.queryUsableLocation(queryParam).then(result => { if (result.code === 0) { this.storeLocationList = result.data[0].storeLocationList @@ -412,7 +431,7 @@ // const queryParam = this.columnDetailDialogList // queryParam.houseId = '100030' const queryParam = this.columnDetailDialogList - queryParam.houseId = this.houseId + queryParam.houseId = this.$store.getters.currentStorehouse.id queryParam.locationId = this.columnDetailDialogList.locationId queryParam.storeAreaId = this.columnDetailDialogList.storeAreaId inbounAPI.inboundTaskPutWay(queryParam).then(result => { @@ -489,14 +508,20 @@ } } -