diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 4e8d433ed..d3dd1b504 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -290,6 +290,8 @@ export enum DICT_TYPE { //========== QMS ========== SAMPLING_TYPE = "sampling_type", // 取样类型 EVALUATION_MODE = "evaluation_mode", // 评估模式 + INSPECTION_CHARACTERISTICS_FEATURE_TYPE = "inspection_characteristics_feature_type", // 特征类型 + INSPECTION_CHARACTERISTICS_RESULT_ENTRY = "inspection_characteristics_result_entry", // 结果录入方式 // ========== 业务 - mes -gaojs ========== diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index a4079fae9..930a4972b 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -7,96 +7,267 @@ :vLoading="formLoading" >
-
-
-
-
-
- -
-
- -
{{ item.description }}
- - - -
-
-
-
-
检验工序
- -
检验特性
- -
-
- + + + + + + + + + + + + + + + + + + + + - -
检验工序
- + :rules="rules" + /> --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
检验特性
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
--> +
+ +
+ +
+ +
- + diff --git a/src/views/qms/basicDataManage/inspectionTemplate/agvLocationrelation.data.ts b/src/views/qms/basicDataManage/inspectionTemplate/agvLocationrelation.data.ts index 724d49a5a..9398a3fda 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/agvLocationrelation.data.ts +++ b/src/views/qms/basicDataManage/inspectionTemplate/agvLocationrelation.data.ts @@ -5,7 +5,8 @@ import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/area import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' -// const inspectionProcessPage = await InspectionProcessPageApi.getInspectionProcessPage() +let inspectionProcessPage = await InspectionProcessPageApi.getInspectionProcessPage() +inspectionProcessPage = inspectionProcessPage.list // 表单校验 export const AgvLocationrelationRules = reactive({ @@ -151,7 +152,71 @@ export const AgvLocationrelation = useCrudSchemas(reactive([ } } ])) - +export const InspectionTemplateRules = reactive({ + description: [ + { required: true , message: '请填写描述', trigger: 'blur' } + ], + version: [ + { required: true , message: '请填写版本', trigger: 'blur' } + ], + inspectionCode: [ + { required: true, message: '请选择检验方案模板编码', trigger: 'blur' } + ], + sequenceCode: [ + { required: true, message: '请填写顺序号', trigger: 'blur' } + ], + inspectionCharCode: [ + { required: true, message: '请选择检验特性编码', trigger: 'blur' } + ], + describe: [ + { required: true, message: '请填写描述', trigger: 'blur' } + ], + inspectionMethodCode: [ + { required: true, message: '请选择检验方法编码', trigger: 'blur' } + ], + dynamicUpdateCode: [ + { required: true, message: '请选择采样过程编码', trigger: 'blur' } + ], + inspectionMethod: [ + { required: true, message: '请选择动态修改规则编码', trigger: 'blur' } + ], + isCanUpdate: [ + { required: true, message: '请选择是否允许修改特征值', trigger: 'blur' } + ], + isDestructionInspection: [ + { required: true, message: '请选择是否破坏性检验', trigger: 'blur' } + ], + resultEntryMethod: [ + { required: true, message: '请选择结果录入方式', trigger: 'blur' } + ], + featureType: [ + { required: true, message: '请选择特征类型', trigger: 'blur' } + ], + quantifyIsCapping: [ + { required: true, message: '请选择是否设定上限', trigger: 'blur' } + ], + quantifyIsLowlimit: [ + { required: true, message: '请选择是否设定下限', trigger: 'blur' } + ], + quantifyTarget: [ + { required: true, message: '请输入目标值', trigger: 'blur' } + ], + quantifyCapping: [ + { required: true, message: '请输入上限值', trigger: 'blur' } + ], + quantifyLowlimit: [ + { required: true, message: '请输入下限值', trigger: 'blur' } + ], + quantifyquantifyUomLowlimit: [ + { required: true, message: '请选择计量单位', trigger: 'blur' } + ], + quantifyDecimal: [ + { required: true, message: '请输入小数位', trigger: 'blur' } + ], + quantifyQuantifyCode: [ + { required: true, message: '请输入选择集编码', trigger: 'blur' } + ], +}) export const InspectionTemplateMain = useCrudSchemas(reactive([ { label: '编码', @@ -195,6 +260,16 @@ export const InspectionTemplateProcess = useCrudSchemas(reactive([ label: '检验方案模板编码', field: 'inspectionCode', sort: 'custom', + form:{ + component:'Select', + api: () => inspectionProcessPage, + componentProps:{ + optionsAlias: { + labelField: 'description', + valueField: 'id' + } + } + } },{ label: '顺序号', field: 'sequenceCode', @@ -204,26 +279,14 @@ export const InspectionTemplateProcess = useCrudSchemas(reactive([ sort: 'custom', form:{ component:'Select', - // api: () => inspectionProcessPage, - // componentProps:{ - // optionsAlias: { - // labelField: 'name', - // valueField: 'id' - // } - // } + api: () => inspectionProcessPage, + componentProps:{ + optionsAlias: { + labelField: 'description', + valueField: 'id' + } + } } - // form: { - // value: userDept.id, - // component: 'Select', - // api: () => userDeptArray, - // componentProps: { - // disabled: true, - // optionsAlias: { - // labelField: 'name', - // valueField: 'id' - // } - // } - // } } ])) export const InspectionTemplateFeatures= useCrudSchemas(reactive([ @@ -247,58 +310,142 @@ export const InspectionTemplateFeatures= useCrudSchemas(reactive([ field: 'inspectionMethodCode', sort: 'custom', form:{ - component:'Select' + component:'Select', + api: () => inspectionProcessPage, + componentProps:{ + optionsAlias: { + labelField: 'description', + valueField: 'id' + } + } } },{ label: '采样过程编码', field: 'dynamicUpdateCode', sort: 'custom', form:{ - component:'Select' + component:'Select', + api: () => inspectionProcessPage, + componentProps:{ + optionsAlias: { + labelField: 'description', + valueField: 'id' + } + } } },{ label: '动态修改规则编码', field: 'inspectionMethod', sort: 'custom', form:{ - component:'Select' + component:'Select', + api: () => inspectionProcessPage, + componentProps:{ + optionsAlias: { + labelField: 'description', + valueField: 'id' + } + } } },{ label: '是否允许修改特征值', field: 'isCanUpdate', sort: 'custom', + form:{ - component:'Select' + component:'Select', + api: () => [{ + value:0, + label:'是' + },{ + value:1, + label:'否' + }], + componentProps:{ + optionsAlias: { + labelField: 'label', + valueField: 'value' + } + } } },{ label: '是否破坏性检验', field: 'isDestructionInspection', sort: 'custom', form:{ - component:'Select' + component:'Select', + api: () => [{ + value:0, + label:'是' + },{ + value:1, + label:'否' + }], + componentProps:{ + optionsAlias: { + labelField: 'label', + valueField: 'value' + } + } } },{ label: '结果录入方式', field: 'resultEntryMethod', sort: 'custom', - form:{ - component:'Select' - } + dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY, + dictClass: 'string', + table: { + width: 150 + }, },{ label: '特征类型', field: 'featureType', sort: 'custom', - form:{ - component:'Select' - } + dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE, + dictClass: 'string', + table: { + width: 150 + }, },{ label: '是否设定上限', field: 'quantifyIsCapping', sort: 'custom', + form:{ + component:'Select', + api: () => [{ + value:0, + label:'是' + },{ + value:1, + label:'否' + }], + componentProps:{ + optionsAlias: { + labelField: 'label', + valueField: 'value' + } + } + } },{ label: '是否设定下限', field: 'quantifyIsLowlimit', sort: 'custom', + form:{ + component:'Select', + api: () => [{ + value:0, + label:'是' + },{ + value:1, + label:'否' + }], + componentProps:{ + optionsAlias: { + labelField: 'label', + valueField: 'value' + } + } + } },{ label: '目标值', field: 'quantifyTarget', diff --git a/src/views/qms/basicDataManage/inspectionTemplate/index.vue b/src/views/qms/basicDataManage/inspectionTemplate/index.vue index 463f6d19e..c01f9f9ba 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/index.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/index.vue @@ -55,6 +55,7 @@ :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasProcess="InspectionTemplateProcess.allSchemas" :formAllSchemasMain="InspectionTemplateMain.allSchemas" + :rules="InspectionTemplateRules" /> import download from '@/utils/download' -import { AgvLocationrelation,AgvLocationrelationRules,InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures } from './agvLocationrelation.data' +import { AgvLocationrelation,AgvLocationrelationRules,InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from './agvLocationrelation.data' import * as AgvLocationrelationApi from '@/api/wms/agvLocationrelation' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue'