From 7d1eba43c0f71cf21bcaca08314656cf6cea50c0 Mon Sep 17 00:00:00 2001 From: freedakgmail Date: Thu, 30 Jul 2026 15:17:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=8F=E6=97=B6=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=E5=9B=BEY=E8=BD=B4=E6=94=B9=E7=94=A8=E9=A2=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=9B=BA=E5=AE=9A=E6=9C=80=E5=A4=A7=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA24=E4=B8=87+=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E5=B3=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/TimePage.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/pages/TimePage.tsx b/client/src/pages/TimePage.tsx index e9f7cbe..98243a7 100644 --- a/client/src/pages/TimePage.tsx +++ b/client/src/pages/TimePage.tsx @@ -69,6 +69,11 @@ export function TimePage() { ? hourlyRows.reduce((best: any, r: any) => Number(r.bill_count || 0) > Number(best?.bill_count || 0) ? r : best, null) : null + const maxBillCount = hourlyRows.length > 0 ? Math.max(...hourlyRows.map((r: any) => Number(r.bill_count || 0))) : 0 + const maxReceived = hourlyRows.length > 0 ? Math.max(...hourlyRows.map((r: any) => Number(r.received || 0))) : 0 + const yLeftMax = Math.ceil(maxReceived * 1.15 / 10000) * 10000 + const yRightMax = Math.ceil(maxBillCount * 1.15 / 10000) * 10000 + const channelTotals = channelRows.length > 0 ? Object.keys(channelRows[0]).filter(k => k !== 'business_date' && k !== 'meituan_commission' && k !== 'taobao_commission' && k !== 'jd_commission') .map(k => ({ @@ -123,8 +128,8 @@ export function TimePage() { `${v}:00`} tick={{ fontSize: 10 }} /> - v >= 10000 ? `${(v / 10000).toFixed(0)}万` : v} tick={{ fontSize: 10 }} domain={[0, (max: number) => Math.ceil(max * 1.15 / 10000) * 10000]} /> - v >= 10000 ? `${(v / 10000).toFixed(0)}万` : v} tick={{ fontSize: 10 }} domain={[0, (max: number) => Math.ceil(max * 1.15 / 10000) * 10000]} /> + v >= 10000 ? `${(v / 10000).toFixed(0)}万` : v} tick={{ fontSize: 10 }} domain={[0, yLeftMax]} /> + v >= 10000 ? `${(v / 10000).toFixed(0)}万` : v} tick={{ fontSize: 10 }} domain={[0, yRightMax]} /> `${v}:00`} formatter={(v: any, name: any) => name === '实收' ? formatCurrency(v) : formatNumber(v)} />