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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '领用部门',
      type: 'keySelect',
      selectKey: '部门字典',
      value: 'department',
    },
  ],
  ['2', {label: '库位名称', type: 'field', value: 'storageLocationName'}],
  ['3', {label: '出库用户', type: 'field', value: 'userName'}],
  ['4', {label: '姓名', type: 'field', value: 'realName'}],
  ['5', {label: '出库日期', type: 'date', value: 'startTime'}],
  [
    '6',
    {
      label: '供应商',
      type: 'keySelect',
      selectKey: '供应商/客户',
      value: 'supplierId',
    },
  ],
  ['7', {label: 'WBS编号', type: 'field', value: 'wbs'}],
  [
    '8',
    {
      label: '所属公司',
      type: 'keySelect',
      value: 'accountSleeve',
      selectKey: '公司',
    },
  ],
]);

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