huang_an 2 роки тому
батько
коміт
cec8ddd693
1 змінених файлів з 10 додано та 5 видалено
  1. 10 5
      src/views/warehouseManagement/stockManagement/add.vue

+ 10 - 5
src/views/warehouseManagement/stockManagement/add.vue

@@ -1294,10 +1294,8 @@
           )
         )
           .then((res) => {
-            console.log(11111111);
             this.$set(row, 'isSave', true);
-
-            if (this.formData.bizScene != 5) {
+            if (this.formData.bizType != 5) {
               this.createMaterialCode(row);
             } else {
               // 退还
@@ -1307,7 +1305,6 @@
           .catch((err) => {
             this.$message.error('请填入必填项!');
           });
-        console.log(2);
       },
       // 批量设置生产日期
       handleSelectionChange(val) {
@@ -1401,6 +1398,9 @@
               if (item.warehouseLedgerDetails?.length) {
                 item.warehouseLedgerDetails.forEach((i, index) => {
                   this.$set(i, 'num', num);
+                  this.$set(i, 'weight', item.minPackingCount);
+                  this.$set(i, 'weightUtil', item.weightUnit);
+
                   if (!item.isUnpack) {
                     if (index < item.warehouseLedgerDetails.length - 1) {
                       num = res1.shift()?.num;
@@ -1421,6 +1421,7 @@
             });
           }
         }
+        console.log('rrrrr', this.warehousingMaterialList);
       },
       // 入库明细生成条码信息 退还
       async createMaterialCodeReturn(row) {
@@ -1568,7 +1569,11 @@
                 num: item.num,
                 batchNo: item.batchNo,
                 categoryId:
-                  this.formData.bizType == 2 ? item.categoryId : item.id,
+                  this.formData.bizType == 2
+                    ? item.categoryId
+                      ? item.categoryId
+                      : this.formData.extInfo.assetType
+                    : item.id,
                 count: item.outInNum,
                 minPackingCount: item.minPackingCount,
                 packingCount: item.outInNum,