Parcourir la source

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

liujt il y a 8 mois
Parent
commit
3144ce60bc
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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;