import { http } from "/@/utils/http";
import { loadEnv } from "@build/index";
const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
const userAPi = VITE_PROXY_DOMAIN_REAL;
const yewuApi = VITE_PROXY_USER_REAL + "/admin/";

export const httpList = (data: object): any => {
  return http.request("post", `${yewuApi}paylist`, { data });
};

//对账单详情
export const httpDetail = (data: object): any => {
  return http.request("post", `${yewuApi}payinfo`, { data });
};

export const httpInfo = (data: object): any => {
  return http.request("post", `${yewuApi}payinfo`, { data });
};

//采购单列表
export const httpCgdList = (data: object = {}): any => {
  return http.request("post", `${yewuApi}cgdlist`, { data });
};

//创建对账单
export const httpAdd = (data: object = {}): any => {
  return http.request("post", `${yewuApi}payadd`, { data });
};

//对账单编辑
export const httpUpadte = (data: object = {}): any => {
  return http.request("post", `${yewuApi}paysave`, { data });
};

//对账单审核
export const httpStatus = (data: object): any => {
  return http.request("post", `${yewuApi}paystatus`, { data });
};

//对账单删除
export const httpDel = (data: object): any => {
  return http.request("post", `${yewuApi}paydel`, { data });
};

export const httpBatch = (data: object): any => {
  return http.request("post", `${yewuApi}cgdquery`, { data });
};
