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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '供应商',
      type: 'keySelect',
      selectKey: '供应商/客户',
      value: 'supplierId',
    },
  ],
  ['2', {label: '到货时间', value: 'startTime', type: 'date'}],
]);

export const fixedMap: MapValue<typeof contextState>[] = [
  {
    label: '订单状态',
    type: 'select',
    value: 'type',
    options: [
      {label: '全部', value: '1'},
      {label: '逾期', value: '2'},
    ],
    hideClear: true,
  },
  {label: '采购单号', type: 'field', value: 'orderCode'},
  {label: '物料编号', value: 'wllbCode', type: 'field'},
  {label: '物料名称', value: 'materialName', type: 'field'},
];
