import { WeaTools } from "ecCom";
import { postExportFetch, postFetch } from "../util/request";

//获取薪资档案各tab的人数
export const queryTabTotal = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/queryTabTotal", "GET", params);
};
//待定薪列表
export const queryList = ({ url, ...params }) => {
  return postFetch(url, params);
};
// 导入档案
export const importSalaryArchive = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params);
};
// 薪资档案预览
export const salaryArchivePreview = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params);
};
// 公共枚举接口
export const commonEnumList = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
};
// 获取导入类型
export const getImportTypes = () => {
  return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {});
};
// 发起调薪地址
export const salaryAdjustmentInfo = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params);
};
// 停薪
export const stopSalary = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params);
};
// 一键全部设为定薪员工
export const allGotoFixed = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoFixed", params);
};
// 设为定薪员工
export const gotoFixed = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/gotoFixed", params);
};
// 停薪
export const gotoStop = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/gotoStop", params);
};
//全部停薪
export const allGotoStop = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoStop", params);
};
// 取消停薪
export const cancelStop = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/cancelStop", params);
};
// 保存发薪设置
export const savePaySet = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/savePaySet", params);
};
// 待定薪删除待办
export const deletePendingTodo = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/deletePendingTodo", params);
};
// 待停薪删除待办
export const deleteSuspendTodo = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo", params);
};
// 待定薪、停薪员工 是否允许删除薪资档案
export const salaryArchiveDelete = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete", "GET", params);
};
// 删除薪资档案
export const deleteSalaryArchive = (params) => {
  return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive", params);
};
// 数据透视列表导出
export const exportDataPerspective = (params) => {
  return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportDataPerspective", params);
};
