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;