
import {
    WeaTools
} from 'ecCom'

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

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

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

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

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

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

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

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


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