From 7065f8373d4c824d02b902870b51d37bbc5621b0 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Wed, 23 Oct 2024 15:51:51 +0800 Subject: [PATCH] 20241022 --- src/views/modules/quote/detail/breakdownCost.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/modules/quote/detail/breakdownCost.vue b/src/views/modules/quote/detail/breakdownCost.vue index 1bda2ac..0bc6158 100644 --- a/src/views/modules/quote/detail/breakdownCost.vue +++ b/src/views/modules/quote/detail/breakdownCost.vue @@ -441,9 +441,17 @@ export default { }else if (column.property === 'rmCostQuote'){ totalCostQuote = new Decimal(sums[index]).toNumber() }else if (column.property === 'totalCostStd'){ - sums[index] = new Decimal(totalCostStd / this.subtotalCostStd * 100).toFixed(0) + '%' + if (!totalCostStd || totalCostStd === 0 || this.subtotalCostStd === 0){ + sums[index] = 0+'%' + }else { + sums[index] = new Decimal(totalCostStd / this.subtotalCostStd * 100).toFixed(0) + '%' + } }else if (column.property === 'totalCostQuote'){ - sums[index] = new Decimal(totalCostQuote / this.subtotalCostQuote * 100).toFixed(0) + '%' + if (!totalCostQuote || totalCostQuote === 0 || this.subtotalCostQuote === 0){ + sums[index] = 0+'%' + }else { + sums[index] = new Decimal(totalCostQuote / this.subtotalCostQuote * 100).toFixed(0) + '%' + } } } else { sums[index] = 'N/A';