You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-vue/src/api/itextpdf/orderPrint.js

23 lines
576 B
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import axios from "@/utils/request";
//---------打印订单
export function inspectionOrderPDFFromTemplateFile(query) {
return axios({
url: "/udiwms/pdf/template/inspection/order/file",
method: "post",
data: query,
});
}
export function orderPDFFromTemplateFile(query) {
return axios({
url: "/udiwms/pdf/template/order/file",
method: "post",
data: query,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}