ysy hace 1 año
padre
commit
b9768690af

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

@@ -15,6 +15,17 @@ export async function getList (data) {
 }
 
 
+export async function pageByBom (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/qms/qualitylevel/pageByBom?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
   
 
   export async function getById(id) {

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

@@ -37,24 +37,24 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               cache-key="inspectionClassify"
-              row-key="id"
+              row-key="qualityLevelId"
               :selection.sync="selection"
             >
               <!-- 表头工具栏 -->
 
               <template v-slot:textType="{ row }">
                 {{
-                  row.itemVO.textType == 1
+                  row.textType == 1
                     ? '数值'
-                    : row.itemVO.textType == 2
+                    : row.textType == 2
                     ? '选择'
-                    : row.itemVO.textType == 3
+                    : row.textType == 3
                     ? '上下限'
-                    : row.itemVO.textType == 4
+                    : row.textType == 4
                     ? '规格'
-                    : row.itemVO.textType == 5
+                    : row.textType == 5
                     ? '时间'
-                    : row.itemVO.textType == 6
+                    : row.textType == 6
                     ? '范围'
                     : ''
                 }}
@@ -62,31 +62,31 @@
 
               <template v-slot:type="{ row }">
                 {{
-                  getDictValue('质检标准类型', row.itemVO.qualityStandardType)
+                  getDictValue('质检标准类型', row.qualityStandardType)
                 }}
               </template>
 
               <template v-slot:defaultValue="{ row }">
                 <div>
-                  <span v-if="row.itemVO.textType == 3">
-                    [ {{ row.itemVO.minValue }}-{{ row.itemVO.maxValue }}]
+                  <span v-if="row.textType == 3">
+                    [ {{ row.minValue }}-{{ row.maxValue }}]
                   </span>
-                  <span v-else>{{ row.itemVO.defaultValue }}</span>
+                  <span v-else>{{ row.defaultValue }}</span>
 
-                  <span> {{ row.itemVO.unit }}</span>
+                  <span> {{ row.unit }}</span>
                 </div>
               </template>
 
               <template v-slot:toolList="{ row }">
                 <div
                   style="display: inline-block"
-                  v-for="(item, idx) in row.itemVO.toolList"
+                  v-for="(item, idx) in row.toolList"
                   :key="idx"
                   >{{ item.name }}
                   <span
                     v-if="
-                      row.itemVO.toolList &&
-                      idx != row.itemVO.toolList.length - 1
+                      row.toolList &&
+                      idx != row.toolList.length - 1
                     "
                     >,
                   </span></div
@@ -108,7 +108,7 @@
 <script>
   import AssetTree from '@/components/AssetTree';
   import userSearch from './components/user-search.vue';
-  import { getList } from '@/api/material/inspectionClassify';
+  import { pageByBom } from '@/api/material/inspectionClassify';
   import dictMixins from '@/mixins/dictMixins';
 
   export default {
@@ -137,21 +137,21 @@
           },
 
           {
-            prop: 'itemVO.categoryLevelName',
+            prop: 'categoryLevelName',
             label: '质检类型',
             align: 'center',
             minWidth: 110
           },
 
           {
-            prop: 'itemVO.inspectionCode',
+            prop: 'inspectionCode',
             label: '参数编码',
             showOverflowTooltip: true,
             align: 'center',
             minWidth: 110
           },
           {
-            prop: 'itemVO.inspectionName',
+            prop: 'inspectionName',
             label: '参数名称',
             showOverflowTooltip: true,
             align: 'center',
@@ -159,7 +159,7 @@
           },
 
           {
-            prop: 'itemVO.textType',
+            prop: 'textType',
             label: '参数类型',
             showOverflowTooltip: true,
             align: 'center',
@@ -168,7 +168,7 @@
           },
 
           {
-            prop: 'itemVO.defaultValue',
+            prop: 'defaultValue',
             slot: 'defaultValue',
             label: '工艺参数',
             align: 'center',
@@ -177,22 +177,22 @@
 
           {
             label: '工艺要求',
-            prop: 'itemVO.inspectionStandard',
+            prop: 'inspectionStandard',
             formatter: (row, column, cellValue) => {
               return (
-                row.itemVO.symbol + ' ' + cellValue + ' ' + row.itemVO.unit
+                row.symbol + ' ' + cellValue + ' ' + row.unit
               );
             },
             minWidth: 150
           },
           {
             label: '标准类型',
-            prop: 'itemVO.type',
+            prop: 'type',
             slot: 'type'
           },
 
           {
-            prop: 'itemVO.qualityStandardName',
+            prop: 'qualityStandardName',
             label: '标准名称',
             align: 'center',
             minWidth: 110
@@ -207,7 +207,7 @@
           },
 
           {
-            prop: 'itemVO.toolList',
+            prop: 'toolList',
             slot: 'toolList',
             label: '工具名称',
             align: 'center',
@@ -230,7 +230,7 @@
       /* 表格数据源 */
       datasource({ page, limit, where }) {
         let _data = null;
-        _data = getList({
+        _data = pageByBom({
           ...where,
           pageNum: page,
           size: limit,

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

@@ -7,7 +7,7 @@
       height="calc(100vh - 605px)"
       tool-class="ele-toolbar-form"
       cache-key="inspectionClassify"
-      row-key="id"
+      row-key="qualityLevelId"
       :selection.sync="selection"
     >
       <template v-slot:toolbar>
@@ -18,53 +18,53 @@
 
       <template v-slot:textType="{ row }">
         {{
-          row.itemVO.textType == 1
+          row.textType == 1
             ? '数值'
-            : row.itemVO.textType == 2
+            : row.textType == 2
             ? '选择'
-            : row.itemVO.textType == 3
+            : row.textType == 3
             ? '上下限'
-            : row.itemVO.textType == 4
+            : row.textType == 4
             ? '规格'
-            : row.itemVO.textType == 5
+            : row.textType == 5
             ? '时间'
-            : row.itemVO.textType == 6
+            : row.textType == 6
             ? '范围'
             : ''
         }}
       </template>
 
       <template v-slot:type="{ row }">
-        {{ getDictValue('质检标准类型', row.itemVO.qualityStandardType) }}
+        {{ getDictValue('质检标准类型', row.qualityStandardType) }}
       </template>
 
       <template v-slot:defaultValue="{ row }">
         <div style="display: flex">
           <div
-            v-if="row.itemVO.textType == 3"
+            v-if="row.textType == 3"
             style="display: flex; align-items: center"
           >
             <el-input
               style="width: 132px"
-              v-model="row.itemVO.minValue"
+              v-model="row.minValue"
             ></el-input>
             <span>&nbsp;&nbsp;-</span>
             <el-input
               style="width: 132px; margin-left: 10px"
-              v-model="row.itemVO.maxValue"
+              v-model="row.maxValue"
             ></el-input>
           </div>
 
           <div v-else style="width: 290px">
             <el-input
-              v-model="row.itemVO.defaultValue"
+              v-model="row.defaultValue"
               placeholder="请输入"
             ></el-input>
           </div>
 
           <el-input
             style="margin-left: 10px; width: 80px"
-            v-model="row.itemVO.unit"
+            v-model="row.unit"
             disabled
           >
           </el-input>
@@ -120,16 +120,18 @@
         list: [],
         dictList: [],
 
+        selection: [],
+
         columns: [
           {
-            prop: 'itemVO.categoryLevelName',
+            prop: 'categoryLevelName',
             label: '质检类型',
             align: 'center',
             minWidth: 110
           },
 
           {
-            prop: 'itemVO.inspectionName',
+            prop: 'inspectionName',
             label: '质检名称',
             showOverflowTooltip: true,
             align: 'center',
@@ -137,7 +139,7 @@
           },
 
           {
-            prop: 'itemVO.defaultValue',
+            prop: 'defaultValue',
             slot: 'defaultValue',
             label: '工艺参数',
             align: 'center',
@@ -146,10 +148,10 @@
 
           {
             label: '工艺要求',
-            prop: 'itemVO.inspectionStandard',
+            prop: 'inspectionStandard',
             formatter: (row, column, cellValue) => {
               return (
-                row.itemVO.symbol + ' ' + cellValue + ' ' + row.itemVO.unit
+                row.symbol + ' ' + cellValue + ' ' + row.unit
               );
             },
             minWidth: 350