124 lines
3.7 KiB
JavaScript
124 lines
3.7 KiB
JavaScript
import { WeaTools } from "ecCom";
|
|
import { postFetch } from '../util/request';
|
|
|
|
//数据采集-累计情况列表
|
|
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 = "", taxAgentId='') => {
|
|
fetch(
|
|
"/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=" +
|
|
id +
|
|
"&ids=" +
|
|
ids + "&taxAgentId=" + taxAgentId
|
|
).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());
|
|
};
|
|
//新建往期累计情况
|
|
export const createAddUpSituation = (params) => {
|
|
return postFetch('/api/bs/hrmsalary/addUpSituation/createAddUpSituation', params);
|
|
}
|
|
//编辑往期累计情况
|
|
export const editAddUpSituation = (params) => {
|
|
return postFetch('/api/bs/hrmsalary/addUpSituation/editAddUpSituation', params);
|
|
}
|
|
//删除所选往期累计情况
|
|
export const deleteSelectAddUpSituation = (params) => {
|
|
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation', params);
|
|
}
|
|
//一键清空往期累计情况
|
|
export const deleteAllAddUpSituation = (params) => {
|
|
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
|
|
}
|
|
//查看信息
|
|
export const getAddUpSituation = (params) => {
|
|
return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params);
|
|
}
|