import axios from "@/utils/request";

export function stockComparePage(params) {
  return axios({
    url: "/udiwms/stockCompare/page",
    method: "POST",
    data: params
  });
}

export function selectInvProductDetail(params) {
  return axios({
    url: "/udiwms/stockCompare/selectInvProductDetail",
    method: "POST",
    data: params
  });
}


export function stockCompareSave(params) {
  return axios({
    url: "/udiwms/stockCompare/save",
    method: "POST",
    data: params
  });
}

export function stockCompareDelete(compareId) {
  return axios({
    url: `/udiwms/stockCompare/delete/${compareId}`,
    method: "DELETE",
  });
}

export function stockCompareAddProduct(params) {
  return axios({
    url: "/udiwms/stockCompare/addProduct",
    method: "POST",
    data: params
  });
}

export function stockCompareDetailPage(params) {
  return axios({
    url: "/udiwms/stockCompare/detail/page",
    method: "POST",
    data: params
  });
}

export function stockCompareResultPage(params) {
  return axios({
    url: "/udiwms/stockCompare/detail/result",
    method: "POST",
    data: params
  });
}

export function dlThrCpProduct(params) {
  return axios({
    url: "/udiwms/stockCompare/addThrProduct",
    method: "POST",
    data: params
  });
}


export function stockCompareDetailDel(params) {
  return axios({
    url: "/udiwms/stockCompare/detail/del",
    method: "DELETE",
    data: params
  });
}

export function uploadCompare(compareId) {
  return axios({
    url: `/udiwms/stockCompare/compare/${compareId}`,
    method: "POST",
  });
}




export function compareExportExcel(data) {
  return axios({
    url: "/udiwms/stockCompare/compare/exportExcel",
    method: "post",
    responseType: 'blob',
    data: data
  });
}
