import { WeaTools } from 'ecCom'

export const getHasRight = params => {
  return WeaTools.callApi('/api/hrm/organization/getHasRight', 'POST', params);
}

export const getRightMenu = params => {
  return WeaTools.callApi('/api/hrm/organization/getRightMenu', 'POST', params);
}

export const getTabs = params => {
  return WeaTools.callApi('/api/hrm/organization/getTabs', 'POST', params);
}

export const getCompanyFormField = params => {
  return WeaTools.callApi('/api/hrm/organization/getCompanyFormField?is_multilang_set=true', 'GET', params);
}

export const getSubCompanyFormField = params => {
  return WeaTools.callApi('/api/hrm/organization/getSubCompanyFormField?is_multilang_set=true', 'GET', params);
}

export const getDepartmentFormField = params => {
  return WeaTools.callApi('/api/hrm/organization/getDepartmentFormField?is_multilang_set=true', 'GET', params);
}

export const getSubCompanyFormFieldView = params => {
  return WeaTools.callApi('/api/hrm/organization/getSubCompanyFormFieldView', 'GET', params);
}

export const getDepartmentFormFieldView = params => {
  return WeaTools.callApi('/api/hrm/organization/getDepartmentFormFieldView', 'GET', params);
}

export const addSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organization/addSubCompany', 'POST', params);
}

export const addDepartment = params => {
  return WeaTools.callApi('/api/hrm/organization/addDepartment', 'POST', params);
}

export const editCompany = params => {
  return WeaTools.callApi('/api/hrm/organization/editCompany', 'POST', params);
}

export const editSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organization/editSubCompany', 'POST', params);
}

export const editDepartment = params => {
  return WeaTools.callApi('/api/hrm/organization/editDepartment', 'POST', params);
}

export const delSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organization/delSubCompany', 'POST', params);
}

export const delDepartment = params => {
  return WeaTools.callApi('/api/hrm/organization/delDepartment', 'POST', params);
}

export const getSubCompanySearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organization/getSubCompanySearchCondition', 'GET', params);
}

export const getDepartmentSearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organization/getDepartmentSearchCondition', 'GET', params);
}

export const getResourceSearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organization/getResourceSearchCondition', 'GET', params);
}

export const getSubCompanySearchList = params => {
  return WeaTools.callApi('/api/hrm/organization/getSubCompanySearchList', 'POST', params);
}

export const getDepartmentSearchList = params => {
  return WeaTools.callApi('/api/hrm/organization/getDepartmentSearchList', 'POST', params);
}

export const getResourceSearchList = params => {
  return WeaTools.callApi('/api/hrm/organization/getResourceSearchList', 'POST', params);
}

export const doSubCompanyCancel = params => {
  return WeaTools.callApi('/api/hrm/organization/doSubCompanyCancel', 'POST', params);
}

export const doDepartmentCancel = params => {
  return WeaTools.callApi('/api/hrm/organization/doDepartmentCancel', 'POST', params);
}

export const doSubCompanyISCanceled = params => {
  return WeaTools.callApi('/api/hrm/organization/doSubCompanyISCanceled', 'POST', params);
}

export const doDepartmentISCanceled = params => {
  return WeaTools.callApi('/api/hrm/organization/doDepartmentISCanceled', 'POST', params);
}

export const saveBatchEdit = params => {
  return WeaTools.callApi('/api/hrm/organization/saveBatchEdit', 'POST', params);
}

export const getResourceVirtualDepartmentSetFormField = params => {
  return WeaTools.callApi('/api/hrm/organization/getResourceVirtualDepartmentSetFormField', 'POST', params);
}

export const saveResourceVirtualDepartmentSet = params => {
  return WeaTools.callApi('/api/hrm/organization/saveResourceVirtualDepartmentSet', 'POST', params);
}

export const saveAddToGroup = params => {
  return WeaTools.callApi('/api/hrm/organization/saveAddToGroup', 'POST', params);
}

//获取导入表单
export const getHrmResourceImportForm = (params) => {
  return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportForm', 'GET', params);
}
//导入文件提交
export const saveHrmResourceImport = (params) => {
  return WeaTools.callApi('/api/hrm/organization/saveHrmResourceImport', 'POST', params);
}
//获取导入结果信息
export const getHrmResourceImportResult = (params) => {
  return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportResult', 'GET', params);
}
//历史导入信息查询
export const getHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportHistory', 'GET', params);
}
//下载历史导入信息
export const downloadHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organization/downloadHrmResourceImportHistory', 'GET', params);
}
//删除历史导入日志
export const delHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organization/delHrmResourceImportHistory', 'POST', params);
}

export const saveBatchDefaultPwd = (params) => {
  return WeaTools.callApi('/api/hrm/organization/saveBatchDefaultPwd', 'POST', params);
}