diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index f298ae8ec..c658bdbba 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -4,7 +4,7 @@ - + + +
@@ -453,6 +463,11 @@ const tableSelectionChange = (val) => { } const handleSelectionDelete = ()=>{ emit('tableSelectionDelete', deleteTableData.value) + nextTick(()=>{ + deleteTableData.value.forEach(row=>{ + TableBaseComponents_Ref.value!.toggleRowSelection(row,false) + }) + }) } // 列表排序 const tableSortChange = (column, prop, order) => { @@ -497,6 +512,9 @@ const validateForm = () => { // 删除数据 const handleDeleteTable = (row, index) => { emit('handleDeleteTable', row, index) + nextTick(()=>{ + TableBaseComponents_Ref.value!.toggleRowSelection(row,false) + }) } // 添加数据 const handleAddTable = () => { @@ -521,6 +539,16 @@ const buttonOperationClick = (row, label, index)=> { emit("buttonOperationClick", row, label, index); } +const currentPage =ref(1) +const pageSize = ref(10) +const showTableData = ()=>{ + console.log('props.tableData',props.tableData) + if(props.tableData.length>100){ + return props.tableData.slice((currentPage.value-1)*pageSize.value,currentPage.value*pageSize.value) + }else{ + return props.tableData + } +} // setup 语法糖 抛出方法 defineExpose({ TableBaseComponents_Ref, diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index c3ef67643..f15b4ed74 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -350,7 +350,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index a0ca72e63..4cfefed4a 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -629,7 +629,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter((item) => !selection.includes(item)) diff --git a/src/views/wms/countManage/count/countRequestMain/index.vue b/src/views/wms/countManage/count/countRequestMain/index.vue index 5ae51ee1e..5b65dd4f1 100644 --- a/src/views/wms/countManage/count/countRequestMain/index.vue +++ b/src/views/wms/countManage/count/countRequestMain/index.vue @@ -507,7 +507,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue index 3d13f5f6b..7f06f76f3 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue @@ -336,7 +336,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index b1af5ce1e..ec184bff3 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -348,7 +348,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index e138e2dce..599867dd7 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -692,7 +692,10 @@ const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index fc8514503..2aa4d3f9a 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -359,7 +359,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 67a8c6bf2..df44730fd 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -493,7 +493,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 06531a9df..83b901650 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -450,7 +450,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index 739840f9e..04aac908e 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -275,7 +275,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index 32a090eb1..9f9165ebd 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -375,7 +375,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 1b210a28f..77554c490 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -425,7 +425,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index c546435e2..8e5432f6e 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -200,17 +200,17 @@ const handleSelectionPoint = async ()=>{ } // 列表-操作按钮 const butttondata = [ - // { - // label: '标签信息', - // name: 'bqxx', - // hide: false, - // type: 'primary', - // icon: '', - // color: '', - // link: true, - // float:'right', - // hasPermi: '' - // }, + { + label: '标签信息', + name: 'bqxx', + hide: false, + type: 'primary', + icon: '', + color: '', + link: true, + float:'right', + hasPermi: '' + }, defaultButtons.mainListPointBtn(null), // 标签打印 // defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), // 删除 diff --git a/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue index c445bd5aa..94f4f18c6 100644 --- a/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue @@ -260,7 +260,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue b/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue index 1e7d7c8e9..9b60a6338 100644 --- a/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue @@ -259,7 +259,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue index 7cb703a5d..dddc7cb22 100644 --- a/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue @@ -259,7 +259,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue index d03824483..db23f1dca 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue @@ -428,7 +428,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index 425e776f9..b37e88036 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -380,7 +380,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 84d9af692..f014cff4b 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -406,7 +406,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index a79c4221d..fd19b5f1d 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -408,7 +408,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index d8bbf336e..a49a6598e 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -390,7 +390,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue index 905718b2b..8dd499624 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -371,7 +371,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index 6d1743a0a..7196e5f01 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -398,7 +398,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index 098f29296..06c820e4f 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -379,7 +379,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 26021eeda..4befdd5ec 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -391,7 +391,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 28ee29b26..5f0dc22e8 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -600,7 +600,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/issue/issueJobMain/index.vue b/src/views/wms/issueManage/issue/issueJobMain/index.vue index 16d31db17..c751f298b 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/index.vue +++ b/src/views/wms/issueManage/issue/issueJobMain/index.vue @@ -170,9 +170,9 @@ const butttondata = (row,$index) => { return [] } return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃--取消承接 // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 358850dc5..299c93049 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -377,7 +377,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index 0a5943fd2..b21efc68b 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -289,7 +289,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/pick/pickRequestMain/index.vue b/src/views/wms/issueManage/pick/pickRequestMain/index.vue index 509c35ffe..38f9777c0 100644 --- a/src/views/wms/issueManage/pick/pickRequestMain/index.vue +++ b/src/views/wms/issueManage/pick/pickRequestMain/index.vue @@ -294,7 +294,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index df5f57e12..d01791d34 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -432,7 +432,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 410cf97f0..541ff60c3 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -618,7 +618,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 6d284844a..844973658 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -352,7 +352,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 43e8abec4..49b9f297e 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -417,7 +417,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 11719d58a..de4582cb8 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -655,7 +655,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue index 569b95755..15b6e76a2 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue @@ -302,7 +302,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index 3ac03937e..e13672e97 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -418,7 +418,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index cd7c3af6a..fa0a7166c 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -538,7 +538,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 4d1503c0a..a093ced2a 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -450,7 +450,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 4c0d3956b..f8dab6fc1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -438,7 +438,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 1e078b89c..338d62945 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -438,7 +438,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 164a58c10..186b60738 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -438,7 +438,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productionplan/workMain/index.vue b/src/views/wms/productionManage/productionplan/workMain/index.vue index c3cca0a34..1935f4027 100644 --- a/src/views/wms/productionManage/productionplan/workMain/index.vue +++ b/src/views/wms/productionManage/productionplan/workMain/index.vue @@ -262,7 +262,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index b2a0b323e..43d105679 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -363,7 +363,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index 7e13b6fd0..fe3749a7e 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -355,7 +355,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 20c11885a..93d80734e 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -555,7 +555,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 45187dc30..50110ead5 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -557,7 +557,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index 0946338d2..8494ac698 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -547,7 +547,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index 6aeaac98e..01f9d762d 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -396,7 +396,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 290d50683..3e735bd9e 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -637,7 +637,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue index a12607b61..a71224618 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue @@ -344,7 +344,10 @@ } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 77db0f9c4..6d43e8b9c 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -699,7 +699,10 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index a4b470ed9..8b785e5fc 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -798,7 +798,10 @@ const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => } // 删除明细 const handleDeleteTable = (item, index, formRef) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } if (tableData.value.length == 0) { isShowButton.value = true PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 8f2633ccf..b9caddd35 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -427,8 +427,12 @@ const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) } // 删除明细 +// 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index 8b39059f1..e880e074d 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -564,8 +564,12 @@ const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) } // 删除明细 +// 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 8d65d6966..efa13a5bb 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -356,8 +356,12 @@ const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) } // 删除明细 +// 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index a3d026459..4bbc39b34 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -511,7 +511,10 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index a24c869b3..c061fa810 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -581,7 +581,10 @@ const handleSelectionPublish = async ()=>{ } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 6d4d63c3c..c87a8cf35 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -946,7 +946,8 @@ const handleAddTable = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.findIndex(item) + tableData.value.splice(itemIndex, 1) } // 主子数据 提交 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue index 0964a5025..5e6427097 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue @@ -68,8 +68,12 @@ const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) } // 删除明细 +// 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue index 7e2039f16..5057b380c 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue @@ -441,8 +441,12 @@ tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) } // 删除明细 + // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index ce8d4ae21..7d368e710 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -254,6 +254,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea const newRow = {...row} newRow[formField] = item[searchField] if (formField == 'poLine') { + newRow['id'] = item['id'] newRow['poNumber'] = item['poNumber'] newRow['poLine'] = item['poLine'] newRow['tax'] =item['tax'] @@ -851,7 +852,10 @@ const handleImport = () => { } // 删除明细 const handleDeleteTable = (item, index) => { - tableData.value.splice(index, 1) + let itemIndex = tableData.value.indexOf(item) + if(itemIndex>-1){ + tableData.value.splice(itemIndex, 1) + } } const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item))