|
|
@ -1,5 +1,6 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { ElTag } from 'element-plus' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const WorkSchedulingRules = reactive({ |
|
|
@ -48,6 +49,13 @@ export const WorkScheduling = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isForm: true, |
|
|
|
form:{ |
|
|
|
component: 'Input', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入计划编号', |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工单编号', |
|
|
@ -88,7 +96,7 @@ export const WorkScheduling = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '计划数量', |
|
|
|
field: 'planCount', |
|
|
|
sort: 'custom', |
|
|
|
isForm: true, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '完工数量', |
|
|
@ -143,7 +151,7 @@ export const WorkScheduling = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '工单模式', |
|
|
|
field: 'formType', |
|
|
|
sort: 'custom', |
|
|
|
isForm: true, |
|
|
|
isForm: false, |
|
|
|
dictType: DICT_TYPE.MES_WORKBILL_MODEL, |
|
|
|
dictClass: 'string', |
|
|
|
form: { |
|
|
@ -173,7 +181,7 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'id', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isTable: true, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
@ -186,15 +194,7 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
@ -219,16 +219,16 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '任务ID', |
|
|
|
field: 'schedulingId', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '任务ID',
|
|
|
|
// field: 'schedulingId',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// form: {
|
|
|
|
// component: 'InputNumber',
|
|
|
|
// value: 0
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '任务序号', |
|
|
|
field: 'taskSort', |
|
|
@ -247,30 +247,55 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '允许工位', |
|
|
|
field: 'workstationValidate', |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: String) => { |
|
|
|
return h( |
|
|
|
ElTag, |
|
|
|
{ |
|
|
|
type:'primary' |
|
|
|
}, |
|
|
|
() => |
|
|
|
JSON.parse(cellValue).map((item: any) => { |
|
|
|
return '['+item.name+']' |
|
|
|
}).join('\r\n') |
|
|
|
) |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '允许设备', |
|
|
|
field: 'deviceValidate', |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: String) => { |
|
|
|
return h( |
|
|
|
ElTag, |
|
|
|
{ |
|
|
|
type:'primary' |
|
|
|
}, |
|
|
|
() => |
|
|
|
JSON.parse(cellValue).map((item: any) => { |
|
|
|
return '['+item.name+']' |
|
|
|
}).join('\r\n') |
|
|
|
) |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '允许人员', |
|
|
|
field: 'personValidate', |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: String) => { |
|
|
|
return h( |
|
|
|
ElTag, |
|
|
|
{ |
|
|
|
label: '报工人', |
|
|
|
field: 'reportPerson', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
type:'primary' |
|
|
|
}, |
|
|
|
() => |
|
|
|
JSON.parse(cellValue).map((item: any) => { |
|
|
|
return '['+item.name+']' |
|
|
|
}).join('\r\n') |
|
|
|
) |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '生产人', |
|
|
|
field: 'receivePerson', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '计划数量', |
|
|
|
field: 'planCount', |
|
|
@ -280,6 +305,12 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
value: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '报工人', |
|
|
|
field: 'reportPerson', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '报工数量', |
|
|
|
field: 'reportCount', |
|
|
@ -328,10 +359,26 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '生产人', |
|
|
|
field: 'receivePerson', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '生产物料',
|
|
|
|
// field: 'materialValidate',
|
|
|
|
// sort: 'custom',
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '生产物料', |
|
|
|
field: 'materialValidate', |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|