From 9b71a63dcac5d2072bf7a26e73941760ba96667f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 20 Nov 2024 15:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=8F=91=E6=96=99=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 67 +++++++++++++----------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 1f5740d4..3048d1e7 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -503,6 +503,7 @@ submitJob() { var params = this.setParams() + console.log(params) // if (!params.subList || params.subList.length == 0) { // uni.hideLoading() @@ -538,40 +539,42 @@ var createTime = getCurrDateTime(); var creator = this.$store.state.user.id this.detailSource.forEach(toLocationCode => { - let obj = {...toLocationCode} - delete obj.subList - obj.recordList = [] - let obj1 ={} - let arr = toLocationCode.subList.filter(item=>item.scaned) - arr.forEach(record=>{ - obj1.supplierCode = record.supplierCode; - obj1.batch = record.batch; - obj1.copyContent =record.copyContent; - obj1.fromInventoryStatus =record.fromInventoryStatus; - obj1.fromLocationCode =record.fromLocationCode; - obj1.handleQty =record.handleQty; - obj1.inventoryStatus =record.fromInventoryStatus; - obj1.packQty =record.packQty; - obj1.packUnit =record.packUnit; - obj1.packingNumber =record.packingNumber; - obj1.qty =record.qty; - obj1.scaned =record.scaned; - obj1.toLocationCode =record.toLocationCode; - obj1.fromPackingNumber =''; - obj1.fromBatch = record.batch; - obj1.toBatch = record.batch; - obj1.toInventoryStatus = record.inventoryStatus; - obj1.toPackingNumber =""; - obj1.packingNumber = ""; - - let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice; - - obj1.singlePrice = single_price; - obj1.amount = single_price *record.qty; - obj.recordList.push(obj1) + let arr = [] + toLocationCode.subList.forEach(record=>{ + if(record.scaned){ + let obj = {...record} + obj.recordList = [] + let obj1 ={} + obj1.supplierCode = record.supplierCode; + obj1.batch = record.batch; + obj1.copyContent =record.copyContent; + obj1.fromInventoryStatus =record.fromInventoryStatus; + obj1.fromLocationCode =record.fromLocationCode; + obj1.handleQty =record.handleQty; + obj1.inventoryStatus =record.fromInventoryStatus; + obj1.packQty =record.packQty; + obj1.packUnit =record.packUnit; + obj1.packingNumber =record.packingNumber; + obj1.qty =record.qty; + obj1.scaned =record.scaned; + obj1.toLocationCode =record.toLocationCode; + obj1.fromPackingNumber =''; + obj1.fromBatch = record.batch; + obj1.toBatch = record.batch; + obj1.toInventoryStatus = record.inventoryStatus; + obj1.toPackingNumber =""; + obj1.packingNumber = ""; + + let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice; + + obj1.singlePrice = single_price; + obj1.amount = single_price *record.qty; + obj.recordList.push(obj1) + subList.push(obj) + } }) - subList.push(obj) }) + this.jobContent.subList = subList this.jobContent.createTime = createTime; this.jobContent.creator = creator;