huang_an 2 лет назад
Родитель
Сommit
569a693be9
1 измененных файлов с 14 добавлено и 4 удалено
  1. 14 4
      src/views/warehouseManagement/stockManagement/add.vue

+ 14 - 4
src/views/warehouseManagement/stockManagement/add.vue

@@ -78,7 +78,6 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            =={{ formData.bizType }}
             <el-form-item label="入库类型" prop="bizType">
               <el-select
                 filterable
@@ -279,7 +278,11 @@
                 v-if="formData.bizType == 1"
               >
                 <template slot-scope="{ row, $index }">
+                  <template v-if="row.isSave">
+                    {{ row.customCode }}
+                  </template>
                   <el-form-item
+                    v-else
                     :prop="`warehousingMaterialList.${$index}.customCode`"
                     required
                   >
@@ -295,7 +298,11 @@
                 v-if="formData.bizType == 2"
               >
                 <template slot-scope="{ row, $index }">
+                  <template v-if="row.isSave">
+                    {{ row.supplierCode }}
+                  </template>
                   <el-form-item
+                    v-else
                     :prop="`warehousingMaterialList.${$index}.supplierCode`"
                     required
                   >
@@ -1062,13 +1069,16 @@
           `warehousingMaterialList.${index}.batchNo`,
           `warehousingMaterialList.${index}.houseList`
         ];
+        if (this.formData.bizType == 1) {
+          fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
+        } else if (this.formData.bizType == 2) {
+          fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
+        }
         if (this.formData.bizType != 5) {
           fileds.push(
             ...[
               `warehousingMaterialList.${index}.outInNum`,
-              `warehousingMaterialList.${index}.minPackingCount`,
-              `warehousingMaterialList.${index}.customCode`,
-              `warehousingMaterialList.${index}.supplierCode`
+              `warehousingMaterialList.${index}.minPackingCount`
             ]
           );
         } else if (