86 lines
2.9 KiB
JavaScript
86 lines
2.9 KiB
JavaScript
import { WeaTools } from 'ecCom';
|
|
|
|
//数据采集-累计专项附加扣除列表
|
|
export const getCumDeductList = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpDeduction/list', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
//数据采集-累计专项附加扣除列表的高级搜索
|
|
export const getCumDeductSaCondition = params => {
|
|
return WeaTools.callApi('/api/bs/hrmsalary/addUpDeduction/getSearchCondition', 'get', params);
|
|
}
|
|
|
|
//数据采集-累计专项附加扣除-导出
|
|
export const exportCumDeductList = (ids = "") => {
|
|
fetch('/api/bs/hrmsalary/addUpDeduction/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 getImportCumDeductParam = params => {
|
|
return WeaTools.callApi('/api/bs/hrmsalary/addUpDeduction/getImportParams', 'get', params);
|
|
}
|
|
|
|
//数据采集-获取累计专项附加扣除记录
|
|
export const getCumDeductDetailList = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpDeduction/getDetailList', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
//数据采集-累计专项附加扣除-导出明细
|
|
export const exportCumDeductDetailList = (id, ids="") => {
|
|
fetch('/api/bs/hrmsalary/addUpDeduction/exportDetail?accumulatedSpecialAdditionalDeductionId='+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 importCumDeductParam = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpDeduction/importAddUpDeduction', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|
|
|
|
// 数据采集-获取累计专项附加扣除-导入预览
|
|
export const importCumDeductPreview = params => {
|
|
return fetch('/api/bs/hrmsalary/addUpDeduction/preview', {
|
|
method: 'POST',
|
|
mode: 'cors',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify(params)
|
|
}).then(res => res.json())
|
|
}
|