Browse Source

20241022

java8
qiezi 1 year ago
parent
commit
7065f8373d
  1. 8
      src/views/modules/quote/detail/breakdownCost.vue

8
src/views/modules/quote/detail/breakdownCost.vue

@ -441,10 +441,18 @@ export default {
}else if (column.property === 'rmCostQuote'){ }else if (column.property === 'rmCostQuote'){
totalCostQuote = new Decimal(sums[index]).toNumber() totalCostQuote = new Decimal(sums[index]).toNumber()
}else if (column.property === 'totalCostStd'){ }else if (column.property === 'totalCostStd'){
if (!totalCostStd || totalCostStd === 0 || this.subtotalCostStd === 0){
sums[index] = 0+'%'
}else {
sums[index] = new Decimal(totalCostStd / this.subtotalCostStd * 100).toFixed(0) + '%' sums[index] = new Decimal(totalCostStd / this.subtotalCostStd * 100).toFixed(0) + '%'
}
}else if (column.property === 'totalCostQuote'){ }else if (column.property === 'totalCostQuote'){
if (!totalCostQuote || totalCostQuote === 0 || this.subtotalCostQuote === 0){
sums[index] = 0+'%'
}else {
sums[index] = new Decimal(totalCostQuote / this.subtotalCostQuote * 100).toFixed(0) + '%' sums[index] = new Decimal(totalCostQuote / this.subtotalCostQuote * 100).toFixed(0) + '%'
} }
}
} else { } else {
sums[index] = 'N/A'; sums[index] = 'N/A';
} }

Loading…
Cancel
Save