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

export const fixedMap: MapValue<typeof contextState>[] = [
  {type: 'field', value: 'askGoodsCode', label: '出库单编号'},
  {type: 'field', value: 'materialCode', label: '物料编号'},
  {type: 'field', value: 'materialName', label: '物料名称'},
];

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  ['1', {type: 'date', label: '通知时间', value: 'startTime'}],
  [
    '2',
    {
      type: 'keySelect',
      label: '所属公司',
      selectKey: '公司',
      value: 'companyNumber',
    },
  ],
  ['3', {type: 'field', label: 'WBS编号', value: 'wbs'}],
  [
    '4',
    {
      type: 'keySelect',
      selectKey: '部门字典',
      label: '领用部门',
      value: 'departmentCode',
    },
  ],
  [
    '5',
    {
      type: 'select',
      label: '出库状态',
      value: 'type',
      options: [
        {label: '已完成', value: '1'},
        {label: '未完成', value: '0'},
      ],
    },
  ],
]);
