/*
 * Author: 黎永顺
 * Description:
 * Date: 2022-06-07 09:52:01
 * LastEditTime: 2022-06-15 13:06:02
 */
import { WeaTools } from "ecCom";

/**
 * name:获取编号设置
 * param {*} params  serialtype， SUBCOMPANY：分部
 * return {*}
 */
export const getCodeSetting = (params) => {
  return WeaTools.callApi("/api/hrm/codeSetting/getCodeSetting", "GET", params);
};

/**
 * name: 保存编号设置
 * param {*} params
 * return {*}
 */
export const saveOrUpdateCodeSetting = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/saveOrUpdateCodeSetting",
    "POST",
    params
  );
};
/**
 * name: 保存起始编号设置
 * param {*} params
 * return {*}
 */
export const saveStartNum = (params) => {
  return WeaTools.callApi("/api/hrm/codeSetting/saveStartNum", "POST", params);
};

/**
 * name: 起始编号设置
 * param {*} params
 * return {*}
 */
export const getStartNumForm = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/getStartNumForm",
    "GET",
    params
  );
};

/**
 * name: 高级搜索条件
 * param {*} params
 * return {*}
 */
 export const getAdvanceSearchCondition = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/getAdvanceSearchCondition",
    "GET",
    params
  );
};

/**
 * name: 预留编号设置列表查询
 * param {*} params
 * return {*}
 */
export const getSearchReservedCodeList = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/getSearchReservedCodeList",
    "POST",
    params
  );
};

/**
 * name: 保存预留编号设置
 * param {*} params
 * return {*}
 */
export const saveReservedCode = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/saveReservedCode",
    "POST",
    params
  );
};

/**
 * name: 新增预留编号表单查询
 * param {*} params
 * return {*}
 */
export const getReservedCodeFrom = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/getReservedCodeFrom",
    "GET",
    params
  );
};

/**
 * name: 删除预留编号
 * param {*} params
 * return {*}
 */
export const deleteReservedCodeById = (params) => {
  return WeaTools.callApi(
    "/api/hrm/codeSetting/deleteReservedCodeById",
    "POST",
    params
  );
};