| | |
| | | import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; |
| | | import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { MesProTaskApi } from '#/api/mes/pro/task'; |
| | | import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder'; |
| | |
| | | import { RouteColorPicker } from '#/views/mes/process-design/route/components'; |
| | | import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components'; |
| | | |
| | | /** 待排产工单列表的搜索表单 */ |
| | | /** 待排产订单列表的搜索表单 */ |
| | | export function useGridFormSchema(): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'code', |
| | | label: '工单编码', |
| | | label: '订单编码', |
| | | component: 'Input', |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入工单编码', |
| | | placeholder: '请输入订单编码', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'name', |
| | | label: '工单名称', |
| | | label: '订单名称', |
| | | component: 'Input', |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入工单名称', |
| | | placeholder: '请输入订单名称', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 待排产工单列表的字段 */ |
| | | /** 待排产订单列表的字段 */ |
| | | export function useGridColumns(): VxeTableGridOptions<MesProWorkOrderApi.WorkOrder>['columns'] { |
| | | return [ |
| | | { |
| | | field: 'code', |
| | | title: '工单编码', |
| | | title: '订单编码', |
| | | fixed: 'left', |
| | | width: 200, |
| | | treeNode: true, |
| | |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: '工单名称', |
| | | title: '订单名称', |
| | | minWidth: 150, |
| | | }, |
| | | { |
| | | field: 'orderSourceType', |
| | | title: '工单来源', |
| | | title: '订单来源', |
| | | width: 100, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | title: '工单数量', |
| | | title: '订单数量', |
| | | width: 100, |
| | | }, |
| | | { |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 排产对话框只读工单信息的表单 */ |
| | | /** 排产对话框只读订单信息的表单 */ |
| | | export function useScheduleFormSchema(): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'code', |
| | | label: '工单编码', |
| | | label: '订单编码', |
| | | component: 'Input', |
| | | componentProps: { |
| | | disabled: true, |
| | |
| | | }, |
| | | { |
| | | fieldName: 'name', |
| | | label: '工单名称', |
| | | label: '订单名称', |
| | | component: 'Input', |
| | | componentProps: { |
| | | disabled: true, |
| | |
| | | }, |
| | | { |
| | | fieldName: 'orderSourceType', |
| | | label: '工单来源', |
| | | label: '订单来源', |
| | | component: 'Select', |
| | | componentProps: { |
| | | disabled: true, |
| | |
| | | }, |
| | | { |
| | | fieldName: 'type', |
| | | label: '工单类型', |
| | | label: '订单类型', |
| | | component: 'Select', |
| | | componentProps: { |
| | | disabled: true, |
| | |
| | | }, |
| | | { |
| | | fieldName: 'quantity', |
| | | label: '工单数量', |
| | | label: '订单数量', |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | class: '!w-full', |
| | |
| | | }, |
| | | { |
| | | fieldName: 'status', |
| | | label: '工单状态', |
| | | label: '订单状态', |
| | | component: 'Select', |
| | | componentProps: { |
| | | disabled: true, |
| | |
| | | return [ |
| | | { |
| | | fieldName: 'workOrderId', |
| | | label: '生产工单', |
| | | label: '生产订单', |
| | | component: markRaw(ProWorkOrderSelect), |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请选择生产工单', |
| | | placeholder: '请选择生产订单', |
| | | }, |
| | | }, |
| | | { |