|
@@ -342,7 +342,6 @@ export default {
|
|
|
})
|
|
|
);
|
|
|
}
|
|
|
- this.setTotalAmounts(productData);
|
|
|
this.productData = productData;
|
|
|
},
|
|
|
sortTableText(service) {
|
|
@@ -511,16 +510,6 @@ export default {
|
|
|
}
|
|
|
return '';
|
|
|
},
|
|
|
- // 设置合同金额合计和标准售价合计,以及计算折扣率总和。
|
|
|
- setTotalAmounts(productData) {
|
|
|
- const totalFinalPrice = productData.reduce((acc, cur) => acc + Number(cur.final_price), 0).toFixed(2);
|
|
|
- const totalOriginalPrice = productData.reduce((acc, cur) => acc + Number(cur.original_price), 0).toFixed(2);
|
|
|
- const rateTotal = div(totalFinalPrice, totalOriginalPrice) ? (div(totalFinalPrice, totalOriginalPrice) * 100).toFixed(2) + '%' : '无法计算';
|
|
|
-
|
|
|
- this.orderData.final_price_total = totalFinalPrice;
|
|
|
- this.orderData.original_price_total = Number(totalOriginalPrice) ? '¥' + totalOriginalPrice : '无法计算';
|
|
|
- this.orderData.rate_total = Number(totalOriginalPrice) ? rateTotal : '无法计算';
|
|
|
- },
|
|
|
|
|
|
shouldRenderItem(item, product) {
|
|
|
if (item.condition && typeof item.condition === 'function') {
|