Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 7 months ago
parent
commit
33d60dd7c7
  1. 115
      src/views/mes/workScheduling/workScheduling.data.ts

115
src/views/mes/workScheduling/workScheduling.data.ts

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

Loading…
Cancel
Save