From b33e1e23b28a9bceda886c3ffd3ed894d3e61c51 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Mon, 24 Nov 2025 11:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E8=AE=B0=E5=BD=95=E5=8A=A0?= =?UTF-8?q?=E5=90=88=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XjApplet/Vip/components/Recharge.vue | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/views/XjApplet/Vip/components/Recharge.vue b/src/views/XjApplet/Vip/components/Recharge.vue index ec68950..01aa20f 100644 --- a/src/views/XjApplet/Vip/components/Recharge.vue +++ b/src/views/XjApplet/Vip/components/Recharge.vue @@ -34,7 +34,13 @@ 查询 - + @@ -104,6 +110,32 @@ function getList() { loading.value = false }) } + +function getSummaries(param) { + const { columns, data } = param + const sums = [] + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '合计' + return + } + const values = data.map((item) => Number(item[column.property])) + if (column.property === 'money') { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr) + if (!isNaN(value)) { + return prev + curr + } else { + return prev + } + }, 0) + sums[index] = sums[index].toFixed(2) + } else { + sums[index] = '' + } + }) + return sums +}