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

  items: [
    { hidden: true, type: 'input', name: 'branchid', label: '仓库ID', value: '' },
    { hidden: true, type: 'input', name: 'branchcode', label: '仓库编码', value: '' }
  ],

  // seach-modal配置
  defSearchConfig: {
    name: 'branchname',
    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: 'branchid',
    companyName: 'branchcode',
    companyCode: 'branchname'
  }
}
