From 5ee7b83db49997cd3336d59006bb6ba33d917a12 Mon Sep 17 00:00:00 2001 From: gaoxq <376340421@qq.com> Date: Thu, 26 Feb 2026 22:15:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B9=E7=9B=AE=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../desktop/screen/Erp/components/ChartV07.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/screen-vue/src/views/desktop/screen/Erp/components/ChartV07.vue b/screen-vue/src/views/desktop/screen/Erp/components/ChartV07.vue index 46ef3ee..eae1f9a 100644 --- a/screen-vue/src/views/desktop/screen/Erp/components/ChartV07.vue +++ b/screen-vue/src/views/desktop/screen/Erp/components/ChartV07.vue @@ -283,14 +283,14 @@ function initChart() { const netProfitYuan = vList.value.map(item => (Number(item.index01 || 0) - Number(item.index02 || 0)).toFixed(2)) const incomeRingRatio = vList.value.map((item, idx) => { - const lastVal = lastMonthIncomeYuan[idx] || 1 + const lastVal = lastMonthIncomeYuan[idx] const currVal = incomeYuan[idx] || 0 - return ((currVal - lastVal) / lastVal * 100).toFixed(2) + return lastVal === 0 ? '0.00' : ((currVal - lastVal) / lastVal * 100).toFixed(2) }) const expenseRingRatio = vList.value.map((item, idx) => { - const lastVal = lastMonthExpenseYuan[idx] || 1 + const lastVal = lastMonthExpenseYuan[idx] const currVal = expenseYuan[idx] || 0 - return ((currVal - lastVal) / lastVal * 100).toFixed(2) + return lastVal === 0 ? '0.00' : ((currVal - lastVal) / lastVal * 100).toFixed(2) }) const incomeWan = incomeYuan.map(val => (val / 10000).toFixed(2)) @@ -308,22 +308,22 @@ function initChart() { 本月收入(元) 本月支出(元) - 本月占比(%) 上月收入(元) 上月支出(元) - 本月净利润(元) 收入环比(%) 支出环比(%) + 占比(%) + 净利润(元) ${incomeYuan[idx]} ${expenseYuan[idx]} - ${rate[idx]} ${lastMonthIncomeYuan[idx]} ${lastMonthExpenseYuan[idx]} - ${netProfitYuan[idx]} ${incomeRingRatio[idx]} ${expenseRingRatio[idx]} + ${rate[idx]} + ${netProfitYuan[idx]} `