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