|
|
@ -1,14 +1,15 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as QualitygroupApi from '@/api/mes/qualitygroup' |
|
|
|
import { Qualitygroup } from '../qualitygroup/qualitygroup.data' |
|
|
|
|
|
|
|
import * as QualityclassApi from '@/api/mes/qualityclass' |
|
|
|
import { Qualityclass } from '@/views/mes/qualityclass/qualityclass.data' |
|
|
|
// import * as QualitygroupApi from '@/api/mes/qualitygroup'
|
|
|
|
// import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
|
|
|
|
// 表单校验
|
|
|
|
export const ItemRules = reactive({ |
|
|
|
concurrencyStamp: [required], |
|
|
|
itemCode: [{ required: true, message: '请输入编码', trigger: 'blur' }], |
|
|
|
itemType: [required], |
|
|
|
dataType: [required] |
|
|
|
itemCode: [{ required: true, message: '请输入项目编码', trigger: 'blur' }], |
|
|
|
itemName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }], |
|
|
|
qmsClass: [{ required: true, message: '请选择一个质检类别', trigger: 'blur' }], |
|
|
|
dataType:[{ required: true, message: '请选择一个数据类型!', trigger: 'blur' }], |
|
|
|
}) |
|
|
|
|
|
|
|
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
@ -111,19 +112,40 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '分组编码',
|
|
|
|
// field: 'itemType',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// // form: {
|
|
|
|
// // componentProps: {
|
|
|
|
// // isSearchList: true, // 开启查询弹窗
|
|
|
|
// // searchTitle: '质检分组', // 查询弹窗标题
|
|
|
|
// // searchListPlaceholder: '请选择质检分组', // 输入框占位文本
|
|
|
|
// // searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
|
|
|
|
// // searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
// // searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
|
|
|
|
// // searchCondition: [{
|
|
|
|
// // key: 'status',
|
|
|
|
// // value: '1',
|
|
|
|
// // action: '=='
|
|
|
|
// // }]
|
|
|
|
// // }
|
|
|
|
// // }
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '类别编码', |
|
|
|
field: 'itemType', |
|
|
|
label: '质检科目编码', |
|
|
|
field: 'qmsClass', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchTitle: '质检科目信息', // 查询弹窗标题
|
|
|
|
searchListPlaceholder: '请选择 类别编码', // 输入框占位文本
|
|
|
|
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
|
|
|
|
searchTitle: '质检分组', // 查询弹窗标题
|
|
|
|
searchListPlaceholder: '请选择质检分组', // 输入框占位文本
|
|
|
|
searchAllSchemas: Qualityclass.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
|
|
|
|
searchPage: QualityclassApi.getQualityclassPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'status', |
|
|
|
value: '1', |
|
|
@ -132,13 +154,6 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '质检科目编码', |
|
|
|
field: 'qmsClass', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '数据类型', |
|
|
|
field: 'dataType', |
|
|
@ -187,7 +202,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isForm: true, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: '2', |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: '2', |
|
|
|
activeValue: '1' |
|
|
|