From 843d1d0d0936375c7cc259d9483fd09fec4e7bff Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 10 六月 2026 14:14:06 +0800
Subject: [PATCH] pro 1.销售出库、销售退货、开票申请、撤项发票、收款单、采购入库、采购退货、进项发票、人员薪资、付款申请、付款单等页面需要做金额的统计合算
---
src/views/financialManagement/payable/reconciliation.vue | 22 ++++
src/views/financialManagement/receivable/salesOut.vue | 24 ++++
src/views/financialManagement/payable/purchaseIn.vue | 22 ++++
src/views/financialManagement/payable/payment.vue | 22 ++++
src/views/financialManagement/receivable/reconciliation.vue | 25 +++++
src/views/financialManagement/receivable/invoiceApply.vue | 23 ++++
src/views/financialManagement/receivable/outputInvoice.vue | 23 ++++
src/views/financialManagement/payable/purchaseReturn.vue | 20 ++++
src/views/financialManagement/receivable/salesReturn.vue | 24 ++++
src/views/financialManagement/payable/input-invoice.vue | 22 ++++
src/views/financialManagement/payable/paymentApply.vue | 20 ++++
11 files changed, 243 insertions(+), 4 deletions(-)
diff --git a/src/views/financialManagement/payable/input-invoice.vue b/src/views/financialManagement/payable/input-invoice.vue
index 86ebd09..ae40709 100644
--- a/src/views/financialManagement/payable/input-invoice.vue
+++ b/src/views/financialManagement/payable/input-invoice.vue
@@ -51,6 +51,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -375,6 +377,26 @@
amount: [{ required: true, message: "璇疯緭鍏ラ噾棰�", trigger: "blur" }],
};
+const summaryProps = ["amount", "taxAmount", "totalAmount"];
+
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (summaryProps.includes(col.property)) {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur[col.property]);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = Number(total.toFixed(2)).toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/payable/payment.vue b/src/views/financialManagement/payable/payment.vue
index 18e7941..dd386d8 100644
--- a/src/views/financialManagement/payable/payment.vue
+++ b/src/views/financialManagement/payable/payment.vue
@@ -65,6 +65,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -149,7 +151,25 @@
dataList.value.reduce((sum, item) => sum + Number(item.amount ?? 0), 0)
);
- const formatMoney = value => {
+ const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "amount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.amount);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = total.toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
+const formatMoney = value => {
if (value === undefined || value === null) return "0.00";
return Number(value)
.toFixed(2)
diff --git a/src/views/financialManagement/payable/paymentApply.vue b/src/views/financialManagement/payable/paymentApply.vue
index e34793f..309d6d3 100644
--- a/src/views/financialManagement/payable/paymentApply.vue
+++ b/src/views/financialManagement/payable/paymentApply.vue
@@ -52,6 +52,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -477,6 +479,24 @@
applyDate: [{ required: true, message: "璇烽�夋嫨鐢宠鏃ユ湡", trigger: "change" }],
};
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "amount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.amount);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = total.toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/payable/purchaseIn.vue b/src/views/financialManagement/payable/purchaseIn.vue
index 532bcb4..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,
@@ -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(),
diff --git a/src/views/financialManagement/payable/purchaseReturn.vue b/src/views/financialManagement/payable/purchaseReturn.vue
index eeec383..4171df2 100644
--- a/src/views/financialManagement/payable/purchaseReturn.vue
+++ b/src/views/financialManagement/payable/purchaseReturn.vue
@@ -44,6 +44,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -175,6 +177,24 @@
getTableData();
};
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "totalAmount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.totalAmount);
+ 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/exportAccountPurchaseReturn",
diff --git a/src/views/financialManagement/payable/reconciliation.vue b/src/views/financialManagement/payable/reconciliation.vue
index e749e56..a3b8495 100644
--- a/src/views/financialManagement/payable/reconciliation.vue
+++ b/src/views/financialManagement/payable/reconciliation.vue
@@ -35,6 +35,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -405,6 +407,26 @@
accountStatementDetails: selectedPurchases.value.map(buildDetailSubmitItem),
});
+const summaryProps = ["openingBalance", "currentPlan", "currentActually", "closingBalance"];
+
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (summaryProps.includes(col.property)) {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur[col.property]);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = Number(total.toFixed(2)).toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/receivable/invoiceApply.vue b/src/views/financialManagement/receivable/invoiceApply.vue
index 85f30b2..21b5f0e 100644
--- a/src/views/financialManagement/receivable/invoiceApply.vue
+++ b/src/views/financialManagement/receivable/invoiceApply.vue
@@ -48,6 +48,8 @@
v-loading="tableLoading"
:column="columns"
:tableData="dataList"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -648,6 +650,27 @@
proxy.download("/accountInvoiceApplication/exportAccountInvoiceApplication", params, filename);
};
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "amount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.amount);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = total.toLocaleString("zh-CN", {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/receivable/outputInvoice.vue b/src/views/financialManagement/receivable/outputInvoice.vue
index d746aea..22cc202 100644
--- a/src/views/financialManagement/receivable/outputInvoice.vue
+++ b/src/views/financialManagement/receivable/outputInvoice.vue
@@ -46,6 +46,8 @@
v-loading="tableLoading"
:column="columns"
:tableData="dataList"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -324,6 +326,27 @@
amount: [{ required: true, message: "璇疯緭鍏ラ噾棰�", trigger: "blur" }],
};
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "amount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.amount);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = total.toLocaleString("zh-CN", {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/receivable/reconciliation.vue b/src/views/financialManagement/receivable/reconciliation.vue
index b1bff0e..03400ef 100644
--- a/src/views/financialManagement/receivable/reconciliation.vue
+++ b/src/views/financialManagement/receivable/reconciliation.vue
@@ -30,6 +30,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -388,6 +390,29 @@
accountStatementDetails: selectedSales.value.map(buildDetailSubmitItem),
});
+const summaryProps = ["openingBalance", "currentPlan", "currentActually", "closingBalance"];
+
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (summaryProps.includes(col.property)) {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur[col.property]);
+ return prev + (isNaN(v) ? 0 : v);
+ }, 0);
+ sums[index] = Number(total.toFixed(2)).toLocaleString("zh-CN", {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ });
+ } else {
+ sums[index] = "";
+ }
+ });
+ return sums;
+};
+
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
diff --git a/src/views/financialManagement/receivable/salesOut.vue b/src/views/financialManagement/receivable/salesOut.vue
index 0e24b37..f6205d8 100644
--- a/src/views/financialManagement/receivable/salesOut.vue
+++ b/src/views/financialManagement/receivable/salesOut.vue
@@ -43,6 +43,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -86,7 +88,6 @@
label: "閲戦",
prop: "outboundAmount",
minWidth: "120",
- align: "right",
formatData: val =>
val === null || val === undefined || val === ""
? ""
@@ -158,6 +159,27 @@
getTableData();
};
+ const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "outboundAmount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.outboundAmount);
+ 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(
"/accountSales/exportAccountSalesOutbound",
diff --git a/src/views/financialManagement/receivable/salesReturn.vue b/src/views/financialManagement/receivable/salesReturn.vue
index c58d330..afe363c 100644
--- a/src/views/financialManagement/receivable/salesReturn.vue
+++ b/src/views/financialManagement/receivable/salesReturn.vue
@@ -37,6 +37,8 @@
:column="columns"
:tableData="dataList"
:tableLoading="tableLoading"
+ isShowSummary
+ :summaryMethod="getSummaries"
:page="{
current: pagination.currentPage,
size: pagination.pageSize,
@@ -80,7 +82,6 @@
label: "閫�娆炬�婚",
prop: "refundAmount",
minWidth: "120",
- align: "right",
formatData: (val) =>
val === null || val === undefined || val === ""
? ""
@@ -149,6 +150,27 @@
getTableData();
};
+const getSummaries = ({ columns, data }) => {
+ const sums = [];
+ columns.forEach((col, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ } else if (col.property === "refundAmount") {
+ const total = data.reduce((prev, cur) => {
+ const v = Number(cur.refundAmount);
+ 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(
"/accountSales/exportAccountSalesReturn",
--
Gitblit v1.9.3