Merge branch 'release/2.9.9.2312.02-个税' into custom-艾志工业-合并个税

This commit is contained in:
黎永顺 2023-12-28 21:03:02 +08:00
commit 7ed277e3b0
38 changed files with 1186 additions and 1906 deletions

View File

@ -1,137 +1,30 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
/**
* 薪资档案api
* @param data
*/
//薪资档案-薪资档案列表
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", {});
@ -144,31 +37,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 => {
@ -184,113 +60,45 @@ 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);
};
// 基数调整记录列表
export const getAdjustHistoryList = (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,47 +53,33 @@ 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);
};
//个税相关-在线获取
export const onlineActualAddUpAdvanceTax = (params) => {
return postFetch('/api/bs/hrmsalary/addUpSituation/online/actualAddUpAdvanceTax', params);

View File

@ -3,16 +3,8 @@ import { postExportFetch, 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());
return postFetch("/api/bs/hrmsalary/taxdeclaration/list", params);
};
//个税申报表-个税申报表表单
export const getDeclareForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getForm", "get", params);
@ -20,14 +12,7 @@ export const getDeclareForm = 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);
};
//个税申报表-个税申报表相关信息
@ -37,17 +22,9 @@ export const getDeclareInfo = 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 => {
@ -64,7 +41,6 @@ export const exportSalaryArchive = (id = "") => {
export const withDrawTaxDeclaration = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration", params);
};
//人员信息报送-个税扣缴义务人列表
export const taxAgentDeclareList = (params) => {
return postFetch("/api/bs/hrmsalary/employeedeclare/taxAgentDeclareList", params);
@ -237,8 +213,42 @@ export const taxPaymentVoucherPrintFeedback = (params) => {
export const taxdeclarationUpdateIcon = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/updateIcon", params);
};
export const employeedeclareExport = params => {
return postExportFetch("/api/bs/hrmsalary/employeedeclare/export", params);
};
//个税申报表申报数据-获取表单
export const getTaxDecForm = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/getAddForm", params);
};
//个税申报表申报数据-新增
export const taxdeclarationAdd = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/add", params);
};
//个税申报表申报数据-编辑
export const taxdeclarationEdit = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/edit", params);
};
//个税申报表申报数据-详情
export const getTaxdeclarationDetailInfo = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/detailInfo", "GET", params);
};
//个税申报表申报数据-下载模板
export const taxdeclarationExportTemplate = params => {
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/downloadTemplate", params);
};
//人员信息报送-下载人员信息报送导入模板
export const employeedeclareExportTemplate = params => {
return postExportFetch("/api/bs/hrmsalary/employeedeclare/exportTemplate", params);
};
//个税申报表申报数据-下载申报内置算税结果
export const exportGetDeclareTaxResultFeedback = params => {
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetDeclareTaxResultFeedback", params);
};
//个税申报表申报数据-数据导入
export const taxdeclarationImportData = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/importData", params);
};
//人员信息报送-人员信息报送导入
export const employeedeclareImportData = (params) => {
return postFetch("/api/bs/hrmsalary/employeedeclare/importData", 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,166 +8,59 @@ 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);
};
//保存薪资帐套薪资项目
@ -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,19 +92,11 @@ 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);
};
//获取报税信息表单
export const taxReturnGetForm = (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

@ -19,7 +19,7 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
current: 0
current: 0, fileid: ""
};
}
@ -29,7 +29,10 @@ class Index extends Component {
current: this.state.current + 1
});
}
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 });
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
current: 0,
fileid: ""
}, () => this.props.onResetImportResult());
}
renderChildren = () => {
@ -77,25 +80,36 @@ class Index extends Component {
* Date: 2023/8/11
*/
handleNext = () => {
const { params, importResult } = this.props;
const { params, importResult, excludeKey } = this.props;
const { current } = this.state;
if (_.isEmpty(importResult)) {
const { fileList } = this.step1Ref.state;
if (!_.isEmpty(params)) {
if (!Object.values(params).every(o => !!o)) {
Modal.warning({
title: getLabel(131329, "信息确认"),
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
});
if (current === 0) {
const { fileList } = this.step1Ref.state;
if (!_.isEmpty(params)) {
if (!Object.values(params).every(o => !!o)) {
Modal.warning({
title: getLabel(131329, "信息确认"),
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
});
return;
}
}
if (_.isEmpty(fileList)) {
message.warning(getLabel(111, "请先上传EXCEL文件"));
return;
}
const [file] = fileList;
const { response } = file;
this.setState({
current: this.state.current + 1,
fileid: response.data.fileid
}, () => {
!excludeKey && this.props.nextCallback && this.props.nextCallback(this.state.fileid);
excludeKey && this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
});
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
}
if (_.isEmpty(fileList)) {
message.warning(getLabel(111, "请先上传EXCEL文件"));
return;
}
const [file] = fileList;
const { response } = file;
this.props.nextCallback(response.data.fileid);
} else {
this.setState({ current: this.state.current + 1 });
}

View File

@ -0,0 +1,62 @@
/*
* Author: 黎永顺
* name: 更多菜单列表
* Description:
* Date: 2023/12/28
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { Menu } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
showDrop: false
};
}
render() {
const { showDrop } = this.state;
const { dropMenuDatas } = this.props;
const menu = dropMenuDatas ?
<Menu mode="vertical" onClick={(o) => {
dropMenuDatas.forEach(d => d.key === o.key && typeof d.onClick === "function" && d.onClick(o.key));
}}>
{
dropMenuDatas && dropMenuDatas.map((d, i) => {
return (
<Menu.Item disabled={d.disabled} key={d.key || i}>
<span className="menu-icon">{d.icon}</span>
{d.content}
</Menu.Item>
);
})}
</Menu> : "";
return (
<div className="more-btn-menu-wrapper">
{
!_.isEmpty(dropMenuDatas) &&
<span className="more-btn" onClick={() => this.setState({ showDrop: true })}>
<i className="more-btn-icon icon-New-Flow-menu"/>
</span>
}
<div className="more-btn-menu"
onMouseLeave={() => this.setState({ showDrop: false })}
style={{ display: showDrop ? "block" : "none" }}>
<span className="more-btn"
onClick={() => this.setState({ showDrop: false })}>
<i className="more-btn-icon icon-New-Flow-menu"/>
</span>
<div className="more-btn-menu-icon-background"></div>
{menu}
</div>
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,86 @@
.more-btn-menu-wrapper {
position: relative;
.more-btn {
display: inline-block;
padding-left: 20px;
line-height: 40px;
vertical-align: middle;
cursor: pointer;
.more-btn-icon {
font-size: 16px;
color: #484848;
cursor: pointer;
}
}
.more-btn-menu {
max-width: 200px;
position: absolute;
right: -14px;
top: 45px;
border: 1px solid #dadada;
-webkit-box-shadow: 0 0 2px #dadada;
box-shadow: 0 0 2px #dadada;
z-index: 99;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #FFF;
.more-btn {
display: block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
height: 44px;
line-height: 35px;
position: absolute;
right: -1px;
top: -44px;
padding: 0 13px;
border: 1px solid #dadada;
border-bottom: 0;
-webkit-box-shadow: 0 -1px 2px -1px #dadada;
box-shadow: 0 -1px 2px -1px #dadada;
background-color: #fff;
}
.more-btn-menu-icon-background {
width: 36px;
height: 100%;
background-color: #f2f5f7;
border: 1px solid #dadada;
border-right: 0;
position: absolute;
top: -1px;
left: -1px;
z-index: 0;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.ant-menu {
margin: 10px 0;
border: 0;
text-align: left;
min-width: 120px;
.ant-menu-item {
height: 30px;
line-height: 30px;
padding: 0 5px 0 0;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
.menu-icon {
display: inline-block;
width: 36px;
margin-right: 6px;
text-align: center;
}
}
}
}
}

View File

@ -62,7 +62,8 @@ class SalaryCalcOcImport extends Component {
onResetImportResult={() => this.setState(({
importDialog: { ...importDialog, importResult: {}, imageId: "" }
}))}
nextCallback={imageId => this.handleImport({ imageId })}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}

View File

@ -36,7 +36,7 @@ class Index extends Component {
const { data } = await getImportField({ salaryAcctRecordId: nextProps.salaryAcctRecordId });
const { checkItems, itemsByGroup } = data;
const payload = {
exportData: false, salaryAcctRecordId: nextProps.salaryAcctRecordId,
importType: false, salaryAcctRecordId: nextProps.salaryAcctRecordId,
salaryItemIds: checkItems.join(",")
};
this.setState({
@ -128,11 +128,11 @@ class Index extends Component {
exportDataDom={
<WeaCheckbox
content={getLabel(543208, "导出现有数据")}
value={getURLParameters(exportTempUrl).exportData === "true" ? "1" : "0"}
value={getURLParameters(exportTempUrl).importType === "true" ? "1" : "0"}
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
onChange={val => {
const payload = {
exportData: val === "1", salaryAcctRecordId,
importType: val === "1", salaryAcctRecordId,
salaryItemIds: headerFieldsDialog.selectItems
};
this.setState(({
@ -141,7 +141,8 @@ class Index extends Component {
}}
/>
}
nextCallback={imageId => this.handleImport({ imageId })}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
<AddHeaderFieldsModal
{...headerFieldsDialog}
@ -159,7 +160,7 @@ class Index extends Component {
.then(({ status, errormsg }) => {
if (status) {
const payload = {
exportData: getURLParameters(exportTempUrl).exportData,
importType: getURLParameters(exportTempUrl).importType,
salaryAcctRecordId, salaryItemIds: salaryItems
};
this.setState(({

View File

@ -91,3 +91,48 @@ export const paymentBankConditions = [
defaultshow: true
}
];
export const incomeTaxDecConditions = [
{
items: [
{
conditionType: "SELECT",
domkey: ["employeeId"],
fieldcol: 16,
label: "姓名",
lanId: 25034,
labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3,
options: []
},
{
conditionType: "INPUT",
domkey: ["jobNum"],
fieldcol: 16,
label: "工号",
lanId: 1933,
labelcol: 8,
value: "",
viewAttr: 1
},
{
conditionType: "INPUT",
domkey: ["cardNum"],
fieldcol: 16,
label: "证件号码",
lanId: 1839,
labelcol: 8,
value: "",
viewAttr: 1
}
],
title: "baseInfo",
defaultshow: true
},
{
items: [],
title: "salaryItems",
defaultshow: true
}
];

View File

@ -0,0 +1,193 @@
/*
* Author: 黎永顺
* name: 个税申报人员-新增与编辑
* Description:
* Date: 2023/12/27
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { incomeTaxDecConditions } from "./constants";
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import { Button, Col, message, Row } from "antd";
import { getConditionDomkeys, getSearchs, toDecimal_n } from "../../../util";
import * as API from "../../../apis/declare";
const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey;
const APIFOX = {
add: API.taxdeclarationAdd,
edit: API.taxdeclarationEdit
};
@inject("declareStore")
@observer
class IncomeTaxDeclarationPersonnelSlide extends Component {
constructor(props) {
super(props);
this.state = {
conditions: [], employeeDeclares: [], taxReportColumns: [],
loading: false, detailInfo: {}
};
}
componentWillReceiveProps(nextProps, nextContext) {
const { declareStore: { initTaxDecForm } } = nextProps;
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxDecForm(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
conditions: [], employeeDeclares: [], taxReportColumns: [],
loading: false, detailInfo: {}
}, () => initTaxDecForm());
}
}
getTaxDecForm = (props) => {
const { taxDeclarationId, id } = props;
API.getTaxDecForm({ taxDeclarationId }).then(({ status, data }) => {
if (status) {
const { employeeDeclares, taxReportColumns } = data;
this.setState({
employeeDeclares, taxReportColumns,
conditions: _.map(incomeTaxDecConditions, item => {
if (item.title === "baseInfo") {
return {
...item, title: getLabel(1361, "基本信息"),
items: _.map(item.items, o => {
if (getKey(o) === "employeeId") {
if (!id) {
return {
...o, otherParams: { showSearch: true, optionFilterProp: "children" },
label: getLabel(o.lanId, o.label),
options: _.map(employeeDeclares, g => ({
key: g.employeeId.toString(),
showname: g.employeeName
}))
};
} else {
return {
conditionType: "INPUT",
domkey: ["username"],
fieldcol: 16,
label: getLabel(25034, "姓名"),
labelcol: 8,
value: "",
viewAttr: 1
};
}
}
return { ...o, label: getLabel(o.lanId, o.label) };
})
};
} else if (item.title === "salaryItems") {
return {
...item, title: getLabel(111, "薪资项"),
items: _.map(taxReportColumns, o => ({
conditionType: o.dataType === "number" ? "INPUTNUMBER" : "INPUT",
domkey: [o.reportColumnDataIndex],
fieldcol: 16,
label: o.reportColumnName,
labelcol: 8,
value: o.dataType === "number" ? 0 : "",
rules: o.dataType === "number" ? "required" : "",
otherParams: { precision: 2 },
viewAttr: o.dataType === "number" ? 3 : 2
}))
};
}
})
}, () => {
const { declareStore: { taxDecForm } } = props;
taxDecForm.initFormFields(this.state.conditions);
id && this.getTaxdeclarationDetailInfo(id);
});
}
});
};
getTaxdeclarationDetailInfo = (id) => {
API.getTaxdeclarationDetailInfo({ id }).then(({ status, data }) => {
if (status) {
const { conditions } = this.state;
const { declareStore: { taxDecForm } } = this.props;
const detailInfo = { ...data, ...data["resultValue"] };
this.setState({
detailInfo: detailInfo
}, () => {
_.forEach(getConditionDomkeys(conditions), o => {
taxDecForm.updateFields({
[o]: this.state.detailInfo[o] || ""
});
});
});
}
});
};
handleFormChange = (params) => {
const { declareStore: { taxDecForm } } = this.props;
const { employeeDeclares } = this.state;
const key = Object.keys(params)[0];
const value = params[key].value;
if (key === "employeeId") {
taxDecForm.updateFields({
jobNum: _.find(employeeDeclares, o => o.employeeId == value).jobNum,
cardNum: _.find(employeeDeclares, o => o.employeeId == value).cardNum
});
}
};
save = () => {
const { declareStore: { taxDecForm }, taxDeclarationId, id } = this.props;
const { employeeDeclares, detailInfo } = this.state;
const type = id ? "edit" : "add";
taxDecForm.validateForm().then(f => {
if (f.isValid) {
const { cardNum, jobNum, employeeId, ...taxReportColumnValues } = taxDecForm.getFormParams();
const payload = {
taxDeclarationId, employeeId: employeeId || detailInfo.employeeId,
employeeType: employeeId ? _.find(employeeDeclares, o => o.employeeId == employeeId).employeeType : detailInfo.employeeType,
taxReportColumnValues: _.reduce(_.keys(taxReportColumnValues), (pre, cur) => {
if (Object.prototype.toString.call(taxReportColumnValues[cur]) === "[object Number]") {
return { ...pre, [cur]: toDecimal_n(taxReportColumnValues[cur], 2) };
} else {
return { ...pre, [cur]: taxReportColumnValues[cur] };
}
}, {})
};
this.setState({ loading: true });
APIFOX[type](type === "add" ? payload : { ...payload, id }).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功!"));
this.props.onClose(true);
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
renderTitle = () => {
return <Row className="declareSchemeDialogTitle" type="flex">
<Col span={12} className="declareSchemeDialogTitle-left">
<div className="icon-circle-base"><i className="icon-coms-fa"/></div>
<span className="title">{this.props.title}</span>
</Col>
<Col span={12} className="declareSchemeDialogTitle-right">
<Button type="primary" loading={this.state.loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
</Col>
</Row>;
};
render() {
const { declareStore: { taxDecForm } } = this.props;
const { conditions } = this.state;
return (
<WeaSlideModal {...this.props} className="incomeTaxDecPerSlideWrapper" onClose={() => this.props.onClose()}
top={0} width={60} height={100} measure="%" direction="right" title={this.renderTitle()}
content={getSearchs(taxDecForm, conditions, 2, false, this.handleFormChange)}
/>
);
}
}
export default IncomeTaxDeclarationPersonnelSlide;

View File

@ -8,6 +8,7 @@ import React, { Component } from "react";
import { message, Tag } from "antd";
import { WeaLocaleProvider } from "ecCom";
import DeclareResultDialog from "./declareResultDialog";
import MoreBtnMenu from "../../../components/moreBtnMenu";
import { taxdeclarationUpdateIcon } from "../../../apis/declare";
import { getQueryString } from "../../../util/url";
@ -42,7 +43,7 @@ class TaxDeclarationInfo extends Component {
render() {
const { resDialog } = this.state;
const { declareInfo } = this.props;
const { declareInfo, onOperate } = this.props;
const { abnormalSize, declareFailSize } = declareInfo;
const infoItem = [
{ key: "salaryMonth", label: getLabel(542604, "薪资所属月") },
@ -52,6 +53,15 @@ class TaxDeclarationInfo extends Component {
{ key: "taxCycle", label: getLabel(542240, "税款所属期") },
{ key: "taxPaidAmount", label: getLabel(111, "已缴金额") }
];
let dropMenuDatas = [];
if (["DECLARE_SUCCESS_NO_PAY", "DECLARE_SUCCESS_UNPAID", "DECLARE_SUCCESS_PAID", "DECLARE_SUCCESS_PAYING"].includes(declareInfo.declareStatus)) {
dropMenuDatas = dropMenuDatas.concat([{
key: "exportGetDeclareTaxResultFeedback",
icon: <i className="icon-coms-download2"/>,
content: getLabel(111, "下载申报内置算税结果"),
onClick: onOperate
}]);
}
return (
<div className="taxDeclarationInfo_layout">
<div className="base-info">
@ -92,6 +102,7 @@ class TaxDeclarationInfo extends Component {
onClick={() => this.handleSeeResult([{ key: "list4Fail" }], getLabel(111, "申报失败数据"))}>
{getLabel(111, "申报失败数据")}{declareFailSize || 0}
</span>
<MoreBtnMenu dropMenuDatas={dropMenuDatas}/>
<DeclareResultDialog
{...resDialog}
onCancel={() => {

View File

@ -0,0 +1,83 @@
/*
* Author: 黎永顺
* name: 个税申报表详情-导入
* Description:
* Date: 2023/12/28
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { message } from "antd";
import ImportDialog from "../../../components/importDialog";
import * as API from "../../../apis/declare";
const getLabel = WeaLocaleProvider.getLabel;
class TaxDeclareDetailImportDialog extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
visible: false, title: "", nextloading: false,
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview",
extraPreview: { taxDeclarationId: "" }
}
};
}
handleImportTaxDeclare = (taxDeclarationId) => {
this.setState({
importDialog: {
...this.state.importDialog, link: this.handleExportTemp,
taxDeclarationId, visible: true, title: getLabel(24023, "数据导入"),
extraPreview: { taxDeclarationId }
}
});
};
handleImport = (payload) => {
const { importDialog } = this.state;
const { taxDeclarationId } = importDialog;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.taxdeclarationImportData({ ...payload, taxDeclarationId })
.then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
}, () => this.props.onSuccess());
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
handleExportTemp = () => {
const { importDialog: { taxDeclarationId } } = this.state;
message.destroy();
message.loading(getLabel(111, "下载中"), 0);
const promise = API.taxdeclarationExportTemplate({ taxDeclarationId });
message.destroy();
};
handleCancel = () => {
this.setState({
importDialog: {
visible: false, title: "", nextloading: false,
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview"
}
});
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...importDialog} onCancel={this.handleCancel}
onResetImportResult={() => this.setState(({
importDialog: { ...importDialog, importResult: {}, imageId: "" }
}))}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default TaxDeclareDetailImportDialog;

View File

@ -5,13 +5,14 @@
* Date: 2023/8/18
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
import { Button, message } from "antd";
import { WeaLocaleProvider, WeaTab } from "ecCom";
import { Button, message, Spin } from "antd";
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings";
import PaymentBtn from "./components/paymentBtn";
import PaymentFeedbackBtn from "./components/paymentFeedbackBtn";
import {
exportGetDeclareTaxResultFeedback,
getDeclareInfo,
getDetailList,
getTaxDeclarationTab,
@ -26,6 +27,8 @@ import {
taxPaymentWithheldVoucherGet
} from "../../apis/declare";
import { convertToUrlString, getQueryString } from "../../util/url";
import IncomeTaxDeclarationPersonnelSlide from "./components/incomeTaxDeclarationPersonnelSlide";
import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDialog";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -49,14 +52,22 @@ class Index extends Component {
correct: false, cancel: false, cancelFeedback: false, refreshingPay: false,
issuance: false
},
taxDecPersonSlide: {
visible: false, title: getLabel(1421, "新增"), taxDeclarationId: "", id: ""
},
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }
};
this.timer = null;
this.taxDeclareRef = null;
}
componentDidMount() {
const promise = this.init();
window.addEventListener("message", this.handleReceive, false);
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
init = async () => {
@ -95,6 +106,34 @@ class Index extends Component {
taxdeclarationGetRate = (index) => {
return taxdeclarationGetRate({ index });
};
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
const promise = this.init();
} else if (type === "turn") {
if (id === "PAGEINFO") {
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getDetailList());
} else if (id === "EDIT") {
this.handleTaxDescPerSlide({
visible: true, id: params.id,
title: getLabel(501169, "编辑")
});
} else if (id === "DELETE") {
}
}
};
postMessageToChild = (payload = {}) => {
const { declareInfo, intelCalcSalaryStatus } = this.state;
const i18n = {
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
"操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"),
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除")
};
const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : "";
const childFrameObj = document.getElementById("atdTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, declareStatus }), "*");
};
getDetailList = () => {
const { loading, pageInfo, selectedKey } = this.state;
const [incomeCategory, taxDeclarationId] = selectedKey.split("%%");
@ -111,10 +150,16 @@ class Index extends Component {
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
columns: _.map(columns, (it, idx) => {
if (idx <= 1) {
return { ...it, width: 150, fixed: "left" };
return { ...it, width: 150, fixed: "left", ellipsis: true };
}
return { ...it, width: 150 };
return { ...it, width: 150, ellipsis: true };
})
}, () => {
const payload = {
dataSource, pageInfo: this.state.pageInfo,
columns: this.state.columns
};
this.postMessageToChild(payload);
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
@ -221,12 +266,36 @@ class Index extends Component {
};
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/detail/export?${convertToUrlString(payload)}`, "_blank");
};
handleTaxDescPerSlide = (params) => {
const { callback, ...module } = params;
const { taxDecPersonSlide, selectedKey } = this.state;
const [__, taxDeclarationId] = selectedKey.split("%%");
this.setState({
taxDecPersonSlide: { ...taxDecPersonSlide, ...module, taxDeclarationId }
}, () => callback && this.getDetailList());
};
exportGetDeclareTaxResultFeedback = () => {
message.destroy();
message.loading(getLabel(111, "下载中..."), 0);
exportGetDeclareTaxResultFeedback({ id: getQueryString("id") })
.then(async ({ status, errormsg }) => {
message.destroy();
if (status) {
message.success(getLabel(111, "下载成功!"));
} else {
message.error(errormsg || getLabel(111, "下载失败!"));
}
}).catch(() => {
message.destroy();
message.error(getLabel(111, "下载失败!"));
});
};
render() {
const {
tabs, selectedKey, columns, pageInfo,
dataSource, loading, declareInfo, intelCalcSalaryStatus
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide
} = this.state;
const [__, taxDeclarationId] = selectedKey.split("%%");
let btns = [
<Button type="primary" onClick={this.export}>{getLabel(17416, "导出")}</Button>,
<Button type="ghost" onClick={() => this.handleOperateDeclare("declare")}
@ -234,23 +303,6 @@ class Index extends Component {
<Button type="ghost" onClick={() => this.handleOperateDeclare("refresh")}
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
];
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => this.getDetailList());
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.getDetailList());
}
};
//申报状态:作废中
declareInfo.declareStatus === "DECLARE_CANCELLING" && (btns.splice(1, 2, <Button
type="ghost" loading={loading.cancelFeedback}
@ -291,6 +343,20 @@ class Index extends Component {
btns.splice(1, 1);
}
}
if (intelCalcSalaryStatus) {
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {
btns.unshift(
<Button type="primary"
onClick={() => this.taxDeclareRef.handleImportTaxDeclare(taxDeclarationId)}>{getLabel(32935, "导入")}</Button>
);
btns.unshift(
<Button type="primary" onClick={() => this.handleTaxDescPerSlide({
visible: true,
title: getLabel(1421, "新增")
})}>{getLabel(1421, "新增")}</Button>
);
}
}
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
btns.push(
<PaymentBtn declareInfo={declareInfo} updateDeclare={this.declare}/>,
@ -303,18 +369,31 @@ class Index extends Component {
}
return (
<div className="declareDetail-layout">
<TaxDeclarationInfo declareInfo={declareInfo}/>
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()}/>
<div className="declareDetail-layout-content">
<WeaTab
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
buttons={btns} onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
/>
<WeaTable
loading={loading.query} bordered
columns={columns} dataSource={dataSource}
pagination={pagination}
scroll={{ x: 1200, y: `calc(100vh - 190px)` }}
{/*个税申报表-新增编辑框*/}
<IncomeTaxDeclarationPersonnelSlide
{...taxDecPersonSlide}
onClose={(callback) => this.handleTaxDescPerSlide({ visible: false, id: "", callback })}
/>
{/*个税申报表导入*/}
<TaxDeclareDetailImportDialog ref={dom => this.taxDeclareRef = dom}
onSuccess={this.declare}
/>
</div>
<div className="declareDetail-layout-table-content">
<Spin spinning={loading.query}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/taxDeclareTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/taxDeclareTable"
id="atdTable"
/>
</Spin>
</div>
</div>
);

View File

@ -1,4 +1,8 @@
.declareDetail-layout {
height: 100%;
display: flex;
flex-direction: column;
.declareDetail-layout-content {
padding: 0 16px;
@ -12,6 +16,15 @@
}
}
.declareDetail-layout-table-content {
flex: 1;
padding: 0 16px;
.ant-spin-nested-loading, .ant-spin-container {
height: 100% !important;
}
}
.icon-span {
cursor: pointer;
@ -218,3 +231,29 @@
}
}
}
.incomeTaxDecPerSlideWrapper {
.wea-slide-modal-content {
background: #f6f6f6;
padding: 16px;
overflow: auto;
height: 100%;
}
.wea-search-group {
padding: 0;
background: #fff;
border: 1px solid #e5e5e5;
border-bottom: none;
margin-bottom: 16px;
.wea-form-cell, .wea-content {
padding: 0;
}
.wea-form-item {
padding: 5px 16px;
border-bottom: 1px solid #e5e5e5;
}
}
}

View File

@ -0,0 +1,116 @@
/*
* Author: 黎永顺
* name: 人员信息报送-导入
* Description:
* Date: 2023/12/28
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaLocaleProvider, WeaSelect } from "ecCom";
import { message } from "antd";
import ImportDialog from "../../../components/importDialog";
import * as API from "../../../apis/declare";
const getLabel = WeaLocaleProvider.getLabel;
class EmployeeDeclareDetailImportDialog extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
visible: false, title: "", nextloading: false, checkType: "jobNum",
link: null, importResult: {}, imageId: "", tempPayload: {},
previewUrl: "/api/bs/hrmsalary/employeedeclare/preview"
}
};
}
handleImportEmployeeDeclare = (tempPayload) => {
this.setState({
importDialog: {
...this.state.importDialog, link: this.handleExportTemp,
tempPayload, visible: true, title: getLabel(24023, "数据导入")
}
});
};
handleImport = (payload) => {
const { importDialog } = this.state;
const { tempPayload, checkType } = importDialog;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.employeedeclareImportData({ ...payload, ...tempPayload, checkType })
.then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
}, () => this.props.onSuccess());
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
handleExportTemp = () => {
const { importDialog: { tempPayload } } = this.state;
message.destroy();
message.loading(getLabel(111, "下载中"), 0);
const promise = API.employeedeclareExportTemplate(tempPayload);
message.destroy();
};
handleCancel = () => {
this.setState({
importDialog: {
visible: false, title: "", nextloading: false, checkType: "jobNum",
link: null, importResult: {}, imageId: "", tempPayload: {},
previewUrl: "/api/bs/hrmsalary/employeedeclare/preview"
}
});
};
renderFormComponent = () => {
const { importDialog } = this.state;
const { checkType } = importDialog;
return <div style={{ padding: "8px 16px", border: "1px solid #e5e5e5", margin: "4px 0" }}>
<div className="weapp-salary-tb-filter">
<div className="tbf-item">
<div className="tbfi-label">{getLabel(111, "校验字段")}</div>
<WeaSelect
detailtype={3} value={checkType} onChange={checkType => {
this.setState(({ importDialog: { ...importDialog, checkType } }));
}} options={[
{ key: "jobNum", showname: getLabel(1933, "工号") },
{ key: "sfz", showname: getLabel(1887, "身份证号码") }
]}
/>
</div>
</div>
</div>;
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...importDialog} onCancel={this.handleCancel}
onResetImportResult={() => this.setState(({
importDialog: { ...importDialog, importResult: {}, imageId: "" }
}))}
importParams={this.renderFormComponent()}
exportDataDom={
<WeaCheckbox
content={getLabel(543208, "导出现有数据")}
value={importDialog.tempPayload.exportData === "true" ? "1" : "0"}
helpfulTip={getLabel(545244, "提示:建议先导出现有最新数据,修改后再导入")}
onChange={val => {
this.setState(({
importDialog: {
...importDialog,
tempPayload: { ...importDialog.tempPayload, exportData: String(val === "1") }
}
}));
}}
/>
}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default EmployeeDeclareDetailImportDialog;

View File

@ -5,10 +5,13 @@
* Date: 2023/8/11
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom";
import { Button, Dropdown, Menu, message, Modal, Spin } from "antd";
import BaseInfo from "./components/baseInfo";
import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareDetailSchemaEditDialog";
import EmployeeDeclareDetailSchemaImportDialog from "./components/employeeDeclareDetailImportDialog";
import { commonEnumList } from "../../apis/payrollFiles";
import {
employeedeclareDeclare,
@ -24,8 +27,6 @@ import {
import { advanceConditions, submitStatus } from "./constants";
import moment from "moment";
import { getSearchs } from "../../util";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { getQueryString } from "../../util/url";
import "./index.less";
@ -51,6 +52,7 @@ class Index extends Component {
selectedRowKeys: [], exportPayload: {}
};
this.baseInfoRef = null;
this.importRef = null;
this.timer = null;
}
@ -399,6 +401,19 @@ class Index extends Component {
}, ["current", "total", "pageSize"]));
this.setState({ loading: { ...this.state.loading, exportLoading: false } });
};
handleEmployeedeclare = ({ key }) => {
switch (key) {
case "import":
const tmplateExpPayload = {
exportData: "false", taxAgentId: getQueryString("id"),
taxCycle: moment(this.state.taxCycle).startOf("month").format("YYYY-MM-DD")
};
this.importRef.handleImportEmployeeDeclare(tmplateExpPayload);
break;
default:
break;
}
};
render() {
const {
@ -417,11 +432,7 @@ class Index extends Component {
const buttons = [
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
onChange={val => this.setState({
taxCycle: val,
pageInfo: {
...pageInfo,
current: 1
}
taxCycle: val, pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryEmployeeList())}/>,
<Button type="primary" onClick={this.employeedeclareDeclare}
loading={loading.declare}>{getLabel(111, "全部报送")}</Button>,
@ -439,15 +450,14 @@ class Index extends Component {
{ title: getLabel(111, "本月信息变动"), viewcondition: "list4Update" }
];
const tabBtns = [
<Button type="ghost" onClick={this.handleAdd}>{getLabel(1421, "新增")}</Button>,
// <Dropdown.Button
// onClick={this.handleAdd}
// overlay={
// <Menu>
// {/*<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>*/}
// </Menu>
// }
// type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
<Dropdown.Button
onClick={this.handleAdd}
overlay={
<Menu onClick={this.handleEmployeedeclare}>
<Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>
</Menu>
}
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
<Dropdown.Button
onClick={() => this.handleEmployeedeclareExport({ key: "all" })}
loading={loading.exportLoading}
@ -545,6 +555,9 @@ class Index extends Component {
});
}}
/>
{/*人员信息报送导入*/}
<EmployeeDeclareDetailSchemaImportDialog ref={dom => this.importRef = dom}
onSuccess={this.queryEmployeeList}/>
</div>
</div>
</div>

View File

@ -178,3 +178,23 @@
.a-center {
align-items: center;
}
.weapp-salary-tb-filter {
display: flex;
align-items: center;
.tbf-item {
display: flex;
align-items: center;
.tbfi-label {
flex-basis: 100px;
flex-shrink: 0;
}
.wea-select {
flex-basis: 200px;
flex-shrink: 0;
}
}
}

View File

@ -75,7 +75,7 @@ class Index extends Component {
};
return (
<WeaTable rowKey="id" dataSource={dataSource} pagination={pagination}
scroll={{ x: 1200, y: `calc(100vh - 166px)` }}
scroll={{ y: `calc(100vh - 166px)` }}
loading={loading} columns={[...columns, {
dataIndex: "options",
title: getLabel(30585, "操作"),

View File

@ -110,7 +110,7 @@ class Index extends Component {
} else if (getKey(o) === "smsSetting") {
return {
...o,
hide: _.isNil(fieldsEchoData["smsStatus"]) || (!_.isNil(fieldsEchoData["smsStatus"]) && (fieldsEchoData["smsStatus"].toString() === "0"))
hide: _.isNil(fieldsEchoData["smsStatus"]) || !fieldsEchoData["smsStatus"] || (!_.isNil(fieldsEchoData["smsStatus"]) && (fieldsEchoData["smsStatus"].toString() === "0"))
};
}
return { ...o };

View File

@ -5,19 +5,19 @@ const { getLabel } = WeaLocaleProvider;
export const condition = [
{
items: [
// {
// colSpan: 2,
// checkbox: false,
// checkboxValue: false,
// conditionType: "SELECT",
// domkey: ["taxAgent"],
// fieldcol: 18,
// label: getLabel(111, "个税扣缴义务人"),
// labelcol: 6,
// options: [],
// multiple: true,
// viewAttr: 2
// },
{
colSpan: 2,
checkbox: false,
checkboxValue: false,
conditionType: "SELECT",
domkey: ["taxAgent"],
fieldcol: 18,
label: getLabel(111, "个税扣缴义务人"),
labelcol: 6,
options: [],
multiple: true,
viewAttr: 2
},
{
browserConditionParam: {
completeParams: {},

View File

@ -69,7 +69,7 @@ class StatisticalMicroSettingsSlide extends Component {
}
getTaxAgentSelectList = (props) => {
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
getTaxAgentSelectList(true).then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
return {
@ -125,7 +125,7 @@ class StatisticalMicroSettingsSlide extends Component {
const { form, id, dimension, onClose } = this.props;
const [salaryStartMonth, salaryEndMonth] = salaryMonth;
const { department, employee, position, subCompany, taxAgent, ...extra } = form.getFormDatas();
// const { value, valueSpan } = taxAgent;
const { value, valueSpan } = taxAgent;
if (!salaryEndMonth || !salaryStartMonth) {
this.refs.weaError.showError();
return;
@ -137,7 +137,7 @@ class StatisticalMicroSettingsSlide extends Component {
employee: _.map(employee.valueObj, it => ({ id: it.id, name: it.name })),
// position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
// taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
items: dataSource,
salaryEndMonth: salaryEndMonth + "-01",
salaryStartMonth: salaryStartMonth + "-01"

View File

@ -971,7 +971,8 @@ export default class Archives extends React.Component {
}}
/>
}
nextCallback={imageId => this.handleImport({ imageId })}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
{
this.state.importVisible && <ImportModal

View File

@ -9,9 +9,12 @@ const { TableStore } = WeaTableNew;
export class DeclareStore {
@observable paymentForm = new WeaForm(); // declareDetail----在线申报-缴款Form
@observable declareForm = new WeaForm(); //薪资核算重构-核算form
@observable taxDecForm = new WeaForm(); //个税申报人员-新增编辑form
// ** 薪资核算重构-初始化核算form **
@action
initDeclareForm = () => this.declareForm = new WeaForm();
@action
initTaxDecForm = () => this.taxDecForm = new WeaForm();
@observable tableStore = new TableStore(); // new table

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("POST", 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;
};