From 7044799b7600f2644a2a431bf045b78befec329a Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 15 Aug 2024 13:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=B3=E5=B0=91=E4=BF=9D=E7=95=99=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productscrap/productscrapRequestMain/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index dd3f32f3d..f6ccc530c 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -296,6 +296,10 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> { } // 删除明细 const handleDeleteTableBom = (item, index) => { + if(detatableDataBom.tableList.length<=1){ + message.error('至少保留一条数据') + return + } let itemIndex = detatableDataBom.tableList.indexOf(item) if (itemIndex > -1) { detatableDataBom.tableList.splice(itemIndex, 1) @@ -303,6 +307,12 @@ const handleDeleteTableBom = (item, index) => { } const tableSelectionDeleteBom = (selection) => { + if(detatableDataBom.tableList.length<=1||detatableDataBom.tableList.length==selection.length){ + message.error('至少保留一条数据') + return + } + + detatableDataBom.tableList = detatableDataBom.tableList.filter(item => !selection.includes(item)) }