| | |
| | | } |
| | | |
| | | /** 工艺路线工序明细表单 */ |
| | | export function useRouteProcessFormSchema(processOptions: Array<{ label: string; value: number }>): VbenFormSchema[] { |
| | | export function useRouteProcessFormSchema( |
| | | processOptions: Array<{ label: string; value: number }>, |
| | | onProcessChange?: (processId?: number) => void, |
| | | ): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: "id", |
| | |
| | | options: processOptions, |
| | | placeholder: "请选择工序", |
| | | showSearch: true, |
| | | onChange: onProcessChange, |
| | | }, |
| | | rules: "selectRequired", |
| | | }, |
| | |
| | | }, |
| | | { |
| | | fieldName: "waitTime", |
| | | label: "等待时间(分)", |
| | | label: "等待时长(小时)", |
| | | component: "InputNumber", |
| | | componentProps: { |
| | | class: "!w-full", |
| | | min: 0, |
| | | precision: 0, |
| | | precision: 2, |
| | | }, |
| | | rules: z.number().default(0), |
| | | }, |
| | |
| | | width: 160, |
| | | }, |
| | | { field: "prepareTime", title: "准备时间(分)", width: 110 }, |
| | | { field: "waitTime", title: "等待时间(分)", width: 110 }, |
| | | { field: "waitTime", title: "等待时长(小时)", width: 110 }, |
| | | { |
| | | field: "colorCode", |
| | | title: "甘特图颜色", |