salary-management-front/pc4mobx/hrmSalary/apis/welfareArchive.js

151 lines
4.3 KiB
JavaScript
Raw Normal View History

import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
2022-02-28 09:29:46 +08:00
export const tips = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/tips", "get", params);
2022-02-28 09:29:46 +08:00
};
export const getCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
2022-02-28 09:29:46 +08:00
};
//社保福利档案列表
export const queryList = (params) => {
return postFetch("/api/bs/hrmsalary/archives/getTable", params);
};
//社保福利档案列表
export const queryInsuranceTabTotal = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params);
};
//删除待办-待增员
export const updateRunStatus = (params) => {
return postFetch("/api/bs/hrmsalary/archives/updateRunStatus", params);
};
//删除待办-待减员
export const cancelStayDel = (params) => {
return postFetch("/api/bs/hrmsalary/archives/cancelStayDel", params);
};
//全量增员
export const allStayAddToPay = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayAddToPay", "GET", params);
};
//全量减员
export const allStayDelToStop = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayDelToStop", "GET", params);
};
//增员
export const stayAddToPay = (params) => {
return postFetch("/api/bs/hrmsalary/archives/stayAddToPay", params);
};
//减员
export const stayDelToStop = (params) => {
return postFetch("/api/bs/hrmsalary/archives/stayDelToStop", params);
};
//删除社保档案
export const deleteArchive = (params) => {
return postFetch("/api/bs/hrmsalary/archives/deleteArchive", params);
};
//取消停缴
export const cancelStopPayment = (params) => {
return postFetch("/api/bs/hrmsalary/archives/cancelStopPayment", params);
};
2022-02-28 09:29:46 +08:00
export const getTable = params => {
return fetch("/api/bs/hrmsalary/archives/getTable", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
2022-02-28 09:29:46 +08:00
};
export const getBaseForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getBaseForm", "get", params);
2022-02-28 09:29:46 +08:00
};
export const getPaymentForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getPaymentForm", "get", params);
2022-02-28 09:29:46 +08:00
};
2022-04-21 14:59:34 +08:00
// 保存
2022-02-28 09:29:46 +08:00
export const save = params => {
return fetch("/api/bs/hrmsalary/archives/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
2022-02-28 09:29:46 +08:00
};
// 导出档案
export const exportDocument = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/export", "get", params);
2022-02-28 09:29:46 +08:00
};
// 导入档案 - 获取组件的一些前置参数
export const getImportDocumentParams = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getImportParams", "get", params);
2022-02-28 09:29:46 +08:00
};
// 导入档案- 导出现有数据
2022-05-09 14:23:43 +08:00
export const exportCurData = params => {
fetch("/api/bs/hrmsalary/scheme/template/export", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).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);
}));
2022-05-07 14:47:14 +08:00
};
// 导入档案-预览
export const previewCurData = (params) => {
return fetch("/api/bs/hrmsalary/scheme/preview", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
2022-05-07 14:47:14 +08:00
// 档案导入
export const importBatch = (params) => {
return fetch("/api/bs/hrmsalary/scheme/importBatch", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
2022-05-07 14:47:14 +08:00
2022-05-19 15:13:31 +08:00
// 导出档案
export const exportArchives = (ids) => {
fetch("/api/bs/hrmsalary/scheme/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);
}));
};
2022-05-19 15:13:31 +08:00
2022-05-07 14:47:14 +08:00