import { WeaTools } from "ecCom"; import { postFetch } from "../util/request"; //数据采集-累计专项附加扣除列表 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 + "&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 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()); }; //新增累计专项附加扣除 export const createAddUpDeduction = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/createAddUpDeduction", params); }; //查看信息 export const getAddUpDeduction = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/getAddUpDeduction", params); }; //编辑累计专项附加扣除 export const editAddUpDeduction = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/editAddUpDeduction", params); }; //批量删除累计专项附加扣除 export const deleteSelectAddUpDeduction = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/deleteSelectAddUpDeduction", params); }; //一键清空累计专项附加扣除 export const deleteAllAddUpDeduction = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/deleteAllAddUpDeduction", params); }; //一键累计 export const autoAddAll = (params) => { return postFetch("/api/bs/hrmsalary/addUpDeduction/autoAddAll", params); }; //数据采集列表查询 export const getTableDate = ({ url, ...params }) => { return postFetch(url, params); }; //数据采集列表详情记录查询 export const getTableRecordDate = ({ url, ...params }) => { return postFetch(url, params); };