You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
3.8 KiB
171 lines
3.8 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import * as QualitygroupApi from '@/api/mes/qualitygroup'
|
|
import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
|
|
// 表单校验
|
|
export const QualityclassRules = reactive({
|
|
|
|
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
|
|
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
|
groupCode: [{ required: true, message: '请选择一个分组', trigger: 'blur' }],
|
|
})
|
|
|
|
export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '删除时间',
|
|
field: 'deleteTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm:false,
|
|
isDetail:false,
|
|
search: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
type: 'daterange',
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
}
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '主键',
|
|
field: 'id',
|
|
sort: 'custom',
|
|
isForm: false,
|
|
isTable: false,
|
|
isDetail:false
|
|
},
|
|
{
|
|
label: '并发乐观锁',
|
|
field: 'concurrencyStamp',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm:false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isDetail:false,
|
|
search: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
type: 'daterange',
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
}
|
|
},
|
|
isForm: false,
|
|
},
|
|
{
|
|
label: '删除用户名',
|
|
field: 'deleter',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false
|
|
},
|
|
{
|
|
label: '位置ID',
|
|
field: 'siteId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '编码',
|
|
field: 'code',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '编码名称',
|
|
field: 'name',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '分组',
|
|
field: 'groupCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择一个分组', // 输入框占位文本
|
|
multiple:false,
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '分组编码', // 查询弹窗标题
|
|
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
|
|
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'status',
|
|
value: '1',
|
|
isMainValue: false
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.QUALIFY_STATUS,
|
|
dictClass: 'string',
|
|
isForm: true,
|
|
isSearch: true,
|
|
isTable: true,
|
|
form: {
|
|
component: 'Switch',
|
|
value: '1',
|
|
componentProps: {
|
|
inactiveValue: '2',
|
|
activeValue: '1'
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
isDetail:false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false
|
|
}
|
|
]))
|
|
|
|
|