From b82074dcd1261b6847b09e50a48072b5c5d29bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Mon, 28 Oct 2024 17:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=8F=91=E6=96=99=E4=B8=8D?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=9D=A5=E6=BA=90=E5=BA=93=E4=BD=8D=202024/8?= =?UTF-8?q?/8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/record/directIssue2.vue | 96 +++++++++++++------------ 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/src/pages/issue/record/directIssue2.vue b/src/pages/issue/record/directIssue2.vue index f66a01c0..18070a91 100644 --- a/src/pages/issue/record/directIssue2.vue +++ b/src/pages/issue/record/directIssue2.vue @@ -309,53 +309,55 @@ }, afterGetBalance(result) { - let balance = result.balance; - let label = result.label; - let pack = result.package; - let packUnit = pack.packUnit; - let packQty = pack.packQty - var item = this.detailSource.find(res => { - if (res.itemCode == balance.itemCode) { - return res - } - }) - if (this.fromWarehouseCode == '') { - this.fromWarehouseCode = balance.warehouseCode; - } - if (item == undefined) { - - var itemp = createItemInfo(balance, pack); - let newDetail = createDetailInfo(balance, pack); // - newDetail.parentNumber = pack.parentNumber; - newDetail.packingNumber = pack.number - newDetail.packUnit = packUnit; - newDetail.packQty = packQty; - itemp.subList.push(newDetail); - this.detailSource.push(itemp) - calcHandleQty(this.detailSource); - - } else { - var detail = item.subList.find(r => { - if (r.packingNumber == pack.number && - r.batch == balance.batch && - r.locationCode == balance.locationCode && - r.inventoryStatus == balance.inventoryStatus) { - return r; - } - }) - if (detail == undefined) { - let newDetail = createDetailInfo(balance, pack); - newDetail.parentNumber = pack.parentNumber; - newDetail.packingNumber = pack.number - newDetail.packUnit = packUnit; - newDetail.packQty = packQty; - item.subList.push(newDetail); - calcHandleQty(this.detailSource); - } else { - if (detail.scaned == true) { - this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]重复扫描 } - } - } + let balance = result.balance; + let label = result.label; + let pack = result.package; + let packUnit = pack.packUnit; + let packQty = pack.packQty + var item = this.detailSource.find(res => { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (this.fromWarehouseCode == '') { + this.fromWarehouseCode = balance.warehouseCode; + } + if (item == undefined) { + + var itemp = createItemInfo(balance, pack); + let newDetail = createDetailInfo(balance, pack); // + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = packUnit; + newDetail.packQty = packQty; + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + calcHandleQty(this.detailSource); + + } else { + var detail = item.subList.find(r => { + if (r.packingNumber == pack.number && + r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus) { + return r; + } + }) + if (detail == undefined) { + let newDetail = createDetailInfo(balance, pack); + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = packUnit; + newDetail.packQty = packQty; + item.subList.push(newDetail); + calcHandleQty(this.detailSource); + } + else { + if (detail.scaned == true) { + this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]重复扫描") + } + } + } },