huang_an 2 лет назад
Родитель
Сommit
227cf300d1
2 измененных файлов с 27 добавлено и 24 удалено
  1. 26 23
      src/views/warehouseManagement/stockManagement/add.vue
  2. 1 1
      vue.config.js

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

@@ -2072,32 +2072,35 @@
               if (item.warehouseLedgerDetails?.length) {
                 item.warehouseLedgerDetails.forEach((i, index) => {
                   this.$set(i, 'num', num);
-                  if (item.measuringUnit == item.weightUnit) {
-                    this.$set(i, 'weight', item.minPackingCount);
-                    this.$set(i, 'initWeight', item.minPackingCount);
-                  } else {
-                    this.$set(
-                      i,
-                      'weight',
-                      Number(
-                        this.$math.format(
-                          1 * item.minPackingCount * item.netWeight,
-                          14
+                  console.log('i---', i);
+                  console.log('row---', row);
+                  if (row.code == i.code) {
+                    if (item.measuringUnit == item.weightUnit) {
+                      this.$set(i, 'weight', item.minPackingCount);
+                      this.$set(i, 'initWeight', item.minPackingCount);
+                    } else {
+                      this.$set(
+                        i,
+                        'weight',
+                        Number(
+                          this.$math.format(
+                            1 * item.minPackingCount * item.netWeight,
+                            14
+                          )
                         )
-                      )
-                    );
-                    this.$set(
-                      i,
-                      'initWeight',
-                      Number(
-                        this.$math.format(
-                          1 * item.minPackingCount * item.netWeight,
-                          14
+                      );
+                      this.$set(
+                        i,
+                        'initWeight',
+                        Number(
+                          this.$math.format(
+                            1 * item.minPackingCount * item.netWeight,
+                            14
+                          )
                         )
-                      )
-                    );
+                      );
+                    }
                   }
-
                   this.$set(i, 'weightUtil', item.weightUnit);
 
                   this.$set(i, 'packingCount', 1);

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.132:18086',
-        target: 'http://192.168.1.110:18086',
+        target: 'http://192.168.1.147:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''