import {SERVICE_DATA_API_BASE} from "@/config/serviceSettings";
//受托生产企业
export const delegationParty = {
  remoteUrl: {
    url: SERVICE_DATA_API_BASE+'/search/page',
    method: 'post'
  },
  // 组件用于form组件时，隐藏表单项含id code
  items: [
    { hidden: true, type: 'input', name: 'oemId', label: '受托生产企业id', value: '', },
    { hidden: true, type: 'input', name: 'oemCode', label: '编码', value: '', },
  ],

  // seach-modal配置
  defSearchConfig: {
    name: 'delegationPartyName',
    label: '受托生产企业名称',
    title: '受托生产企业名称',
    value: '',
    rowKey: 'oemId',
    destroyOnClose: true,
    targetClick: true,
    targetValueKey: 'oemName',
  },

  // modal的搜索栏
  defToolBar: {
    span: 24,
    items: [
      { dataIndex: 'oemId', title: 'oemId', hidden: true },
      { type: 'input', name: 'oemCondition', label: '受托生产企业', labelCol: { span: 8 }, span: 12, },
      // { type: 'input', name: 'oemCode', label: '受托生产企业编码', labelCol: { span: 8 }, span: 12, }
    ]
  },

  // modal的table配置
  defTableCol: [
    { dataIndex: 'oemName', title: '受托生产企业名称' },
    { dataIndex: 'oemId', title: 'oemId', hidden: true },
    { dataIndex: 'oemCode', title: '受托生产企业编码' },
  ],
  // 接口字段映射
  mapper: {
    oemName: 'delegationPartyName',
  }

};

