import axios from '@/utils/request'


export function printSplitLabel(query) {
  return axios({
    url: "/udiwms/split/label/print",
    method: "post",
    data: query,
    headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
    responseType: 'arraybuffer',   //一定要设置响应类型，否则页面会是空白pdf
  });
}


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

export function startSplit(query) {
  return axios({
    url: "/udiwms/ioSplit/material/order/split",
    method: "post",
    data: query
  });
}


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

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


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

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


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



