|
|
@ -4,138 +4,229 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
// 表单校验
|
|
|
|
export const EquipmentMaintenanceRecordMainRules = reactive({ |
|
|
|
number: [required], |
|
|
|
sources: [required], |
|
|
|
equipmentCode: [required], |
|
|
|
planNumber: [required], |
|
|
|
status: [required], |
|
|
|
factoryAreaCode: [required], |
|
|
|
concurrencyStamp: [required] |
|
|
|
type: [required], |
|
|
|
planStartTime: [required], |
|
|
|
planEndTime: [required], |
|
|
|
startTime: [required], |
|
|
|
endTime: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '保养编号', |
|
|
|
field: 'number', |
|
|
|
label: 'id', |
|
|
|
field: 'id', |
|
|
|
sort: 'custom', |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '记录编号', |
|
|
|
field: 'recordNo', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述', |
|
|
|
field: 'describing', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养工单', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '来源字典', |
|
|
|
field: 'sources', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '设备编号', |
|
|
|
field: 'equipmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '设备类别', |
|
|
|
field: 'category', |
|
|
|
label: '故障类型枚举', |
|
|
|
field: 'faultType', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.DEVICE_TYPE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '班次枚举', |
|
|
|
field: 'classes', |
|
|
|
label: '工装或设备字典', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
// dictType: DICT_TYPE.SHIFT_TYPE,
|
|
|
|
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
dictType: DICT_TYPE.DEVICE_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养计划工单', |
|
|
|
label: '保养计划工单号', |
|
|
|
field: 'planNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '故障类型枚举', |
|
|
|
field: 'faultType', |
|
|
|
label: '计划开始时间', |
|
|
|
field: 'planStartTime', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.FAILURE_REASON, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'SelectV2' |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养周期', |
|
|
|
field: 'cycle', |
|
|
|
label: '计划结束时间', |
|
|
|
field: 'planEndTime', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.MAINTENANCE_CYCLE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'times', |
|
|
|
label: '保养开始时间', |
|
|
|
field: 'startTime', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'verifyer2', |
|
|
|
label: '保养结束时间', |
|
|
|
field: 'endTime', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '验证内容', |
|
|
|
field: 'verifyContent2', |
|
|
|
label: '保养班组', |
|
|
|
field: 'classType', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '验证时间', |
|
|
|
field: 'verifyTime2', |
|
|
|
label: '验证人', |
|
|
|
field: 'verifyer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养人', |
|
|
|
field: 'maintenancer', |
|
|
|
label: '验证内容', |
|
|
|
field: 'verifyContent', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
component: 'Editor', |
|
|
|
componentProps: { |
|
|
|
valueHtml: '', |
|
|
|
height: 200 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养人联系电话', |
|
|
|
field: 'maintenancePhone', |
|
|
|
label: '验证时间', |
|
|
|
field: 'verifyTime', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'completeResult', |
|
|
|
label: '保养人id', |
|
|
|
field: 'maintenancer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '完成时间', |
|
|
|
field: 'completionTime2', |
|
|
|
label: '保养人联系电话', |
|
|
|
field: 'maintenancePhone', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养时间', |
|
|
|
field: 'maintenanceTime', |
|
|
|
label: '完成时间', |
|
|
|
field: 'completionTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -150,59 +241,173 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema |
|
|
|
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: '流程状态枚举', |
|
|
|
label: '流程状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.JOB_STATUS, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'Radio' |
|
|
|
} |
|
|
|
dictType: DICT_TYPE.EAM_ORDER_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '自动接单',
|
|
|
|
// field: 'autoOrder',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '自动执行',
|
|
|
|
// field: 'autoPerform',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '自动验证',
|
|
|
|
// field: 'autoVerify',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '直接生成记录', |
|
|
|
field: 'directCreateRecord', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '所属厂区编号', |
|
|
|
field: 'factoryAreaCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车间编号', |
|
|
|
field: 'workshopCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: 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: 'workshopSectionCode', |
|
|
|
label: '部门id', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
label: '地点ID', |
|
|
|
field: 'siteId', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用默认TRUE', |
|
|
|
field: 'available', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '删除时间', |
|
|
|
field: 'deletionTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE' |
|
|
|
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', |
|
|
|