import {
	WeaTools
} from 'ecCom'

export const getPageAuth = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getHasRight', 'GET', params);
}

export const getAllSubButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getListButtonMenu', 'GET', params);
}

export const getDeptButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getFormButtonMenu', 'POST', params);
}

export const getAllSubPayrollInfoTable = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageList', 'POST', params);
}

export const getDeptPayrollInfoTable = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageViewForm', 'POST', params);
}

export const getEditableDeptPayrollTable = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageEditForm', 'POST', params);
}

export const getAllSubSearchItems = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageListCondition', 'POST', params);
}

export const getDeptSearchItems = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageFormCondition', 'POST', params);
}

export const createPayroll = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/createSalaryManage', 'POST', params);
}

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

export const sendPayroll = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/sendSalaryManage', 'POST', params);
}

export const closePayroll = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/closeSalaryManage', 'POST', params);
}

export const adjustSalarySetting = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/changeSalaryManage', 'POST', params);
}

export const saveDeptPayrollInfo = (params) => {
	return WeaTools.callApi('/api/hrm/finance/salarymanage/editSalaryManage', 'POST', params);
}

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