| | |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | | import { getDictOptions } from '@vben/hooks'; |
| | | |
| | | import { getItemTypeSimpleList } from '#/api/mes/md/item/type'; |
| | | |
| | | /** 物料选择弹窗搜索表单 */ |
| | | export function useMdmItemSelectGridFormSchema(): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'code', |
| | | label: '物料编码', |
| | | label: '品种编码', |
| | | component: 'Input', |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入物料编码', |
| | | placeholder: '请输入品种编码', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'name', |
| | | label: '物料名称', |
| | | label: '品种名称', |
| | | component: 'Input', |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入物料名称', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'categoryId', |
| | | label: '物料分类', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | placeholder: '请选择物料分类', |
| | | allowClear: true, |
| | | api: async () => { |
| | | const res = await getItemTypeSimpleList(); |
| | | return res || []; |
| | | }, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | placeholder: '请输入品种名称', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | { type: multiple ? 'checkbox' : 'radio', width: 50 }, |
| | | { |
| | | field: 'code', |
| | | title: '物料编码', |
| | | title: '品种编码', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: '物料名称', |
| | | title: '品种名称', |
| | | minWidth: 180, |
| | | align: 'left', |
| | | }, |
| | |
| | | title: '规格型号', |
| | | minWidth: 150, |
| | | align: 'left', |
| | | }, |
| | | { |
| | | field: 'categoryId', |
| | | title: '物料分类', |
| | | minWidth: 120, |
| | | align: 'center', |
| | | slots: { default: 'categoryId' }, |
| | | }, |
| | | { |
| | | field: 'unitMeasureName', |