85 lines
2.8 KiB
JavaScript
85 lines
2.8 KiB
JavaScript
import { WeaTools } from 'ecCom';
|
|
|
|
//数据采集-累计情况列表
|
|
export const getCumSituationList = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpSituation/list', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
//数据采集-累计情况列表的高级搜索
|
|
export const getCumSituationSaCondition = params => {
|
|
return WeaTools.callApi('/api/bs/hrmsalary/addUpSituation/getSearchCondition', 'get', params);
|
|
}
|
|
|
|
//数据采集-累计情况-导出
|
|
export const exportCumSituationList = ids => {
|
|
fetch('/api/bs/hrmsalary/addUpSituation/export?ids=' + ids).then(res => res.blob().then(blob => {
|
|
var filename=`往期累计情况(工资、薪金).xlsx`
|
|
var a = document.createElement('a');
|
|
var url = window.URL.createObjectURL(blob);
|
|
a.href = url;
|
|
a.download = filename;
|
|
a.click();
|
|
window.URL.revokeObjectURL(url);
|
|
}))
|
|
}
|
|
|
|
//数据采集-累计情况-获取导入参数
|
|
export const getImportCumSituationParam = params => {
|
|
return WeaTools.callApi('/api/bs/hrmsalary/addUpSituation/getImportParams', 'get', params);
|
|
}
|
|
|
|
//数据采集-获取累计情况记录
|
|
export const getCumSituationDetailList = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpSituation/getDetailList', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
//数据采集-累计情况-导出明细
|
|
export const exportCumSituationDetailList = (id, ids="") => {
|
|
fetch('/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId='+id+'&ids=' + ids).then(res => res.blob().then(blob => {
|
|
var filename=`往期累计情况(工资、薪金).xlsx`
|
|
var a = document.createElement('a');
|
|
var url = window.URL.createObjectURL(blob);
|
|
a.href = url;
|
|
a.download = filename;
|
|
a.click();
|
|
window.URL.revokeObjectURL(url);
|
|
}))
|
|
}
|
|
|
|
// 数据采集-累计情况-导入
|
|
export const importCumSituationParam = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpSituation/importAddUpSituation', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
// 数据采集-累计情况-导入预览
|
|
export const importCumSituationPreview = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpSituation/preview', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
} |