From b6b3888d74f9f4c02e37b75d1045a41f9b75946f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 16 Oct 2024 15:16:47 +0800 Subject: [PATCH] =?UTF-8?q?YT-406=E8=A3=85=E9=85=8D=E5=88=B6=E5=93=81?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=EF=BC=8Cpc=E7=94=B3=E8=AF=B7=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E7=89=A9=E6=96=99=E4=B8=8D=E5=90=8C=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=EF=BC=8Cpda=E6=98=BE=E7=A4=BA=E6=88=90=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E4=B8=80=E5=85=B1=E7=9A=84=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E4=B8=8D=E5=90=8C=E6=89=B9=E6=AC=A1=E5=88=86?= =?UTF-8?q?=E5=BC=80=E6=98=BE=E7=A4=BA=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/detail.js | 2 +- .../job/productPutawayDetail.vue | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/common/detail.js b/src/common/detail.js index ac1b3ed2..47e53bb7 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -49,7 +49,7 @@ export function getDataSource(subList) { let items = []; subList.forEach(detail => { var item = items.find(r => - r.itemCode == detail.itemCode) + r.itemCode == detail.itemCode && r.batch == detail.batch ) if (item == undefined) { item = createItemInfo(detail); let newDetail = createDetailInfo(detail); // diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index bc151e08..22479ff0 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -334,15 +334,24 @@ 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.batch == batch && - r.fromLocationCode == result.fromLocationCode - }) - if (itemDetail == undefined) { + // var itemDetail = detail.subList.find(r => { + // return r.batch == result.label.batch && + // r.fromLocationCode == result.fromLocationCode + // }) + let itemDetail = '' + this.detailSource.find(item => { + const itemDetail1 = item.subList.find(r => { + return r.batch == result.label.batch && r.fromLocationCode == result.fromLocationCode + }) + if(itemDetail1){ + itemDetail = itemDetail1 + } + console.log(99,itemDetail1) + }); + if (!itemDetail) { this.showErrorMessage("批次【" + batch + "】库位【" + result .fromLocationCode + "】不在列表中") } else { @@ -379,6 +388,7 @@ } } } catch (e) { + console.log(2333,e) this.showMessage(e.message) } },