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

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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '客户名称',
      type: 'keySelect',
      selectKey: '供应商/客户',
      value: 'customerCode',
    },
  ],
  [
    '2',
    {
      label: '所属公司',
      type: 'keySelect',
      selectKey: '公司',
      value: 'companyNumber',
    },
  ],
  ['3', {label: '销售日期', type: 'date', value: 'startTime'}],
  ['4', {label: 'WBS编号', type: 'field', value: 'wbs'}],
  ['5', {label: '来源类型', type: 'field', value: 'sourceType'}],
  ['6', {label: '移动类型', type: 'field', value: 'moveType'}],
  ['7', {label: '交货类型', type: 'field', value: 'deliveryType'}],
  ['8', {label: '分录号', type: 'field', value: 'entryNumber'}],
]);
