Browse Source

Merge remote-tracking branch 'origin/dev' into dev

mazheng 1 year ago
parent
commit
e8259748e6

BIN
dist.rar


+ 12 - 0
src/api/material/BOM.js

@@ -158,6 +158,18 @@ export async function getBomPageList(params) {
   return Promise.reject(new Error(res.data.message));
 }
 
+// 获取产品BOM列表
+export async function getBomPageCategoryId(params) {
+  const res = await request.get(`/main/bomCategory/pageByCategoryId`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
 // 转换
 export async function convert(data) {
   const res = await request.post(`/main/bomCategory/convert`, data);

+ 40 - 0
src/api/material/inspectionClassify.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request';
+
+
+
+
+// 列表 
+
+export async function getList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/qms/qualitylevel/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+  
+
+  export async function getById(id) {
+    const res = await request.get(`/qms/qualitylevel/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }
+
+
+
+
+
+// 批量保存
+export async function saveBatch (data) {
+  const res = await request.post(`/qms/qualitylevel/saveBatch`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 18 - 0
src/api/system/file/index.js

@@ -102,3 +102,21 @@ export async function importBatch (data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 导入pbom
+export async function importPBom (data) {
+  const formData = new FormData();
+  data.multiPartFiles.forEach((item, index) => {
+    formData.append(`multiPartFiles`, item);
+  });
+  const res = await request.post(
+    `/main/bomCategory/importPBom`,
+    formData
+  );
+  if (res.data.code === '0') {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+

+ 3 - 1
src/enum/dict.js

@@ -47,7 +47,9 @@ export default {
   区域类型: 'main_area_type',
   工种类型: 'work_type',
   '客户/供应商资质类型': 'contact_qc_type',
-  生产类型: 'productionType'
+  生产类型: 'productionType',
+  质检标准类型: 'quality_testing_code',
+  质检方式: 'quality_method_code'
 };
 
 export const numberList = [

+ 130 - 150
src/views/material/BOMmanage/components/attribute.vue

@@ -2,7 +2,7 @@
   <div>
     <el-form label-width="100px" ref="form" :model="attributeData">
       <el-row>
-        <el-col :span="8"  label-width="100px">
+        <el-col :span="8" label-width="100px">
           <el-form-item label="名称:" prop="category.name">
             <el-input
               placeholder=""
@@ -12,131 +12,122 @@
           </el-form-item>
         </el-col>
 
- 
-          <el-col :span="8"  label-width="100px">
-            <el-form-item label="编码:" prop="code">
-              <el-input
-                placeholder=""
-                v-model="category.code"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="牌号:" prop="brandNum">
-              <el-input
-                placeholder=""
-                v-model="category.brandNum"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="型号:" prop="modelType">
-              <el-input
-                placeholder=""
-                v-model="category.modelType"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="编码:" prop="code">
+            <el-input
+              placeholder=""
+              v-model="category.code"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="规格:" prop="specification">
-              <el-input
-                placeholder=""
-                v-model="category.specification"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="牌号:" prop="brandNum">
+            <el-input
+              placeholder=""
+              v-model="category.brandNum"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="计量单位:" prop="measuringUnit">
-              <el-input
-                placeholder=""
-                v-model="category.measuringUnit"
-                disabled
-              ></el-input>
-              
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="型号:" prop="modelType">
+            <el-input
+              placeholder=""
+              v-model="category.modelType"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="重量单位:" prop="weightUnit">
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="规格:" prop="specification">
+            <el-input
+              placeholder=""
+              v-model="category.specification"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-              <el-input
-                placeholder=""
-                v-model="category.weightUnit"
-                disabled
-              ></el-input>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="计量单位:" prop="measuringUnit">
+            <el-input
+              placeholder=""
+              v-model="category.measuringUnit"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="重量单位:" prop="weightUnit">
+            <el-input
+              placeholder=""
+              v-model="category.weightUnit"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="包装单位:" prop="packingUnit">
-              <el-input
-                placeholder=""
-                v-model="category.packingUnit"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="包装单位:" prop="packingUnit">
+            <el-input
+              placeholder=""
+              v-model="category.packingUnit"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="毛重:" prop="roughWeight">
-              <el-input
-                placeholder=""
-                v-model="category.roughWeight"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="毛重:" prop="roughWeight">
+            <el-input
+              placeholder=""
+              v-model="category.roughWeight"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="净重:" prop="netWeight">
-              <el-input
-                placeholder=""
-                v-model="category.netWeight"
-                disabled
-              ></el-input>
-            </el-form-item>
-          </el-col>
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="净重:" prop="netWeight">
+            <el-input
+              placeholder=""
+              v-model="category.netWeight"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item
-              label="加工类型:"
-              prop="isConsumable"
-              v-if="
-                [1, 23, 9, 28].includes(Number(category.categoryLevelPathId))
-              "
-            >
+        <el-col :span="8" label-width="100px">
+          <el-form-item
+            label="加工类型:"
+            prop="isConsumable"
+            v-if="[1, 23, 9, 28].includes(Number(category.categoryLevelPathId))"
+          >
             <el-input
-                placeholder=""
-                :v-model="category.isConsumable == 1 ? '批量' : '单件'"
-                disabled
-              ></el-input>
-   
-            </el-form-item>
-          </el-col>
+              placeholder=""
+              :v-model="category.isConsumable == 1 ? '批量' : '单件'"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
-          <el-col :span="8" label-width="100px">
-            <el-form-item label="生产类型:" prop="produceType">
-              <el-input
-                placeholder=""
-                :v-model="  category.produceType &&
-                ['自制件', '采购件', '装配件', '外协件'][
-                  category.produceType - 1
-                ]"
-                disabled
-              ></el-input>
-          
-            </el-form-item>
-          </el-col>
-       
+        <el-col :span="8" label-width="100px">
+          <el-form-item label="生产类型:" prop="produceType">
+            <el-select v-model="category.produceType" filterable multiple>
+                <el-option
+                  v-for="item in dictList"
+                  :key="item.value"
+                  :value="item.value"
+                  :label="item.label"
+                ></el-option>
+              </el-select>
+          </el-form-item>
+        </el-col>
       </el-row>
 
       <el-row>
@@ -183,26 +174,6 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="8" label-width="100px">
-          <el-form-item label="状态" prop="name">
-            <el-select
-              style="width: 100%"
-              v-model="attributeData.status"
-              placeholder="请选择"
-            >
-              <el-option
-                v-for="item in statusOptions"
-                :label="item.label"
-                :value="item.value"
-                :key="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-row>
         <el-col :span="8" label-width="100px">
           <el-form-item label="物料库路径" prop="name">
             <el-input
@@ -212,16 +183,10 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="8" label-width="100px">
-          <el-form-item label="版本" prop="name">
-            <el-input
-              placeholder=""
-              v-model="attributeData.versions"
-            ></el-input>
-          </el-form-item>
-        </el-col>
       </el-row>
 
+
+
       <el-row>
         <el-col :span="20" label-width="100px">
           <el-form-item label="备注" prop="name">
@@ -257,14 +222,15 @@
         </el-col>
       </el-row>
 
-      <!-- <div class="btn_box">
+      <div class="btn_box">
         <el-button type="primary">修改</el-button>
-      </div> -->
+      </div>
     </el-form>
   </div>
 </template>
 
 <script>
+  import { getByCode } from '@/api/system/dictionary-data';
   export default {
     components: {},
     data() {
@@ -295,16 +261,30 @@
           {
             label: 'ABOM',
             value: '3'
-          },
-     
-        ]
+          }
+        ],
+        dictList: [],
       };
     },
 
-    created() {},
+    created() {
+      this.getDictList('productionType');
+    },
 
     beforeDestroy() {},
-    methods: {},
+    methods: {
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+     
+      },
+    },
     props: {
       attributeData: {
         type: Object,

+ 2 - 10
src/views/material/BOMmanage/components/baseInfo.vue

@@ -13,7 +13,7 @@
           </el-col>
 
 
-      <el-row v-if="dataInfo.bomType == 2">
+      <el-row>
         <el-col :span="6" label-width="100px">
           <el-form-item label="BOM编码" prop="type">
             <el-input
@@ -61,15 +61,7 @@
         </el-col>
 
 
-        <el-col :span="6" label-width="100px">
-          <el-form-item label="所属工厂" prop="code">
-            <el-input
-              disabled
-              placeholder="所属工厂"
-              v-model="dataInfo.code"
-            ></el-input>
-          </el-form-item>
-        </el-col>
+   
 
       </el-row>
 

+ 194 - 0
src/views/material/BOMmanage/components/detailedList.vue

@@ -0,0 +1,194 @@
+<template>
+    <div class="ele-body">
+      <el-card shadow="never">
+        <BOMSearch
+          @search="reload"
+          :statusOpt="statusOpt"
+          :categoryCode="where.categoryCode"
+        />
+        <ele-pro-table
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            :initLoad="false"
+            class="dict-table"
+            tool-class="ele-toolbar-actions"
+          >
+            <!-- 表头工具栏 -->
+            <template v-slot:action="{ row }">
+              <el-switch
+                :active-value="'1'"
+                :inactive-value="'0'"
+                @change="openBom(row, $event)"
+                v-model="row.status"
+              >
+              </el-switch>
+            </template>
+          </ele-pro-table>
+      </el-card>
+    </div>
+  </template>
+  
+  <script>
+    import BOMSearch from './BOM-search.vue';
+    import {  getBomPageCategoryId, startAndStop } from '@/api/material/BOM';
+  
+    export default {
+      name: 'SystemDictionary',
+      components: { BOMSearch },
+      data() {
+        return {
+          // 表格列配置
+          columns: [
+            {
+              label: '序号',
+              columnKey: 'index',
+              type: 'index',
+              width: 55,
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'code',
+              label: 'BOM编码',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'name',
+              label: 'BOM名称',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'categoryCode',
+              label: '产品编码',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'categoryName',
+              label: '产品名称',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'versions',
+              label: '版本'
+            },
+            {
+              prop: 'status ',
+              label: '状态',
+              formatter: (row) => {
+                return this.statusOpt[+row.status];
+              }
+            },
+            {
+              prop: 'createName',
+              label: '创建人',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'createTime',
+              label: '创建日期',
+              showOverflowTooltip: true
+            },
+            {
+              action: 'action',
+              slot: 'action',
+              label: '操作'
+            }
+          ],
+          statusOpt: {
+            '': '全部',
+            0: '已停用',
+            1: '已发布'
+          },
+          loading: false,
+          loadingInstance: null,
+          where: {},
+  
+          attrObj: {}
+
+        };
+      },
+      mounted() {
+     
+      },
+      props: {
+      attributeData: {
+        type: Object,
+        default: {}
+      }
+    },
+
+    watch: {
+      attributeData(val) {
+    this.attrObj = val
+
+    this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+          });
+        });
+      }  
+    },
+  
+      methods: {
+
+        /* 启用关闭BOM */
+        openBom(row, boolean) {
+          this.loadingInstance = this.$loading({
+            lock: true,
+            text: boolean ? '启用中...' : '关闭中...',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+          startAndStop({ id: row.id, status: row.status }).then(() => {
+            this.$message.success('操作成功');
+            this.loadingInstance.close();
+          });
+          setTimeout(() => {}, 2000);
+        },
+        /* 表格数据源 */
+        datasource({ where, page, limit }) {
+          return getBomPageCategoryId({
+            ...where,
+            pageNum: page,
+            size: limit,
+            id: this.attrObj.id,
+            bomType: this.attrObj.bomType,
+          });
+        },
+   
+        /* 刷新表格 */
+        reload(where) {
+          this.$refs.table.reload({ where });
+        },
+
+  
+  
+  
+      }
+    };
+  </script>
+  
+  <style lang="scss" scoped>
+    .ele-body {
+      height: 100%;
+      ::v-deep .el-card {
+        height: 100%;
+        .el-card__body {
+          height: 100%;
+          display: flex;
+          flex-direction: column;
+          .dict-table {
+            flex: 1;
+            overflow: hidden;
+            display: flex;
+            flex-direction: column;
+            .el-table {
+              flex: 1;
+              overflow-y: auto;
+            }
+          }
+        }
+      }
+    }
+  </style>
+  

+ 7 - 12
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -157,8 +157,8 @@
             </template>
           </ele-pro-table>
         </el-tab-pane>
-        <el-tab-pane label="质检参数" name="质检参数">
-   
+        <el-tab-pane label="质检项参数" name="质检项参数">
+             <term></term>
         </el-tab-pane>
         <el-tab-pane label="生产节拍" name="生产节拍">
           <el-form label-width="100px" ref="form" :model="beatParam">
@@ -931,6 +931,7 @@
   import userSearch from './user-search.vue';
   import jobDialog from './jobDialog.vue';
   import standardOutput from './standardOutput.vue';
+  import term from '../qualityTesting/term'
   export default {
     components: {
       userSearch,
@@ -939,7 +940,8 @@
       ProductModal,
       jobDialog,
       ProductModalMultiple,
-      standardOutput
+      standardOutput,
+      term
     },
     mixins: [dictMixins],
     data() {
@@ -1535,11 +1537,6 @@
           this.$refs.table.setData(
             this.tableData.taskParam[this.currentIndex].produceList || []
           );
-        } else if (this.activeName === '质检参数') {
-          // 质检参数
-          this.$refs.qualityTable.setData(
-            this.tableData.taskParam[this.currentIndex].qualityParam || []
-          );
         } else if (this.activeName === '生产节拍') {
           console.log(this.tableData.taskParam[this.currentIndex].beatParam);
           this.beatParam =
@@ -1608,13 +1605,11 @@
         let dom = null;
         if (this.activeName === '工艺参数') {
           dom = this.$refs.table;
-        } else if (this.activeName === '质检参数') {
-          dom = this.$refs.qualityTable;
-        }
+        } 
         dom.setData([...data, ...dom.getData()]);
         this.$set(
           this.tableData.taskParam[this.currentIndex],
-          this.activeName === '工艺参数' ? 'produceList' : 'qualityParam',
+          this.activeName === '工艺参数' ? 'produceList' : '',
           dom.getData()
         );
       },

+ 28 - 9
src/views/material/BOMmanage/details.vue

@@ -63,7 +63,7 @@
               >
               <el-button
                 v-if="
-                  currentNodeData.bomType == 2 &&
+                (currentNodeData.bomType == 2  || currentNodeData.bomType == 3) &&
                   currentNodeData.children?.length <= 0
                 "
                 type="danger"
@@ -74,13 +74,14 @@
                 >删除</el-button
               >
               <el-button
+                v-if="currentNodeData.bomType == 1"
                 type="primary"
                 size="mini"
                 icon="el-icon-download"
                 plain
                 >导出</el-button
               >
-              <el-button type="primary" size="mini" icon="el-icon-upload2" plain
+              <el-button   @click="uploadFile" v-if="currentNodeData.bomType == 1"  type="primary" size="mini" icon="el-icon-upload2" plain
                 >导入</el-button
               >
               <el-button
@@ -122,8 +123,9 @@
               <el-tab-pane label="属性" name="属性">
                 <attribute :attributeData="currentNodeData"></attribute>
               </el-tab-pane>
-              <el-tab-pane label="文档" name="文档">
-                <document></document>
+              <el-tab-pane label="清单" name="清单">
+                <!-- <document></document> -->
+                 <detailedList  :attributeData="currentNodeData"></detailedList>
               </el-tab-pane>
               <el-tab-pane
                 v-if="currentNodeData.bomType == 2"
@@ -151,6 +153,8 @@
       </ele-split-layout>
     </el-card>
     <bomTreeDialog ref="bomTreeDialogRef" @reload="bomTreeDialogReload" />
+
+    <importDialog :defModule="moudleName" ref="importDialogRef" @success="reload" />
   </div>
 </template>
 
@@ -167,18 +171,22 @@
   import attribute from './components/attribute.vue';
   import routing from './components/routing.vue';
   import baseInfo from './components/baseInfo.vue';
-  import document from './components/document.vue';
+  // import document from './components/document.vue';
   import workmanship from './components/workmanship.vue';
   import bomTreeDialog from './components/bomTreeDialog.vue';
+  import importDialog from "./qualityTesting/import-dialog.vue";
+  import detailedList from './components/detailedList.vue'
   export default {
     name: 'BOMmanage',
     components: {
       attribute,
       baseInfo,
-      document,
+      // document,
       workmanship,
       bomTreeDialog,
-      routing
+      routing,
+      importDialog,
+      detailedList
     },
     data() {
       return {
@@ -202,7 +210,9 @@
         versions: null,
         loadingInstance: null,
         noBack: false,
-        treeId: null
+        treeId: null,
+
+        moudleName : "mainUser",
       };
     },
     mounted() {
@@ -366,7 +376,16 @@
             children: []
           };
         }
-      }
+      },
+
+      uploadFile () {
+      this.$refs.importDialogRef.open();
+    },
+    
+    reload(where) {
+      this.getTreeData();
+      },
+
     }
   };
 </script>

+ 126 - 0
src/views/material/BOMmanage/qualityTesting/import-dialog.vue

@@ -0,0 +1,126 @@
+<template>
+  <!-- 上传 -->
+  <el-dialog title="导入文件上传" :visible.sync="dialogVisible" width="40%">
+    <el-form label-width="110px" class="zw-criterion">
+      <el-form-item label="选择文件">
+        <el-upload
+          class="avatar-uploader"
+          action="#"
+          :show-file-list="false"
+          :http-request="handlSuccess"
+          :before-upload="beforeUpload"
+        >
+          <el-button icon="el-icon-plus" size="small" type="primary"
+            >文件上传</el-button
+          >
+          <div slot="tip" class="el-upload__tip"
+            >只能上传excel文件</div
+          >
+        </el-upload>
+      </el-form-item>
+      <el-form-item label="上传列表">
+        <div class="imgs-box">
+          <p v-for="(item, index) in attaments" :key="index" class="imgs-p">
+            <span> {{ item.name }}</span>
+            <el-link @click="delFileList(index)" type="primary">删除</el-link>
+          </p>
+        </div>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">关 闭</el-button>
+      <el-button size="small" :loading="loading"  @click="upload" type="primary">上 传</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { importPBom } from '@/api/system/file/index.js';
+
+  export default {
+    props: {
+      defModule: ''
+    },
+    //注册组件
+    data() {
+      return {
+        showViewer: false, // 显示查看器
+        dialogVisible: false,
+        uploadShow: false,
+        module: '',
+        attaments: [], //上传文件
+        file: '',
+
+        loading: false
+      };
+    },
+    created() {},
+    methods: {
+      open() {
+        this.attaments = [];
+        this.module = '';
+        this.dialogVisible = true;
+      },
+      //删除附件
+      delFileList(index) {
+        this.attaments.splice(index, 1);
+      },
+      //上传限制
+      beforeUpload(file) {
+        const isLt10M = file.size / 1024 / 1024 < 10;
+        if (!isLt10M) {
+          this.$message.error('导入单文件大小不能超过 10MB!');
+        }
+        return isLt10M;
+      },
+      //图片上传
+      handlSuccess(param) {
+        this.file = param.file;
+        this.attaments.push(param.file);
+      },
+      // 文件上传
+      async upload() {
+        if (this.attaments.length == 0) {
+          return this.$message.warning('文件不能为空!');
+        }
+        this.module = this.$props.defModule;
+
+        this.loading = true;
+        await importPBom({
+          module: this.module,
+          multiPartFiles: this.attaments
+        });
+
+        setTimeout(() => {
+          this.loading = false;
+        }, 10000);
+        this.$message.success('操作成功!');
+        this.dialogVisible = false;
+        this.$emit('success');
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+  .zw-table-header {
+    float: right;
+  }
+
+  .imgs-box .imgs-p {
+    height: 30px;
+    background: #f0f3f3;
+    line-height: 30px;
+    width: 372px;
+    margin-bottom: 5px;
+    padding: 0 10px;
+    display: flex;
+    justify-content: space-between;
+  }
+  .zw-criterion-normal {
+    padding: 20px 0 0 0;
+  }
+  .el-main {
+    overflow: hidden;
+  }
+</style>

+ 224 - 0
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/edit.vue

@@ -0,0 +1,224 @@
+<!-- 用户编辑弹窗 -->
+<template>
+  <el-dialog
+    class="ele-dialog-form"
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    width="1000px"
+    append-to-body
+  >
+    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+      <el-row>
+        <el-col :span="24">
+          <el-tabs v-model="activeName" type="card">
+            <el-tab-pane
+              :label="item.name"
+              :name="item.name"
+              v-for="item in activeList"
+              :key="item.name"
+            >
+              <el-table
+                v-show="activeName == '质检项' "
+                style="margin-top: 15px"
+                :data="form.parameterStandards"
+                border
+                height="40vh"
+              >
+                <el-table-column
+                  :label="form.singleWeightDivision"
+                  align="center"
+                >
+                  <el-table-column
+                    label="参数上限"
+                    align="center"
+                    v-if="form.parameterType == 3"
+                  >
+                    <template slot-scope="scope">
+                      <el-form-item label-width="0" prop="finalValue">
+                        <el-input
+                          clearable
+                          :disabled="type == 'detail'"
+                          v-model="scope.row.finalValue"
+                          placeholder="请输入"
+                        />
+                      </el-form-item>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                    label="参数下限"
+                    align="center"
+                    v-if="form.parameterType == 3"
+                  >
+                    <template slot-scope="scope">
+                      <el-form-item label-width="0" prop="initialValue">
+                        <el-input
+                          :disabled="type == 'detail'"
+                          clearable
+                          v-model="scope.row.initialValue"
+                          placeholder="请输入"
+                        />
+                      </el-form-item>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                    label="默认值"
+                    align="center"
+                    v-if="form.parameterType != 3"
+                  >
+                    <template slot-scope="scope">
+                      <el-form-item label-width="0" prop="defaultValue">
+                        <el-input
+                          clearable
+                          :disabled="type == 'detail'"
+                          v-model="scope.row.defaultValue"
+                          placeholder="请输入"
+                        />
+                      </el-form-item>
+                    </template>
+                  </el-table-column>
+                </el-table-column>
+                <el-table-column :label="form.tolerance" align="center">
+                  <el-table-column label="质检标准" align="center">
+                    <template slot-scope="scope">
+                      <el-form-item label-width="0" prop="inspectionStandard">
+                        <el-input
+                          clearable
+                          v-model="scope.row.toleranceValue"
+                          placeholder="请输入"
+                          :disabled="type == 'detail'"
+                        >
+                          <DictSelection
+                            style="width: 100px"
+                            slot="prepend"
+                            clearable
+                            :disabled="type == 'detail'"
+                            dictName="数学字符"
+                            v-model="scope.row.symbol"
+                          ></DictSelection>
+                        </el-input>
+                        <!-- </el-form-item> -->
+                      </el-form-item>
+                    </template>
+                  </el-table-column>
+           
+                </el-table-column>
+              </el-table>
+
+            </el-tab-pane></el-tabs
+          >
+
+
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <template v-slot:footer>
+      <el-button @click="handleClose">取消</el-button>
+      <el-button
+        type="primary"
+        :loading="loading"
+        @click="save"
+        v-if="type != 'detail'"
+      >
+        保存
+      </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    components: {},
+
+    data() {
+      const defaultForm = function () {
+        return {
+          parameterStandards: [],
+          linePoints: []
+        };
+      };
+      return {
+        defaultForm,
+        // 表单数据
+        form: { ...defaultForm() },
+        activeName: '质检项',
+        activeList: [{ name: '质检项' }],
+        // 表单验证规则
+        rules: {
+     
+        },
+        visible: false,
+
+        title: null,
+        loading: false
+      };
+    },
+
+    created() {},
+    methods: {
+      open(row) {
+        this.form = JSON.parse(JSON.stringify(row));
+        this.visible = true;
+      },
+ 
+
+      handleDeleteItem(index, list) {
+        this.form[list].splice(index, 1);
+      },
+      /* 保存编辑 */
+      save() {},
+      restForm() {
+        this.form = { ...this.defaultForm() };
+        this.$nextTick(() => {
+          this.$refs.form.clearValidate();
+        });
+      },
+      handleClose() {
+        this.restForm();
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .location-warp {
+    display: flex;
+
+    .detail {
+      margin-left: 10px;
+    }
+  }
+
+  :deep(
+      .el-dialog:not(.ele-dialog-form)
+        .el-dialog__body
+        .el-form
+        .el-form-item:last-child
+    ) {
+    margin-bottom: 22px;
+  }
+  :deep(
+      .el-dialog:not(.ele-dialog-form)
+        .el-dialog__body
+        .el-form
+        .el-table__body
+        .el-table__row
+        .el-form-item:last-child
+    ) {
+    margin-bottom: 0 !important;
+  }
+  .add-product {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    font-size: 30px;
+    color: #1890ff;
+    margin: 10px 0;
+    cursor: pointer;
+  }
+</style>

+ 165 - 0
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/user-list.vue

@@ -0,0 +1,165 @@
+<template>
+  <div>
+    <user-search @search="reload" ref="searchRef"> </user-search>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      height="calc(100vh - 365px)"
+      full-height="calc(100vh - 116px)"
+      tool-class="ele-toolbar-form"
+      cache-key="systemOrgUserTable"
+    >
+      <!-- 编码列 -->
+
+      <template v-slot:name="{ row }">
+        {{ row.qualityStandard.name }}
+      </template>
+
+      <template v-slot:code="{ row }">
+        <el-link
+          @click="openDetail(row.qualityStandard)"
+          type="primary"
+          :underline="false"
+        >
+          {{ row.qualityStandard.code }}
+        </el-link>
+      </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 ? '启用' : '停用' }}
+      </template>
+
+      <template v-slot:mode="{ row }">
+        {{ getDictValue('质检方式', row.mode) }}
+      </template>
+
+      <template v-slot:version="{ row }">
+        {{ row.qualityStandard.version }}
+      </template>
+    </ele-pro-table>
+
+    <Detail ref="detailRef"></Detail>
+  </div>
+</template>
+
+<script>
+  import userSearch from './user-search.vue';
+  import { getList } from '@/api/material/inspectionClassify';
+  import dictMixins from '@/mixins/dictMixins';
+  import Detail from './edit.vue';
+
+  export default {
+    mixins: [dictMixins],
+    components: { userSearch, Detail },
+    props: {
+      // 类别id
+
+      rootId: [Number, String]
+    },
+    data() {
+      return {
+        // 当前编辑数据
+        current: null,
+
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center'
+          },
+
+          {
+            prop: 'code',
+            label: '标准编码',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code'
+          },
+
+          {
+            prop: 'name',
+            label: '标准名称',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'name'
+          },
+
+          {
+            label: '标准类型',
+            prop: 'type',
+            slot: 'type'
+          },
+
+          {
+            label: '标准代码',
+            prop: 'standardCode'
+          },
+
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            minWidth: 110,
+            slot: 'status'
+          },
+
+          {
+            prop: 'version',
+            label: '版本号',
+            align: 'center',
+            minWidth: 110,
+            slot: 'version'
+          }
+        ]
+      };
+    },
+    created() {
+      this.requestDict('质检方式');
+      this.requestDict('质检标准类型');
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getList({
+          ...where,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId || 12,
+          rootCategoryLevelId: this.rootId
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({
+          pageNum: 1,
+          where: where,
+          categoryLevelId: this.categoryLevelId,
+          rootCategoryLevelId: this.rootId
+        });
+      },
+
+      clickSearch(info) {
+        this.categoryLevelId = info.id;
+        this.rootCategoryLevelId = info.rootCategoryLevelId;
+        this.reload();
+      },
+
+      openDetail(row) {
+        this.$refs.detailRef.open(row);
+      }
+    }
+  };
+</script>

+ 84 - 0
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/user-search.vue

@@ -0,0 +1,84 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form label-width="77px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
+    <el-row :gutter="15">
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="质检名称:">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="状态:">
+
+          <el-select clearable  v-model="where.status" placeholder="请选择状态">
+            <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ?{ lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="组织机构:">
+          <auth-selection data-type="Array" v-model="where.deptIds" style="width: 100%"></auth-selection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label-width="50px">
+          <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search" size="small">
+            查询
+          </el-button>
+          <el-button @click="reset" icon="el-icon-refresh-left" size="small" type="primary">重置</el-button>
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+export default {
+  data() {
+    // 默认表单数据
+    const defaultWhere = {
+      name: '',
+      status: ''
+    };
+
+
+    return {
+      // 表单数据
+      where: { ...defaultWhere },
+
+      statusList: [
+        {
+          value: 0,
+          label: '停用'
+        },
+        {
+          value: 1,
+          label: '启用'
+        }
+      ]
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    /* 搜索 */
+    search() {
+      console.log(this.where);
+      this.$emit('search', this.where);
+    },
+    /*  重置 */
+    reset() {
+      this.where = { ...this.defaultWhere };
+      this.search();
+    }
+  }
+};
+</script>

+ 105 - 0
src/views/material/BOMmanage/qualityTesting/inspectionClassify/index.vue

@@ -0,0 +1,105 @@
+<template>
+  <el-dialog
+    title="质检"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="80%"
+  >
+    <div class="ele-body">
+      <el-card shadow="never" v-loading="loading">
+        <ele-split-layout
+          width="266px"
+          allow-collapse
+          :right-style="{ overflow: 'hidden' }"
+        >
+          <div>
+            <div class="ele-border-lighter sys-organization-list">
+              <AssetTree
+                @handleNodeClick="handleNodeClick"
+                @setRootId="setRootId"
+                :id="rootId"
+                ref="treeList"
+              />
+            </div>
+          </div>
+          <template v-slot:content>
+            <user-list
+              v-if="current"
+              :category-id="current.id"
+              :root-id="rootId"
+              ref="searchRef"
+            />
+          </template>
+        </ele-split-layout>
+      </el-card>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree';
+  import userList from './components/user-list.vue';
+
+  export default {
+    components: {
+      AssetTree,
+      userList
+    },
+    data() {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: '12',
+        visible: false
+      };
+    },
+    computed: {},
+    methods: {
+      handleNodeClick(info) {
+        this.current = info;
+        this.$nextTick(() => {
+          console.log(info);
+          this.$refs.searchRef.clickSearch(info);
+        });
+      },
+      // 获取根节点id
+      setRootId(id) {
+        if (id) {
+          this.rootId = id;
+        }
+      },
+
+      open() {
+        this.visible = true;
+      },
+
+      handleClose() {
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+</style>

+ 0 - 0
src/views/material/BOMmanage/qualityTesting/spot.vue


+ 20 - 0
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -0,0 +1,20 @@
+<template>
+    <div>
+        质检项
+        <el-button @click="() => this.$refs.termRef.open()">弹出</el-button>
+
+        <termPop ref="termRef"></termPop>
+    </div>
+</template>
+
+<script>
+import termPop from './inspectionClassify/index.vue'
+export default {
+    components: { termPop },
+    data() {
+        return {};
+    },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 4 - 4
src/views/material/product/detail.vue

@@ -161,7 +161,7 @@
               </div>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="所属部门">
               <deptSelect
                 v-model="form.chargeGroupId"
@@ -178,7 +178,7 @@
                 :init="false"
               />
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
             <el-form-item label="级别">
               <template>
@@ -387,7 +387,7 @@
 
         this.categoryLevelPathId = info.category.categoryLevelPathIdParent;
         this.judgeSet(info);
-        this.searchDeptNodeClick(this.form.chargeDeptId);
+        // this.searchDeptNodeClick(this.form.chargeDeptId);
 
         if (this.status == 1) {
           rootCategoryCode(this.categoryLevelPathId).then((res) => {
@@ -482,7 +482,7 @@
             label: item[values[0]]
           };
         });
-        console.log(123, this.dictList);
+     
       },
 
       openCategory() {