From ece2dfeb926d728b10db38038e4d12e9e9851c24 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期五, 06 六月 2025 17:38:10 +0800
Subject: [PATCH] 分页修改

---
 src/views/salesManagement/receiptPaymentHistory/index.vue |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/views/salesManagement/receiptPaymentHistory/index.vue b/src/views/salesManagement/receiptPaymentHistory/index.vue
index 0fd8eef..9485151 100644
--- a/src/views/salesManagement/receiptPaymentHistory/index.vue
+++ b/src/views/salesManagement/receiptPaymentHistory/index.vue
@@ -10,6 +10,8 @@
     </div>
     <div class="table_list">
       <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true"
+                :isShowSummary="isShowSummarySon"
+                :summaryMethod="summarizeMainTable1"
                 :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination"
                 :total="total"></PIMTable>
     </div>
@@ -20,7 +22,7 @@
 import { ref } from 'vue'
 import { Search } from "@element-plus/icons-vue";
 import {
-  receiptPaymentHistoryList
+  receiptPaymentHistoryListPage
 } from "@/api/salesManagement/receiptPayment.js";
 const { proxy } = getCurrentInstance()
 const tableColumn = ref([
@@ -35,6 +37,9 @@
   {
     label: '鍥炴閲戦',
     prop: 'receiptPaymentAmount',
+    formatData: (params) => {
+      return parseFloat(params).toFixed(2);
+    }
   },
   {
     label: '鍥炴鏂瑰紡',
@@ -77,26 +82,33 @@
 })
 const { searchForm } = toRefs(data)
 const { receipt_payment_type } = proxy.useDict("receipt_payment_type")
-
+const isShowSummarySon = ref(true);
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
   page.current = 1
   getList()
 }
-const pagination = ({ current, limit }) => {
-  page.current = current;
-  page.size = limit;
+const pagination = (obj) => {
+  page.current = obj.page;
+  page.size = obj.limit;
   getList()
 }
 const getList = () => {
   tableLoading.value = true
-  receiptPaymentHistoryList({ ...searchForm.value, ...page }).then(res => {
+  receiptPaymentHistoryListPage({ ...searchForm.value, ...page }).then(res => {
     tableLoading.value = false
-    tableData.value = res.rows
+    tableData.value = res.records
     total.value = res.total
   })
 }
+// 瀛愯〃鍚堣鏂规硶
+const summarizeMainTable1 = (param) => {
+  return proxy.summarizeTable(param, ['receiptPaymentAmount'], {
+    ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+    futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+  });
+};
 // 琛ㄦ牸閫夋嫨鏁版嵁
 const handleSelectionChange = (selection) => {
   selectedRows.value = selection

--
Gitblit v1.9.3