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

const newApi = VITE_WORKORDER_REAL

//发票回票列表
export const httpList = (data: object): any => {
  return http.request("post", `${newApi}cxinv/payinv/backlist`, { data });
};

//发票回票添加
export const httpAdd = (data: object): any => {
  return http.request("post", `${newApi}cxinv/payinv/back`, { data });
};

//发票回票审核状态
export const httpStatus = (data: object): any => {
  return http.request("post", `${newApi}cxinv/payinv/backstatus`, { data });
};

//发票回票详情
export const httpInfo = (data: object): any => {
  return http.request("post", `${newApi}cxinv/payinv/backinfo`, { data });
};

export const httpDetail = (data: object): any => {
  return http.request("post", `${newApi}cxinv/payinv/info`, { data });
};

//发票回票删除
export const httpDelete = (data: object): any => {
  return http.request("post", `${yewuApi}invdel`, { data });
};
