소스 검색

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

liujt 5 달 전
부모
커밋
4f0e0ef7e1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);