| | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | |
| | | /** 表单类型 */ |
| | | export type FormType = 'create' | 'update'; |
| | | export type FormType = 'create' | 'update' | 'detail'; |
| | | |
| | | /** 新增/修改检测结果的表单 */ |
| | | export function useQcIndicatorResultFormSchema( |
| | | formApi?: VbenFormApi, |
| | | readonly = false, |
| | | ): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | |
| | | placeholder: '请输入样品编号', |
| | | }, |
| | | rules: 'required', |
| | | suffix: () => |
| | | suffix: readonly ? undefined : () => |
| | | h( |
| | | Button, |
| | | { |
| | |
| | | }, |
| | | { default: () => '生成' }, |
| | | ), |
| | | }, |
| | | { |
| | | fieldName: 'sn', |
| | | label: '物资 SN', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入物资 SN', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'remark', |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | field: 'sn', |
| | | title: '物资SN', |
| | | minWidth: 200, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '备注', |
| | | minWidth: 200, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 150, |
| | | width: 240, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |