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/";

interface postType extends Promise<any> {
  data?: object;
  code?: number;
  message?: string;
}

//销售订单发票票面
export const httpSaleInvoice = (data?: object): postType => {
  return http.request("post", `${yewuApi}orderticket`, { data });
};

//采购单回票发票票面信息
export const httpPurchaseInvoice = (data?: object): postType => {
  return http.request("post", `${yewuApi}cgdticket`, { data });
};
