295 lines
7.9 KiB
JavaScript
295 lines
7.9 KiB
JavaScript
import { WeaTools } from "ecCom";
|
|
|
|
//数据采集-考勤引用-考勤数据列表
|
|
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());
|
|
};
|
|
//数据采集-考勤引用-考勤数据列表
|
|
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
|
|
);
|
|
};
|
|
|
|
//数据采集-考勤引用-获取账套列表
|
|
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
|
|
);
|
|
};
|
|
|
|
//数据采集-考勤引用-同步引用考勤数据
|
|
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);
|
|
};
|
|
|
|
//数据采集-考勤引用-删除考勤数据
|
|
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
|
|
);
|
|
};
|
|
|
|
//数据采集-考勤引用-考勤字段管理列表
|
|
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
|
|
);
|
|
};
|
|
|
|
//数据采集-考勤引用-新建考勤字段
|
|
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());
|
|
};
|
|
|
|
//数据采集-考勤引用-启用/停用自定义字段
|
|
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());
|
|
};
|
|
|
|
//数据采集-考勤引用-考勤引用字段设置-列表
|
|
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());
|
|
};
|
|
|
|
//数据采集-考勤引用-考勤引用字段设置-保存
|
|
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());
|
|
};
|
|
//数据采集-考勤引用-考勤引用字段设置-恢复默认设置
|
|
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());
|
|
};
|
|
|
|
//数据采集-考勤引用-考勤引用字段设置-设为默认设置
|
|
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);
|
|
})
|
|
);
|
|
};
|
|
|
|
// 考勤导入预览
|
|
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());
|
|
};
|
|
|
|
// 考勤数据导入
|
|
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());
|
|
};
|
|
|
|
// 查看考勤详情
|
|
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());
|
|
};
|
|
|
|
// 根据所属月和账套获取周期
|
|
export const getSalaryCycleAndAttendCycle = (params) => {
|
|
return WeaTools.callApi(
|
|
"/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle",
|
|
"get",
|
|
params
|
|
);
|
|
};
|