yijing 1 rok temu
rodzic
commit
70bc22b484
1 zmienionych plików z 12 dodań i 12 usunięć
  1. 12 12
      src/views/warehouseManagement/stockManagement/add.vue

+ 12 - 12
src/views/warehouseManagement/stockManagement/add.vue

@@ -851,20 +851,16 @@ export default {
         //计量数量
         row.measureQuantity = this.changeCount(total);
         console.log(total, '包装数量')
-        if (row.packingUnit == row.measureUnit && row.measureUnit == '立方' && row.netWeight) {
-          total = Number(row.packingQuantity) * row.netWeight;
+
+        if (row.packingUnit == row.measureUnit) {
+          // total = Number(row.packingQuantity) * row.netWeight;
           console.log(total, '22')
         } else {
-          let conversionApplied = false;
           for (; startIndex < endIndex; endIndex--) {
-            if (!conversionApplied) {
-              total = this.$math.format(
-                row.packingSpecificationOption[endIndex].packageCell * total,
-                14
-              );
-              conversionApplied = true;
-            }
-
+            total = this.$math.format(
+              row.packingSpecificationOption[endIndex].packageCell * total,
+              14
+            );
           }
           console.log(total, '333')
         }
@@ -882,6 +878,9 @@ export default {
 
           console.log(total, '55555')
           this.$set(this.productList[index], 'weight', total);
+          if (row.packingUnit == row.measureUnit) {
+            this.$set(this.productList[index], 'measureQuantity', row.packingQuantity)
+          }
         } else {
           console.log(row, 'row')
           if (row.measureType != 1) {
@@ -904,6 +903,7 @@ export default {
             console.log(total, '8')
           }
         }
+        this.$set(this.productList[index], 'measureQuantity', total)
       }
     },
     //出入库申请列表操作直接入库
@@ -2309,7 +2309,7 @@ export default {
     generateWrappers(row, productIndex, packingCodeList) {
       console.log(packingCodeList, 'packingCodeListROW', row.measureType)
       //计量类型不是数量
-      if (row.measureType != 1) {
+      if (!row.isUnpack && row.measureType != 1) {
         // 计量单位=包装单位,则不生成包装层数据
         if (row.measureUnit == row.packingUnit) {
           // 直接生成物品层数据