| | |
| | | import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; |
| | | import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder'; |
| | | import { type MesProWorkOrderApi, getWorkOrderApproveProcessList } from '#/api/mes/pro/workorder'; |
| | | import { getSimpleRoleList } from '#/api/system/role'; |
| | | import type { MesProWorkOrderBomApi } from '#/api/mes/pro/workorder/bom'; |
| | | import type { MesProWorkOrderProcessApi } from '#/api/mes/pro/workorder/process'; |
| | | |
| | |
| | | disabled: headerReadonly, |
| | | format: 'YYYY-MM-DD', |
| | | placeholder: '请选择需求日期', |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | | { |
| | | fieldName: 'feedbackRole', |
| | | label: '报工角色', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getSimpleRoleList, |
| | | disabled: headerReadonly, |
| | | labelField: 'name', |
| | | valueField: 'code', |
| | | mode: 'multiple', |
| | | placeholder: '请选择报工角色', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'feedbackApprove', |
| | | label: '是否报工审批', |
| | | component: 'Switch', |
| | | componentProps: { |
| | | class: '!w-auto', |
| | | checkedChildren: '是', |
| | | unCheckedChildren: '否', |
| | | disabled: headerReadonly, |
| | | }, |
| | | defaultValue: false, |
| | | rules: 'required', |
| | | }, |
| | | { |
| | | fieldName: 'processDefinitionKey', |
| | | label: '审批流程', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getWorkOrderApproveProcessList, |
| | | disabled: headerReadonly, |
| | | labelField: 'name', |
| | | valueField: 'key', |
| | | placeholder: '请选择审批流程', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['feedbackApprove'], |
| | | show: (values) => !!values.feedbackApprove, |
| | | rules(values) { |
| | | if (values.feedbackApprove) { |
| | | return 'selectRequired'; |
| | | } |
| | | return undefined; |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | fieldName: 'remark', |
| | | label: '备注', |
| | |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.MES_PRO_WORK_ORDER_STATUS }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'productionStatus', |
| | | title: '生产状态', |
| | | width: 100, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.ORDER_PRODUCTION_STATUS }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'processProgressList', |
| | | title: '工序生产进度', |
| | | width: 350, |
| | | slots: { default: 'processProgressList' }, |
| | | }, |
| | | { |
| | | field: 'completionProgress', |
| | | title: '完成进度', |
| | | width: 200, |
| | | slots: { default: 'completionProgress' }, |
| | | }, |
| | | { |
| | | field: 'createTime', |
| | |
| | | slots: { default: 'backflushFlag' }, |
| | | }, |
| | | { |
| | | field: 'outputItemCode', |
| | | title: '产出物料编码', |
| | | width: 120, |
| | | }, |
| | | { |
| | | field: 'outputItemName', |
| | | title: '产出物料名称', |
| | | width: 120, |
| | | field: 'outputItemNames', |
| | | title: '产出物料', |
| | | width: 160, |
| | | }, |
| | | { |
| | | field: 'remark', |