From 6e39a94f01ce72fadcec3716eea5ce82a7ec2279 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 28 Mar 2026 18:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E6=A1=8C=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=BB=9F=E8=AE=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/table/index.vue | 57 ++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/src/views/tool/table/index.vue b/src/views/tool/table/index.vue index 0020705..8170de1 100644 --- a/src/views/tool/table/index.vue +++ b/src/views/tool/table/index.vue @@ -40,15 +40,25 @@ --> -
-
- - {{ item.label }} +
+
+
+ + {{ item.label }} +
+
+
+ 未结账: + {{ totalOrder }}笔 + + {{ totalPerson }}人 + + ¥{{ totalMoney }}
@@ -363,7 +373,7 @@ function addTableShow(item) { const tableList = ref([]); const tablequery = reactive({ page: 1, - size: 100, + size: 300, }); async function tableInit() { @@ -371,6 +381,33 @@ async function tableInit() { tableList.value = res.records; } +const totalOrder = computed(() => { + return tableList.value.reduce((pre, cur) => { + if (cur.status == "unsettled") { + return pre + 1; + } + return pre; + }, 0); +}); + +const totalPerson = computed(() => { + return tableList.value.reduce((pre, cur) => { + if (cur.status == "unsettled") { + return pre + cur.personNum; + } + return pre; + }, 0); +}); + +const totalMoney = computed(() => { + return tableList.value.reduce((pre, cur) => { + if (cur.status == "unsettled") { + return pre + cur.orderAmount; + } + return pre; + }, 0); +}); + // 区域 let areaMap = ref({}); const refAddEara = ref(null);