chris 1 년 전
부모
커밋
62f1cf491a
2개의 변경된 파일35개의 추가작업 그리고 1개의 파일을 삭제
  1. 22 0
      src/utils/enums.js
  2. 13 1
      src/views/modules/production/inspect-type-dialog.vue

+ 22 - 0
src/utils/enums.js

@@ -72,7 +72,29 @@ export const bomStateOption = [
   {label: '暂停生产', value: '2'}
 ]
 
+// 读写状态
 export const writeStateOption = [
   {label: '只读', value: '1'},
   {label: '读写', value: '2'}
 ]
+
+// 检验方法
+export const inspectionMethodOptions = [
+  {label: '游标卡尺', value: '1'},
+  {label: '千分尺', value: '2'},
+  {label: '高度尺', value: '3'},
+  {label: '百分表', value: '4'},
+  {label: 'R规', value: '5'},
+  {label: '环规、塞规', value: '6'},
+  {label: '游标角度尺', value: '7'},
+  {label: '三坐标', value: '8'},
+  {label: '模具', value: '9'},
+  {label: '样板', value: '10'},
+  {label: '夹具', value: '11'},
+  {label: '目测', value: '12'},
+  {label: '组合测量', value: '13'},
+  {label: '精密测量', value: '14'},
+  {label: '敲击', value: '15'},
+  {label: '测厚仪', value: '16'},
+  {label: '其他', value: '17'}
+]

+ 13 - 1
src/views/modules/production/inspect-type-dialog.vue

@@ -34,6 +34,7 @@
           header-align="center"
           align="center"
           min-width="160"
+          :formatter="formatInspectionMethod"
           :show-tooltip-when-overflow="true"
           label="检验方法"/>
         <el-table-column
@@ -66,12 +67,15 @@
 </template>
 
 <script>
+  import {inspectionMethodOptions} from '@/utils/enums'
+
   export default {
     name: 'inspect-type-dialog',
     data () {
       return {
         visible: false,
-        dataList: []
+        dataList: [],
+        inspectionMethodOptions: inspectionMethodOptions
       }
     },
     methods: {
@@ -81,6 +85,14 @@
       async init (dataList) {
         this.visible = true
         this.dataList = dataList
+      },
+      formatInspectionMethod (row) {
+        if (!row.inspectionMethod) return ''
+        let option = this.inspectionMethodOptions.find(t => t.value === row.inspectionMethod)
+        if (option != null) {
+          return option.label
+        }
+        return ''
       }
     }
   }