From 38d43b697f86d5ee8345e4d6397d3c1da32bbd5b Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 29 一月 2026 15:02:35 +0800
Subject: [PATCH] fix: 附件上传后有两个分页展示(原材料、过程、出厂都有)

---
 src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
index 7596e6d..d329768 100644
--- a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
@@ -4,6 +4,10 @@
     :column="columns"
     :tableData="dataList"
     :tableLoading="loading"
+		:summaryMethod="summarizeChildrenTable"
+		:isShowSummary="true"
+    :isShowPagination="false"
+    height="auto"
   >
   </PIMTable>
 </template>
@@ -11,6 +15,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,6 +60,7 @@
     {
       label: "鍚◣鍗曚环(鍏�)",
       prop: "taxInclusiveUnitPrice",
+			width:200,
       formatData: (val) => {
         return val ? parseFloat(val).toFixed(2) : "-";
       },
@@ -61,6 +68,7 @@
     {
       label: "鍚◣鎬讳环(鍏�)",
       prop: "taxInclusiveTotalPrice",
+			width:200,
       formatData: (val) => {
         return val ? parseFloat(val).toFixed(2) : "-";
       },
@@ -68,6 +76,7 @@
     {
       label: "涓嶅惈绋庢�讳环(鍏�)",
       prop: "taxExclusiveTotalPrice",
+			width:200,
       formatData: (val) => {
         return val ? parseFloat(val).toFixed(2) : "-";
       },
@@ -75,6 +84,7 @@
     {
       label: "鏈鏉ョエ閲戦(鍏�)",
       prop: "ticketsAmount",
+			width:200,
       formatData: (val) => {
         return val ? parseFloat(val).toFixed(2) : "-";
       },
@@ -86,6 +96,7 @@
     {
       label: "鏈潵绁ㄩ噾棰�(鍏�)",
       prop: "futureTicketsAmount",
+			width:200,
       formatData: (val) => {
         return val ? parseFloat(val).toFixed(2) : "-";
       },
@@ -98,11 +109,33 @@
   }
 );
 
-const getList = (id) => {
+const getList = async (id) => {
+  await nextTick();
   filters.salesLedgerId = id;
+  // 璁剧疆涓�涓緢澶х殑 pageSize 浠ヨ幏鍙栨墍鏈夋暟鎹�
+  pagination.pageSize = 10000;
+  pagination.currentPage = 1;
   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