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

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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  ['1', {label: '出库人', type: 'field', value: 'userName'}],
  ['2', {label: '姓名', type: 'field', value: 'realName'}],
  [
    '3',
    {
      label: '所属公司',
      type: 'keySelect',
      selectKey: '公司',
      value: 'companyCode',
    },
  ],
  [
    '4',
    {
      label: '客户名称',
      type: 'keySelect',
      selectKey: '供应商/客户',
      value: 'customerCode',
    },
  ],
  ['5', {label: '出库时间', type: 'date', value: 'startTime'}],
  ['6', {label: 'WBS编号', type: 'field', value: 'wbs'}],
]);
