|
|
|
@ -391,10 +391,10 @@ export default { |
|
|
|
}, 0); |
|
|
|
sums[index] = new Decimal(sums[index]).toFixed(6) |
|
|
|
if (column.property ==='subtotalCostQuote'){ |
|
|
|
this.subtotalCostQuote = sums[index] |
|
|
|
this.subtotalCostQuote = sums[index]?sums[index]:0 |
|
|
|
} |
|
|
|
if (column.property ==='subtotalCostStd'){ |
|
|
|
this.subtotalCostStd = sums[index] |
|
|
|
this.subtotalCostStd = sums[index]?sums[index]:0 |
|
|
|
} |
|
|
|
if (column.property === 'subPercentageQuote' || column.property ==='subPercentageStd'){ |
|
|
|
sums[index] = new Decimal(sums[index] * 100).toFixed(2) + '%' |
|
|
|
@ -461,10 +461,12 @@ export default { |
|
|
|
<span>{{new Decimal(scope.row[item.columnProp] * 100).toFixed(2)}}%</span> |
|
|
|
</template> |
|
|
|
<template v-else-if=" item.columnProp === 'totalCostStd'"> |
|
|
|
<span v-if="!item.columnHidden">{{ new Decimal(scope.row['rmCostStandard']/ subtotalCostStd * 100).toFixed(0)}}%</span> |
|
|
|
<span v-if="scope.row['rmCostStandard'] !== 0 && subtotalCostStd !== 0">{{ new Decimal(scope.row['rmCostStandard'] / subtotalCostStd * 100).toFixed(0)}}%</span> |
|
|
|
<span v-else>0%</span> |
|
|
|
</template> |
|
|
|
<template v-else-if=" item.columnProp === 'totalCostQuote'"> |
|
|
|
<span v-if="!item.columnHidden">{{ new Decimal(scope.row['rmCostQuote']/ subtotalCostQuote * 100).toFixed(0)}}%</span> |
|
|
|
<span v-if="scope.row['rmCostQuote'] !== 0 && subtotalCostQuote !== 0">{{ new Decimal(scope.row['rmCostQuote']/ subtotalCostQuote * 100).toFixed(0)}}%</span> |
|
|
|
<span v-else>0%</span> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
|