import {
	WeaTools
} from 'ecCom'

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

export const getSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchCondition', 'GET', params);

export const getSearchList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchList', 'POST', params);

export const getBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 1});

export const getKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 2});

export const saveBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 1});

export const saveKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 2});

export const deleteGroup = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/del', 'POST', params);

export const getShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getShiftCycleForm', 'GET', params);

export const delShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/delShiftCycleForm', 'POST', params);

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

export const init = (params = {}) => Promise.all([getSearchCondition(), getTabs()]);

export const getLocationForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getForm', 'GET', params);

export const saveLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/save', 'POST', params);

export const delLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/del', 'POST', params);

export const getWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getForm', 'GET', params);

export const saveWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/save', 'POST', params);

export const delWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/del', 'POST', params);

export const getMemberSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchCondition', 'GET', params);

export const getMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchList', 'POST', params);

export const getMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getForm', 'GET', params);

export const saveMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/save', 'POST', params);

export const delMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/del', 'POST', params);

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

export const importExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/importExcel', 'POST', params);

// 考勤组查询gropuradio
export const getGroupMemeberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemeberCondition', 'GET', params);

// 考勤组查询列表
export const getGroupMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemberList', 'GET', params);

// 获取添加考勤组人员表单
export const getAddMemberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getAddMemberCondition', 'GET', params);

//加入考勤组保存
export const saveAddMember = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/saveAddMember', 'POST', params);

export const getGroupLocationList = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getGroupLocationList', 'GET', params);

export const getGroupWifiList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getGroupWifiList', 'GET', params);

export const saveValidateDate = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/saveValidateDate', 'POST', params);
