From c3e0e9a4962d8a8d24bfb9f57cd7c1fd12ab11a3 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 7 Jul 2026 19:05:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9E=E6=AC=BE=E6=8F=90=E9=86=92?= =?UTF-8?q?=E5=A4=84=E7=90=86=E8=B6=85=E9=A2=9D=E5=9B=9E=E6=AC=BE=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=EF=BC=88=E8=B4=9F=E6=95=B0=E6=9C=AA=E5=9B=9E=E6=AC=BE?= =?UTF-8?q?=E2=86=92=E8=B6=85=E9=A2=9D=E5=9B=9E=E6=AC=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/modules/home.js | 7 +++++-- templates/index.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/static/modules/home.js b/static/modules/home.js index 3012885..5574e15 100644 --- a/static/modules/home.js +++ b/static/modules/home.js @@ -7,11 +7,14 @@ function renderHome() { // 回款提醒 const yrRev = m.revenue_annual || 0, yrPay = m.payment_annual || 0, yrUnpaid = yrRev - yrPay; const yrPayRate = yrRev > 0 ? Math.round(yrPay / yrRev * 100) : 0; - const yrUnpaidWan = Math.round(yrUnpaid / 10000); + const yrUnpaidWan = Math.round(Math.abs(yrUnpaid) / 10000); const payRateCls = yrPayRate < 30 ? 'text-red-600' : yrPayRate < 80 ? 'text-amber-600' : 'text-green-600'; + const unpaidLabel = yrUnpaid >= 0 + ? '你还有 ' + yrUnpaidWan + '万 未回款' + : '超额回款 ' + yrUnpaidWan + '万'; const payReminder = yrRev > 0 ? '
' + '' + - '回款提醒:本年度确收 ' + moneyInt(yrRev) + ',回款 ' + moneyInt(yrPay) + ',你还有 ' + yrUnpaidWan + '万 未回款,当前回款率:' + yrPayRate + '%' + + '回款提醒:本年度确收 ' + moneyInt(yrRev) + ',回款 ' + moneyInt(yrPay) + ',' + unpaidLabel + ',当前回款率:' + yrPayRate + '%' + '
' : ''; const rows1 = [ ["年度累计", moneyInt(m.signed_annual || m.signed_amount)], diff --git a/templates/index.html b/templates/index.html index 5ed371b..c8e0cf3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -76,7 +76,7 @@
-

OPC Manager v1.0.0.9

+

OPC Manager v1.0.0.10

科普 OPC 工作台