| | |
| | | import { UserSelect } from '#/views/system/user/components'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | |
| | | /** 表单类型 */ |
| | | export type FormType = 'create' | 'detail' | 'update'; |
| | | /** 表单类型(fill:临时批次码补录正式信息) */ |
| | | export type FormType = 'create' | 'detail' | 'update' | 'fill'; |
| | | |
| | | /** 新增/修改的表单 */ |
| | | export function useFormSchema(formType: FormType): VbenFormSchema[] { |
| | |
| | | component: 'Input', |
| | | componentProps: { |
| | | disabled: true, |
| | | placeholder: '保存后自动生成', |
| | | placeholder: '补录后自动生成', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: [''], |
| | | show: () => formType !== 'create', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'tempCode', |
| | | label: '临时批次码', |
| | | component: 'Input', |
| | | componentProps: { |
| | | disabled: true, |
| | | placeholder: '预生成二维码阶段使用的临时码', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: [''], |
| | | show: () => formType === 'fill', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 300, |
| | | width: 350, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |