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 {