From 4103bef9452332bbb1a35aec027e8c65cbc6e21f Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 29 Aug 2024 14:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E4=B8=8D=E6=98=AF=E6=8E=A8=E8=8D=90=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/coms/comIssueDetailCard.vue | 28 ++++++++++++++------- src/pages/issue/coms/comScanIssuePack.vue | 1 + src/pages/issue/job/issueDetail.vue | 3 --- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/pages/issue/coms/comIssueDetailCard.vue b/src/pages/issue/coms/comIssueDetailCard.vue index 6f7443b6..f438449a 100644 --- a/src/pages/issue/coms/comIssueDetailCard.vue +++ b/src/pages/issue/coms/comIssueDetailCard.vue @@ -20,14 +20,14 @@ - + - + @@ -37,9 +37,9 @@ 扫描 - + - @@ -136,12 +136,16 @@ }) }); }, - - swipeClick(e, batch, record, index) { + swipeClick(e, batch, + record,recordIndex, + batchIndex, + Batchs, + locatonIndex, + Locations) { if (e.content.text == "编辑") { this.edit(batch, record) } else if (e.content.text == "移除") { - this.remove(batch, record, index) + this.remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) } }, @@ -164,11 +168,17 @@ this.showItem = item; this.$refs.receiptHint.openScanPopup() }, - remove(batch, record, index) { + remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) { this.$refs.message.showQuestionMessage("确定移除扫描信息?", res => { if (res) { - batch.Records.splice(index, 1); + batch.Records.splice(recordIndex, 1); + if(batch.Records.length==0&&Batchs[batchIndex].isNewAdd){ + Batchs.splice(batchIndex,1) + } + if(batch.Records.length==0&&Locations[locatonIndex].isNewAdd){ + Locations.splice(locatonIndex,1) + } this.resizeCollapse(); this.$emit('updateData', record) } diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index 2a1edfb9..362fa484 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -762,6 +762,7 @@ createBatchInfo(data, balance, packageInfo) { let batch = { + isNewAdd: true, batch: data.batch, qty: 0, uom: data.uom, diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 12dc5bed..3151bad4 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -425,9 +425,6 @@ }, updateData(record) { - console.log('updateData', record) - console.log('this.detailSource', this.detailSource) - let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); let itemHandleQty = 0;