Explorar o código

fix(BIZComponents): 修复计算总价时使用数量字段而不是计量数量的问题

liujt hai 8 meses
pai
achega
3144ce60bc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/BIZComponents/setProduct.js

+ 2 - 2
src/BIZComponents/setProduct.js

@@ -22,8 +22,8 @@ export function changeCount(row, countObj, noDiscountSingle) {
     : data.discountSinglePrice;
 
   setWeight(data);
-  if (row.totalCount && row.singlePrice) {
-    data['totalPrice'] = row.totalCount * row.singlePrice;
+  if (row[countObj.countKey] && row.singlePrice) {
+    data['totalPrice'] = row[countObj.countKey] * row.singlePrice;
     data['discountTotalPrice'] = !noDiscountSingle
       ? data.totalPrice
       : data.discountTotalPrice;