From bfff831304d65d948613e3774364bb29bebaeb0c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 15 六月 2026 09:20:18 +0800
Subject: [PATCH] pro 1.数据模拟前端页面
---
src/views/financialManagement/payable/purchaseIn.vue | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/views/financialManagement/payable/purchaseIn.vue b/src/views/financialManagement/payable/purchaseIn.vue
index fcb768f..b105859 100644
--- a/src/views/financialManagement/payable/purchaseIn.vue
+++ b/src/views/financialManagement/payable/purchaseIn.vue
@@ -49,6 +49,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -98,7 +100,7 @@
slot: "inboundDate",
},
{ label: "浜у搧鍚嶇О", prop: "productName", minWidth: "140" },
- { label: "浜у搧瑙勬牸", prop: "specificationModel", minWidth: "140" },
+ { label: "瑙勬牸鍨嬪彿", prop: "specificationModel", minWidth: "140" },
{
label: "閲戦",
prop: "inboundAmount",
@@ -189,7 +191,25 @@
getTableData();
};
- const handleOut = () => {
+ const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "inboundAmount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.inboundAmount);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = total.toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
+const handleOut = () => {
proxy.download(
"/accountPurchase/exportAccountPurchaseInbound",
buildFilterParams(),
--
Gitblit v1.9.3