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

//浮动薪酬项目列表
export const getVariableSalaryItemList = params => {
  return postFetch("/api/bs/hrmsalary/variableSalaryItem/listPage", params);
};
//删除浮动薪酬项目
export const deleteVariableSalaryItem = params => {
  return postFetch("/api/bs/hrmsalary/variableSalaryItem/delete", params);
};
//获取浮动薪酬项目详情
export const getVariableSalaryItemDetail = params => {
  return postFetch("/api/bs/hrmsalary/variableSalaryItem/getDetail", params);
};
//保存/更新 浮动薪酬项目
export const saveVariableSalaryItem = params => {
  return postFetch("/api/bs/hrmsalary/variableSalaryItem/save", params);
};

//创建浮动薪酬档案时获取项目信息
export const getCreateForm = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/getCreateForm", params);
};
//创建浮动薪酬档案
export const createVariableSalary = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/createData", params);
};
//创建浮动薪酬档案
export const getVariableSalaryList = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/list", params);
};
//导入浮动薪酬档案
export const importVariableSalary = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/importData", params);
};
//删除浮动薪酬档案
export const deleteVariableSalary = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/deleteSelectData", params);
};
//获取浮动薪酬档案明细
export const getVariableSalaryDetail = params => {
  return postFetch("/api/bs/hrmsalary/variableSalary/getDetail", params);
};
// 获取当前管理员下的所有的个税扣缴义务人
export const getAdminTaxAgentList = () => {
  return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare: false });
};
// 浮动薪酬档案导出
export const exportVariableSalary = (params) => {
  return postExportFetch("/api/bs/hrmsalary/variableSalary/export", params);
};

