|
@ -1,15 +1,17 @@ |
|
|
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 { EquipmentAccounts } from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const MaintenanceRules = reactive({ |
|
|
export const MaintenanceRules = reactive({ |
|
|
number: [required], |
|
|
number: [required], |
|
|
|
|
|
name: [required], |
|
|
equipmentCode: [required], |
|
|
equipmentCode: [required], |
|
|
optionCode: [required], |
|
|
optionCode: [required], |
|
|
factoryAreaCode: [required], |
|
|
cycle: [required], |
|
|
concurrencyStamp: [required], |
|
|
startTime: [required], |
|
|
|
|
|
endTime: [required], |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
@ -29,8 +31,8 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '描述', |
|
|
label: '计划名称', |
|
|
field: 'describing', |
|
|
field: 'name', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
@ -43,7 +45,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '设备编号', |
|
|
label: '设备工装编号', |
|
|
field: 'equipmentCode', |
|
|
field: 'equipmentCode', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
@ -82,30 +84,114 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '班次', |
|
|
label: '计划开始时间', |
|
|
field: 'classes', |
|
|
field: 'startTime', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
|
|
|
formatter: dateFormatter, |
|
|
isSearch: true, |
|
|
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: 'peoples', |
|
|
field: 'endTime', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
|
|
|
formatter: dateFormatter, |
|
|
isSearch: true, |
|
|
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: 'InputNumber', |
|
|
component: 'DatePicker', |
|
|
value: 0 |
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '预计所需时间', |
|
|
label: '状态', |
|
|
field: 'estimatedMinutes', |
|
|
field: 'status', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '审核人', |
|
|
|
|
|
field: 'approver', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '审核内容', |
|
|
|
|
|
field: 'approveContent', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
component: 'Editor', |
|
|
value: 0 |
|
|
componentProps: { |
|
|
|
|
|
valueHtml: '', |
|
|
|
|
|
height: 200 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '审核时间', |
|
|
|
|
|
field: 'approveTime', |
|
|
|
|
|
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: '自动审核', |
|
|
|
|
|
field: 'autoExamine', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '自动通过', |
|
|
|
|
|
field: 'autoAgree', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '直接生成记录', |
|
|
|
|
|
field: 'directCreateRecord', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '所属厂区编号', |
|
|
label: '所属厂区编号', |
|
@ -130,10 +216,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'createTime', |
|
|
field: 'createTime', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
formatter: dateFormatter, |
|
|
formatter: dateFormatter, |
|
|
isSearch: false, |
|
|
isSearch: true, |
|
|
isTable: false, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isDetail:false, |
|
|
|
|
|
search: { |
|
|
search: { |
|
|
component: 'DatePicker', |
|
|
component: 'DatePicker', |
|
|
componentProps: { |
|
|
componentProps: { |
|
@ -157,7 +240,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '备注', |
|
|
label: '备注', |
|
|
field: 'remark', |
|
|
field: 'remark', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
isSearch: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '地点ID', |
|
|
label: '地点ID', |
|
|