| | |
| | | |
| | | import { z } from '#/adapter/form'; |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplatePage } from '#/api/mes/pro/processdesign/template'; |
| | | |
| | | /** 表单类型 */ |
| | | export type FormType = 'create' | 'detail' | 'update'; |
| | |
| | | rules: z.number().default(CommonStatusEnum.ENABLE), |
| | | }, |
| | | { |
| | | fieldName: 'paramCollectMode', |
| | | label: '参数采集方式', |
| | | component: 'Select', |
| | | defaultValue: 0, |
| | | componentProps: { |
| | | options: [ |
| | | { label: '不采集', value: 0 }, |
| | | { label: '每次报工填写', value: 1 }, |
| | | { label: '每个任务填写一次', value: 2 }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'paramTemplateId', |
| | | label: '参数模板', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplatePage, |
| | | params: { pageNo: 1, pageSize: 100 }, |
| | | resultField: 'list', labelField: 'templateName', valueField: 'id', |
| | | showSearch: true, optionFilterProp: 'label', allowClear: true, |
| | | placeholder: '启用参数采集时请选择模板', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'attention', |
| | | label: '工序说明', |
| | | component: 'Textarea', |