trunk/pc4mobx/organization/apis/staff.js

53 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-05-25 14:58:27 +08:00
import {
WeaTools
} from 'ecCom'
export const getSearchList = (params) => {
2022-05-26 13:55:26 +08:00
return WeaTools.callApi('/api/bs/hrmorganization/staff/getTable', 'GET', params);
2022-05-25 14:58:27 +08:00
}
export const deleteTableData = (params) => {
2022-05-26 13:55:26 +08:00
return fetch('/api/bs/hrmorganization/staff/deleteByIds', {
2022-05-25 14:58:27 +08:00
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
}
export const getAdvanceSearchCondition = (params) => {
2022-05-26 13:55:26 +08:00
return WeaTools.callApi('/api/bs/hrmorganization/staff/getSearchCondition', 'GET', params);
2022-05-25 14:58:27 +08:00
}
export const add = (params) => {
2022-05-26 13:55:26 +08:00
return fetch('/api/bs/hrmorganization/staff/saveStaff', {
2022-05-25 14:58:27 +08:00
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
}
export const edit = (params) => {
2022-05-26 13:55:26 +08:00
return fetch('/api/bs/hrmorganization/staff/updateStaff', {
2022-05-25 14:58:27 +08:00
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
}
2022-05-26 13:55:26 +08:00
export const getForm = (params) => {
return WeaTools.callApi('/api/bs/hrmorganization/staff/getForm', 'GET', params);
2022-05-25 14:58:27 +08:00
}
export const getHasRight = (params) => {
2022-05-26 13:55:26 +08:00
return WeaTools.callApi('/api/bs/hrmorganization/staff/getHasRight', 'GET', params);
2022-05-25 14:58:27 +08:00
}