From 5a110a24c1bb74637259d860a4d3a455ad541316 Mon Sep 17 00:00:00 2001 From: 15233722133 <15233722133@163.com> Date: Mon, 8 Jun 2026 10:33:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=97=E8=A1=A8=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=95=B0=E6=8D=AE=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/listRecord.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/index/listRecord.vue b/pages/index/listRecord.vue index ad9c800..2c6b65b 100644 --- a/pages/index/listRecord.vue +++ b/pages/index/listRecord.vue @@ -84,8 +84,10 @@ const titleText = firstItem?.spuName || order?.no || '-'; const qty = Number(order?.productCount ?? 0) || 0; const statusText = formatOrderStatus(order || {}); - const totalPrice = Number(order?.totalPrice ?? 0) || 0; - const totalRevenue = Number(order?.totalRevenue ?? 0) || 0; + const sumItemTotalPrice = items.reduce((acc, cur) => acc + (Number(cur?.totalPrice) || 0), 0); + const sumItemTotalRevenue = items.reduce((acc, cur) => acc + (Number(cur?.totalRevenue) || 0), 0); + const totalPrice = sumItemTotalPrice || (Number(order?.totalPrice ?? 0) || 0); + const totalRevenue = sumItemTotalRevenue || (Number(order?.totalRevenue ?? 0) || 0); const progress = totalPrice > 0 ? Math.max(0, Math.min(100, (totalRevenue / totalPrice) * 100))