import { WeaTools } from "ecCom"; import { postFetch } from '../util/request'; //数据采集-其他免税扣除列表 export const getOtherDeductList = (params) => { return fetch("/api/bs/hrmsalary/otherDeduction/list", { method: "POST", mode: "cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify(params), }).then((res) => res.json()); }; //数据采集-其他免税扣除列表的高级搜索 export const getOtherDeductSaCondition = (params) => { return WeaTools.callApi( "/api/bs/hrmsalary/otherDeduction/getSearchCondition", "get", params ); }; //数据采集-其他免税扣除-获取导入参数 export const getImportOtherDeductParam = (params) => { return WeaTools.callApi( "/api/bs/hrmsalary/otherDeduction/getImportParams", "get", params ); }; //数据采集-其他免税扣除-导出 export const exportOtherDeductList = (ids = "") => { fetch("/api/bs/hrmsalary/otherDeduction/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); }) ); // return WeaTools.callApi( // "/api/bs/hrmsalary/otherDeduction/export", // "POST", // params // ); }; //数据采集-获取其他免税扣除记录 export const getOtherDeductDetailList = (params) => { return fetch("/api/bs/hrmsalary/otherDeduction/getDetailList", { method: "POST", mode: "cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify(params), }).then((res) => res.json()); }; //数据采集-其他免税扣除-导出明细 export const exportOtherDeductDetailList = (id, ids) => { fetch( "/api/bs/hrmsalary/otherDeduction/exportDetail?otherTaxExemptDeductionId=" + 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 importOtherDeductionParam = (params) => { return fetch("/api/bs/hrmsalary/otherDeduction/importData", { method: "POST", mode: "cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify(params), }).then((res) => res.json()); }; // 数据采集-其他免税扣除-导入预览 export const importOtherDeductionPreview = (params) => { return fetch("/api/bs/hrmsalary/otherDeduction/preview", { method: "POST", mode: "cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify(params), }).then((res) => res.json()); }; //新增其他免税扣除 export const createData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/createData', params); } //查看信息 export const getData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/getData', params); } //编辑其他免税扣除 export const editData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/editData', params); } //批量删除其他免税扣除 export const deleteSelectData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/deleteSelectData', params); } //一键清空其他免税扣除 export const deleteAllData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/deleteAllData', params); } //沿用上月 export const extendToLastMonth = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/extendToLastMonth', params); }