From e6cc5cb565dfc761cf5d16c297739cb0d942b9bb Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 11:59:41 +0800 Subject: [PATCH] =?UTF-8?q?YT-585=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=EF=BC=8Cpda=E6=89=AB=E7=AE=B1=E7=AD=BE?= =?UTF-8?q?=EF=BC=8C=E5=B8=A6=E5=87=BA=E6=89=80=E6=9C=89=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E4=B8=8D=E6=98=AF=E7=AE=B1=E7=AD=BE?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E5=BA=94=E5=B8=A6=E5=87=BA=E7=AE=B1?= =?UTF-8?q?=E7=AD=BE=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unPlanned/job/issueJobDetail.vue | 71 +++++++++++++++++++--- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue index 9f548107..b9188d32 100644 --- a/src/pages/unPlanned/job/issueJobDetail.vue +++ b/src/pages/unPlanned/job/issueJobDetail.vue @@ -250,6 +250,13 @@ }, getScanResult(result) { + if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + }, + setDataBatch(result){ try { var packingNumber = result.balance.packingNumber; var batch = result.balance.batch; @@ -258,13 +265,12 @@ var locationCode = result.balance.locationCode; var inventoryStatus = result.balance.inventoryStatus; var detail = this.detailSource.find(r => r.itemCode == itemCode); - + if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { var itemDetail = detail.subList.find(r => { - return r.packingNumber == packingNumber && - r.batch == batch && + return r.batch == batch && r.fromLocationCode == result.fromLocationCode&& r.isRecommend==false }) @@ -273,7 +279,7 @@ itemCode:itemCode, packingNumber:packingNumber, batch:batch, - handleQty:detail.qty r.itemCode == itemCode); + + if (detail == undefined) { + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + } else { + var itemDetail = detail.subList.find(r => { + return r.packingNumber == packingNumber && + r.batch == batch && + r.fromLocationCode == result.fromLocationCode&& + r.isRecommend==false + }) + if (itemDetail == undefined) { + var newAdd = { + itemCode:itemCode, + packingNumber:packingNumber, + batch:batch, + handleQty:detail.qty {