
import {
    WeaTools
} from 'ecCom'

export const getSearchList = (params) => {
    return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getTable', 'GET', params);
}

export const deleteTableData = (params) => {
    return fetch('/api/bs/hrmorganization/staffplan/deleteByIds', {
        method: 'POST',
        mode: 'cors',
        headers: {
            'Content-Type': 'application/json'
        }, 
        body: JSON.stringify(params)
    })
}

export const getAdvanceSearchCondition = (params) => {
    return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getSearchCondition', 'GET', params);
}

export const add = (params) => {
    return fetch('/api/bs/hrmorganization/staffplan/saveStaffPlan', {
        method: 'POST',
        mode: 'cors',
        headers: {
            'Content-Type': 'application/json'
        }, 
        body: JSON.stringify(params)
    })
}

export const edit = (params) => {
    return fetch('/api/bs/hrmorganization/staffplan/updateStaffPlan', {
        method: 'POST',
        mode: 'cors',
        headers: {
            'Content-Type': 'application/json'
        }, 
        body: JSON.stringify(params)
    })
}

export const updateForbiddenTag = (params) => {
    return fetch('/api/bs/hrmorganization/staffplan/updateForbiddenTagById', {
        method: 'POST',
        mode: 'cors',
        headers: {
            'Content-Type': 'application/json'
        }, 
        body: JSON.stringify(params)
    })
}

export const getSchemeForm = (params) => {
    return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getForm', 'GET', params);
}

export const getHasRight = (params) => {
    return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getHasRight', 'GET', params);
}