ysy 2 years ago
parent
commit
416ce3d85d

+ 2 - 2
src/views/inspectionClassify/components/ProductModal.vue

@@ -153,7 +153,7 @@ export default {
         ...where,
         pageNum: page,
         size: limit,
-        categoryLevelId: 15,
+        categoryLevelId: this.categoryLevelId,
 
       });
       return res;
@@ -173,7 +173,7 @@ export default {
       try {
         this.treeLoading = true;
 
-        const res = await getTreeByPid(15);
+        const res = await getTreeByPid(4);
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 7 - 20
src/views/inspectionClassify/components/edit.vue

@@ -6,20 +6,8 @@
       <el-row>
 
 
-        <el-col :span="12">
-          <el-form-item label="版本号:" prop="version">
-            <el-input v-model="form.version"></el-input>
-          </el-form-item>
-        </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="状态:" prop="status">
-            <el-select v-model="form.status" placeholder="请选择" style="width: 100%">
-              <el-option label="停用" :value="0" />
-              <el-option label="启用" :value="1" />
-            </el-select>
-          </el-form-item>
-        </el-col>
+
 
         <el-col :span="12">
           <el-form-item label="质检方式:" prop="mode">
@@ -141,7 +129,7 @@ export default {
       return {
         id: '',
         name: '',
-        status: '',
+        status: 1,
         type: '',
         version: '1.0',
         standardCode: '',
@@ -159,18 +147,14 @@ export default {
       rules: {
 
         name: [{ required: true, message: '请输入', trigger: 'blur' }],
-        version: [{ required: true, message: '请输入', trigger: 'blur' }],
+
         type: {
           required: true,
           message: '请选择',
           trigger: 'change'
         },
 
-        status: {
-          required: true,
-          message: '请选择',
-          trigger: 'change'
-        },
+
 
       },
       visible: false,
@@ -195,6 +179,9 @@ export default {
 
     getDetail(id) {
       getById(id).then(res => {
+        if (!res.data.version) {
+          res.data.version = '1.0'
+        }
         this.form = res.data
         this.form['postscriptRemoveIds'] = []
         this.form['toolRemoveIds'] = []

+ 39 - 12
src/views/inspectionClassify/components/user-list.vue

@@ -23,6 +23,18 @@
       </template>
 
 
+      
+      <template v-slot:type="{ row }">
+
+        {{getDictValue('质检标准类型', row.qualityStandard.type)}}
+
+      </template>
+
+      <template v-slot:standardCode="{ row }">
+        {{ row.qualityStandard.standardCode }}
+      </template>
+
+
 
       <template v-slot:status="{ row }">
         {{ row.qualityStandard.status == 1 ? '启用' : '停用' }}
@@ -30,7 +42,7 @@
 
 
       <template v-slot:mode="{ row }">
-        {{getDictValue('质检方式', row.mode)}}
+        {{ getDictValue('质检方式', row.mode) }}
 
       </template>
 
@@ -115,7 +127,19 @@ export default {
           slot: 'name',
         },
 
- 
+        {
+          label: '标准类型',
+          prop: 'type',
+          slot: 'type',
+        },
+
+        {
+          label: '标准代码',
+          prop: 'standardCode',
+
+        },
+
+
 
         {
           prop: 'status',
@@ -125,6 +149,14 @@ export default {
           slot: 'status',
         },
 
+        {
+          prop: 'version',
+          label: '版本号',
+          align: 'center',
+          minWidth: 110,
+          slot: 'version',
+        },
+
 
 
         {
@@ -135,13 +167,7 @@ export default {
           slot: 'mode',
         },
 
-        {
-          prop: 'version',
-          label: '版本号',
-          align: 'center',
-          minWidth: 110,
-          slot: 'version',
-        },
+
 
         {
           label: '操作',
@@ -158,6 +184,7 @@ export default {
   },
   created() {
     this.requestDict('质检方式');
+    this.requestDict('质检标准类型')
   },
   methods: {
     /* 表格数据源 */
@@ -172,7 +199,7 @@ export default {
     },
     /* 刷新表格 */
     reload(where) {
-      this.$refs.table.reload({ pageNum: 1, where: where ,  categoryLevelId: this.categoryLevelId ,  rootCategoryLevelId: this.rootId});
+      this.$refs.table.reload({ pageNum: 1, where: where, categoryLevelId: this.categoryLevelId, rootCategoryLevelId: this.rootId });
     },
 
     /* 打开编辑弹窗 */
@@ -213,8 +240,8 @@ export default {
       this.$refs.searchRef.search();
     },
 
-    clickSearch(info){
-      this.categoryLevelId = info.id 
+    clickSearch(info) {
+      this.categoryLevelId = info.id
       this.rootCategoryLevelId = info.rootCategoryLevelId
       this.reload()
 

+ 1 - 0
src/views/inspectionClassify/index.vue

@@ -39,6 +39,7 @@ export default {
     handleNodeClick(info) {
       this.current = info;
        this.$nextTick(() => {
+        console.log(info)
         this.$refs.searchRef.clickSearch(info)
        })
     },