Преглед изворни кода

处置方式某些不用选仓库

wsx пре 11 месеци
родитељ
комит
56e4838d18

+ 3 - 3
src/views/inspectionWork/components/sampleDisposeDialog.vue

@@ -103,9 +103,9 @@
 
       <template
         v-if="
-          this.formData.disposeType == 3 ||
-          this.formData.disposeType == 6 ||
-          this.formData.disposeType == 9
+          formData.disposeType == 3 ||
+          formData.disposeType == 6 ||
+          formData.disposeType == 9
         "
       >
         <el-form-item label="入库仓库:" prop="depotId" align="center">

+ 17 - 2
src/views/sample/samplemanagement/detailList.vue

@@ -168,7 +168,13 @@
           </el-row>
         </template>
 
-        <template v-if="disposeForm.disposeType !== 8">
+        <template
+          v-if="
+            disposeForm.disposeType == 3 ||
+            disposeForm.disposeType == 6 ||
+            disposeForm.disposeType == 9
+          "
+        >
           <el-form-item label="入库仓库:" prop="depotId" align="center">
             <el-select style="width: 100%" v-model="disposeForm.depotId">
               <el-option
@@ -184,7 +190,7 @@
       </el-form>
 
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消 </el-button>
+        <el-button @click="close">取 消 </el-button>
         <el-button type="primary" @click="consfirm">确 定</el-button>
       </span>
     </el-dialog>
@@ -468,6 +474,14 @@
     watch: {
       'disposeForm.disposeType': {
         handler(newVal, oldVal) {
+          if (newVal == 6) {
+            this.rules.depotId = [];
+          } else {
+            this.rules.depotId = [
+              { required: true, message: '请选择仓库', trigger: 'change' }
+            ];
+          }
+
           this.disposeForm.sampleCondition = '';
           this.disposeForm.sampleDate = '';
           this.disposeForm.samplePlace = '';
@@ -550,6 +564,7 @@
         });
       },
       close() {
+        this.$refs.disposeForm.resetFields()
         this.dialogVisible = false;
         this.disposeType = '';
       },

+ 13 - 13
src/views/unqualifiedProduct/unqualifiedList/concessionacceptance/index.vue

@@ -199,19 +199,19 @@
           //   label: '创建人',
           //   align: 'center'
           // },
-          {
-            prop: 'depotName',
-            label: '仓库名称',
-            align: 'center'
-          },
-          {
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
-            }
-          }
+          // {
+          //   prop: 'depotName',
+          //   label: '仓库名称',
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'status',
+          //   label: '状态',
+          //   align: 'center',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
+          //   }
+          // }
 
           // {
           //   columnKey: 'action',

+ 13 - 13
src/views/unqualifiedProduct/unqualifiedList/consumeproducts/index.vue

@@ -199,19 +199,19 @@
           //   label: '创建人',
           //   align: 'center'
           // },
-          {
-            prop: 'depotName',
-            label: '仓库名称',
-            align: 'center'
-          },
-          {
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
-            }
-          }
+          // {
+          //   prop: 'depotName',
+          //   label: '仓库名称',
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'status',
+          //   label: '状态',
+          //   align: 'center',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
+          //   }
+          // }
 
           // {
           //   columnKey: 'action',

+ 23 - 15
src/views/unqualifiedProduct/unqualifiedList/detailList.vue

@@ -172,16 +172,15 @@
           </el-row>
         </template>
 
-        <template v-if="this.disposeForm.disposeType !== 8">
-          <el-form-item
-            label="入库仓库:"
-            prop="depotId"
-            align="center"
-          >
-            <el-select
-              style="width: 100%"
-              v-model="disposeForm.depotId"
-            >
+        <template
+          v-if="
+            disposeForm.disposeType == 3 ||
+            disposeForm.disposeType == 6 ||
+            disposeForm.disposeType == 9
+          "
+        >
+          <el-form-item label="入库仓库:" prop="depotId" align="center">
+            <el-select style="width: 100%" v-model="disposeForm.depotId">
               <el-option
                 v-for="item in warehouseList"
                 :key="item.id"
@@ -477,10 +476,11 @@
             align: 'center',
             width: '120',
             showOverflowTooltip: true,
-            formatter: (row, column, cellValue) => {   
+            formatter: (row, column, cellValue) => {
               console.log(this.allList.find((item) => item.value == cellValue));
-              
-              return this.allList.find((item) => item.value == cellValue)?.label;
+
+              return this.allList.find((item) => item.value == cellValue)
+                ?.label;
             }
           },
 
@@ -547,6 +547,9 @@
         });
       },
       close() {
+        this.$refs.disposeForm.resetFields();
+        this.dialogVisible = false;
+        this.disposeType = '';
         this.all = false;
         this.formData.disposalStatus = '';
       },
@@ -592,8 +595,6 @@
         });
 
         return;
-
-
       },
       validate() {},
       async save(data) {
@@ -623,6 +624,13 @@
     watch: {
       'disposeForm.disposeType': {
         handler(newVal, oldVal) {
+          if (newVal == 6) {
+            this.rules.depotId = [];
+          } else {
+            this.rules.depotId = [
+              { required: true, message: '请选择仓库', trigger: 'change' }
+            ];
+          }
           this.disposeForm.sampleCondition = '';
           this.disposeForm.sampleDate = '';
           this.disposeForm.samplePlace = '';

+ 13 - 13
src/views/unqualifiedProduct/unqualifiedList/downgradeuse/index.vue

@@ -199,19 +199,19 @@
           //   label: '创建人',
           //   align: 'center'
           // },
-          {
-            prop: 'depotName',
-            label: '仓库名称',
-            align: 'center'
-          },
-          {
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
-            }
-          }
+          // {
+          //   prop: 'depotName',
+          //   label: '仓库名称',
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'status',
+          //   label: '状态',
+          //   align: 'center',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
+          //   }
+          // }
 
           // {
           //   columnKey: 'action',

+ 13 - 13
src/views/unqualifiedProduct/unqualifiedList/returngoods/index.vue

@@ -199,19 +199,19 @@
           //   label: '创建人',
           //   align: 'center'
           // },
-          {
-            prop: 'depotName',
-            label: '仓库名称',
-            align: 'center'
-          },
-          {
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
-            }
-          }
+          // {
+          //   prop: 'depotName',
+          //   label: '仓库名称',
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'status',
+          //   label: '状态',
+          //   align: 'center',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
+          //   }
+          // }
 
           // {
           //   columnKey: 'action',

+ 13 - 13
src/views/unqualifiedProduct/unqualifiedList/rework/index.vue

@@ -237,19 +237,19 @@
           //   label: '创建人',
           //   align: 'center'
           // },
-          {
-            prop: 'depotName',
-            label: '仓库名称',
-            align: 'center'
-          },
-          {
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
-            }
-          }
+          // {
+          //   prop: 'depotName',
+          //   label: '仓库名称',
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'status',
+          //   label: '状态',
+          //   align: 'center',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 0 ? '未入库' : cellValue == 1 ? '已入库' : '';
+          //   }
+          // }
 
           // {
           //   columnKey: 'action',