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

export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
  [
    '1',
    {
      label: '要料部门',
      type: 'keySelect',
      selectKey: '部门字典',
      value: 'departmentCode',
    },
  ],
  [
    '2',
    {
      label: '所属公司',
      type: 'keySelect',
      selectKey: '公司',
      value: 'companyCode',
    },
  ],
  ['3', {label: '分录号', type: 'field', value: 'entryNumber'}],
  ['4', {label: '移动类型', type: 'field', value: 'moveType'}],
  ['5', {label: '来源类型', type: 'field', value: 'sourceType'}],
  [
    '6',
    {
      label: '状态',
      type: 'select',
      value: 'type',
      options: [
        {label: '未出库', value: '0'},
        {label: '已出库', value: '1'},
      ],
    },
  ],
  ['7', {label: '申请日期', type: 'date', value: 'startTime'}],
]);

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