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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  ['1', {label: '报工时间', value: 'endTime', type: 'date'}],
  ['2', {label: '分录号', value: 'entryNumber', type: 'field'}],
  [
    '3',
    {
      label: '所属公司',
      value: 'companyNumber',
      type: 'keySelect',
      selectKey: '公司',
    },
  ],
  ['4', {label: '移动类型', value: 'moveType', type: 'field'}],
  ['5', {label: '来源类型', value: 'sourceType', type: 'field'}],
  [
    '6',
    {
      label: '状态',
      value: 'type',
      type: 'select',
      options: [
        {label: '未入库', value: '0'},
        {label: '已入库', value: '1'},
      ],
    },
  ],
]);

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