feature/2.9.42310.01-接口fetch重新封装
This commit is contained in:
parent
a21982bf62
commit
560af8a703
|
|
@ -1,293 +1,112 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
|
||||
/**
|
||||
* 薪资档案api
|
||||
* @param data
|
||||
*/
|
||||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//薪资档案-薪资档案列表
|
||||
export const getArchiveList = params => {
|
||||
return fetch('/api/bs/hrmsalary/salaryArchive/list', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
|
||||
//薪资档案的高级搜索
|
||||
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);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
|
||||
};
|
||||
|
||||
//薪资档案-获取薪资档案详情表单
|
||||
export const getArchiveForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getForm', 'get', 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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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())
|
||||
}
|
||||
|
||||
//薪资档案-删除个税扣缴义务人调整
|
||||
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);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/saveTaxAgent", params);
|
||||
};
|
||||
|
||||
// 获取导入类型
|
||||
export const getImportTypes = () => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {});
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {});
|
||||
};
|
||||
// 获取档案和人员状态类型
|
||||
export const commonEnumList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
|
||||
};
|
||||
// 发起调薪地址
|
||||
export const salaryAdjustmentInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', 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 => {
|
||||
var filename=`薪资档案.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
fetch("/api/bs/hrmsalary/salaryArchive/exportList?ids=" + ids).then(res => res.blob().then(blob => {
|
||||
var filename = `薪资档案.xlsx`;
|
||||
var a = document.createElement("a");
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}));
|
||||
};
|
||||
|
||||
// 调整记录-个税扣缴义务人列表
|
||||
export const 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);
|
||||
}
|
||||
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())
|
||||
}
|
||||
|
||||
// 调整-薪资项目-通过薪资档案的薪资项目id获取薪资项目调整表单
|
||||
export const getSalaryItemFormByItemId = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getSalaryItemFormBySalaryArchiveItemId', 'GET', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", 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 postFetch(`/api/bs/hrmsalary/salaryArchive/deleteSalaryItem?salaryArchiveItemId=${params.salaryArchiveItemId}`, 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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,14 +103,7 @@ 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);
|
||||
};
|
||||
|
||||
// 薪资记录--归档薪资核算记录
|
||||
|
|
@ -208,38 +118,17 @@ export const fileSalaryAcct = (params) => {
|
|||
};
|
||||
// 薪资记录-回算
|
||||
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 +151,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 +174,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 +192,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 +225,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 +243,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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,25 +1,14 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from '../util/request';
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//数据采集-累计情况列表
|
||||
export const getCumSituationList = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/addUpSituation/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/list", params);
|
||||
};
|
||||
|
||||
//数据采集-累计情况列表的高级搜索
|
||||
export const getCumSituationSaCondition = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/addUpSituation/getSearchCondition",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/addUpSituation/getSearchCondition", "get", params);
|
||||
};
|
||||
|
||||
//数据采集-累计情况-导出
|
||||
|
|
@ -37,34 +26,18 @@ export const exportCumSituationList = (ids) => {
|
|||
);
|
||||
};
|
||||
|
||||
//数据采集-累计情况-获取导入参数
|
||||
export const getImportCumSituationParam = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/addUpSituation/getImportParams",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
};
|
||||
|
||||
//数据采集-获取累计情况记录
|
||||
export const getCumSituationDetailList = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/addUpSituation/getDetailList", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/getDetailList", params);
|
||||
};
|
||||
|
||||
//数据采集-累计情况-导出明细
|
||||
export const exportCumSituationDetailList = (id, ids = "", taxAgentId='') => {
|
||||
export const exportCumSituationDetailList = (id, ids = "", taxAgentId = "") => {
|
||||
fetch(
|
||||
"/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=" +
|
||||
id +
|
||||
"&ids=" +
|
||||
ids + "&taxAgentId=" + taxAgentId
|
||||
id +
|
||||
"&ids=" +
|
||||
ids + "&taxAgentId=" + taxAgentId
|
||||
).then((res) =>
|
||||
res.blob().then((blob) => {
|
||||
var filename = `往期累计情况(工资、薪金).xlsx`;
|
||||
|
|
@ -80,44 +53,30 @@ export const exportCumSituationDetailList = (id, ids = "", taxAgentId='') => {
|
|||
|
||||
// 数据采集-累计情况-导入
|
||||
export const importCumSituationParam = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/addUpSituation/importAddUpSituation", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/importAddUpSituation", params);
|
||||
};
|
||||
|
||||
// 数据采集-累计情况-导入预览
|
||||
export const importCumSituationPreview = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/addUpSituation/preview", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/preview", params);
|
||||
};
|
||||
//新建往期累计情况
|
||||
export const createAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/createAddUpSituation', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/createAddUpSituation", params);
|
||||
};
|
||||
//编辑往期累计情况
|
||||
export const editAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/editAddUpSituation', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/editAddUpSituation", params);
|
||||
};
|
||||
//删除所选往期累计情况
|
||||
export const deleteSelectAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation", params);
|
||||
};
|
||||
//一键清空往期累计情况
|
||||
export const deleteAllAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation", params);
|
||||
};
|
||||
//查看信息
|
||||
export const getAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/addUpSituation/getAddUpSituation", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,68 +1,41 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
import { postFetch } from '../util/request';
|
||||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//个税申报表-个税申报表列表
|
||||
export const getDeclareList = params => {
|
||||
return fetch('/api/bs/hrmsalary/taxdeclaration/list', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
//个税申报表-个税申报表表单
|
||||
export const getDeclareForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getForm', 'get', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/list", params);
|
||||
};
|
||||
|
||||
//个税申报表-个税申报表生成
|
||||
export const saveDeclare = params => {
|
||||
return fetch('/api/bs/hrmsalary/taxdeclaration/save', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/save", params);
|
||||
};
|
||||
|
||||
//个税申报表-个税申报表相关信息
|
||||
export const getDeclareInfo = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo', 'get', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", "get", params);
|
||||
};
|
||||
|
||||
// 个税申报表详情列表
|
||||
export const getDetailList = params => {
|
||||
return fetch('/api/bs/hrmsalary/taxdeclaration/detail/list', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/detail/list", params);
|
||||
};
|
||||
|
||||
// 个税申报表导出
|
||||
export const exportSalaryArchive = (id = "") => {
|
||||
fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).then(res => res.blob().then(blob => {
|
||||
var filename=`个税申报表.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
fetch("/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=" + id).then(res => res.blob().then(blob => {
|
||||
var filename = `个税申报表.xlsx`;
|
||||
var a = document.createElement("a");
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}));
|
||||
};
|
||||
//个税申报表-撤回申报
|
||||
export const withDrawTaxDeclaration = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration", params);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,171 +8,64 @@ export const getLedgerList = params => {
|
|||
|
||||
//启用/禁用薪资帐套
|
||||
export const changeLedgerStatus = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/disable", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/disable", params);
|
||||
};
|
||||
|
||||
//复制薪资帐套
|
||||
export const duplicateLedger = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/duplicate", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/duplicate", params);
|
||||
};
|
||||
|
||||
//删除薪资帐套
|
||||
export const deleteLedger = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/delete", params);
|
||||
};
|
||||
|
||||
//薪资帐套基本信息表单
|
||||
export const getLedgerBasicForm = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/basic/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
// return fetch('/api/bs/hrmsalary/salarysob/basic/getForm', {
|
||||
// method: 'POST',
|
||||
// mode: 'cors',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// body: JSON.stringify(params)
|
||||
// }).then(res => res.json())
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
|
||||
};
|
||||
|
||||
//保存薪资帐套基本信息
|
||||
export const saveLedgerBasic = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/basic/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/basic/save", params);
|
||||
};
|
||||
|
||||
//薪资帐套外部人员范围(包含)列表
|
||||
export const getLedgerPersonRangeExtList = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/ext/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/ext/list", params);
|
||||
};
|
||||
//薪资帐套人员范围(包含)列表
|
||||
export const getLedgerPersonRangeInclude = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/listInclude", params);
|
||||
};
|
||||
|
||||
//薪资帐套人员范围(排除)列表
|
||||
export const getLedgerPersonRangeExclude = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/listExclude", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
//薪资帐套人员范围表单
|
||||
export const getLedgerPersonRangeForm = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/range/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/listExclude", params);
|
||||
};
|
||||
|
||||
//保存薪资帐套外部人员范围
|
||||
export const saveLedgerPersonExtRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/ext/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/ext/save", params);
|
||||
};
|
||||
//删除薪资帐套外部人员范围
|
||||
export const deleteLedgerPersonExtRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/ext/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/ext/delete", params);
|
||||
};
|
||||
//保存薪资帐套人员范围
|
||||
export const saveLedgerPersonRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/save", params);
|
||||
};
|
||||
|
||||
//删除薪资帐套人员范围
|
||||
export const deleteLedgerPersonRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
//薪资帐套项目分组的详情
|
||||
export const getLedgerItemGroupForm = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/item/group/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/delete", params);
|
||||
};
|
||||
|
||||
//保存薪资帐套薪资项目
|
||||
export const saveLedgerItem = params => {
|
||||
const { itemGroups, items, ...extra } = params;
|
||||
const { itemGroups, items, ...extra } = params;
|
||||
const payload = {
|
||||
itemGroups: _.map(itemGroups, item => {
|
||||
return {
|
||||
|
|
@ -189,136 +82,52 @@ export const saveLedgerItem = params => {
|
|||
}) || [],
|
||||
...extra
|
||||
};
|
||||
|
||||
|
||||
return fetch("/api/bs/hrmsalary/salarysob/item/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(payload)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/save", payload);
|
||||
};
|
||||
|
||||
//薪资帐套薪资项目详情
|
||||
export const getLedgerItemForm = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/item/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/item/getForm", "get", params);
|
||||
};
|
||||
|
||||
//薪资帐套校验规则列表
|
||||
export const getLedgerRuleList = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/checkrule/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
//薪资帐套校验规则表单
|
||||
export const getLedgerRuleForm = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/checkrule/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/list", params);
|
||||
};
|
||||
|
||||
//保存薪资帐套校验规则
|
||||
export const saveLedgerRule = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/checkrule/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
//编辑薪资帐套校验规则公式
|
||||
export const updateLedgerRuleFormula = params => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/checkrule/formula/update",
|
||||
"POST",
|
||||
params
|
||||
);
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/save", params);
|
||||
};
|
||||
|
||||
//删除薪资帐套校验规则
|
||||
export const deleteLedgerRule = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/checkrule/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/checkrule/delete", params);
|
||||
};
|
||||
|
||||
// 薪资项目可选列表
|
||||
export const listSalaryItem = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/item/listSalaryItem", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/listSalaryItem", params);
|
||||
};
|
||||
|
||||
// 员工信息字段列表
|
||||
export const empFieldList = () => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/salarysob/empField/list",
|
||||
"GET",
|
||||
{}
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/empField/list", "GET", {});
|
||||
};
|
||||
|
||||
// 调薪计薪规则可选的薪资项目列表
|
||||
export const listSalarySobItem = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem", params);
|
||||
};
|
||||
|
||||
// 调薪计薪规则保存
|
||||
export const saveAdjustmentRule = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/save", params);
|
||||
};
|
||||
|
||||
// 调薪计薪规则列表
|
||||
export const listAdjustmentRule = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/adjustmentrule/list", params);
|
||||
};
|
||||
|
||||
//获取回算薪资项目
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
// 工资单发放-获取规则设置下拉框
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
//获取当前登录人所控制的人员范围
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,34 +3,16 @@ import { postFetch } from "../util/request";
|
|||
|
||||
//个税扣缴义务人列表
|
||||
export const getTaxAgentList = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/taxAgent/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/list", params);
|
||||
};
|
||||
//同步人员范围
|
||||
export const taxAgentRangeSync = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/taxAgent/range/sync", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/sync", params);
|
||||
};
|
||||
|
||||
// 系统管理员权限
|
||||
export const getPermission = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/taxAgent/permission",
|
||||
"GET",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/permission", "GET", params);
|
||||
};
|
||||
|
||||
//获取个税扣缴义务人表单
|
||||
|
|
@ -40,11 +22,7 @@ export const getTaxAgentForm = (params) => {
|
|||
|
||||
//获取个税扣缴义务人基础信息表单
|
||||
export const getTaxAgentBaseForm = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/taxAgent/base/getForm",
|
||||
"get",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/base/getForm", "get", params);
|
||||
};
|
||||
|
||||
//新建个税扣缴义务人
|
||||
|
|
@ -114,17 +92,9 @@ export const getTaxAgentSelectList = (isShare = false) => {
|
|||
|
||||
//当前登录人个税扣缴义务人下拉列表
|
||||
export const getTaxAgentSelectListAsAdmin = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/taxAgent/selectListAsAdmin",
|
||||
"GET",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectListAsAdmin", "GET", params);
|
||||
};
|
||||
//当前登录人是否有添加人员范围的权限
|
||||
export const hasIconInTax = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax",
|
||||
"GET",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
// 导出档案
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
const server = window.server || "";
|
||||
export const formHeaderPost = (url, method, params, header) => {
|
||||
url = url + "?__random__=" + (new Date()).valueOf();
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
params.access_token = localStorage.access_token;
|
||||
}
|
||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
||||
let formdata = new URLSearchParams();
|
||||
Object.keys(params).map(key => {
|
||||
formdata.append(key, params[key]);
|
||||
|
|
@ -10,36 +14,26 @@ export const formHeaderPost = (url, method, params, header) => {
|
|||
body: formdata
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
export const postFetch = (url, params) => {
|
||||
url = url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
params.access_token = localStorage.access_token;
|
||||
}
|
||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, getFetchParams("POST", params)).then(res => res.json());
|
||||
};
|
||||
export const headerRequestFetch = (url, method, params, header) => {
|
||||
url = url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, {
|
||||
method, mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header },
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
params.access_token = localStorage.access_token;
|
||||
}
|
||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, getFetchParams(method, params, header)).then(res => res.json());
|
||||
};
|
||||
export const postExportFetch = (url, params) => {
|
||||
url = url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => {
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
params.access_token = localStorage.access_token;
|
||||
}
|
||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, getFetchParams(method, params)).then(res => {
|
||||
const filename = res.headers.get("Content-Disposition").split("filename=")[1];
|
||||
res.blob().then(blob => {
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
|
|
@ -51,4 +45,36 @@ export const postExportFetch = (url, params) => {
|
|||
});
|
||||
});
|
||||
};
|
||||
export const getFd = (values) => {
|
||||
let fd = {};
|
||||
for (let p in values) {
|
||||
values[p] = _.isNil(values[p]) ? "" : values[p];
|
||||
let item = values[p];
|
||||
if (window.E9Encrypt && __AESEcrypt__) item = __AESEcrypt__.aes_data_encrypt(item);
|
||||
fd = { ...fd, [p]: item };
|
||||
}
|
||||
if (window.E9Encrypt && __AESEcrypt__) {
|
||||
fd = { ...fd, rsaAes01: __AESEcrypt__.get_rsa_aes_01(), rsaAes02: __AESEcrypt__.get_rsa_aes_02() };
|
||||
}
|
||||
return fd;
|
||||
};
|
||||
const getFetchParams = (method, params, header = {}) => {
|
||||
let obj = {
|
||||
method, mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
...header
|
||||
}
|
||||
};
|
||||
if (server === "") {
|
||||
obj.credentials = "include";
|
||||
}
|
||||
if (!_.isEmpty(params)) {
|
||||
obj.body = JSON.stringify(getFd(params));
|
||||
} else {
|
||||
obj.body = JSON.stringify(params);
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue