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

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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '要货仓库',
      type: 'keySelect',
      selectKey: '仓库',
      value: 'askGoodsWarehouseId',
    },
  ],
  [
    '2',
    {
      label: '出货仓库',
      type: 'keySelect',
      selectKey: '仓库',
      value: 'supplyWarehouseId',
    },
  ],
  [
    '3',
    {
      label: '所属公司',
      type: 'keySelect',
      selectKey: '公司',
      value: 'companyCode',
    },
  ],
  ['4', {label: '移库类型', type: 'field', value: 'warehouseTransferType'}],
  ['5', {label: 'WBS编号', type: 'field', value: 'wbs'}],
  ['6', {label: '分录号', type: 'field', value: 'entryNumber'}],
  ['7', {label: '移库日期', type: 'date', value: 'startTime'}],
]);
