import axios from "@/utils/request";

export function changeOrderPage(query) {
  return axios(
    {
      url: "/udi/device/changeOrder/page",
      method: "POST",
      data: query
    }
  )
}

export function saveChangeOrder(query) {
  return axios(
    {
      url: "/udi/device/changeOrder/save",
      method: "POST",
      data: query
    }
  )
}

export function changeOrderDetailByUser(query) {
  return axios(
    {
      url: "/udi/device/changeOrder/detailByUser",
      method: "POST",
      data: query
    }
  )
}

export function cancelChangeOrder(orderId, query) {
  return axios(
    {
      url: `/udi/device/changeOrder/cancel/${orderId}`,
      method: "GET",
      params: query
    }
  )
}

export function confirmChangeOrder(orderId, query) {
  return axios(
    {
      url: `/udi/device/changeOrder/confirm/${orderId}`,
      method: "GET",
      params: query
    }
  )
}

export function rejectChangeOrder(orderId, query) {
  return axios(
    {
      url: `/udi/device/changeOrder/reject/${orderId}`,
      method: "GET",
      params: query
    }
  )
}
