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.
 
 
 

106 lines
1.9 KiB

import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
// 表单校验
export const WorkstationRules = reactive({
code: [required]
})
export const TabsList = [{
label: "工组",
prop: 'Team',
},
{
label: "设备",
prop: 'Equipment',
},
{
label: "工序",
prop: 'Process',
},
{
label: "产品",
prop: 'Production',
}
]
export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '生效时间',
field: 'activeTime',
sort: 'custom',
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: 'expireTime',
sort: 'custom',
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: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))