From 33d9e4e1a653f0fb460826eb20bf58457045ff8e Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 04 三月 2026 16:40:33 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New

---
 src/views/salesManagement/receiptPayment/index.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index a2a0b2f..83cf942 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -40,6 +40,7 @@
       <el-table
         :data="tableData"
         border
+        ref="tableRef"
         v-loading="tableLoading"
         @selection-change="handleSelectionChange"
         :row-key="(row) => row.id"
@@ -313,6 +314,7 @@
 });
 const total = ref(0);
 const expandedRowKeys = ref([]);
+const tableRef = ref(null);
 
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const dialogFormVisible = ref(false);
@@ -335,7 +337,7 @@
 const getStatusTagType = (statusName = '') => {
   const normalized = statusName.trim();
   if (!normalized) return 'info';
-  return normalized === '鏈畬鎴愬洖娆�' ? 'danger' : 'success';
+  return normalized === '鏈畬鎴愪粯娆�' ? 'danger' : 'success';
 };
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -421,7 +423,11 @@
     proxy.$modal.msgError("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
     return;
   }
-  const validRows = selectedRows.value.filter((item) => item.noReceiptAmount !== 0);
+  // 浠呭厑璁糕�滃緟鍥炴閲戦 > 0鈥濈殑璁板綍杩涘叆鏂板鍥炴寮圭獥锛屽苟杩囨护鎺夊彲鑳芥贩鍏ョ殑绌哄璞�
+  const validRows = selectedRows.value.filter((item) => {
+    if (!item || !item.id) return false;
+    return Number(item.pendingInvoiceTotal ?? 0) > 0;
+  });
   if (validRows.length === 0) {
     proxy.$modal.msgWarning("鎵�閫夎褰曞潎鏃犻渶鍥炴");
     return;
@@ -485,6 +491,9 @@
 const closeDia = () => {
   forms.value = [];
   dialogFormVisible.value = false;
+  // 閬垮厤浜屾鎵撳紑寮圭獥鏃朵粛鎼哄甫涓婁竴娆$殑閫夋嫨瀵艰嚧鈥滃鍑轰竴琛�/鑴忔暟鎹��
+  selectedRows.value = [];
+  tableRef.value?.clearSelection();
 };
 
 // 鍒犻櫎鍥炴璁板綍

--
Gitblit v1.9.3