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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '所在仓库',
      type: 'keySelect',
      value: 'warehouseWhere',
      selectKey: '仓库',
    },
  ],
  [
    '2',
    {
      label: '物料类型',
      type: 'keySelect',
      value: 'storageLocationType',
      selectKey: '物料类型',
    },
  ],
  [
    '3',
    {
      label: '混合库位',
      type: 'select',
      value: 'isNotDisable',
      options: [
        {label: '是', value: '1'},
        {label: '否', value: '0'},
      ],
    },
  ],
  [
    '4',
    {
      label: '产成品库位',
      type: 'select',
      value: 'isProduct',
      options: [
        {label: '是', value: '1'},
        {label: '否', value: '0'},
      ],
    },
  ],
  [
    '5',
    {
      label: '修改人',
      type: 'field',
      value: 'modifyUser',
    },
  ],
]);

export const fixedMap: MapValue<typeof contextState>[] = [
  {label: '库位编号', type: 'field', value: 'storageLocationCode'},
  {label: '库位名称', type: 'field', value: 'storageLocationName'},
];
