From 51dff0cde3a4ac40a7de4fffe9e87a6b5bf5f81a Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Wed, 3 Jul 2024 17:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/main.js | 48 +++++++-------- fe/PDA/pages/task/countFgDetail.vue | 9 ++- fe/PDA/pages/task/countRawDetail.vue | 7 +-- fe/PDA/pages/task/sparePartIssueJobDetail.vue | 33 ++++++++--- fe/PDA/router/index.js | 2 +- fe/PDA/static/config.js | 59 +++++++++++++++++++ 6 files changed, 115 insertions(+), 43 deletions(-) create mode 100644 fe/PDA/static/config.js diff --git a/fe/PDA/main.js b/fe/PDA/main.js index 5ffd766e4..94d0f00d6 100644 --- a/fe/PDA/main.js +++ b/fe/PDA/main.js @@ -6,36 +6,32 @@ import url from './common/config.js' import modelConfig from './common/modelConfig.js' import utils from './common/utils.js' import uView from "./uni_modules/uview-ui"; +import config from "./static/config.js" +let initData =function(){ + Vue.prototype.$dev_url = config.params.dev; + console.log("请求地址11",Vue.prototype.$dev_url) + Vue.prototype.$companyCode = config.params.companyCode; + Vue.prototype.$warehouseCode = config.params.warehouseCode; + Vue.prototype.$putawayLocationTypes = config.params.putawayLocationTypes; //创建上架任务的库存类型 + Vue.prototype.$putawayInventoryStatus = config.params.putawayInventoryStatus; //创建上架任务的库存状态 + Vue.prototype.$print_url = config.params.print_url; //打印的服务地址 + Vue.prototype.$isScrapScanToLocation = config.params.isScrapScanToLocation; //原料报废是否显示库位 + Vue.prototype.$isReceiptToday = config.params.isReceiptToday; //采购收货是否只看今天的采购任务 + + Vue.prototype.$scrapReason = config.params.scrapReason; //原料报废原因字典项 + Vue.prototype.$purchaseReturnReason = config.params.purchaseReturnReason; //采购退货原因字典项 + Vue.prototype.$returnBeforPutawayReason = config.params.returnBeforPutawayReason; //上架前退货原因字典项 + Vue.prototype.$receiptCheckReason = config.params.receiptCheckReason; //采购收货不合格原因字典项 + + Vue.prototype.$configList = config.configList; + // getApp().globalData.text = config.params.version_update_url; +} + +initData() // import message from "@/common/message"; import axios from 'axios'; -let startApp = function() { - console.log('startApp', 'startApp') - uni.request({ - url: `./static/config.json?t=${new Date().getTime()}` - }).then(res => { - //在配置中读url,company等信息 - Vue.prototype.$dev_url = res[1].data.params.dev; - console.log("请求地址",Vue.prototype.$dev_url) - Vue.prototype.$companyCode = res[1].data.params.companyCode; - Vue.prototype.$warehouseCode = res[1].data.params.warehouseCode; - Vue.prototype.$putawayLocationTypes = res[1].data.params.putawayLocationTypes; //创建上架任务的库存类型 - Vue.prototype.$putawayInventoryStatus = res[1].data.params.putawayInventoryStatus; //创建上架任务的库存状态 - Vue.prototype.$print_url = res[1].data.params.print_url; //打印的服务地址 - Vue.prototype.$isScrapScanToLocation = res[1].data.params.isScrapScanToLocation; //原料报废是否显示库位 - Vue.prototype.$isReceiptToday = res[1].data.params.isReceiptToday; //采购收货是否只看今天的采购任务 - - Vue.prototype.$scrapReason = res[1].data.params.scrapReason; //原料报废原因字典项 - Vue.prototype.$purchaseReturnReason = res[1].data.params.purchaseReturnReason; //采购退货原因字典项 - Vue.prototype.$returnBeforPutawayReason = res[1].data.params.returnBeforPutawayReason; //上架前退货原因字典项 - Vue.prototype.$receiptCheckReason = res[1].data.params.receiptCheckReason; //采购收货不合格原因字典项 - Vue.prototype.$configList = res[1].data.configList; - getApp().globalData.text = res[1].data.params.version_update_url; - - }) -} -startApp() import VueAxios from 'vue-axios'; import './router/index'; //引入拦截 // import './router/router.js'; diff --git a/fe/PDA/pages/task/countFgDetail.vue b/fe/PDA/pages/task/countFgDetail.vue index abc8baec4..2dcb34cce 100644 --- a/fe/PDA/pages/task/countFgDetail.vue +++ b/fe/PDA/pages/task/countFgDetail.vue @@ -82,8 +82,7 @@ {{item.lot}} --> - - + + {{ item.status | statusColor}} @@ -417,7 +416,7 @@ item.isNew =true; this.setQty(item, item.inventoryQty, true); } else { - this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据'); + this.showMessage('盘点数量异常,ERP物料号【' + itemCode + '】的出现多条数据'); } }, diff --git a/fe/PDA/pages/task/countRawDetail.vue b/fe/PDA/pages/task/countRawDetail.vue index 863940c32..7ec69b474 100644 --- a/fe/PDA/pages/task/countRawDetail.vue +++ b/fe/PDA/pages/task/countRawDetail.vue @@ -85,8 +85,7 @@ {{item.lot}} - - + + {{ item.status | statusColor}} diff --git a/fe/PDA/pages/task/sparePartIssueJobDetail.vue b/fe/PDA/pages/task/sparePartIssueJobDetail.vue index 08f146142..3fc059530 100644 --- a/fe/PDA/pages/task/sparePartIssueJobDetail.vue +++ b/fe/PDA/pages/task/sparePartIssueJobDetail.vue @@ -62,7 +62,7 @@ - + @@ -159,7 +159,6 @@ - { + uni.hideLoading(); + if (res) { + current.handledToLocationCode = res.code + current.handledToLocationArea = res.locationArea + current.handledToLocationGroup = res.locationGroup + current.handledToLocationErpCode = res.locationErpCode + } else { + this.showMessage('未查找到库位【' + locationCode + '】'); + } + + }).catch((err) => { + this.showMessage(err.message); + }) + }, + //加载零件信息 getDetail() { let that = this; @@ -432,6 +449,7 @@ item.handledFromQty = balancesItem.qty item.handledFromLocationCode = balancesItem.locationCode item.handleToPackingCodeLocationCode = balancesItem.locationCode + this.getToLocation(this.details[0].recommendToLocationCode) } else { showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item .recommendToLot + "]不一致,是否继续发料", res => { @@ -458,6 +476,7 @@ item.handledFromQty = balancesItem.qty item.handledFromLocationCode = balancesItem.locationCode item.handleToPackingCodeLocationCode = balancesItem.locationCode + this.getToLocation(this.details[0].recommendToLocationCode) } }) } diff --git a/fe/PDA/router/index.js b/fe/PDA/router/index.js index 9d57528cc..833667d34 100644 --- a/fe/PDA/router/index.js +++ b/fe/PDA/router/index.js @@ -31,7 +31,7 @@ uni.addInterceptor('navigateTo', { return true }, success (e) { - versionTool.isNewVersion() + // versionTool.isNewVersion() } }) diff --git a/fe/PDA/static/config.js b/fe/PDA/static/config.js new file mode 100644 index 000000000..c06ff6c7a --- /dev/null +++ b/fe/PDA/static/config.js @@ -0,0 +1,59 @@ +const configList = [{ + "name": "公司代码", + "value": "DongYang" + }, { + "name": "仓库代码", + "value": "T9" + }, + { + "name": "服务地址", + "value": "http://dev.ccwin-in.com:60099" + }, + { + "name": "原料报废扫描库位", + "value": "否" + }, + { + "name": "只看当天采购任务", + "value": "是" + } + ] + + const params = { + "companyCode": "DongYang", + "warehouseCode": "T9", + "putawayLocationTypes": "1,2,3,4", + "putawayInventoryStatus": "2", + "dev": "http://dev.ccwin-in.com:60099", + "print_url": "http://dev.ccwin-in.com:59095", + "version_update_url": "http://dev.ccwin-in.com:60071", + "isScrapScanToLocation": false, + "isReceiptToday": false, + "scrapReason": "ScrapReason", + "purchaseReturnReason": "PurReturnReason", + "returnBeforPutawayReason": "UnqualifiedReason", + "receiptCheckReason": "UnqualifiedReason" + } + const desc = { + "companyCode": "公司代码", + "warehouseCode": "仓库代码", + "putawayLocationTypes": "上架库位类型", + "putawayInventoryStatus": "上架库存状态", + "dev": "api请求地址", + "print_url": "", + "version_update_url": "版本更新地址", + "isScrapScanToLocation": "原料报废是否显示扫描库位(false : 不显示扫描库位,true:显示扫描库位)", + "isReceiptToday": "采购收货是否只看今天的采购任务 (false : 看所有,true:只看今天):", + "ScrapReason": "原料报废原因字典项", + "purchaseReturnReason": "采购退货原因字典项", + "returnBeforPutawayReason": "上架前退货原因字典项", + "receiptCheckReason": "采购收货不合格原因字典项" + } + + + +export default { + configList, + params, + desc +}