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

  items: [
    { hidden: true, type: 'input', name: 'warehouseId', label: '仓库ID', value: '' },
    { hidden: true, type: 'input', name: 'warehouseCode', label: '仓库编码', value: '' },
    { hidden: true, type: 'input', name: 'dcId', label: '仓配中心Id', value: '' }
  ],

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

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

  // modal的table配置
  defTableCol: [
    { dataIndex: 'companyId', title: '仓库ID', hidden: true },
    { dataIndex: 'dcId', title: '仓配中心ID', hidden: true },
    { dataIndex: 'companyName', title: '仓库名称' },
    { dataIndex: 'companyCode', title: '仓库编码' }
  ],

  // 接口字段映射
  mapper: {
    companyId: 'warehouseId',
    companyName: 'warehouseName',
    companyCode: 'warehouseCode',
    dcId: 'dcId',
  }
}
