Merge branch 'feature/V2-dev合并多语言' into custom/上海港湾-多语言版本

This commit is contained in:
黎永顺 2023-12-14 16:49:18 +08:00
commit b10c07e86b
29 changed files with 671 additions and 2141 deletions

View File

@ -1,136 +1,34 @@
import { WeaTools } from "ecCom";
/**
* 薪资档案api
* @param data
*/
import { postFetch } from "../util/request";
//薪资档案-薪资档案列表
export const getArchiveList = params => {
return fetch("/api/bs/hrmsalary/salaryArchive/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
};
//薪资档案的高级搜索
export const getSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
};
//薪资档案-导出薪资档案
export const exportArchiveList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/exportList", "POST", params);
};
//薪资档案-获取导入参数
export const getImportArchiveParam = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportParams", "get", params);
};
//薪资档案-获取薪资档案详情表单
export const getArchiveForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);
};
//薪资档案-获取薪资项目调整表单
export const getSalaryItemForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getSalaryItemForm", "GET", params);
};
//薪资档案-保存薪资项目调整
export const saveSalaryItem = params => {
return fetch("/api/bs/hrmsalary/salaryArchive/saveSalaryItem", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/saveSalaryItem", params);
};
//薪资档案-获取个税扣缴义务人调整表单
export const getTaxAgentForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getTaxAgentForm", "GET", params);
};
//薪资档案-保存个税扣缴义务人调整
export const saveTaxAgent = params => {
return fetch("/api/bs/hrmsalary/salaryArchive/saveTaxAgent", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/saveTaxAgent", params);
};
//薪资档案-删除个税扣缴义务人调整
export const deleteTaxAgent = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/deleteTaxAgent", "GET", params);
};
//薪资档案操作记录-薪资项目操作记录列表
export const getItemAdjustList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/salaryItemList", "POST", params);
};
//薪资档案操作记录-薪资项目操作记录列表的高级搜索
export const getItemAdjustSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/getSalaryItemSearchCondition", "GET", params);
};
//薪资档案操作记录-导出-薪资项目操作记录列表
export const exportItemAdjust = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/exportSalaryItemList", "POST", params);
};
//薪资档案操作记录-个税扣缴义务人操作记录列表
export const getPersonAdjustList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/salaryItemList", "POST", params);
};
//薪资档案操作记录-个税扣缴义务人操作记录列表的高级搜索
export const getPersonAdjustSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/getTaxAgentSearchCondition", "GET", params);
};
//薪资档案操作记录-导出-个税扣缴义务人操作记录列表
export const exportPersonAdjust = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchiveOperateLog/exportTaxAgentList", "POST", params);
};
//薪资档案-获取设置表单
export const getSettingForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getDimissionSetForm", "GET", params);
};
//薪资档案-保存离职时段设置
export const saveSetting = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/saveDimissionSet", "POST", params);
};
//薪资档案-模版下载链接(无数据)
export const downloadSalaryArchiveTemplateurl = `/api/bs/hrmsalary/salaryArchive/downloadTemplate`;
// 薪资档案- 模版下载 (有之前数据)
export const downloadsalaryArchiveDetail = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/exportList", "POST", params);
};
// 获取导入类型
export const getImportTypes = () => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {});
@ -143,31 +41,14 @@ export const commonEnumList = (params) => {
export const salaryAdjustmentInfo = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params);
};
// 导入预览
export const importPreview = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/preview", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params);
};
// 导入档案
export const importSalaryArchive = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params);
};
// 导出档案
export const exportSalaryArchive = (ids = "") => {
fetch("/api/bs/hrmsalary/salaryArchive/exportList?ids=" + ids).then(res => res.blob().then(blob => {
@ -183,111 +64,43 @@ export const exportSalaryArchive = (ids = "") => {
// 调整记录-个税扣缴义务人列表
export const adjustRecordTaxAgentList = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/taxAgentList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/taxAgentList", params);
};
// 调整记录-薪资项目-列表
export const adjustRecordSalaryItemList = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/salaryItemList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/salaryItemList", params);
};
// 调整记录-薪资项目-单个
export const singleSalaryItemList = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/singleSalaryItemList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/singleSalaryItemList", params);
};
// 调整记录-个税扣缴义务人-单个
export const singleTaxAgentList = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/singleTaxAgentList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/singleTaxAgentList", params);
};
// 调整-义务扣缴人-通过薪资档案的个税扣缴义务人id获取个税扣缴义务人调整表单
export const getTaxAgentFormBySalaryArchiveTaxAgentId = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getTaxAgentFormBySalaryArchiveTaxAgentId", "GET", params);
};
// 调整-薪资项目-获取调整前的值
export const getSalaryItemAdjustBeforeValue = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/getSalaryItemAdjustBeforeValue", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/getSalaryItemAdjustBeforeValue", params);
};
// 停薪
export const stopSalary = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/stopSalary", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params);
};
// 调整-薪资项目-通过薪资档案的薪资项目id获取薪资项目调整表单
export const getSalaryItemFormByItemId = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getSalaryItemFormBySalaryArchiveItemId", "GET", params);
};
// 删除薪资项目调薪
export const deleteSalaryItem = (params) => {
return fetch(`/api/bs/hrmsalary/salaryArchive/deleteSalaryItem?salaryArchiveItemId=${params.salaryArchiveItemId}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
}
}).then(res => res.json());
return WeaTools.callApi(`/api/bs/hrmsalary/salaryArchive/deleteSalaryItem?salaryArchiveItemId=${params.salaryArchiveItemId}`, "GET", params);
};
export const getSingleSalaryItemInfo = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/getSingleSalaryItemInfo", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/getSingleSalaryItemInfo", params);
};
export const editSingleSalaryItem = (params) => {
return fetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/editSingleSalaryItem", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/editSingleSalaryItem", params);
};

View File

@ -1,294 +1,80 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
//数据采集-考勤引用-考勤数据列表
export const checkOperation = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/checkOperation", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/checkOperation", params);
};
//数据采集-考勤引用-考勤数据列表
export const getAttendanceList = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//数据采集-考勤引用-考勤数据-获取导入参数
export const getImportAttendanceParam = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/getImportParams",
"get",
params
);
return postFetch("/api/bs/hrmsalary/attendQuote/list", params);
};
//数据采集-考勤引用-获取账套列表
export const getLedgerList = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/selectSalarySobList",
"get",
params
);
};
//数据采集-考勤引用-获取引用考勤表单
export const getAttendanceReferForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/getSyncForm",
"get",
params
);
};
//数据采集-考勤引用-获取引用考勤表单周期数据
export const getAttendanceReferPeriod = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle",
"post",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/attendQuote/selectSalarySobList", "get", params);
};
//数据采集-考勤引用-同步引用考勤数据
export const syncAttendanceRefer = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/syncAttendQuoteData", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//数据采集-考勤引用-查看考勤数据
export const getAttendanceDetail = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/attendQuote/view", "get", params);
return postFetch("/api/bs/hrmsalary/attendQuote/syncAttendQuoteData", params);
};
//数据采集-考勤引用-删除考勤数据
export const deleteAttendance = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
// return WeaTools.callApi(
// "/api/bs/hrmsalary/attendQuote/delete",
// "POST",
// params
// );
};
//数据采集-考勤引用-导出考勤数据
export const exportAttendance = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/export",
"POST",
params
);
};
//数据采集- 考勤应用-导出模版+全量数据
export const exportForTemplate = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/exportForTemplate",
"POST",
params
);
return postFetch("/api/bs/hrmsalary/attendQuote/delete", params);
};
//数据采集-考勤引用-考勤字段管理列表
export const getAttendanceFieldList = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/fieldList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//数据采集-考勤引用-获取考勤字段表单
export const getAttendanceFieldForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/getFieldForm",
"get",
params
);
return postFetch("/api/bs/hrmsalary/attendQuote/fieldList", params);
};
//数据采集-考勤引用-新建考勤字段
export const saveAttendanceField = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/saveField", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//数据采集-考勤引用-修改考勤字段
export const updateAttendanceField = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/updateField", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/saveField", params);
};
//数据采集-考勤引用-启用/停用自定义字段
export const updateAttendanceFieldStatus = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/updateEnableStatus", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//数据采集-考勤引用-删除考勤字段
export const deleteAttendanceField = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/deleteField", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/updateEnableStatus", params);
};
//数据采集-考勤引用-考勤引用字段设置-列表
export const getAttendanceFieldSettingList = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/fieldSetting/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/fieldSetting/list", params);
};
//数据采集-考勤引用-考勤引用字段设置-保存
export const saveAttendanceFieldSetting = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/fieldSetting/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/fieldSetting/save", params);
};
//数据采集-考勤引用-考勤引用字段设置-恢复默认设置
export const returnToAttendanceFieldSettingDefault = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/fieldSetting/recoverAsDefault", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/fieldSetting/recoverAsDefault", params);
};
//数据采集-考勤引用-考勤引用字段设置-设为默认设置
export const saveAttendanceFieldSettingAsDefault = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/fieldSetting/saveAsDefault", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
// 考勤导入模板下载
export const downloadTemplate = (salaryYearMonth, salarySobId) => {
// /api/bs/hrmsalary/attendQuote/downloadTemplate
fetch(
"/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=" +
salaryYearMonth +
"&salarySobId=" +
salarySobId
).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 postFetch("/api/bs/hrmsalary/attendQuote/fieldSetting/saveAsDefault", params);
};
// 考勤导入预览
export const previewAttendQuote = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/preview", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/preview", params);
};
// 考勤数据导入
export const importAttendQuoteData = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/importAttendQuoteData", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/importAttendQuoteData", params);
};
// 查看考勤详情
export const viewAttendQuote = (params) => {
return fetch("/api/bs/hrmsalary/attendQuote/view", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/attendQuote/view", params);
};
// 根据所属月和账套获取周期
export const getSalaryCycleAndAttendCycle = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle", "get", params);
};

View File

@ -1,27 +1,14 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
// 薪资记录--薪资核算列表
export const getSalaryAcctList = params => {
return fetch("/api/bs/hrmsalary/salaryacct/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/list", params);
};
// 薪资记录--保存薪资核算的基本信息
export const saveBasic = params => {
return fetch("/api/bs/hrmsalary/salaryacct/basic/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/basic/save", params);
};
// 薪资记录--薪资核算详情
@ -31,49 +18,21 @@ export const salaryacctGetForm = params => {
// 核算人员--薪资核算环比上期减少人员列表
export const reducedemployeeList = params => {
return fetch("/api/bs/hrmsalary/salaryacct/reducedemployee/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/reducedemployee/list", params);
};
// 核算人员--薪资核算环比上月增加人员
export const addedemployeeList = params => {
return fetch("/api/bs/hrmsalary/salaryacct/addedemployee/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/addedemployee/list", params);
};
// 核算人员--薪资核算人员确认列表
export const acctemployeeList = params => {
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/list", params);
};
// 核算人员--检查薪资核算人员的个税扣缴义务人
export const checkTaxAgent = params => {
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/checkTaxAgent", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/checkTaxAgent", params);
};
// 薪资记录--获取薪资核算的薪资周期、考勤周期等
@ -83,14 +42,7 @@ export const getSalarySobCycle = params => {
// 核算人员--添加薪资核算人员
export const saveAcctemployee = params => {
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/save", params);
};
// 核算人员--导出环比减少人员
@ -121,62 +73,27 @@ export const exportAcctEmployee = (id) => {
// 核算人员--删除薪资核算人员
export const deleteAcctemployee = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/delete", params);
};
// 核算结果--列表
export const acctResultList = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/list", params);
};
// 核算结果--薪资核算
export const acctresultAccounting = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/accounting", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/accounting", params);
};
// 线下比对-列表
export const comparisonresultList = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/accounting", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/accounting", params);
};
// 核算人员--刷新薪资核算人员的个税扣缴义务人
export const refreshTaxAgent = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/refreshTaxAgent", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/refreshTaxAgent", params);
};
// 薪资核算-编辑表单
@ -186,60 +103,33 @@ export const acctresultDetail = (params) => {
// 薪资记录--删除薪资核算记录
export const deleteSalaryacct = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/delete", params);
};
// 薪资记录--归档薪资核算记录
export const fileSalaryAcct = (params) => {
return fetch(`/api/bs/hrmsalary/salaryacct/file?id=${params.id}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
}
}).then(res => res.json());
return WeaTools.callApi(`/api/bs/hrmsalary/salaryacct/file`, "GET", params);
// return fetch(`/api/bs/hrmsalary/salaryacct/file?id=${params.id}`, {
// method: "GET",
// mode: "cors",
// headers: {
// "Content-Type": "application/json"
// }
// }).then(res => res.json());
};
// 薪资记录-回算
export const backCalculate = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/backCalculate", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/backCalculate", params);
};
// 薪资记录-重新核算
export const reAccounting = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/reAccounting", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/reAccounting", params);
};
// 薪资结果-编辑表单保存
export const saveAcctResult = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/save", params);
};
// 核算结果--导入核算结果前生成导入模板时可选的薪资项目
@ -262,26 +152,12 @@ export const getImportTemplate = (salaryItemIds, salaryAcctRecordId) => {
// 核算结果-导入预览
export const previewAcctResult = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/preview", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/preview", params);
};
// 核算结果-导入
export const importAcctResult = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/importSalaryAcctResult", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/importSalaryAcctResult", params);
};
// 核算结果-导出全部
@ -299,14 +175,7 @@ export const exportAcctResult = (salaryAcctRecordId, ids) => {
// 线下对比-列表
export const comparisonResultList = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/comparisonresult/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/comparisonresult/list", params);
};
// 线下对比--结果导入模板
@ -324,26 +193,12 @@ export const exportImportTemplate = (salaryAcctRecordId) => {
// 线下对比--导入预览
export const previewComparisonResult = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/comparisonresult/preview", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/comparisonresult/preview", params);
};
// 线下对比--导入
export const importComparisonExcelAcctResult = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/comparisonresult/importExcelAcctResult", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/comparisonresult/importExcelAcctResult", params);
};
// 线下对比-导出
@ -371,25 +226,11 @@ export const getColumnDesc = (params) => {
// 更新薪资核算结果的锁定状态
export const updateLockStatus = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params);
};
// 导入薪资核算添加表头字段缓存
export const cacheImportField = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
};
//薪资核算-页面查看权限
export const salaryacctAcctresultCheckAuth = params => {
@ -403,12 +244,5 @@ export const getExportField = params => {
//薪资核算-导出薪资核算添加表头字段缓存
export const customCacheExportField = (params) => {
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", params);
};

View File

@ -3,23 +3,12 @@ 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());
return postFetch("/api/bs/hrmsalary/addUpDeduction/list", params);
};
//数据采集-累计专项附加扣除列表的高级搜索
export const getCumDeductSaCondition = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/addUpDeduction/getSearchCondition",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/addUpDeduction/getSearchCondition", "get", params);
};
//数据采集-累计专项附加扣除-导出
@ -37,25 +26,9 @@ export const exportCumDeductList = (ids = "") => {
);
};
//数据采集-累计专项附加扣除-获取导入参数
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());
return postFetch("/api/bs/hrmsalary/addUpDeduction/getDetailList", params);
};
//数据采集-累计专项附加扣除-导出明细
@ -80,29 +53,14 @@ export const exportCumDeductDetailList = (id, ids = "") => {
// 数据采集-获取累计专项附加扣除-导入
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());
return postFetch("/api/bs/hrmsalary/addUpDeduction/importAddUpDeduction", params);
};
// 数据采集-获取累计专项附加扣除-导入预览
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());
return postFetch("/api/bs/hrmsalary/addUpDeduction/preview", params);
};
//新增累计专项附加扣除
export const createAddUpDeduction = (params) => {
return postFetch("/api/bs/hrmsalary/addUpDeduction/createAddUpDeduction", params);

View File

@ -1,25 +1,14 @@
import { WeaTools } from "ecCom";
import { postFetch } from '../util/request';
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());
return postFetch("/api/bs/hrmsalary/addUpSituation/list", params);
};
//数据采集-累计情况列表的高级搜索
export const getCumSituationSaCondition = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/addUpSituation/getSearchCondition",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/addUpSituation/getSearchCondition", "get", params);
};
//数据采集-累计情况-导出
@ -37,34 +26,18 @@ export const exportCumSituationList = (ids) => {
);
};
//数据采集-累计情况-获取导入参数
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());
return postFetch("/api/bs/hrmsalary/addUpSituation/getDetailList", params);
};
//数据采集-累计情况-导出明细
export const exportCumSituationDetailList = (id, ids = "", taxAgentId='') => {
export const exportCumSituationDetailList = (id, ids = "", taxAgentId = "") => {
fetch(
"/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=" +
id +
"&ids=" +
ids + "&taxAgentId=" + taxAgentId
id +
"&ids=" +
ids + "&taxAgentId=" + taxAgentId
).then((res) =>
res.blob().then((blob) => {
var filename = `往期累计情况(工资、薪金).xlsx`;
@ -80,44 +53,30 @@ export const exportCumSituationDetailList = (id, ids = "", taxAgentId='') => {
// 数据采集-累计情况-导入
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());
return postFetch("/api/bs/hrmsalary/addUpSituation/importAddUpSituation", params);
};
// 数据采集-累计情况-导入预览
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());
return postFetch("/api/bs/hrmsalary/addUpSituation/preview", params);
};
//新建往期累计情况
export const createAddUpSituation = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/createAddUpSituation', params);
}
return postFetch("/api/bs/hrmsalary/addUpSituation/createAddUpSituation", params);
};
//编辑往期累计情况
export const editAddUpSituation = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/editAddUpSituation', params);
}
return postFetch("/api/bs/hrmsalary/addUpSituation/editAddUpSituation", params);
};
//删除所选往期累计情况
export const deleteSelectAddUpSituation = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation', params);
}
return postFetch("/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation", params);
};
//一键清空往期累计情况
export const deleteAllAddUpSituation = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
}
return postFetch("/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation", params);
};
//查看信息
export const getAddUpSituation = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params);
}
return postFetch("/api/bs/hrmsalary/addUpSituation/getAddUpSituation", params);
};

View File

@ -1,68 +1,41 @@
import { WeaTools } from 'ecCom';
import { postFetch } from '../util/request';
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
//个税申报表-个税申报表列表
export const getDeclareList = params => {
return fetch('/api/bs/hrmsalary/taxdeclaration/list', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
//个税申报表-个税申报表表单
export const getDeclareForm = params => {
return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getForm', 'get', params);
}
return postFetch("/api/bs/hrmsalary/taxdeclaration/list", params);
};
//个税申报表-个税申报表生成
export const saveDeclare = params => {
return fetch('/api/bs/hrmsalary/taxdeclaration/save', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
return postFetch("/api/bs/hrmsalary/taxdeclaration/save", params);
};
//个税申报表-个税申报表相关信息
export const getDeclareInfo = params => {
return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo', 'get', params);
}
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", "get", params);
};
// 个税申报表详情列表
export const getDetailList = params => {
return fetch('/api/bs/hrmsalary/taxdeclaration/detail/list', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
return postFetch("/api/bs/hrmsalary/taxdeclaration/detail/list", params);
};
// 个税申报表导出
export const exportSalaryArchive = (id = "") => {
fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).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);
}))
}
fetch("/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=" + id).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 withDrawTaxDeclaration = (params) => {
return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params);
}
return postFetch("/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration", params);
};

View File

@ -1,25 +1,9 @@
import { WeaTools } from "ecCom";
/**
* 薪资项目api
* @param data
*/
import { postFetch } from "../util/request";
// 薪资项目-获取列表
export const getItemList = params => {
return fetch("/api/bs/hrmsalary/salaryitem/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//薪资项目的高级搜索
export const getSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSearchCondition", "GET", params);
return postFetch("/api/bs/hrmsalary/salaryitem/list", params);
};
//数据源列表字典项
@ -29,61 +13,23 @@ export const formulaDatasourceList = params => {
//薪资项目-系统薪资项目列表
export const getSysItemList = params => {
return fetch("/api/bs/hrmsalary/salaryitem/sysList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//系统薪资项目的高级搜索
export const getSysSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSysSearchCondition", "GET", params);
return postFetch("/api/bs/hrmsalary/salaryitem/sysList", params);
};
//薪资项目-批量删除薪资项目
export const deleteItem = params => {
return fetch("/api/bs/hrmsalary/salaryitem/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryitem/delete", params);
};
//薪资项目-批量删除列表
export const deleteItemList = params => {
return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryitem/listCanDelete", params);
};
//薪资项目-新增薪资项目
export const saveItem = params => {
delete params.formulaContent;
return fetch("/api/bs/hrmsalary/salaryitem/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//薪资项目-更新薪资项目
export const updateItem = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/update", "POST", params);
return postFetch("/api/bs/hrmsalary/salaryitem/save", params);
};
//薪资项目-薪资项目详情
@ -93,100 +39,41 @@ export const getItemForm = params => {
//薪资项目-添加系统薪资项目
export const saveSysItem = params => {
return fetch("/api/bs/hrmsalary/salaryitem/saveSys", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryitem/saveSys", params);
};
//获取薪资项目可选的类型(与属性有联动)
export const getItemTypeOption = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/listSalaryItemTypeOption", "GET", params);
};
//获取公式描述
export const getFormulaDes = params => {
return WeaTools.callApi("/api/bs/hrmsalary/formula/des", "GET", params);
};
// *** 公式 start ***
// 获取公式变量类型
export const formualSearchGroup = params => {
return fetch("/api/bs/hrmsalary/formula/search/group", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/formula/search/group", params);
};
//获取公式变量字段
export const formualSearchField = params => {
return fetch("/api/bs/hrmsalary/formula/search/field", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/formula/search/field", params);
};
// /api/bs/hrmsalary/formula/save
// 保存公式
export const saveFormual = params => {
return fetch("/api/bs/hrmsalary/formula/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/formula/save", params);
};
// 公式测试
export const testFormual = params => {
return fetch("/api/bs/hrmsalary/formula/mock", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/formula/mock", params);
};
// 根据id获取formual
export const detailFormual = params => {
return fetch("/api/bs/hrmsalary/formula/detail", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/formula/detail", params);
};
// *** 公式 end ***
// 列出可以删除的薪资项目
export const listCanDelete = params => {
return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryitem/listCanDelete", params);
};
//获取哪些账套中使用了该薪资项目
@ -195,12 +82,5 @@ export const getSalarySobBySalaryItem = params => {
};
// 同步到薪资账套
export const syncSalaryItemToSalarySobItem = params => {
return fetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem ", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem", params);
};

View File

@ -8,171 +8,64 @@ export const getLedgerList = params => {
//启用/禁用薪资帐套
export const changeLedgerStatus = params => {
return fetch("/api/bs/hrmsalary/salarysob/disable", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/disable", params);
};
//复制薪资帐套
export const duplicateLedger = params => {
return fetch("/api/bs/hrmsalary/salarysob/duplicate", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/duplicate", params);
};
//删除薪资帐套
export const deleteLedger = params => {
return fetch("/api/bs/hrmsalary/salarysob/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/delete", params);
};
//薪资帐套基本信息表单
export const getLedgerBasicForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/basic/getForm",
"get",
params
);
// return fetch('/api/bs/hrmsalary/salarysob/basic/getForm', {
// method: 'POST',
// mode: 'cors',
// headers: {
// 'Content-Type': 'application/json'
// },
// body: JSON.stringify(params)
// }).then(res => res.json())
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
};
//保存薪资帐套基本信息
export const saveLedgerBasic = params => {
return fetch("/api/bs/hrmsalary/salarysob/basic/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/basic/save", params);
};
//薪资帐套外部人员范围(包含)列表
export const getLedgerPersonRangeExtList = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/ext/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/range/ext/list", params);
};
//薪资帐套人员范围(包含)列表
export const getLedgerPersonRangeInclude = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/range/listInclude", params);
};
//薪资帐套人员范围(排除)列表
export const getLedgerPersonRangeExclude = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/listExclude", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//薪资帐套人员范围表单
export const getLedgerPersonRangeForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/range/getForm",
"get",
params
);
return postFetch("/api/bs/hrmsalary/salarysob/range/listExclude", params);
};
//保存薪资帐套外部人员范围
export const saveLedgerPersonExtRange = params => {
return fetch("/api/bs/hrmsalary/salarysob/ext/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/ext/save", params);
};
//删除薪资帐套外部人员范围
export const deleteLedgerPersonExtRange = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/ext/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/range/ext/delete", params);
};
//保存薪资帐套人员范围
export const saveLedgerPersonRange = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/range/save", params);
};
//删除薪资帐套人员范围
export const deleteLedgerPersonRange = params => {
return fetch("/api/bs/hrmsalary/salarysob/range/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//薪资帐套项目分组的详情
export const getLedgerItemGroupForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/item/group/getForm",
"get",
params
);
return postFetch("/api/bs/hrmsalary/salarysob/range/delete", params);
};
//保存薪资帐套薪资项目
export const saveLedgerItem = params => {
const { itemGroups, items, ...extra } = params;
const { itemGroups, items, ...extra } = params;
const payload = {
itemGroups: _.map(itemGroups, item => {
return {
@ -189,136 +82,52 @@ export const saveLedgerItem = params => {
}) || [],
...extra
};
return fetch("/api/bs/hrmsalary/salarysob/item/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/item/save", payload);
};
//薪资帐套薪资项目详情
export const getLedgerItemForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/item/getForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/item/getForm", "get", params);
};
//薪资帐套校验规则列表
export const getLedgerRuleList = params => {
return fetch("/api/bs/hrmsalary/salarysob/checkrule/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//薪资帐套校验规则表单
export const getLedgerRuleForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/checkrule/getForm",
"get",
params
);
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/list", params);
};
//保存薪资帐套校验规则
export const saveLedgerRule = params => {
return fetch("/api/bs/hrmsalary/salarysob/checkrule/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//编辑薪资帐套校验规则公式
export const updateLedgerRuleFormula = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/checkrule/formula/update",
"POST",
params
);
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/save", params);
};
//删除薪资帐套校验规则
export const deleteLedgerRule = params => {
return fetch("/api/bs/hrmsalary/salarysob/checkrule/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/delete", params);
};
// 薪资项目可选列表
export const listSalaryItem = params => {
return fetch("/api/bs/hrmsalary/salarysob/item/listSalaryItem", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/item/listSalaryItem", params);
};
// 员工信息字段列表
export const empFieldList = () => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salarysob/empField/list",
"GET",
{}
);
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/empField/list", "GET", {});
};
// 调薪计薪规则可选的薪资项目列表
export const listSalarySobItem = params => {
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem", params);
};
// 调薪计薪规则保存
export const saveAdjustmentRule = params => {
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/save", params);
};
// 调薪计薪规则列表
export const listAdjustmentRule = params => {
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/list", params);
};
//获取回算薪资项目

View File

@ -1,25 +1,12 @@
import { WeaTools } from "ecCom";
import { formHeaderPost } from "../util/request";
import { formHeaderPost, postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
// 工资单列表
export const mySalaryBillList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/mySalaryBillList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/mySalaryBillList", params);
};
// 社保福利列表
export const welfareList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/report/welfare/list", "GET", params);
};
// 调薪记录列表
export const recordList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/report/record/list", "GET", params);

View File

@ -1,34 +1,14 @@
import { WeaTools } from "ecCom";
import { postFetch } from '../util/request';
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());
return postFetch("/api/bs/hrmsalary/otherDeduction/list", params);
};
//数据采集-其他免税扣除列表的高级搜索
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
);
return WeaTools.callApi("/api/bs/hrmsalary/otherDeduction/getSearchCondition", "get", params);
};
//数据采集-其他免税扣除-导出
@ -44,32 +24,20 @@ export const exportOtherDeductList = (ids = "") => {
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());
return postFetch("/api/bs/hrmsalary/otherDeduction/getDetailList", params);
};
//数据采集-其他免税扣除-导出明细
export const exportOtherDeductDetailList = (id, ids) => {
fetch(
"/api/bs/hrmsalary/otherDeduction/exportDetail?otherTaxExemptDeductionId=" +
id +
"&ids=" +
ids + "&taxAgentId=" + taxAgentId
id +
"&ids=" +
ids + "&taxAgentId=" + taxAgentId
).then((res) =>
res.blob().then((blob) => {
var filename = `其他免税扣除.xlsx`;
@ -85,49 +53,35 @@ export const exportOtherDeductDetailList = (id, ids) => {
// 数据采集-其他免税扣除-导入
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());
return postFetch("/api/bs/hrmsalary/otherDeduction/importData", params);
};
// 数据采集-其他免税扣除-导入预览
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());
return postFetch("/api/bs/hrmsalary/otherDeduction/preview", params);
};
//新增其他免税扣除
export const createData = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/createData', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/createData", params);
};
//查看信息
export const getData = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/getData', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/getData", params);
};
//编辑其他免税扣除
export const editData = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/editData', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/editData", params);
};
//批量删除其他免税扣除
export const deleteSelectData = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/deleteSelectData', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/deleteSelectData", params);
};
//一键清空其他免税扣除
export const deleteAllData = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/deleteAllData', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/deleteAllData", params);
};
//沿用上月
export const extendToLastMonth = (params) => {
return postFetch('/api/bs/hrmsalary/otherDeduction/extendToLastMonth', params);
}
return postFetch("/api/bs/hrmsalary/otherDeduction/extendToLastMonth", params);
};

View File

@ -4,14 +4,7 @@ import { convertToUrlString } from "../util/url";
//工资单-工资单发放列表
export const getPayrollList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/list", params);
};
// 工资单发放进度条
export const getPayrollIssuanceProgressBar = (id) => {
@ -20,68 +13,32 @@ export const getPayrollIssuanceProgressBar = (id) => {
//工资单-获取table提示信息
export const getPayrollInfo = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/send/getBaseInfo",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/send/getBaseInfo", "get", params);
};
//工资单-获取工资单发放高级搜索
export const getPaySa = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/send/getInfoSearchCondition",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/send/getInfoSearchCondition", "get", params);
};
//工资单-工资单发放
export const grantPayroll = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/grant", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/grant", params);
};
//工资单-工资单撤回
export const withdrawPayroll = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/withdraw", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/withdraw", params);
};
//工资单-工资单发放详情列表
export const getPayrollDetailList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/detailList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/detailList", params);
};
//工资单-工资单发放详情列表的高级搜索
export const getPayrollDetailSa = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/getDetailSearchCondition", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/getDetailSearchCondition", params);
};
//工资单-导出-工资单发放信息列表
@ -108,150 +65,58 @@ export const exportPayroll = params => {
//工资单-工资单模板列表
export const getPayrollTemplateList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/template/list", params);
};
//工资单-获取薪资账套下拉列表
export const getPayrollTemplateLedgerList = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/selectSalarySobList",
"POST",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/selectSalarySobList", "POST", params);
};
//工资单-获取工资单基础设置表单
export const getPayrollBaseForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/getBaseForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getBaseForm", "get", params);
};
//工资单-获取工资单显示设置表单
export const getPayrollShowForm = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/getShowForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getShowForm", "get", params);
};
//工资单-获取工资单薪资项目设置
export const getPayrollItemList = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/getSalaryItemSet",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getSalaryItemSet", "get", params);
};
//工资单-更改默认使用
export const changePayrollDefaultUse = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/defaultUse", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/template/defaultUse", params);
};
//工资单-新建工资单
export const savePayroll = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/save", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/template/save", params);
};
//工资单-编辑工资单
export const updatePayroll = params => {
const { background, ...extra } = params;
return fetch("/api/bs/hrmsalary/salaryBill/template/update", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ background: _.isNil(background) ? "" : background, ...extra })
}).then(res => res.json());
};
//工资单-编辑工资单-编辑基础设置
export const updatePayrollBase = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/updateBase",
"POST",
params
);
};
//工资单-编辑工资单-编辑显示设置
export const updatePayrollShow = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/updateShow",
"POST",
params
);
return postFetch("/api/bs/hrmsalary/salaryBill/template/update", { background: _.isNil(background) ? "" : background, ...extra });
};
//工资单-复制工资单
export const duplicatePayroll = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/copy", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/template/copy", params);
};
//工资单-删除工资单
export const deletePayroll = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
//工资单-获取租户名
export const getTenantName = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/template/getTenantName",
"get",
params
);
return postFetch("/api/bs/hrmsalary/salaryBill/template/delete", params);
};
// 工资单发放-工资单发放信息列表
export const getInfoList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/infoList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/infoList", params);
};
// 工资单发放-导出-工资单发放详情列表
@ -278,59 +143,27 @@ export const exportDetailList = params => {
// 工资单发放-工资单批量发放信息列表
export const batchSendInfoList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/batchSendInfoList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/batchSendInfoList", params);
};
// 工资单发放-工资单批量撤回信息列表
export const batchWithdrawInfoList = params => {
return fetch("/api/bs/hrmsalary/salaryBill/send/batchWithdrawInfoList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/send/batchWithdrawInfoList", params);
};
// 工资单发放-按钮状态
export const getSendBtnStatus = params => {
return WeaTools.callApi(
"/api/bs/hrmsalary/salaryBill/send/getSendBtnStatus",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/send/getSendBtnStatus", "get", params);
};
// 工资单发放-扩展按钮点击
export const grantProxy = params => {
return fetch("/api/bs/hrmsalary/salaryBill/grantProxy", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/grantProxy", params);
};
// 工资单发放-新建时获取补发工资单模板薪资项目设置
export const getReplenishForm = params => {
return fetch("/api/bs/hrmsalary/salaryBill/template/getReplenishForm", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/salaryBill/template/getReplenishForm", params);
};
// 工资单发放-获取规则设置下拉框

View File

@ -3,15 +3,7 @@ import { postExportFetch, postFetch } from "../util/request";
//社会福利台账-获取正常缴纳列表
export const getCommonList = (params) => {
// return WeaTools.callApi('/api/bs/hrmsalary/siaccount/batch/list', 'POST', params);
return fetch("/api/bs/hrmsalary/siaccount/batch/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/batch/list", params);
};
//社会福利台账-获取tab列表
@ -21,241 +13,101 @@ export const getTabList = (params) => {
//社会福利台账-获取正常缴纳列表
export const getNormalList = (params) => {
// return WeaTools.callApi('/api/bs/hrmsalary/siaccount/detail/common/list', 'get', params);
return fetch("/api/bs/hrmsalary/siaccount/detail/common/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
};
//社会福利台账-获取补缴列表
export const getSupplementaryList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
};
//社会福利台账-获取总览列表
export const getOverViewList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/overView", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/overView", params);
};
//社会福利台账-获取异常列表
export const getChangeList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/changeList", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/changeList", params);
};
//社会福利台账-保存并进入核算
export const save = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/save", params);
};
//社会福利台账-归档
export const siaccountFile = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/file", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/file", params);
};
//社会福利台账-核算异常列表
export const inspectList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/inspectList", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/inspectList", params);
};
//社会福利台账-删除正常缴纳人员
export const siaccountCommonDelete = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/common/delete", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/common/delete", params);
};
//社会福利台账-添加正常缴纳人员
export const siaccountCommonSave = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/common/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/common/save", params);
};
//社会福利台账-添加补缴人员
export const siaccountSupplementarySave = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/supplementary/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/supplementary/save", params);
};
//社会福利台账-删除月份表单
export const siaccountDelete = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/delete", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/delete", params);
};
//社会福利台账-正常缴纳添加缴纳人员表单
export const siaccountCommonForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/commonForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/commonForm", "get", params);
};
//社会福利台账-补缴添加缴纳人员表单
export const querySupplementaryForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/querySupplementaryForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/querySupplementaryForm", "get", params);
};
// 核算详情页核算
export const commonAccount = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/commonAccount", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/commonAccount", params);
};
// 社保福利台账重新核算
export const socialSecurityBenefitsRecalculate = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/socialSecurityBenefitsRecalculate", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/socialSecurityBenefitsRecalculate", params);
};
// 获取当前管理员下的所有的个税扣缴义务人
export const getAdminTaxAgentList = () => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/getAdminTaxAgentList",
"get",
{}
);
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getAdminTaxAgentList", "get", {});
};
// 表单字段对应的接口
export const getWelfareList = () => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/getWelfareList",
"get",
{}
);
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getWelfareList", "get", {});
};
// 补差表单字段对应的接口
export const getBalanceWelfareList = () => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/getBalanceWelfareList",
"get",
{}
);
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getBalanceWelfareList", "get", {});
};
// 社保福利台账-导入预览
export const welfarePreview = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/welfare/preview", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/welfare/preview", params);
};
// 社保福利台账-核算数据导入
export const importInsuranceAcctDetail = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/welfare/importInsuranceAcctDetail", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/welfare/importInsuranceAcctDetail", params);
};
// 社保福利台账-补差数据导入
export const importBalanceInsuranceDetail = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/welfare/importBalanceInsuranceDetail", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/welfare/importBalanceInsuranceDetail", params);
};
// 社保福利台账-线下对比数据导入
export const importExcelInsuranceDetail = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/comparisonwelfare/importExcelInsuranceDetail", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/siaccount/comparisonwelfare/importExcelInsuranceDetail", params);
};
//获取当前登录人所控制的人员范围
@ -296,23 +148,11 @@ export const getPaymentGroup = (params) => {
};
//获取核算项个人和公司社保福利缴纳详情
export const getPaymentById = ({ id }) => {
return fetch(`/api/bs/hrmsalary/siaccount/getPaymentById?id=${id}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
}
}).then(res => res.json());
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getPaymentById", "GET", { id });
};
//获取社保福利项列表
export const compensationCategoryType = ({ id }) => {
return fetch(`/api/bs/hrmsalary/siaccount/compensationCategoryType?id=${id}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
}
}).then(res => res.json());
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/compensationCategoryType", "GET", { id });
};
//获取调差列表

View File

@ -1,38 +1,18 @@
import { WeaTools } from 'ecCom';
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
export const getSysList = params => {
return fetch('/api/bs/hrmsalary/sys/list', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
return postFetch("/api/bs/hrmsalary/sys/list", params);
};
export const sysSave = params => {
return fetch('/api/bs/hrmsalary/sys/save', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
return postFetch("/api/bs/hrmsalary/sys/save", params);
};
export const sysUpdate = params => {
return fetch('/api/bs/hrmsalary/sys/update', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
return postFetch("/api/bs/hrmsalary/sys/update", params);
};
export const getSysDetail = params => {
return WeaTools.callApi('/api/bs/hrmsalary/sys/detail', 'get', params);
}
return WeaTools.callApi("/api/bs/hrmsalary/sys/detail", "get", params);
};

View File

@ -3,34 +3,16 @@ import { postFetch } from "../util/request";
//个税扣缴义务人列表
export const getTaxAgentList = (params) => {
return fetch("/api/bs/hrmsalary/taxAgent/list", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/taxAgent/list", params);
};
//同步人员范围
export const taxAgentRangeSync = (params) => {
return fetch("/api/bs/hrmsalary/taxAgent/range/sync", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then((res) => res.json());
return postFetch("/api/bs/hrmsalary/taxAgent/range/sync", params);
};
// 系统管理员权限
export const getPermission = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/taxAgent/permission",
"GET",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/permission", "GET", params);
};
//获取个税扣缴义务人表单
@ -40,11 +22,7 @@ export const getTaxAgentForm = (params) => {
//获取个税扣缴义务人基础信息表单
export const getTaxAgentBaseForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/taxAgent/base/getForm",
"get",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/base/getForm", "get", params);
};
//新建个税扣缴义务人
@ -114,17 +92,9 @@ export const getTaxAgentSelectList = (isShare = false) => {
//当前登录人个税扣缴义务人下拉列表
export const getTaxAgentSelectListAsAdmin = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/taxAgent/selectListAsAdmin",
"GET",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectListAsAdmin", "GET", params);
};
//当前登录人是否有添加人员范围的权限
export const hasIconInTax = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax",
"GET",
params
);
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
};

View File

@ -1,48 +1,27 @@
import { WeaTools } from 'ecCom';
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
//税率表列表
export const getTaxRateList = params => {
return WeaTools.callApi('/api/bs/hrmsalary/taxrate/list', 'get', params);
}
return WeaTools.callApi("/api/bs/hrmsalary/taxrate/list", "get", params);
};
//删除税率表
export const deleteTaxRate = params => {
return fetch('/api/bs/hrmsalary/taxrate/delete', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
return postFetch("/api/bs/hrmsalary/taxrate/delete", params);
};
//获取新建或者详情表单
export const getTaxRateForm = params => {
return WeaTools.callApi('/api/bs/hrmsalary/taxrate/getForm', 'get', params);
}
return WeaTools.callApi("/api/bs/hrmsalary/taxrate/getForm", "get", params);
};
//新建税率表
export const saveTaxRate = params => {
return fetch('/api/bs/hrmsalary/taxrate/save', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
return postFetch("/api/bs/hrmsalary/taxrate/save", params);
};
//编辑税率表
export const updateTaxRate = params => {
return fetch('/api/bs/hrmsalary/taxrate/update', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
return postFetch("/api/bs/hrmsalary/taxrate/update", params);
};

View File

@ -54,14 +54,7 @@ export const cancelStopPayment = (params) => {
return postFetch("/api/bs/hrmsalary/archives/cancelStopPayment", params);
};
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());
return postFetch("/api/bs/hrmsalary/archives/getTable", params);
};
export const getBaseForm = params => {
@ -74,36 +67,12 @@ export const getPaymentForm = params => {
// 保存
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());
};
// 导出档案
export const exportDocument = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/export", "get", params);
};
// 导入档案 - 获取组件的一些前置参数
export const getImportDocumentParams = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getImportParams", "get", params);
return postFetch("/api/bs/hrmsalary/archives/save", params);
};
// 导入档案- 导出现有数据
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 => {
postFetch("/api/bs/hrmsalary/scheme/template/export", params).then(res => res.blob().then(blob => {
var filename = `社保福利档案模板.xlsx`;
var a = document.createElement("a");
var url = window.URL.createObjectURL(blob);
@ -116,26 +85,12 @@ export const exportCurData = params => {
// 导入档案-预览
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());
return postFetch("/api/bs/hrmsalary/scheme/preview", params);
};
// 档案导入
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());
return postFetch("/api/bs/hrmsalary/scheme/importBatch", params);
};
// 导出档案

View File

@ -1,45 +1,27 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
export const getForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/scheme/getForm", "get", params);
};
export const getTable = params => {
// return WeaTools.callApi('/api/bs/hrmsalary/scheme/getTable', 'get', params);
return fetch("/api/bs/hrmsalary/scheme/getTable", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/scheme/getTable", params);
};
export const createScheme = params => {
return fetch("/api/bs/hrmsalary/scheme/insert", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/scheme/insert", params);
};
export const updateScheme = params => {
return fetch("/api/bs/hrmsalary/scheme/update", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/scheme/update", params);
};
export const getCopyForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/scheme/copyForm", "get", params);
};
export const copyScheme = params => {
return fetch(`/api/bs/hrmsalary/scheme/copyScheme?id=${params.id}&schemeName=${params.schemeName}`, {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
return fetch(`/api/bs/hrmsalary/scheme/copyScheme?${convertToUrlString(params)}`, {
method: "GET",
mode: "cors",
headers: {
@ -48,61 +30,24 @@ export const copyScheme = params => {
}).then(res => res.json());
};
export const deleteScheme = params => {
return fetch("/api/bs/hrmsalary/scheme/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/scheme/delete", params);
};
export const getCustomCategoryForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/sicategory/customCategoryForm", "get", params);
};
export const getCustomCategoryList = params => {
// return WeaTools.callApi('/api/bs/hrmsalary/sicategory/customCategoryList', 'get', params);
return fetch("/api/bs/hrmsalary/sicategory/customCategoryList", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/sicategory/customCategoryList", params);
};
export const createSICategory = params => {
return fetch("/api/bs/hrmsalary/sicategory/createSICategory", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/sicategory/createSICategory", params);
};
export const updateCustomCategory = params => {
return fetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryName", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryName", params);
};
export const deleteCustomCategory = (params) => {
return postFetch("/api/bs/hrmsalary/sicategory/deleteCustomCategory", params);
};
export const updateCustomCategoryStatus = params => {
return fetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryStatus", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
return postFetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryStatus", params);
};

View File

@ -16,11 +16,11 @@ const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class Index extends Component {
render() {
const { theme, background, tip, tipPosi, itemTypeList } = this.props;
const { theme, background, tip, tipPosi, itemTypeList, title } = this.props;
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
return (
<React.Fragment>
<div className="pbmc-head">{getLabel(545773, "薪酬预览")}</div>
<div className="pbmc-head">{title || getLabel(545773, "薪酬预览")}</div>
<div className="pbmc-body">
<div className="weapp-salary-payroll-mobile-preview">
<div className="bill-container">
@ -79,6 +79,7 @@ class Index extends Component {
!onlyOneGrup && tipPosi === "2" && tip &&
<div className="corporate-culture-text footer" title={tip}>{tip}</div>
}
{this.props.children}
</div>
</div>
</div>

View File

@ -20,6 +20,18 @@
.bill-container {
background: #f6f6f6;
.space {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 16px;
.ant-btn {
margin-right: 16px;
}
}
.bill-info-header {
padding-top: 16px;

View File

@ -0,0 +1,85 @@
import React, { Component } from "react";
import { WeaInputLocale, WeaLocaleProvider } from "ecCom";
import moment from "moment";
import { dealTemplate } from "./index";
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class Content extends Component {
render() {
const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props;
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
return (
<div className="salary-preview-container">
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>
<div className="header-salary-date-time">{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}</div>
</div>
<div className="body">
{
background &&
<div className="comp-img"><img src={`${background}`} alt="logo"/></div>
}
{
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
<div className="data-detail">
{
showData.map((groupItem, index) => {
// 如果当前组下没有条目 当前组直接不展示。
if (!groupItem) return null;
const { groupId, groupName, items = [] } = groupItem;
return (
<div className="salary-group" key={groupId || index}>
{
groupName ? <div
className="group-title">{groupName.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(groupName)) : getCurrentLabel(groupName)}</div> : null
}
<div className="group-list">
{
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="send-tip top">
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
{
items.map((templatItem, index) => {
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
return <div key={index}
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
<div className="item-name" title={salaryItemShowName || name}>
<span className="text">{salaryItemShowName || name || ""}</span>
</div>
<div className="item-count">{salaryItemValue || ""}</div>
</div>;
})
}
{
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="send-tip bottom">
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
</div>
</div>);
})
}
</div>
{
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
</div>
</div>
{this.props.children}
</div>
);
}
}
export default Content;

View File

@ -1,85 +1,15 @@
import React, { Component } from "react";
import { WeaInputLocale, WeaLocaleProvider } from "ecCom";
import moment from "moment";
import { WeaLocaleProvider } from "ecCom";
import Content from "./content";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class Index extends Component {
render() {
const { theme, background, tip, tipPosi, itemTypeList } = this.props;
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
return (
<div className="pbpc-content">
<div className="weapp-salary-sp weapp-salary-payroll-pc-preview">
<div className="salary-preview-container">
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>
<div className="header-salary-date-time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>
</div>
<div className="body">
{
background &&
<div className="comp-img"><img src={`${background}`} alt="logo"/></div>
}
{
!onlyOneGrup && tipPosi === "1" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
<div className="data-detail">
{
showData.map((groupItem, index) => {
// 如果当前组下没有条目 当前组直接不展示。
if (!groupItem) return null;
const { groupId, groupName, items = [] } = groupItem;
return (
<div className="salary-group" key={groupId || index}>
{
groupName ? <div
className="group-title">{groupName.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(groupName)) : getCurrentLabel(groupName)}</div> : null
}
<div className="group-list">
{
(onlyOneGrup && tipPosi === "1" && tip) && (<div className="send-tip top">
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
{
items.map((templatItem, index) => {
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
return <div key={index}
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
<div className="item-name" title={salaryItemShowName || name}>
<span className="text">{salaryItemShowName || name || ""}</span>
</div>
<div className="item-count">{salaryItemValue || ""}</div>
</div>;
})
}
{
(onlyOneGrup && tipPosi === "2" && tip) && (<div className="send-tip bottom">
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
</div>
</div>);
})
}
</div>
{
!onlyOneGrup && tipPosi === "2" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
</div>
</div>
</div>
</div>
<div className="weapp-salary-sp weapp-salary-payroll-pc-preview"><Content {...this.props}/></div>
</div>
);
}
@ -94,7 +24,7 @@ export const dealTemplate = (itemTypeList, type) => {
const { items, groupName, groupId } = group;
if (items.length !== 0) {
items.forEach((item) => {
item.salaryItemValue = "100";
item.salaryItemValue = item.salaryItemValue || "100";
});
if (items.length % 2 && type === "pc") items.push({});
// 未分类不展示标题

View File

@ -5,144 +5,6 @@
.weapp-salary-sp {
background: #f6f6f6;
.salary-preview-container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
width: 100%;
.edition-center {
max-width: 1000px;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding-bottom: 32px;
.header {
height: 48px;
padding: 0 16px;
font-size: 12px;
color: #111;
.header-title {
height: 22px;
font-size: 17px;
color: #111;
line-height: 22px;
font-weight: 400;
text-align: center;
}
.header-salary-date-time {
margin-top: 16px;
text-align: center;
height: 14px;
font-size: 14px;
color: #999;
line-height: 14px;
font-weight: 400;
}
}
.body {
width: 100%;
margin-top: 32px;
.comp-img {
text-align: center;
img {
width: 100%;
}
}
.corporate-culture-text {
width: 100%;
margin-top: 16px;
text-align: center;
min-height: 12px;
font-size: 12px;
color: #111;
white-space: pre-wrap;
word-break: break-all;
}
.data-detail {
margin-top: 16px;
.salary-group {
margin-bottom: 16px;
.group-title {
font-size: 14px;
}
.group-list {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
.even {
border-left: 1px solid #e5e5e5;
}
.zero, .first {
border-top: 1px solid #e5e5e5;
}
.list-item {
width: 50%;
display: flex;
justify-content: left;
min-height: 40px;
align-items: center;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
.item-name {
flex-basis: 170px;
box-sizing: border-box;
width: 170px;
padding: 0 16px;
height: 100%;
background: #fbfbfb;
border-right: 1px solid #e5e5e5;
font-size: 12px;
color: #666;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
.text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
}
.item-count {
flex-basis: 328px;
padding-left: 16px;
height: 100%;
line-height: 40px;
background: #fff;
font-size: 12px;
color: #111;
word-break: break-all;
}
}
}
}
}
}
}
}
}
.weapp-salary-payroll-pc-preview {
@ -151,3 +13,141 @@
overflow-y: auto;
}
}
.salary-preview-container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
width: 100%;
.edition-center {
max-width: 1000px;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding-bottom: 32px;
.header {
height: 48px;
padding: 0 16px;
font-size: 12px;
color: #111;
.header-title {
height: 22px;
font-size: 17px;
color: #111;
line-height: 22px;
font-weight: 400;
text-align: center;
}
.header-salary-date-time {
margin-top: 16px;
text-align: center;
height: 14px;
font-size: 14px;
color: #999;
line-height: 14px;
font-weight: 400;
}
}
.body {
width: 100%;
margin-top: 32px;
.comp-img {
text-align: center;
img {
width: 100%;
}
}
.corporate-culture-text {
width: 100%;
margin-top: 16px;
text-align: center;
min-height: 12px;
font-size: 12px;
color: #111;
white-space: pre-wrap;
word-break: break-all;
}
.data-detail {
margin-top: 16px;
.salary-group {
margin-bottom: 16px;
.group-title {
font-size: 14px;
}
.group-list {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
.even {
border-left: 1px solid #e5e5e5;
}
.zero, .first {
border-top: 1px solid #e5e5e5;
}
.list-item {
width: 50%;
display: flex;
justify-content: left;
min-height: 40px;
align-items: center;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
.item-name {
flex-basis: 170px;
box-sizing: border-box;
width: 170px;
padding: 0 16px;
height: 100%;
background: #fbfbfb;
border-right: 1px solid #e5e5e5;
font-size: 12px;
color: #666;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
.text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
}
.item-count {
flex-basis: 328px;
padding-left: 16px;
height: 100%;
line-height: 40px;
background: #fff;
font-size: 12px;
color: #111;
word-break: break-all;
}
}
}
}
}
}
}
}

View File

@ -1,11 +1,10 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { getQueryString } from "../../util/url";
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
import { Button, message, Modal } from "antd";
import Authority from "../mySalary/authority";
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
import "../payroll/templatePreview/index.less";
import * as API from "../../apis/mySalaryBenefits";
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
@ -13,7 +12,9 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
import CaptchaModal from "../../components/captchaModal";
import PassSetDialog from "./passSetDialog";
import { ConfirmBtns } from "../mySalary/mySalaryView";
import "./index.less";
import Content from "../../components/pcTemplate/content";
import MobileTemplate from "../../components/mobileTemplate";
import "../mySalary/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("mySalaryStore")
@ -173,75 +174,68 @@ export default class MobilePayroll extends React.Component {
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
const type = getQueryString("type");
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <div>
<WeaDialog
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
title={getLabel(501201, "请输入二次验证密码")} visible={visible} initLoadCss
className="verifyWrapper"
hasScroll buttons={[
<Button type="primary" size="small" onClick={this.doSecondAuth}>{getLabel(826, "确定")}</Button>
]}
>
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(385869, "此项必填")}>
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
onChange={authCode => this.setState({ authCode })}/>
</WeaError>
{
notSetting &&
<div style={{ clear: "both", paddingTop: 10 }}>
{getLabel("514970", "您还未设置二次验证密码,点击")}
<a href="javascript:void(0);"
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
</div>
}
</WeaDialog>
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
</div>;
const {
salaryTemplate, salaryGroups, employeeInformation,
sendTime, confirmStatus
} = toJS(this.props.mySalaryStore.mySalaryBill);
const salaryProps = {
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
itemTypeList: [employeeInformation, ...salaryGroups]
};
return (
<div className="computerTemplate" style={{
height: "100%",
overflowY: "hidden",
paddingBottom: "20px"
}}>
<WeaDialog
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
title={getLabel(501201, "请输入二次验证密码")} visible={visible} initLoadCss
className="verifyWrapper"
hasScroll buttons={[
<Button type="primary" size="small" onClick={this.doSecondAuth}>{getLabel(826, "确定")}</Button>
]}
>
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(385869, "此项必填")}>
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
onChange={authCode => this.setState({ authCode })}/>
</WeaError>
{
notSetting &&
<div style={{ clear: "both", paddingTop: 10 }}>
{getLabel("514970", "您还未设置二次验证密码,点击")}
<a href="javascript:void(0);"
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
</div>
}
</WeaDialog>
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
<React.Fragment>
{
type === "phone" ?
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<div className="templatePreview">
<div className="contentWrapper">
<PhoneTemplate
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
>
{
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</PhoneTemplate>
</div>
</div>
<MobileTemplate {...salaryProps} title={getLabel(545935, "工资单查看")}>
{
(_.isNil(confirmStatus) || confirmStatus === "0") &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</MobileTemplate>
</Authority>
:
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<div className="templatePreview">
<div className="contentWrapper">
<ComputerTemplate
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
>
{
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</ComputerTemplate>
</div>
<div className="weapp-salary-my-salary-view-payroll">
<Content {...salaryProps}>
{
(_.isNil(confirmStatus) || confirmStatus === "0") &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</Content>
</div>
</Authority>
}
@ -250,7 +244,7 @@ export default class MobilePayroll extends React.Component {
onCancel={() => this.setState({ captchaVisible: false })}
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
/>
</div>
</React.Fragment>
);
}
}

View File

@ -20,3 +20,25 @@
}
}
}
.weapp-salary-my-salary-view-payroll {
padding: 32px 0;
height: 100vh;
overflow-y: auto;
background: #f6f6f6;
.space {
width: 100%;
max-width: 1000px;
display: flex;
align-items: center;
justify-content: flex-end;
.ant-btn {
margin-right: 16px;
}
}
}
.page {
}

View File

@ -9,10 +9,10 @@ import { inject, observer } from "mobx-react";
import { Button, message, Modal } from "antd";
import { WeaLocaleProvider } from "ecCom";
import Authority from "./authority";
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
import Content from "../../components/pcTemplate/content";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import "../payroll/templatePreview/index.less";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -84,29 +84,26 @@ class MySalaryView extends Component {
if (_.isEmpty(mySalaryStore)) {
return <div></div>;
}
const employeeInformation = !_.isEmpty(mySalaryStore) && mySalaryStore.employeeInformation;
const salaryGroups = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryGroups;
const salaryTemplateShowSet = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryTemplate;
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
const salaryProps = {
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
itemTypeList: [employeeInformation, ...salaryGroups]
};
return (
<React.Fragment>
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<div style={{ height: "100%", overflow: "auto" }}>
<div className="templatePreview">
<ComputerTemplate
isMsgPreview
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
>
{
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0")) &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</ComputerTemplate>
</div>
<div className="weapp-salary-my-salary-view-payroll">
<Content {...salaryProps}>
{
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
<ConfirmBtns
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
}
</Content>
</div>
</Authority>
<CaptchaModal

View File

@ -27,7 +27,10 @@ class Index extends Component {
<span>{getLabel(542610, "发放时间")}</span>
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
</div>
<a href="javascript:void(0);">{`${getLabel(33564, "查看")}>`}</a>
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&type=phone`}
target="_blank">
{`${getLabel(33564, "查看")}>`}
</a>
</li>;
})
}

View File

@ -39,7 +39,7 @@ class Index extends Component {
mySalaryMobile.removeEventListener("scroll", this.handleScroll, true);
}
getMySalaryBillList = () => {
getMySalaryBillList = (type) => {
const { salaryYearMonth, pageInfo } = this.state;
this.setState({ loading: true });
mySalaryBillList({ salaryYearMonth, ...pageInfo }).then(({ status, data }) => {
@ -48,14 +48,13 @@ class Index extends Component {
const { datas: dataSource, pageInfo: pageResult } = data;
const { pageNum: current, pageSize, total } = pageResult;
this.setState({
dataSource: [...this.state.dataSource, ...dataSource],
dataSource: type ? dataSource : [...this.state.dataSource, ...dataSource],
pageInfo: { ...pageInfo, current, pageSize, total }
}, () => this.setState({ isMore: this.state.dataSource.length < total }));
}
}).catch(() => this.setState({ loading: false }));
};
handleLoadMore = () => {
// 为测试效果临时使用 message
const { pageInfo, isMore } = this.state;
if (!isMore) return;
const { current } = pageInfo;
@ -71,8 +70,9 @@ class Index extends Component {
const { salaryYearMonth } = this.state;
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
this.setState({
pageInfo: { ...this.state.pageInfo, current: 1 },
salaryYearMonth: type === "salaryStartYearMonth" ? [val, salaryEndYearMonth] : [salaryStartYearMonth, val]
}, () => this.getMySalaryBillList());
}, () => this.getMySalaryBillList(true));
};
render() {

View File

@ -5,7 +5,7 @@
* Date: 2023/11/23
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { WeaDialog, WeaInputLocale, WeaLocaleProvider } from "ecCom";
import { Button, Col, Row, Tree } from "antd";
import uuidV4 from "uuid/v4";
import { getSmsSalaryItemSet } from "../../../../apis/payroll";
@ -16,6 +16,8 @@ import "codemirror/mode/javascript/javascript.js";
const TreeNode = Tree.TreeNode;
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class SmsSettingDialog extends Component {
constructor(props) {
@ -38,7 +40,8 @@ class SmsSettingDialog extends Component {
getSmsSalaryItemSet({ salarySobId: props.salarySobId }).then(({ status, data }) => {
if (status) this.setState({
variableList: _.map(data, item => ({
key: item.groupId, value: item.groupName,
key: item.groupId,
value: item.groupName.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(item.groupName)) : getCurrentLabel(item.groupName),
children: item.items
}))
});
@ -131,7 +134,9 @@ class SmsSettingDialog extends Component {
{
_.map(children, child => {
const { name, id } = child;
return (<TreeNode title={name} key={id || uuidV4()}/>);
return (<TreeNode
title={name.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(name)) : getCurrentLabel(name)}
key={id || uuidV4()}/>);
})
}
</TreeNode>;

View File

@ -1,5 +1,9 @@
const server = window.server || "";
export const formHeaderPost = (url, method, params, header) => {
url = url + "?__random__=" + (new Date()).valueOf();
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
let formdata = new URLSearchParams();
Object.keys(params).map(key => {
formdata.append(key, params[key]);
@ -10,36 +14,26 @@ export const formHeaderPost = (url, method, params, header) => {
body: formdata
}).then(res => res.json());
};
export const postFetch = (url, params) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
return fetch(url, getFetchParams("POST", params)).then(res => res.json());
};
export const headerRequestFetch = (url, method, params, header) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method, mode: "cors",
headers: { "Content-Type": "application/json", ...header },
body: JSON.stringify(params)
}).then(res => res.json());
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
return fetch(url, getFetchParams(method, params, header)).then(res => res.json());
};
export const postExportFetch = (url, params) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
return fetch(url, getFetchParams(method, params)).then(res => {
const filename = res.headers.get("Content-Disposition").split("filename=")[1];
res.blob().then(blob => {
const url = window.URL.createObjectURL(blob);
@ -51,4 +45,36 @@ export const postExportFetch = (url, params) => {
});
});
};
export const getFd = (values) => {
let fd = {};
for (let p in values) {
values[p] = _.isNil(values[p]) ? "" : values[p];
let item = values[p];
if (window.E9Encrypt && __AESEcrypt__) item = __AESEcrypt__.aes_data_encrypt(item);
fd = { ...fd, [p]: item };
}
if (window.E9Encrypt && __AESEcrypt__) {
fd = { ...fd, rsaAes01: __AESEcrypt__.get_rsa_aes_01(), rsaAes02: __AESEcrypt__.get_rsa_aes_02() };
}
return fd;
};
const getFetchParams = (method, params, header = {}) => {
let obj = {
method, mode: "cors",
headers: {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
...header
}
};
if (server === "") {
obj.credentials = "include";
}
if (!_.isEmpty(params) && Object.prototype.toString.call(params) === "[object Object]") {
obj.body = JSON.stringify(getFd(params));
} else {
obj.body = JSON.stringify(params);
}
return obj;
};