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

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

//销售订单列表
export const httpList = (data: any): any => { return http.request("post", `${yewuApi}orderlist`, { data });};
//详情
export const httpDetail = (data: object): ResponseType => { return http.request("post", `${yewuApi}saleinfo`, { data }); };

export const httpChildDetail = (data: object): ResponseType => { return http.request("post", `${VITE_PURCHASE_REAL}/admin/getCombind`, { data }); };



const newApi = VITE_WORKORDER_REAL
//标签操作记录
export const httpRecord = (data: object): ResponseType =>  http.request("post", newApi +  `cxinv/label/list`, { data });
