/*
 * @Date: 2024-05-10 16:29:07
 * @LastEditors: 陈禹琨 chenyukun@prolog-int.com
 * @LastEditTime: 2024-07-11 09:18:29
 * @FilePath: /upcloud-wms-qingniu-web/src/views/kzyWMS/home/api/index.js
 * @Description: cyk
 */
import { axios } from "@/utils/request";
import { SERVICE_DATA_API_BASE } from "@/config/serviceSettings";

const baseUrl = SERVICE_DATA_API_BASE;
// 顶部卡片数据
export const getHeaderData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "home_page_orderCnt",
  });
};
// 卡片数据查询
export const getCardData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "home_page_in_info",
  });
};
// 入库柱状图查询服务
export const getInBoundBarData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "home_page_in_billInfo",
  });
};
// 出库柱状图查询服务
export const getOutBoundBarData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "home_page_outTask",
  });
};
// 库存总数查询
export const getTotalStockPieData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "home_page_lot",
  });
};
// 出库条目数饼图
export const getOutBoundPieData = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "hoem_page_taskD",
  });
};
//待审批任务数
export const getPendingTaskCount = (data = {}) => {
  return axios.post(baseUrl + "/search", {
    params: { ...data },
    num: "INDEX_APPROVAL_FLOW",
  });
};
