From 4b44783dfbc0ab21b8970cce25fddfc1cfffeafb Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 23 四月 2026 16:47:20 +0800
Subject: [PATCH] fix: 回款登记加上合计数据

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

diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 7b03d7d..1354591 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"
@@ -101,7 +102,6 @@
                   <el-button
                     link
                     type="primary"
-                    size="small"
                     @click="changeEditType(scope.row)"
                     v-if="!scope.row.editType"
                     >缂栬緫</el-button
@@ -109,7 +109,6 @@
                   <el-button
                     link
                     type="primary"
-                    size="small"
                     @click="saveReceiptPayment(scope.row)"
                     v-if="scope.row.editType"
                     >淇濆瓨</el-button
@@ -117,7 +116,6 @@
                   <el-button
                     link
                     type="primary"
-                    size="small"
                     @click="delReceiptRecord(scope.row)"
                     >鍒犻櫎</el-button
                   >
@@ -206,6 +204,8 @@
         border
         style="width: 100%"
         size="small"
+        show-summary
+        :summary-method="summarizeFormTable"
       >
         <el-table-column type="index" label="搴忓彿" width="50" align="center"/>
         <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" show-overflow-tooltip />
@@ -313,6 +313,7 @@
 });
 const total = ref(0);
 const expandedRowKeys = ref([]);
+const tableRef = ref(null);
 
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const dialogFormVisible = ref(false);
@@ -335,7 +336,7 @@
 const getStatusTagType = (statusName = '') => {
   const normalized = statusName.trim();
   if (!normalized) return 'info';
-  return normalized === '鏈畬鎴愬洖娆�' ? 'danger' : 'success';
+  return normalized === '鏈畬鎴愪粯娆�' ? 'danger' : 'success';
 };
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -404,7 +405,7 @@
 const summarizeMainTable = (param) => {
   return proxy.summarizeTable(
     param,
-    ["receiptPaymentAmountTotal", "noReceiptAmount"],
+    ["invoiceTotal", "pendingInvoiceTotal"],
     {
       ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
       futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
@@ -414,6 +415,10 @@
 // 瀛愯〃鍚堣鏂规硶
 const summarizeChildrenTable = (param) => {
   return proxy.summarizeTable(param, ["receiptPaymentAmount"]);
+};
+// 鏂板鍥炴寮圭獥琛ㄥ悎璁℃柟娉�
+const summarizeFormTable = (param) => {
+  return proxy.summarizeTable(param, ["pendingInvoiceTotal", "receiptPaymentAmount"]);
 };
 // 鎵撳紑寮规
 const openForm = () => {
@@ -491,6 +496,7 @@
   dialogFormVisible.value = false;
   // 閬垮厤浜屾鎵撳紑寮圭獥鏃朵粛鎼哄甫涓婁竴娆$殑閫夋嫨瀵艰嚧鈥滃鍑轰竴琛�/鑴忔暟鎹��
   selectedRows.value = [];
+  tableRef.value?.clearSelection();
 };
 
 // 鍒犻櫎鍥炴璁板綍

--
Gitblit v1.9.3