import {SERVICE_CTRL_TOWER} from "@/config/serviceSettings";
//
export const cargoOwnerAuth = {
  remoteUrl: { url: SERVICE_CTRL_TOWER+'/userDataAuth/allDataAuthByUser/?companyType=H', method: 'get' },

  // 组件用于form组件时，隐藏表单项含id code
  items: [
    { hidden: true, type: 'input', name: 'cargoOwnerId', label: '货主ID', value: '' },
    { hidden: true, type: 'input', name: 'cargoOwnerCode', label: '货主编码', value: '' }
  ],

  // seach-modal配置
  defSearchConfig: {
    name: 'cargoOwnerName',
    label: '货主名称',
    title: '货主名称',
    value: '',
    rowKey: 'companyId',
    destroyOnClose: true,
    targetClick: true,
    targetValueKey: 'companyName'
  },

  // modal的搜索栏
  defToolBar: {
    items: []
  },

  // modal的table配置
  defTableCol: [
    { dataIndex: 'companyId', title: '货主ID', hidden: true },
    { dataIndex: 'companyName', title: '货主名称' },
    { dataIndex: 'companyCode', title: '货主编码' }
  ],

  // 接口字段映射
  mapper: {
    companyId: 'cargoOwnerId',
    companyName: 'cargoOwnerName',
    companyCode: 'cargoOwnerCode'
  }
}
