From 7bc799a18191a00bcbbd16e18979a0b3076cb113 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 24 Aug 2023 13:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E4=B8=8A?= =?UTF-8?q?=E6=9E=B6=E5=8F=AA=E8=83=BD=E4=B8=8A=E6=9E=B6=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/pages/putaway/purchasePutaway.vue | 57 +++++++++++++++++------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/fe/PDA/pages/putaway/purchasePutaway.vue b/fe/PDA/pages/putaway/purchasePutaway.vue index 6bef617a6..49a3893e0 100644 --- a/fe/PDA/pages/putaway/purchasePutaway.vue +++ b/fe/PDA/pages/putaway/purchasePutaway.vue @@ -11,8 +11,15 @@ + + 采购订单 : {{poNumber}} + + + + + @@ -96,6 +103,7 @@ recommendErpLocationCode: '', currentLabel: null, reScanItem: null, //重复的箱码 + poNumber: "" }; }, props: { @@ -108,7 +116,7 @@ onNavigationBarButtonTap(e) { if (e.index === 0) { goHome(); - }else if(e.index === 1){ + } else if (e.index === 1) { window.location.reload(); } }, @@ -149,6 +157,9 @@ }) this.itemList.splice(itemIndex, 1) } + if (this.itemList == 0) { + this.poNumber = "" + } }, getScanResult(result) { @@ -158,6 +169,17 @@ let itemInfo = that.itemList.find(r => { return r.itemCode == result.data.itemCode }) + + console.log("采购订单" + this.poNumber) + if (this.poNumber == "") { + this.poNumber = that.currentLabel.poNumber + } else { + if (this.poNumber != that.currentLabel.poNumber) { + this.showMessage("当前采购订单是号[" + this.poNumber + "]与扫描的箱码["+code+"]对应的采购订单号[" + that.currentLabel.poNumber + "]不一致") + return; + } + } + let params = JSON.stringify(that.currentLabel); console.log('采购上架', params); if (itemInfo == undefined) { @@ -441,31 +463,32 @@ let item = { number: "", - worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN, + worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, jobNumber: "", details: [] } that.itemList.forEach(i => { i.labelList.forEach(r => { - r.toLocationCode = this.location.code; - r.toLocationGroup = this.location.locationGroupCode; - r.toLocationArea = this.location.areaCode; - r.toLocationErpCode = this.location.erpLocationCode; - item.details.push(r); + r.toLocationCode = this.location.code; + r.toLocationGroup = this.location.locationGroupCode; + r.toLocationArea = this.location.areaCode; + r.toLocationErpCode = this.location.erpLocationCode; + item.details.push(r); }) }) + console.log("采购订单" + this.poNumber) let params = JSON.stringify(item); - purchasePutaway(params) - .then(res => { - that.showCommitSuccess(); - that.clearInfo(); - uni.hideLoading(); - }) - .catch(err => { - that.showMessage(err.message); - uni.hideLoading(); - }); + // purchasePutaway(params) + // .then(res => { + // that.showCommitSuccess(); + // that.clearInfo(); + // uni.hideLoading(); + // }) + // .catch(err => { + // that.showMessage(err.message); + // uni.hideLoading(); + // }); }, cancel() {