| | |
| | | import type { MesProTaskApi } from '#/api/mes/pro/task'; |
| | | import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder'; |
| | | |
| | | import type { Ref } from 'vue'; |
| | | |
| | | import { markRaw } from 'vue'; |
| | | |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 100, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | } |
| | | |
| | | /** 生产任务新增/修改的表单 */ |
| | | export function useTaskFormSchema(formApi?: VbenFormApi): VbenFormSchema[] { |
| | | export function useTaskFormSchema(formApi?: VbenFormApi, workOrderQuantity?: Ref<number | undefined>): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'workstationId', |
| | |
| | | fieldName: 'quantity', |
| | | label: '排产数量', |
| | | component: 'InputNumber', |
| | | description: () => workOrderQuantity?.value != null ? `订单数量:${workOrderQuantity.value}` : '', |
| | | componentProps: { |
| | | class: '!w-full', |
| | | min: 0.01, |