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 ? '
OPC Manager v1.0.0.9
+OPC Manager v1.0.0.10