From 33ba0b0585a2ecbbb04ade3df268ad2b05e1221c Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 30 十月 2024 18:32:18 +0800
Subject: [PATCH] 1.财务报表-增加总销售扎数
---
components/order/print-list.vue | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/components/order/print-list.vue b/components/order/print-list.vue
index 2d44324..2e270b4 100644
--- a/components/order/print-list.vue
+++ b/components/order/print-list.vue
@@ -34,7 +34,7 @@
</el-row>
<el-table-print
:data="item.items"
- :summary-method="getSummaries"
+ :summary-method="getSummaries.bind(this, item.totalAmount)"
show-summary
border
style="width: 100%"
@@ -107,17 +107,15 @@
}
}
},
- getSummaries(param) {
+ getSummaries(totalAmount, param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
- sums[index] =
- '总扎数合计:' +
- data.reduce((total, current) => {
- total += current.num
- return total
- }, 0)
+ sums[index] = `总扎数合计:${data.reduce((total, current) => {
+ total += current.num
+ return total
+ }, 0)} 总金额:¥${totalAmount}`
} else {
sums[index] = ''
}
--
Gitblit v1.9.3