|
|
|
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";
|
|
|
|
import {BasicFaultCause} from "@/views/eam/basicFaultCause/basicFaultCause.data";
|
|
|
|
import * as ItemApi from "@/api/eam/basicFaultCause";
|
|
|
|
import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data";
|
|
|
|
import * as WorkshopApi from "@/api/eam/basicEamWorkshop";
|
|
|
|
import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data";
|
|
|
|
import * as BasicFaultTypeApi from "@/api/eam/basicFaultType";
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const EquipmentRepairJobMainRules = reactive({
|
|
|
|
number: [required],
|
|
|
|
type: [required],
|
|
|
|
sources: [required],
|
|
|
|
urgency: [required],
|
|
|
|
level: [required],
|
|
|
|
equipmentCode: [required],
|
|
|
|
faultType: [required],
|
|
|
|
status: [required],
|
|
|
|
shutDown:[required],
|
|
|
|
})
|
|
|
|
|
|
|
|
export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: 'id',
|
|
|
|
field: 'id',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修工单号',
|
|
|
|
field: 'number',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '设备类别',
|
|
|
|
field: 'type',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.DEVICE_TYPE,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '报修工单号',
|
|
|
|
field: 'repairNumber',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '来源',
|
|
|
|
field: 'sources',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: false,
|
|
|
|
isForm: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修描述',
|
|
|
|
field: 'maintenanceDesc',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '紧急程度',
|
|
|
|
field: 'urgency',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_URGENCY,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修级别',
|
|
|
|
field: 'level',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '设备编号',
|
|
|
|
field: 'equipmentCode',
|
|
|
|
sort: 'custom',
|
|
|
|
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: '是否停机',
|
|
|
|
field: 'shutDown',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
form: {
|
|
|
|
component: 'Radio'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修开始时间',
|
|
|
|
field: 'startTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 'endTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 'totalMinutes',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修验证人',
|
|
|
|
field: 'verifyerRepair',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修验证内容',
|
|
|
|
field: 'verifyContentRepair',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修验证时间',
|
|
|
|
field: 'verifyTimeRepair',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 'verifyerReport',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '报修验证内容',
|
|
|
|
field: 'verifyContentReport',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '报修验证时间',
|
|
|
|
field: 'verifyTimeReport',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 'maintenancer',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修人联系电话',
|
|
|
|
field: 'maintenancePhone',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '结果',
|
|
|
|
field: 'completeResult',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '完成时间',
|
|
|
|
field: 'completionTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 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: '报修时间',
|
|
|
|
field: 'repairTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail: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: 'repairer',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: true,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '故障类型',
|
|
|
|
field: 'faultType',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form: {
|
|
|
|
componentProps: {
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择故障类型', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '故障类型信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: BasicFaultType.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: BasicFaultTypeApi.getBasicFaultTypePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{
|
|
|
|
key: 'available',
|
|
|
|
value: 'TRUE',
|
|
|
|
isMainValue: false
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '故障描述',
|
|
|
|
field: 'faultDesc',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '流程状态',
|
|
|
|
field: 'status',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.EAM_REPAIR_STATUS,
|
|
|
|
dictClass: 'string',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// 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,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '班组类型',
|
|
|
|
field: 'classType',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// label: '所属厂区编号',
|
|
|
|
// field: 'factoryAreaCode',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
label: '车间代码',
|
|
|
|
field: 'workshopCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
required: true,
|
|
|
|
form: {
|
|
|
|
componentProps: {
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '车间', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '车间信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{
|
|
|
|
key: 'available',
|
|
|
|
value: 'TRUE',
|
|
|
|
isMainValue: false
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// {
|
|
|
|
// label: '产线编号',
|
|
|
|
// field: 'lineCode',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '工序编号',
|
|
|
|
// field: 'processCode',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '工位编号',
|
|
|
|
// field: 'workstationCode',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
label: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
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')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '部门id',
|
|
|
|
field: 'departmentCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '地点ID',
|
|
|
|
field: 'siteId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可用默认TRUE',
|
|
|
|
field: 'available',
|
|
|
|
sort: 'custom',
|
|
|
|
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: {
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const EquipmentRepairJobDetailRules = reactive({
|
|
|
|
number: [required],
|
|
|
|
masterId: [required],
|
|
|
|
describing:[required],
|
|
|
|
faultCause:[required],
|
|
|
|
workOut:[required],
|
|
|
|
maintenances:[required],
|
|
|
|
})
|
|
|
|
|
|
|
|
export const EquipmentRepairJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: 'id',
|
|
|
|
field: 'id',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修工单号',
|
|
|
|
field: 'number',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form:{
|
|
|
|
componentProps: {
|
|
|
|
disabled: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '主表id',
|
|
|
|
field: 'masterId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form:{
|
|
|
|
componentProps: {
|
|
|
|
disabled: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '故障描述',
|
|
|
|
field: 'describing',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '故障原因',
|
|
|
|
field: 'faultCause',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form: {
|
|
|
|
componentProps: {
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择 故障原因',
|
|
|
|
searchTitle: '故障原因', // 查询弹窗标题
|
|
|
|
searchAllSchemas: BasicFaultCause.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchPage: ItemApi.getBasicFaultCausePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{
|
|
|
|
key: 'available',
|
|
|
|
value: 'TRUE',
|
|
|
|
action: '==',
|
|
|
|
isSearch: true,
|
|
|
|
isMainValue: false
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '解决措施',
|
|
|
|
field: 'workOut',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '维修人员',
|
|
|
|
field: 'maintenances',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
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')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
isForm: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '部门id',
|
|
|
|
field: 'departmentCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '地点ID',
|
|
|
|
field: 'siteId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable: false,
|
|
|
|
isForm: false,
|
|
|
|
isDetail:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可用默认TRUE',
|
|
|
|
field: 'available',
|
|
|
|
sort: 'custom',
|
|
|
|
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: {
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|