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.
319 lines
6.0 KiB
319 lines
6.0 KiB
11 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
|
// 表单校验
|
||
|
export const EquipmentMaintenanceMainRules = reactive({
|
||
|
number: [required],
|
||
|
equipmentCode: [required],
|
||
|
planNumber: [required],
|
||
|
status: [required],
|
||
|
factoryAreaCode: [required],
|
||
|
concurrencyStamp: [required],
|
||
|
})
|
||
|
|
||
|
export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: 'id',
|
||
|
field: 'id',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
isDetail:false,
|
||
|
},
|
||
|
{
|
||
|
label: '保养工单编号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '描述',
|
||
|
field: 'describing',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '设备编号',
|
||
|
field: 'equipmentCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '设备分类',
|
||
|
field: 'type',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '班次枚举',
|
||
|
field: 'classes',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '保养计划工单号',
|
||
|
field: 'planNumber',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '故障类型枚举',
|
||
|
field: 'faultType',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '保养周期',
|
||
|
field: 'cycle',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '保养次数',
|
||
|
field: 'times',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '验证人',
|
||
|
field: 'verifyer',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '验证内容',
|
||
|
field: 'verifyContent',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'Editor',
|
||
|
componentProps: {
|
||
|
valueHtml: '',
|
||
|
height: 200
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '验证时间',
|
||
|
field: 'verifyTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
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: '保养人id',
|
||
|
field: 'maintenancer',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '保养人联系电话',
|
||
|
field: 'maintenancePhone',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '结果枚举临时措施、完成',
|
||
|
field: 'completeResult',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '完成时间',
|
||
|
field: 'completionTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
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: 'maintenanceTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
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: 'status',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'Radio'
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '所属厂区编号',
|
||
|
field: 'factoryAreaCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '车间编号',
|
||
|
field: 'workshopCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '工段编号',
|
||
|
field: 'workshopSectionCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '创建时间',
|
||
|
field: 'createTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
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: '部门id',
|
||
|
field: 'departmentCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
isDetail:false,
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
field: 'remark',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '地点ID',
|
||
|
field: 'siteId',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
isDetail:false,
|
||
|
},
|
||
|
{
|
||
|
label: '是否可用默认TRUE',
|
||
|
field: 'available',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '删除时间',
|
||
|
field: 'deletionTime',
|
||
|
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: '删除人id',
|
||
|
field: 'deleterId',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
isDetail:false,
|
||
|
},
|
||
|
{
|
||
|
label: '并发乐观锁',
|
||
|
field: 'concurrencyStamp',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
isDetail:false,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|