import axios from "@/utils/request"


export function orderPage(query) {
  return axios({
    url: "/udiwms/basic/collect/order/filter",
    method: "post",
    data: query
  });
}

export function findByBill(query) {
  return axios({
    url: "/udiwms/basic/collect/order/findByBill",
    method: "get",
    params: query
  });
}

export function getNextOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/order/next",
    method: "get",
    params: query
  });
}

export function getCurOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/order/current",
    method: "get",
    params: query
  });
}


export function orderDetail(query) {
  return axios({
    url: "/udiwms/basic/collect/order/detail",
    method: "get",
    params: query
  });
}

export function allDetail(query) {
  return axios({
    url: "/udiwms/basic/collect/order/allDetail",
    method: "get",
    params: query
  });
}


export function deleteByOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/order/deleteOrder",
    method: "post",
    data: query
  });
}

export function deleteOriginOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/order/deleteOriginOrder",
    method: "post",
    data: query
  });
}


/**
 * 手动扫码明细
 * @param query
 * @returns {AxiosPromise}
 */
export function manualCodeDetail(query) {
  return axios({
    url: "/udiwms/ioSplit/collect/manual/code/list",
    method: "get",
    params: query
  });
}

/**
 * 自动扫码明细
 * @param query
 * @returns {AxiosPromise}
 */
export function autoCodeDetail(query) {
  return axios({
    url: "/udiwms/ioSplit/collect/auto/order/filter",
    method: "get",
    params: query
  });
}

/**
 * 自动扫码明细
 * @param query
 * @returns {AxiosPromise}
 */
export function autoCodeResult(query) {
  return axios({
    url: "/udiwms/ioSplit/collect/auto/order/result",
    method: "get",
    params: query
  });
}

/**
 * 删除或减扫码明细
 * @param query
 * @returns {AxiosPromise}
 */
export function codeRemove(query) {
  return axios({
    url: "/udiwms/ioSplit/collect/code/remove",
    method: "post",
    data: query
  });
}


export function bindWork(query) {
  return axios({
    url: "/udiwms/basic/collect/order/bindWork",
    method: "post",
    data: query
  });
}


export function updateBiz(query) {
  return axios({
    url: "/udiwms/basic/collect/order/biz/save",
    method: "post",
    data: query
  });
}


export function importOrder(query) {
  return axios({
    url: "/udiwms/collect/order/import",
    method: "get",
    params: query
  });
}

export function clearAllOrder(query) {
  return axios({
    url: "/udiwms/collect/order/clearAll",
    method: "get",
    params: query
  });
}

export function orderTop(query) {
  return axios({
    url: "/udiwms/basic/collect/order/orderTop",
    method: "post",
    data: query
  });
}


export function getSplitCode(query) {
  return axios({
    url: "/udiwms/ioSplit/collect/auto/code/filter",
    method: "get",
    params: query
  });
}


export function downloadOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/origin/order/download",
    method: "post",
    data: query
  });
}


export function getThrOrderPage(query) {
  return axios({
    url: "/udiwms/basic/collect/origin/order/getThrOrderPage",
    method: "post",
    data: query
  });
}

export function orderUpload(query) {
  return axios({
    url: "/udiwms/basic/collect/order/upload",
    method: "post",
    data: query
  });
}


export function errorHandle(query) {
  return axios({
    url: "/udiwms/basic/collect/origin/order/errorHandle",
    method: "post",
    data: query
  });
}


export function errorHandleSubmit(query) {
  return axios({
    url: "/udiwms/basic/collect/origin/order/errorHandleSubmit",
    method: "post",
    data: query
  });
}


//已完成单
export function orderFinish(query) {
  return axios({
    url: "/udiwms/basic/collect/orderFinish/filter",
    method: "get",
    params: query
  });
}

//已完成单明细
export function getDetail(query) {
  return axios({
    url: "/udiwms/basic/collect/orderFinish/detail",
    method: "get",
    params: query
  });
}

export function findFromCorp(query) {
  return axios({
    url: "/udiwms/basic/collect/fromCorp",
    method: "post",
    data: query
  });
}


export function decideOrder(query) {
  return axios({
    url: "/udiwms/basic/collect/decideOrder",
    method: "post",
    data: query
  });
}



