fix:产品折扣金额bug处理
parent
5ac798c295
commit
2fae492f2b
|
|
@ -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';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue