From b393ec30e2a3bba4c518407b0a897abc312a78e4 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 29 Nov 2024 16:21:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/package/packageTarget.vue | 3 ++ .../package/record/mergePackageRecord.vue | 40 +++++++++---------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/mycomponents/package/packageTarget.vue b/src/mycomponents/package/packageTarget.vue index a1af74a0..ac84af7e 100644 --- a/src/mycomponents/package/packageTarget.vue +++ b/src/mycomponents/package/packageTarget.vue @@ -46,6 +46,9 @@ showPack() { this.$refs.scanPopup.openScanPopup(); }, + closePack() { + this.$refs.scanPopup.closeScanPopup(); + }, getScanResult(result) { this.$emit("getScanResult", result) } diff --git a/src/pages/package/record/mergePackageRecord.vue b/src/pages/package/record/mergePackageRecord.vue index 0740bce5..8307bd65 100644 --- a/src/pages/package/record/mergePackageRecord.vue +++ b/src/pages/package/record/mergePackageRecord.vue @@ -10,6 +10,9 @@ @@ -22,7 +25,7 @@ - @@ -150,7 +153,9 @@ return; } var itemp = createItemInfo(balance, pack); + itemp.containerNumber="" let newDetail = createDetailInfo(balance, pack); // + itemp.subList.push(newDetail); this.currentItemCode = balance.itemCode; this.detailSource.push(itemp) @@ -275,7 +280,7 @@ detail.toPackingNumber = this.toPackingNumber; detail.fromBatch = detail.batch; - detail.toBatch = detail.batch; + detail.toBatch = this.toBatch; detail.fromLocationCode = detail.locationCode; // detail.toLocationCode = detail.toLocationCode; @@ -294,13 +299,6 @@ if (res) {} }); }, - showErrorMessage(message) { - this.$refs.comMessage.showErrorMessage(message, res => { - if (res) { - - } - }); - }, showScanMessage(message) { this.$refs.comMessage.showScanMessage(message); @@ -333,24 +331,22 @@ }) }, - updateData() { - this.calcHandleQty(); - for (var i = 0; i < this.detailSource.length; i++) { - let item = this.detailSource[i]; - if (item.qty == 0) { - this.detailSource.splice(i, 1) - } - } - }, getToPackingNumber(result) { if(this.currentItemCode!=result.label.itemCode){ - this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode + + this.showErrorMessage("当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode + "]不一致,请扫描相同物料号") return; } - this.toPackingNumber = result.label.packingNumber; - this.toBatch =result.label.batch - + var item =this.detailSource[0].subList.find(r=>r.packingNumber==result.label.packingNumber) + if(item){ + this.showErrorMessage("目标箱码[" + result.label.packingNumber + "与来源箱码[" + item.packingNumber + + "]一致,请扫描不同箱码") + return; + }else { + this.toPackingNumber = result.label.packingNumber; + this.toBatch =result.label.batch + this.$refs.toPackingRef.closePack() + } } } }