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