liujt 7 месяцев назад
Родитель
Сommit
ca80340ed8

+ 0 - 1
src/views/bpm/handleTask/components/saleOrder/returnGoods/submit.vue

@@ -167,7 +167,6 @@
         // this.$emit('submit');
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
-   
         if (!storageData) {
           return;
         }

+ 17 - 19
src/views/bpm/stockManagement/storage.vue

@@ -228,13 +228,13 @@
                 align="center"
                 width="100"
                 prop="ifPackageOk"
+                v-if="isShowPackage"
               > 
                 <template slot-scope="{ row, $index }">
-                  <template v-if="row.isSave">
-                    {{ row.ifPackageOk ? '是' : '否' }}
-                  </template>
+                  <!-- <template v-if="row.isSave">
+                    {{ row.ifPackageOk == 1 ? '是' : row.ifPackageOk == 0 ? '否' : '' }}
+                  </template> -->
                   <el-form-item
-                    v-else
                     :prop="`productList.${$index}.ifPackageOk`"
                     required
                   >
@@ -250,13 +250,13 @@
                 align="center"
                 width="100"
                 prop="unpackUserName"
+                v-if="isShowPackage"
               >
                 <template slot-scope="{ row, $index }">
-                  <template v-if="row.isSave">
+                  <!-- <template v-if="row.isSave">
                     {{ row.unpackUserName }}
-                  </template>
+                  </template> -->
                   <el-form-item
-                    v-else
                     :prop="`productList.${$index}.unpackUserName`"
                     required
                   >
@@ -1749,7 +1749,7 @@
             });
             console.log(this.productList, 'this.productListtttttttttttt');
             this.$nextTick(() => {
-              // this.batchSave();
+              this.batchSave();
               // this.listSaveArrs()
             });
           });
@@ -2424,7 +2424,14 @@
           this.$message.error('请先保存所有产品信息');
           return;
         }
-
+        if(this.isShowPackage) {
+          const userNameLength = this.productList.filter(item => !item.unpackUserName).length
+          const packgeLength = this.productList.filter(item => !item.ifPackageOk).length
+          if(userNameLength || packgeLength) {
+            this.$message.error('请先填写拆包装责任人和包装完好与否');
+            return;
+          }
+        }
         // 处理包装数据
         let _packingList = [];
         _packingList = this.packingList.map((packingItem) => {
@@ -2923,10 +2930,6 @@
               `productList.${index}.warehouseId`,
               
             ];
-            if(this.isShowPackage) {
-              fileds.push(`productList.${index}.unpackUserName`,
-              `productList.${index}.ifPackageOk`,)
-            }
             if (row.isSave) {
               return Promise.resolve(true);
             } else {
@@ -3072,12 +3075,7 @@
             `productList.${index}.warehouseId`
           ];
 
-          if(this.isShowPackage) {
-            fileds.push(
-              `productList.${index}.unpackUserName`,
-              `productList.${index}.ifPackageOk`,
-            )
-          }
+   
           Promise.all(
             fileds.map(
               (item) =>