import axios from '@/utils/request'

export function getResultDetailList(params) {
  return axios({
    url: "/udiwms/inout/resultDetail/filterList",
    method: "get",
    params: params
  });
}

export function getResultOrderList(params) {
  return axios({
    url: "/udiwms/inout/resultDetail/filterOrderList",
    method: "get",
    params: params
  });
}

export function verifyTemplateFile(data) {
  return axios({
    url: "/udiwms/pdf/template/order/result/file",
    method: "post",
    data: data
  });
}

export function verifyTemplateFileLabel(data) {
  return axios({
    url: "/udiwms/pdf/templateLabel/order/result/file",
    method: "post",
    data: data
  });
}

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


export function excelInoutImport(params) {
  return axios({
    url: "/udiwms/inout/resultDetail/exportExcel",
    method: "get",
    responseType: 'blob',
    params: params
  });
}

export function postExcelInoutImport(data) {
  return axios({
    url: "/udiwms/inout/resultDetail/selectExportExcel",
    method: "post",
    responseType: 'blob',
    data: data
  });
}
