Explorar el Código

fix(setProduce): 修复采购类型下重量计算逻辑错误

liujt hace 5 meses
padre
commit
4f0e0ef7e1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/BIZComponents/setProduct.js

+ 1 - 1
src/BIZComponents/setProduct.js

@@ -51,7 +51,7 @@ export function changeCount(row, countObj, noDiscountSingle, weightType) {
 
 // 计算总重
 function setWeight(row, type) {
-  if (row.weightUnit == row.measuringUnit && row.pricingWay == 1 && type != 'purchase') {
+  if (row.weightUnit == row.measuringUnit && (type != 'purchase' || (type == 'purchase'&& row.pricingWay == 1))) {
     row['totalWeight'] = row.totalCount;
   } else if (row.totalCount && row.singleWeight) {
     row['totalWeight'] = (row.totalCount * row.singleWeight).toFixed(2);