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

export const fixedMap: MapValue<typeof contextState>[] = [
  {label: '入库单编号', value: 'storageCode', type: 'field'},
  {label: '生产订单号', value: 'productionCode', type: 'field'},
  {label: '物料编号', value: 'wllbCode', type: 'field'},
  {label: '物料名称', value: 'materialName', type: 'field'},
];

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  ['1', {label: '工号', type: 'field', value: 'userName'}],
  ['2', {label: '姓名', type: 'field', value: 'realName'}],
  ['3', {label: '库位名称', type: 'field', value: 'storageLocationName'}],
  ['4', {label: 'WBS编号', type: 'field', value: 'wbs'}],
  ['5', {label: '入库时间', type: 'date', value: 'startTime'}],
  ['6', {label: '属性', type: 'field', value: 'attribute'}],
  [
    '7',
    {
      label: '所属公司',
      type: 'keySelect',
      value: 'companyNumber',
      selectKey: '公司',
    },
  ],
]);
