From 478c6aea493a0776cbc0aa490fbba9eae0694627 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 9 Jan 2024 14:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E3=80=81?= =?UTF-8?q?=E8=A1=A5=E6=96=99=E6=89=AB=E6=8F=8F=E4=B8=8D=E6=98=AF=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E6=89=B9=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deliver/record/deliverRecord.vue | 2 +- pages/issue/coms/comScanIssuePack.vue | 6 +- pages/issue/job/issueDetail.vue | 9 +-- pages/repleinsh/coms/comScanReplishPack.vue | 5 +- pages/repleinsh/job/repleinshDetail.vue | 85 +++++++++++---------- 5 files changed, 59 insertions(+), 48 deletions(-) diff --git a/pages/deliver/record/deliverRecord.vue b/pages/deliver/record/deliverRecord.vue index f4e9945e..271de003 100644 --- a/pages/deliver/record/deliverRecord.vue +++ b/pages/deliver/record/deliverRecord.vue @@ -121,7 +121,7 @@ }, onLoad(option) { - var typeCode = "DeliverRecord" + var typeCode = "Deliver" getBusinessType(typeCode, res => { if (res.success) { this.businessType = res.businessType; diff --git a/pages/issue/coms/comScanIssuePack.vue b/pages/issue/coms/comScanIssuePack.vue index 6b4b6019..d594bcef 100644 --- a/pages/issue/coms/comScanIssuePack.vue +++ b/pages/issue/coms/comScanIssuePack.vue @@ -321,11 +321,15 @@ ) } } else { - if (this.jobContent.AllowModifyBatch == null) { + if (this.jobContent.allowModifyBatch == "TRUE") { this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + '】的发料明细,是否要继续发料?', res => { if (res) { let batch = that.createBatchInfo(label, balance,packageInfo); + //新增加的批次赋值details + if(fromLocation.Batchs.length>0){ + batch.detail = fromLocation.Batchs[0].detail; + } fromLocation.Batchs.unshift(batch); } }) diff --git a/pages/issue/job/issueDetail.vue b/pages/issue/job/issueDetail.vue index d8641f96..015ff2df 100644 --- a/pages/issue/job/issueDetail.vue +++ b/pages/issue/job/issueDetail.vue @@ -277,7 +277,7 @@ }, setParams() { - var subList = [] + var commitSubList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id this.detailSource.forEach(toLocationCode => { @@ -286,8 +286,8 @@ fromLocation.Batchs.forEach(batch => { let subItem = batch.detail; if(subItem!=undefined){ - subItem.recordList = []; if (batch.Records.length > 0) { + subItem.recordList = []; batch.Records.forEach(r => { let record = {}; record.handleQty = r.qty; @@ -324,15 +324,14 @@ } subItem.recordList.push(record); }) - subList.push(subItem); + commitSubList.push(subItem); } } }) }) }) }) - - this.jobContent.subList = subList + this.jobContent.subList = commitSubList this.jobContent.createTime = createTime; this.jobContent.creator = creator; return this.jobContent; diff --git a/pages/repleinsh/coms/comScanReplishPack.vue b/pages/repleinsh/coms/comScanReplishPack.vue index c5257d43..e4d95aef 100644 --- a/pages/repleinsh/coms/comScanReplishPack.vue +++ b/pages/repleinsh/coms/comScanReplishPack.vue @@ -317,11 +317,14 @@ ) } } else { - if (this.jobContent.AllowModifyBatch == null) { + if (this.jobContent.allowModifyBatch == "TRUE") { this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + '】的发料明细,是否要继续发料?', res => { if (res) { let batch = that.createBatchInfo(label, balance,packageInfo); + if(fromLocation.Batchs.length>0){ + batch.detail = fromLocation.Batchs[0].detail; + } fromLocation.Batchs.unshift(batch); } }) diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index 019cd3dd..087d491f 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -252,7 +252,7 @@ }, setParams() { - var subList = [] + var commitSubList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id this.detailSource.forEach(toLocationCode => { @@ -260,52 +260,57 @@ item.Locations.forEach(fromLocation => { fromLocation.Batchs.forEach(batch => { let subItem = batch.detail; - subItem.recordList = []; - if (batch.Records.length > 0) { - batch.Records.forEach(r => { - let record = {}; - record.handleQty = r.qty; - - record.fromPackingNumber = r - .packingNumber; - record.fromBatch = r.batch; - record.fromContainerNumber = r - .ContainerNumber; - - record.toContainerNumber = r - .ContainerNumber; - record.toInventoryStatus = r - .inventoryStatus; - record.toLocationCode = this - .toLocationCode; - record.supplierCode = r.supplierCode; - - //使用在途库不改变管理模式 - if (this.jobContent.useOnTheWayLocation == - 'TRUE') { - record.toPackingNumber = r - .packingNumber; - record.toBatch = r.batch; - } else { - var info = getPackingNumberAndBatch( - this.managementList, r - .itemCode, - r.packingNumber, r - .batch); - record.toPackingNumber = info + + if (subItem != undefined) { + if (batch.Records.length > 0) { + subItem.recordList = []; + batch.Records.forEach(r => { + let record = {}; + record.handleQty = r.qty; + + record.fromPackingNumber = r .packingNumber; - record.toBatch = info.batch; - } - subItem.recordList.push(record); - }) - subList.push(subItem); + record.fromBatch = r.batch; + record.fromContainerNumber = r + .ContainerNumber; + + record.toContainerNumber = r + .ContainerNumber; + record.toInventoryStatus = r + .inventoryStatus; + record.toLocationCode = this + .toLocationCode; + record.supplierCode = r.supplierCode; + + //使用在途库不改变管理模式 + if (this.jobContent + .useOnTheWayLocation == + 'TRUE') { + record.toPackingNumber = r + .packingNumber; + record.toBatch = r.batch; + } else { + var info = + getPackingNumberAndBatch( + this.managementList, r + .itemCode, + r.packingNumber, r + .batch); + record.toPackingNumber = info + .packingNumber; + record.toBatch = info.batch; + } + subItem.recordList.push(record); + }) + commitSubList.push(subItem); + } } }) }) }) }) - this.jobContent.subList = subList + this.jobContent.subList = commitSubList this.jobContent.createTime = createTime; this.jobContent.creator = creator; return this.jobContent;