|
|
@ -1,5 +1,7 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const EquipmentRepairRecordMainRules = reactive({ |
|
|
@ -11,7 +13,6 @@ export const EquipmentRepairRecordMainRules = reactive({ |
|
|
|
equipmentCode: [required], |
|
|
|
totalMinutes: [required], |
|
|
|
faultType: [required], |
|
|
|
concurrencyStamp: [required] |
|
|
|
}) |
|
|
|
|
|
|
|
export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
@ -28,12 +29,9 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.DEVICE_TYPE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '报修工单申请号', |
|
|
|
label: '报修工单号', |
|
|
|
field: 'repairNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
@ -42,43 +40,56 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '来源字典', |
|
|
|
field: 'sources', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, |
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修描述', |
|
|
|
field: 'maintenanceDesc', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '紧急程度', |
|
|
|
field: 'urgency', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.REPAIR_DEGREE, |
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_URGENCY, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修级别', |
|
|
|
field: 'level', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.REPAIR_LEVEL, |
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '设备编号', |
|
|
|
field: 'equipmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: true, |
|
|
|
isForm: true, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchTitle: '设备信息', // 查询弹窗标题
|
|
|
|
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
|
|
|
|
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
multiple:true, |
|
|
|
searchCondition: [{ |
|
|
|
key: 'status', |
|
|
|
value: 'NORMAL', |
|
|
|
action: '==', |
|
|
|
isSearch: true, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否停机', |
|
|
@ -96,7 +107,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'startTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -118,7 +129,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'endTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -139,23 +150,25 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '维修时间', |
|
|
|
field: 'totalMinutes', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '验证人', |
|
|
|
field: 'verifyer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '验证内容', |
|
|
|
field: 'verifyContent', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
form: { |
|
|
|
component: 'Editor', |
|
|
|
componentProps: { |
|
|
@ -169,7 +182,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'verifyTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -190,35 +206,31 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '执行人', |
|
|
|
field: 'maintenancer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修人联系电话', |
|
|
|
field: 'maintenancePhone', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '结果枚举', |
|
|
|
field: 'completeResult', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, |
|
|
|
dictType: DICT_TYPE.EAM_COMPLETE_RESULT, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '完成时间', |
|
|
|
field: 'completionTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -240,7 +252,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'maintenanceTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -262,7 +277,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'repairTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -283,11 +298,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '报修人', |
|
|
|
field: 'repairer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '故障类型', |
|
|
@ -296,75 +307,86 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.FAILURE_REASON, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '流程状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.EAM_REPAIR_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'Radio' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动接单', |
|
|
|
field: 'autoOrder', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动执行', |
|
|
|
field: 'autoPerform', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动验证', |
|
|
|
field: 'autoVerify', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '直接生成记录', |
|
|
|
field: 'directCreateRecord', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '班组类型', |
|
|
|
field: 'classType', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
} |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '所属厂区编号', |
|
|
|
field: 'factoryAreaCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车间编号', |
|
|
|
field: 'workshopCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工段编号', |
|
|
|
field: 'workshopSectionCode', |
|
|
|
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: '是否可用', |
|
|
@ -372,7 +394,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|