|
@ -4,71 +4,30 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
|
|
|
|
|
|
export const InspectionTemplateRules = reactive({ |
|
|
export const InspectionTemplateRules = reactive({ |
|
|
description: [ |
|
|
description: [{ required: true, message: '请填写描述', trigger: 'blur' }], |
|
|
{ required: true, message: '请填写描述', trigger: 'blur' } |
|
|
version: [{ required: true, message: '请填写版本', trigger: 'blur' }], |
|
|
], |
|
|
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }], |
|
|
version: [ |
|
|
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }], |
|
|
{ required: true, message: '请填写版本', trigger: 'blur' } |
|
|
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }], |
|
|
], |
|
|
describe: [{ required: true, message: '请填写描述', trigger: 'blur' }], |
|
|
inspectionCode: [ |
|
|
inspectionMethodCode: [{ required: true, message: '请选择检验方法编码', trigger: 'blur' }], |
|
|
{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' } |
|
|
dynamicUpdateCode: [{ required: true, message: '请选择采样过程编码', trigger: 'blur' }], |
|
|
], |
|
|
inspectionMethod: [{ required: true, message: '请选择动态修改规则编码', trigger: 'blur' }], |
|
|
sequenceCode: [ |
|
|
isCanUpdate: [{ required: true, message: '请选择是否允许修改特征值', trigger: 'blur' }], |
|
|
{ required: true, message: '请填写顺序号', trigger: 'blur' } |
|
|
isDestructionInspection: [{ required: true, message: '请选择是否破坏性检验', trigger: 'blur' }], |
|
|
], |
|
|
resultEntryMethod: [{ required: true, message: '请选择结果录入方式', trigger: 'blur' }], |
|
|
inspectionCharCode: [ |
|
|
featureType: [{ required: true, message: '请选择特征类型', trigger: 'blur' }], |
|
|
{ required: true, message: '请选择检验特性编码', trigger: 'blur' } |
|
|
quantifyIsCapping: [{ required: true, message: '请选择是否设定上限', trigger: 'blur' }], |
|
|
], |
|
|
quantifyIsLowlimit: [{ required: true, message: '请选择是否设定下限', trigger: 'blur' }], |
|
|
describe: [ |
|
|
quantifyTarget: [{ required: true, message: '请输入目标值', trigger: 'blur' }], |
|
|
{ required: true, message: '请填写描述', trigger: 'blur' } |
|
|
quantifyCapping: [{ required: true, message: '请输入上限值', trigger: 'blur' }], |
|
|
], |
|
|
quantifyLowlimit: [{ required: true, message: '请输入下限值', trigger: 'blur' }], |
|
|
inspectionMethodCode: [ |
|
|
quantifyquantifyUomLowlimit: [{ required: true, message: '请选择计量单位', trigger: 'blur' }], |
|
|
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } |
|
|
quantifyDecimal: [{ required: true, message: '请输入小数位', trigger: 'blur' }], |
|
|
], |
|
|
quantifyQuantifyCode: [{ 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 InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const InspectionSchemeMain = useCrudSchemas( |
|
|
|
|
|
reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '编码', |
|
|
label: '编码', |
|
|
field: 'code', |
|
|
field: 'code', |
|
@ -92,7 +51,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 200 |
|
|
width: 200 |
|
|
}, |
|
|
}, |
|
|
isSearch: true, |
|
|
isSearch: true |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '物料编码', |
|
|
label: '物料编码', |
|
@ -101,22 +60,25 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
isSearch: true, |
|
|
isSearch: true |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
label: '描述', |
|
|
label: '描述', |
|
|
field: 'description', |
|
|
field: 'description', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, { |
|
|
{ |
|
|
label: '版本', |
|
|
label: '版本', |
|
|
field: 'version', |
|
|
field: 'version', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
label: '检验类型编码', |
|
|
label: '检验类型编码', |
|
|
field: 'inspectionType', |
|
|
field: 'inspectionType', |
|
|
dictType: DICT_TYPE.INSPECTION_TYPE, |
|
|
dictType: DICT_TYPE.INSPECTION_TYPE, |
|
@ -125,14 +87,16 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 175 |
|
|
width: 175 |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
label: '检验模板编码', |
|
|
label: '检验模板编码', |
|
|
field: 'programmeTemplateCode', |
|
|
field: 'programmeTemplateCode', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width: 175 |
|
|
width: 175 |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
label: '拆分规则', |
|
|
label: '拆分规则', |
|
|
field: 'splitRule', |
|
|
field: 'splitRule', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
@ -140,8 +104,9 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
table: { |
|
|
table: { |
|
|
width: 175 |
|
|
width: 175 |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, { |
|
|
{ |
|
|
label: 'aql', |
|
|
label: 'aql', |
|
|
field: 'aql', |
|
|
field: 'aql', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
@ -150,7 +115,8 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
label: '检验水平', |
|
|
label: '检验水平', |
|
|
field: 'inspectionLevel', |
|
|
field: 'inspectionLevel', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
@ -159,7 +125,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
isSearch: true, |
|
|
isSearch: true |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '每份样品量', |
|
|
label: '每份样品量', |
|
@ -184,12 +150,12 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
style: { width: '100%' }, |
|
|
style: { width: '100%' }, |
|
|
type: 'datetime', |
|
|
type: 'datetime', |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
valueFormat: 'x', |
|
|
valueFormat: 'x' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
table: { |
|
|
table: { |
|
|
width: 175 |
|
|
width: 175 |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '失效时间', |
|
|
label: '失效时间', |
|
@ -206,12 +172,12 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
style: { width: '100%' }, |
|
|
style: { width: '100%' }, |
|
|
type: 'datetime', |
|
|
type: 'datetime', |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
valueFormat: 'x', |
|
|
valueFormat: 'x' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
table: { |
|
|
table: { |
|
|
width: 175 |
|
|
width: 175 |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '是否可用', |
|
|
label: '是否可用', |
|
@ -231,14 +197,79 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
width: 110 |
|
|
width: 110 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '创建时间', |
|
|
|
|
|
field: 'createTime', |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 180 |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
style: { width: '100%' }, |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '创建者', |
|
|
|
|
|
field: 'creator', |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 130 |
|
|
|
|
|
}, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isTable: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '最后更新时间', |
|
|
|
|
|
field: 'updateTime', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isDetail: true, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
|
|
}, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 180 |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
style: { width: '100%' }, |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '最后更新者', |
|
|
|
|
|
field: 'updater', |
|
|
|
|
|
isDetail: true, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 150 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '操作', |
|
|
label: '操作', |
|
|
field: 'action', |
|
|
field: 'action', |
|
|
isDetail: false, |
|
|
|
|
|
isForm: false, |
|
|
isForm: false, |
|
|
|
|
|
isDetail: false, |
|
|
table: { |
|
|
table: { |
|
|
width: 150, |
|
|
width: 150, |
|
|
fixed: 'right' |
|
|
fixed: 'right' |
|
|
}, |
|
|
|
|
|
} |
|
|
} |
|
|
])) |
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
) |
|
|