import {
	WeaTools
} from 'ecCom';

export const getCondition = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetCondition', 'GET', params)

//有效期设置
export const getPLSManagerSetList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetList', 'POST', params)

export const getPLSManagerSetForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetForm', 'GET', params)

export const savePLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManagerSet', 'POST', params)

export const deletePLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/deletePLSManagerSet', 'POST', params)

export const synPLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/synPLSManagerSet', 'POST', params)

export const initPeriod = (params = {}) => Promise.all([getPLSManagerSetForm(), getCondition(params)])

//批量规则
export const getPLSManagerBatchList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerBatchList', 'POST', params)

export const getPLSManagerBatchForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerBatchForm', 'GET', params)

export const savePLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManagerBatch', 'POST', params)

export const deletePLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/deletePLSManagerBatch', 'POST', params)

export const synPLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/synPLSManagerBatch', 'POST', params)

export const initRule = (params = {}) => Promise.all([getPLSManagerBatchForm(), getCondition(params)])

//设置
export const getPLSManagerList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerList', 'POST', params)

export const savePLSManager = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManager', 'POST', params)

export const processPLSManager = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/processPLSManager', 'POST', params)

export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getImportForm?is_multilang_set=true', 'GET', params)

export const saveImport = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/saveImport', 'POST', params)

export const exportData = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/exportPLSManagerExcel', 'POST', params)