|
|
@ -1,15 +1,17 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
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 MaintenanceRules = reactive({ |
|
|
|
number: [required], |
|
|
|
name: [required], |
|
|
|
equipmentCode: [required], |
|
|
|
optionCode: [required], |
|
|
|
factoryAreaCode: [required], |
|
|
|
concurrencyStamp: [required], |
|
|
|
cycle: [required], |
|
|
|
startTime: [required], |
|
|
|
endTime: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
@ -29,8 +31,8 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述', |
|
|
|
field: 'describing', |
|
|
|
label: '计划名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
@ -43,7 +45,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '设备编号', |
|
|
|
label: '设备工装编号', |
|
|
|
field: 'equipmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
@ -82,30 +84,114 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '班次', |
|
|
|
field: 'classes', |
|
|
|
label: '计划开始时间', |
|
|
|
field: 'startTime', |
|
|
|
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: 'peoples', |
|
|
|
label: '计划结束时间', |
|
|
|
field: 'endTime', |
|
|
|
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: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '预计所需时间', |
|
|
|
field: 'estimatedMinutes', |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '审核人', |
|
|
|
field: 'approver', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '审核内容', |
|
|
|
field: 'approveContent', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
component: 'Editor', |
|
|
|
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: '所属厂区编号', |
|
|
@ -130,10 +216,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -157,7 +240,7 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '地点ID', |
|
|
|