import {FilterGroupMap, MapValue} from '@components';
import {contextState} from '../context';

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  ['1', {label: '物料类别', type: 'field', value: 'materialType'}],
  [
    '2',
    {
      label: '物料类型',
      type: 'keySelect',
      value: 'wllbClass',
      selectKey: '物料类型',
    },
  ],
  [
    '3',
    {
      label: '混合存储',
      type: 'select',
      value: 'isNotDisable',
      options: [
        {label: '是', value: '1'},
        {label: '否', value: '0'},
      ],
    },
  ],
  [
    '4',
    {
      label: '推荐库位',
      type: 'select',
      value: 'isRecommend',
      options: [
        {label: '是', value: '1'},
        {label: '否', value: '0'},
      ],
    },
  ],
  [
    '5',
    {
      label: '修改人',
      type: 'field',
      value: 'modifyUser',
    },
  ],
]);

export const fixedMap: MapValue<typeof contextState>[] = [
  {label: '物料编号', value: 'code', type: 'field'},
  {label: '物料名称', value: 'name', type: 'field'},
];
