修改资质维护bug

ywj_dev
郑明梁 2 years ago
parent 59c1c07b06
commit e238d7d2c3

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

@ -175,6 +175,13 @@
>打印
</el-button
>
<el-button
type="text"
size="small"
@click.native="printOrderDetailPDF(scope.row)"
>报表打印
</el-button
>
<el-button
type="text"
size="small"
@ -477,7 +484,11 @@ import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getResultDetailList} from "@/api/inout/orderDetailResult";
import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {
inspectionOrderPDFFromStatemenTemplateFile,
inspectionOrderPDFFromTemplateFile, orderPDFFromStatemenTemplateFile,
orderPDFFromTemplateFile
} from '@/api/itextpdf/orderPrint'
import AcceptOrder from "@/views/inout/DialogReviewOrder";
import DialogCheck from "@/views/inout/DialogCheck";
@ -975,6 +986,37 @@ export default {
this.loading = false;
});
},
printOrderDetailPDF(row) {
let tQuery = {
labelId: 5,
orderIdFk: row.billNo
};
this.loading = true;
inspectionOrderPDFFromStatemenTemplateFile(tQuery).then((response) => {
if (response.code === 20000) {
orderPDFFromStatemenTemplateFile(tQuery).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
this.getOrderQRCodeTextList();
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
},
onResultReset() {
this.resultQuery = {
orderId: null,

Loading…
Cancel
Save