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