fix:产品折扣金额bug处理

dev_1.0.2
UNISINSIGHT\rdpnr_jiangpeng 2026-03-26 11:27:53 +08:00
parent 5ac798c295
commit 2fae492f2b
1 changed files with 4 additions and 1 deletions

View File

@ -312,7 +312,10 @@ export default {
}, },
calculateTotal(productList, discount) { calculateTotal(productList, discount) {
if (!productList) return 0; if (!productList) return 0;
return productList.reduce((sum, product) => sum + (product.allPrice || 0), 0); if (this.order.orderStatus === '2' || this.order.orderStatus === 2) {
return productList.reduce((sum, product) => sum + (product.allPrice || 0), 0);
}
return productList.reduce((sum, product) => sum + (this.getDiscountedAllPrice(product, discount) || 0), 0);
}, },
formatCurrency(value) { formatCurrency(value) {
if (value == null) return '0.00'; if (value == null) return '0.00';