From 2d7bb5873edb82c1e4e54ff12aed3d78f52c140e Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 24 Jun 2024 19:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E6=96=B9=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/api/index.js | 9 ++ .../comThirdLocationRequestItem.vue | 6 +- fe/PDA/mycomponents/coms/task/comThird.vue | 2 +- fe/PDA/pages.js | 4 +- fe/PDA/pages.json | 4 +- fe/PDA/pages/record/productionReturn.vue | 6 +- fe/PDA/pages/record/productionReturnPack.vue | 130 +++++++++++------- fe/PDA/pages/request/thirdLocationRequest.vue | 3 + .../thirdLocationRequestListDetail.vue | 6 +- fe/PDA/pages/task/thirdLocationJob.vue | 4 +- fe/PDA/pages/task/thirdLocationJobDetail.vue | 12 +- 11 files changed, 122 insertions(+), 64 deletions(-) diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js index 631c9a113..55613b8ce 100644 --- a/fe/PDA/api/index.js +++ b/fe/PDA/api/index.js @@ -1548,6 +1548,15 @@ export const getThirdLocationList = (params) => request( data: params }); +export const getThirdLocationList1 = (params) => request( + devUrl + "/api/pda/job/third-location/list", { + method: 'post', + data: {"condition":{"filters":[]},"Sorting":"","SkipCount":0,"MaxResultCount":20} + }); + + + + //根据Number 获取三方库收货任务 export const getThirdLocationJobByNumber = (number) => request( devUrl + "/api/pda/job/third-location/by-number/" + number, { diff --git a/fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue b/fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue index 48bccf740..687b32e5e 100644 --- a/fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue +++ b/fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue @@ -29,12 +29,12 @@ - + - - diff --git a/fe/PDA/mycomponents/coms/task/comThird.vue b/fe/PDA/mycomponents/coms/task/comThird.vue index 1250744eb..cde73f952 100644 --- a/fe/PDA/mycomponents/coms/task/comThird.vue +++ b/fe/PDA/mycomponents/coms/task/comThird.vue @@ -28,7 +28,7 @@ - + diff --git a/fe/PDA/pages.js b/fe/PDA/pages.js index 6163f239e..b7be7c1f2 100644 --- a/fe/PDA/pages.js +++ b/fe/PDA/pages.js @@ -695,14 +695,14 @@ module.exports = () => ({ { "path": "pages/record/productionReturn", "style": { - "navigationBarTitleText": "客户退货(单件码)", + "navigationBarTitleText": "客户退货单件码", "enablePullDownRefresh": true } }, { "path": "pages/record/productionReturnPack", "style": { - "navigationBarTitleText": "客户退货(箱码)", + "navigationBarTitleText": "客户退货箱码", "enablePullDownRefresh": true } }, diff --git a/fe/PDA/pages.json b/fe/PDA/pages.json index 38ae9fec3..b545f0f7b 100644 --- a/fe/PDA/pages.json +++ b/fe/PDA/pages.json @@ -680,14 +680,14 @@ { "path": "pages/record/productionReturn", "style": { - "navigationBarTitleText": "客户退货(单件码)", + "navigationBarTitleText": "客户退货单件码", "enablePullDownRefresh": true } }, { "path": "pages/record/productionReturnPack", "style": { - "navigationBarTitleText": "客户退货(箱码)", + "navigationBarTitleText": "客户退货箱码", "enablePullDownRefresh": true } }, diff --git a/fe/PDA/pages/record/productionReturn.vue b/fe/PDA/pages/record/productionReturn.vue index 764c68740..c2913a4c8 100644 --- a/fe/PDA/pages/record/productionReturn.vue +++ b/fe/PDA/pages/record/productionReturn.vue @@ -168,7 +168,7 @@ if (res) { this.allDataList.splice(index, 1); this.allCount = this.allDataList.length; - var title =this.allCount>0?"客户退货单件码"+"("+this.allCount+")":"客户退货" + var title =this.allCount>0?"客户退货单件码"+"("+this.allCount+")":"客户退货单件码" uni.setNavigationBarTitle({ title: title }) @@ -200,7 +200,7 @@ this.allDataList.unshift(item) this.allCount = this.allDataList.length; uni.setNavigationBarTitle({ - title: "客户退货"+"("+this.allCount+")" + title: "客户退货单件码"+"("+this.allCount+")" }) this.$forceUpdate(); @@ -409,7 +409,7 @@ this.allCount = 0; this.loadingType = "" uni.setNavigationBarTitle({ - title: "客户退货" + title: "客户退货单件码" }) this.$refs.comCollapseLocation.clearLocation(); }, diff --git a/fe/PDA/pages/record/productionReturnPack.vue b/fe/PDA/pages/record/productionReturnPack.vue index 2403fa9b0..2eac6ef4e 100644 --- a/fe/PDA/pages/record/productionReturnPack.vue +++ b/fe/PDA/pages/record/productionReturnPack.vue @@ -2,7 +2,7 @@ - + @@ -18,6 +18,14 @@ 箱码 {{item.packingCode}} + + 批次 + {{item.lot}} + + + 库位 + {{item.recommendLocationCode}} + 单位 {{item.uom}} @@ -119,7 +127,7 @@ return { options: [], currentItem: {}, - toLocationInfo:{}, + toLocationInfo: {}, toLocationCode: "", allCount: 0, allDataList: [], @@ -133,8 +141,7 @@ props: { }, - onLoad() { - }, + onLoad() {}, onPullDownRefresh() { uni.stopPullDownRefresh() }, @@ -152,7 +159,7 @@ }, methods: { - + qtyChanged(value, item, index) { if (value <= 0) { this.showMessage('退货数量必须大于0') @@ -165,7 +172,7 @@ if (res) { this.allDataList.splice(index, 1); this.allCount = this.allDataList.length; - var title =this.allCount>0?"客户退货"+"("+this.allCount+")":"客户退货" + var title = this.allCount > 0 ? "客户退货箱码" + "(" + this.allCount + ")" : "客户退货箱码" uni.setNavigationBarTitle({ title: title }) @@ -175,7 +182,7 @@ }, getScanResult(result) { - var resultData =result.data + var resultData = result.data var filterItem = this.allDataList.filter(res => { if (res.packingCode == resultData.code) { return res; @@ -186,23 +193,41 @@ return; } - var item = { - packingCode:resultData.code, - itemCode: resultData.itemCode, - itemName: resultData.itemName, - itemDesc1: resultData.itemDesc1, - stdPackQty: resultData.stdPackQty, - uom: resultData.uom, - qty: resultData.stdPackQty + locations(resultData.recommendLocationCode).then(res => { + if (res) { + //不用隔离、在途、待检 + if (res.type == 1 || res.type == 6 || res.type == 13) { + that.showMessage("来源库位不可以是待检、隔离、在途库位类型"); + } else { + var item = { + packingCode: resultData.code, + itemCode: resultData.itemCode, + itemName: resultData.itemName, + itemDesc1: resultData.itemDesc1, + stdPackQty: resultData.stdPackQty, + lot:resultData.lot, + recommendLocationCode:resultData.recommendLocationCode, + uom: resultData.uom, + qty: resultData.qty + + } + this.allDataList.unshift(item) + this.allCount = this.allDataList.length; + uni.setNavigationBarTitle({ + title: "客户退货箱码" + "(" + this.allCount + ")" + }) + + this.$forceUpdate(); + } + } else { + this.showMessage('来源库位【' + resultData.recommendLocationCode + '】不存在'); + } - } - this.allDataList.unshift(item) - this.allCount = this.allDataList.length; - uni.setNavigationBarTitle({ - title: "客户退货"+"("+this.allCount+")" + }).catch(err => { + this.showMessage(err.message); }) - - this.$forceUpdate(); + + }, @@ -215,16 +240,27 @@ locations(locationCode).then(res => { uni.hideLoading(); if (res) { - this.toLocationInfo =res; - this.toLocationCode = res.code + if (res.type == 2) { + this.toLocationInfo = res; + this.toLocationCode = res.code + } else { + this.toLocationInfo = {} + this.toLocationCode = "" + this.$refs.comCollapseLocation.clearLocation(); + this.showMessage('目标库位必须是原料库位类型'); + } } else { + this.toLocationInfo = {} + this.toLocationCode = "" this.showMessage('目标库位【' + locationCode + '】不存在'); + this.$refs.comCollapseLocation.clearLocation(); } }).catch(err => { uni.hideLoading(); - this.toLocationInfo={} + this.toLocationInfo = {} this.toLocationCode = "" + this.$refs.comCollapseLocation.clearLocation(); this.showMessage(err.message); }) @@ -244,9 +280,9 @@ this.showMessage('请扫描目标库位'); return; } - var checkQtyItem =this.checkQty() - if(checkQtyItem!=undefined){ - this.showMessage("【"+checkQtyItem.itemCode+'】数量为0,退货数量必须大于0'); + var checkQtyItem = this.checkQty() + if (checkQtyItem != undefined) { + this.showMessage("【" + checkQtyItem.itemCode + '】数量为0,退货数量必须大于0'); return; } @@ -256,27 +292,26 @@ }); let params = this.setSubmitParam(); - console.log( JSON.stringify(params) ) + console.log(JSON.stringify(params)) customerReturnCommit(params) .then(res => { uni.hideLoading(); this.showCommitSuccess(); this.clearInfo(); - + }) .catch(err => { uni.hideLoading(); this.showMessage(err.message); - }); }, - - checkQty(){ - var isCheck =true; - var result =undefined + + checkQty() { + var isCheck = true; + var result = undefined for (let item of this.allDataList) { - if(item.qty==0){ - result =item + if (item.qty == 0) { + result = item break } } @@ -296,16 +331,19 @@ uom: res.uom, qty: res.qty, stdPackQty: res.stdPackQty, - toLocationCode:this.toLocationCode, - toLocationArea:this.toLocationInfo.areaCode, - toLocationGroup:this.toLocationInfo.locationGroupCode, - toLocationErpCode:this.toLocationInfo.erpLocationCode, - recommendPackingCode :res.packingCode, - handledPackingCode :res.packingCode + toLocationCode: this.toLocationCode, + toLocationArea: this.toLocationInfo.areaCode, + toLocationGroup: this.toLocationInfo.locationGroupCode, + toLocationErpCode: this.toLocationInfo.erpLocationCode, + recommendPackingCode: res.packingCode, + recommendLot: res.lot, + handledPackingCode: res.packingCode, + handledLot: res.lot, + handledQty:res.qty } item.details.push(detail) }) - + return item; }, @@ -405,12 +443,12 @@ clearInfo() { this.allDataList = []; - this.toLocationInfo={} + this.toLocationInfo = {} this.toLocationCode = ""; this.allCount = 0; this.loadingType = "" uni.setNavigationBarTitle({ - title: "客户退货" + title: "客户退货箱码" }) this.$refs.comCollapseLocation.clearLocation(); }, diff --git a/fe/PDA/pages/request/thirdLocationRequest.vue b/fe/PDA/pages/request/thirdLocationRequest.vue index 257a9f5ec..78d2d486e 100644 --- a/fe/PDA/pages/request/thirdLocationRequest.vue +++ b/fe/PDA/pages/request/thirdLocationRequest.vue @@ -405,6 +405,9 @@ itemDesc1: res.itemDesc1, uom: res.uom, qty: res.qty, + packingCode:"", + lot:"", + enumInventoryStatus:2, singleCodeRequest:res.singleCodeRequest, stdPackQty: res.stdPackQty, toLocationCode:this.toLocationCode, diff --git a/fe/PDA/pages/request/thirdLocationRequestListDetail.vue b/fe/PDA/pages/request/thirdLocationRequestListDetail.vue index 6bb45e310..6cbb6ad4c 100644 --- a/fe/PDA/pages/request/thirdLocationRequestListDetail.vue +++ b/fe/PDA/pages/request/thirdLocationRequestListDetail.vue @@ -69,10 +69,10 @@
- - -
diff --git a/fe/PDA/pages/task/thirdLocationJob.vue b/fe/PDA/pages/task/thirdLocationJob.vue index 928601cee..ae5a4aa3d 100644 --- a/fe/PDA/pages/task/thirdLocationJob.vue +++ b/fe/PDA/pages/task/thirdLocationJob.vue @@ -16,7 +16,7 @@