yusheng пре 2 недеља
родитељ
комит
93768e986f
1 измењених фајлова са 12 додато и 23 уклоњено
  1. 12 23
      src/views/warehouseManagement/stockManagement/add.vue

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

@@ -1688,7 +1688,11 @@
             weight = row.measureQuantity * Number(row.singleWeight);
           }
           this.$set(this.productList[index], 'weight', weight);
-          this.$set(this.productList[index], 'packingQuantity', this.setPNum(row));
+          this.$set(
+            this.productList[index],
+            'packingQuantity',
+            this.setPNum(row)
+          );
         }
       },
       //出入库申请列表操作直接入库
@@ -2627,8 +2631,6 @@
         return number;
       },
 
-
- 
       // 表格样式
       rowClass({ row, column, rowIndex, columnIndex }) {
         if (rowIndex === 1) {
@@ -3292,33 +3294,20 @@
             );
             if (row.isUnpack) {
               // 第二层条件: packingBoolen
-              if (packingBoolen) {
-                // 空值保护: 确保 filterArr[0] 存在
-                item.packingUnit =
-                  row.packingSpecificationOption[1].conversionUnit;
-              } else {
-                // 第三层条件: measureBoolen
-                if (measureBoolen) {
-                  // 处理 packingSpecificationOption 的索引
-                  const option =
-                    row.packingSpecificationOption?.[1] ||
-                    row.packingSpecificationOption?.[0];
-                  item.packingUnit = option?.conversionUnit;
-                } else {
-                  item.packingUnit =
-                    row.packingSpecificationOption[1].conversionUnit;
-                }
-              }
+              item.packingUnit =
+                row.packingSpecificationOption[1].conversionUnit;
             }
 
-         
             if (row.weightUnit == row.measureUnit) {
               item.weight = item.measureQuantity
                 ? Number(item.measureQuantity)
                 : 0;
-            } else { 
+            } else {
               //单位不相等 物品层总重除包装层计量
-               item.weight=this.$math.format(row.weight/item.measureQuantity, 14);
+              item.weight = this.$math.format(
+                (row.singleWeight || 0) * item.measureQuantity,
+                14
+              );
               // console.log('计量单位为不为KG类======================');
               // // 计量单位为不为KG类,重新统计计算
               // let inBoolen = !!this.getDict(