From fd3e3b19aaf23c4f68d8b98d514499510b152e39 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 11 七月 2025 15:54:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue |   43 ++++++++++++++++++++++++++++++++++++-------
 1 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
index 0523e40..24a368a 100644
--- a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
@@ -4,6 +4,9 @@
     :column="columns"
     :tableData="dataList"
     :tableLoading="loading"
+		:summaryMethod="summarizeChildrenTable"
+		:isShowSummary="true"
+    height="auto"
   >
   </PIMTable>
 </template>
@@ -11,6 +14,8 @@
 <script setup>
 import { usePaginationApi } from "@/hooks/usePaginationApi";
 import { productList } from "@/api/procurementManagement/procurementLedger.js";
+import { nextTick } from "vue";
+const { proxy } = getCurrentInstance();
 
 defineOptions({
   name: "鏉ョエ鐧昏鎶樺彔琛�",
@@ -54,29 +59,33 @@
     {
       label: "鍚◣鍗曚环(鍏�)",
       prop: "taxInclusiveUnitPrice",
+			width:200,
       formatData: (val) => {
-        return parseFloat(val).toFixed(2) ?? 0;
+        return val ? parseFloat(val).toFixed(2) : "-";
       },
     },
     {
       label: "鍚◣鎬讳环(鍏�)",
       prop: "taxInclusiveTotalPrice",
+			width:200,
       formatData: (val) => {
-        return parseFloat(val).toFixed(2) ?? 0;
+        return val ? parseFloat(val).toFixed(2) : "-";
       },
     },
     {
       label: "涓嶅惈绋庢�讳环(鍏�)",
       prop: "taxExclusiveTotalPrice",
+			width:200,
       formatData: (val) => {
-        return parseFloat(val).toFixed(2) ?? 0;
+        return val ? parseFloat(val).toFixed(2) : "-";
       },
     },
     {
       label: "鏈鏉ョエ閲戦(鍏�)",
       prop: "ticketsAmount",
+			width:200,
       formatData: (val) => {
-        return parseFloat(val).toFixed(2) ?? 0;
+        return val ? parseFloat(val).toFixed(2) : "-";
       },
     },
     {
@@ -86,8 +95,9 @@
     {
       label: "鏈潵绁ㄩ噾棰�(鍏�)",
       prop: "futureTicketsAmount",
+			width:200,
       formatData: (val) => {
-        return parseFloat(val).toFixed(2) ?? 0;
+        return val ? parseFloat(val).toFixed(2) : "-";
       },
     },
   ],
@@ -98,11 +108,30 @@
   }
 );
 
-const getList = (id) => {
+const getList = async (id) => {
+  await nextTick();
   filters.salesLedgerId = id;
   getTableData();
 };
-
+// 瀛愯〃鍚堣鏂规硶
+const summarizeChildrenTable = (param) => {
+	return proxy.summarizeTable(
+		param,
+		[
+			"taxInclusiveUnitPrice",
+			"taxInclusiveTotalPrice",
+			"taxExclusiveTotalPrice",
+			"ticketsNum",
+			"ticketsAmount",
+			"futureTickets",
+			"futureTicketsAmount",
+		],
+		{
+			ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+			futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+		}
+	);
+};
 defineExpose({
   getList,
 });

--
Gitblit v1.9.3