From fa4a8a332b2b60b7b94b1f763091c1daf8927710 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 22 四月 2026 14:18:35 +0800
Subject: [PATCH] 优化选择数据逻辑,仅保留具有子项的行以便于删除操作

---
 src/views/procurementManagement/procurementLedger/index.vue |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index abe1804..9a76e2a 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -1315,7 +1315,7 @@
   };
   // 琛ㄦ牸閫夋嫨鏁版嵁
   const handleSelectionChange = selection => {
-    selectedRows.value = selection;
+    selectedRows.value = selection.filter(item => Array.isArray(item.children));
   };
   const productSelected = selectedRows => {
     productSelectedRows.value = selectedRows;
@@ -1787,7 +1787,9 @@
   const handleDelete = () => {
     let ids = [];
     if (selectedRows.value.length > 0) {
-      ids = selectedRows.value.map(item => item.id);
+      ids = selectedRows.value
+        .filter(item => Array.isArray(item.children))
+        .map(item => item.id);
     } else {
       proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
       return;

--
Gitblit v1.9.3