From da22c6395014ce5ba65e77514793634d636c084b Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 27 Aug 2024 19:50:19 +0800 Subject: [PATCH] =?UTF-8?q?HL-5676=20=E7=9B=B4=E6=8E=A5=E5=8F=91=E6=96=99?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=89=AB=E6=8F=8F=E5=A4=9A=E4=B8=AA=E7=89=A9?= =?UTF-8?q?=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/record/directIssue.vue | 50 +++++++++----------------- 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue index f1ba1da2..68a74ac8 100644 --- a/src/pages/issue/record/directIssue.vue +++ b/src/pages/issue/record/directIssue.vue @@ -4,19 +4,13 @@ - - - - 来源库位 : {{fromLocationCode}} - - - + @@ -79,7 +73,6 @@ getBusinessType, createItemInfo, createDetailInfo, - calcTreeHandleQty, calcHandleQty } from '@/common/record.js'; @@ -200,11 +193,11 @@ let pack = result.package; - if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this - .fromLocationCode + "]没有库存余额") - return; - } + // if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { + // this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this + // .fromLocationCode + "]没有库存余额") + // return; + // } var item = this.detailSource.find(res => { if (res.itemCode == balance.itemCode) { @@ -212,15 +205,13 @@ } }) if (item == undefined) { - if (this.itemCode != "" && this.itemCode != balance.itemCode) { - this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码") - return; - } if (this.fromWarehouseCode == '') { this.fromWarehouseCode = balance.warehouseCode; } var itemp = createItemInfo(balance, pack); let newDetail = createDetailInfo(balance, pack); // + newDetail.fromLocationCode=balance.locationCode + newDetail.parentNumber = pack.parentNumber; newDetail.packingNumber = pack.number newDetail.packUnit = pack.packUnit; @@ -237,7 +228,7 @@ var detail = item.subList.find(r => { if (r.packingNumber == pack.number && r.batch == balance.batch && - r.locationCode == balance.locationCode && + r.fromLocationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) { return r; } @@ -249,7 +240,8 @@ if (pack.parentNumber) { var checkData = item.subList.find(r => { if (r.packingNumber == pack.parentNumber && - r.batch == balance.batch) { + r.batch == balance.batch&& + r.fromLocationCode == balance.locationCode) { return r; } }) @@ -264,6 +256,7 @@ newDetail.packingNumber = pack.number newDetail.packUnit = pack.packUnit; newDetail.packQty = pack.packQty; + newDetail.fromLocationCode=balance.locationCode if (balance.lableQty) { newDetail.handleQty = balance.lableQty } @@ -273,7 +266,8 @@ //扫描的是父包装 var checkData = item.subList.find(r => { if (r.parentNumber == pack.number && - r.batch == balance.batch) { + r.batch == balance.batch&& + r.fromLocationCode == balance.locationCode) { return r; } }) @@ -288,6 +282,7 @@ newDetail.packingNumber = pack.number newDetail.packUnit = pack.packUnit; newDetail.packQty = pack.packQty; + newDetail.fromLocationCode=balance.locationCode if (balance.lableQty) { newDetail.handleQty = balance.lableQty } @@ -297,6 +292,7 @@ console.log("扫描的是父包装,是否移除子包装") } else { let newDetail = createDetailInfo(balance, pack); + newDetail.fromLocationCode=balance.locationCode newDetail.parentNumber = pack.parentNumber; newDetail.packingNumber = pack.number newDetail.packUnit = pack.packUnit; @@ -326,18 +322,6 @@ }); }, - calcTreeHandleQty() { - for (let item of this.detailSource) { - item.qty = 0; - for (let detail of item.subList) { - if (detail != undefined) { - item.qty = calc.add(item.qty, detail.qty) - } - } - } - this.$forceUpdate(); - }, - showSelect() { // if (this.editPosition) { this.show = true