diff --git a/src/pages/issue/coms/comIssueDetailCard.vue b/src/pages/issue/coms/comIssueDetailCard.vue index 5f6d681b..c7d2e6f2 100644 --- a/src/pages/issue/coms/comIssueDetailCard.vue +++ b/src/pages/issue/coms/comIssueDetailCard.vue @@ -12,18 +12,21 @@ - + - + 扫描 - + @@ -102,12 +105,11 @@ const resizeCollapse = () => { }) }) } -const swipeClick = (params, batch, record) => { - const { text } = scanOptions.value[params[1]] - if (text == '编辑') { +const swipeClick = (e, batch, record,recordIndex, batchIndex, Batchs, locatonIndex, Locations) => { + if (e.content.text == '编辑') { edit(batch, record) - } else if (text == '移除') { - remove(batch, record, params[0]) + } else if (e.content.text == '移除') { + remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) } } const itemCoceClick = (params, item) => { @@ -124,10 +126,16 @@ const edit = (batch, item) => { balanceQtyEditRef.value.openEditPopup(item.balance, item.qty) } -const remove = (batch, record, index) => { +const remove = (batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) => { comMessageRef.value.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) + } resizeCollapse() emit('updateData', record) } diff --git a/src/pages/issue/coms/comIssueDetailCardBatch.vue b/src/pages/issue/coms/comIssueDetailCardBatch.vue new file mode 100644 index 00000000..f44d7bb0 --- /dev/null +++ b/src/pages/issue/coms/comIssueDetailCardBatch.vue @@ -0,0 +1,150 @@ + + + + + \ No newline at end of file diff --git a/src/pages/issue/coms/comIssueJobCard.vue b/src/pages/issue/coms/comIssueJobCard.vue index dd806c76..ce1026b6 100644 --- a/src/pages/issue/coms/comIssueJobCard.vue +++ b/src/pages/issue/coms/comIssueJobCard.vue @@ -9,13 +9,15 @@ + + + + \ No newline at end of file