报表打印代码提交

ywj_dev
郑明梁 2 years ago
parent e238d7d2c3
commit 4306c4de41

@ -192,7 +192,7 @@
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="160" fixed="right">
<el-table-column label="操作" width="250" fixed="right">
<template slot-scope="scope">
<el-button
@ -202,6 +202,13 @@
>打印
</el-button
>
<el-button
type="text"
size="small"
@click.native="printOrderDetailPDF(scope.row)"
>报表打印
</el-button
>
<el-button
type="text"
size="small"
@ -573,7 +580,11 @@ import {getBizDetailList} from "@/api/inout/orderDetailBiz";
import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code";
import AcceptOrder from "@/views/inout/DialogReviewOrder";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {
inspectionOrderPDFFromStatemenTemplateFile,
inspectionOrderPDFFromTemplateFile, orderPDFFromStatemenTemplateFile,
orderPDFFromTemplateFile
} from '@/api/itextpdf/orderPrint'
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { previewImage } from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -873,6 +884,36 @@ export default {
.catch(() => {
});
},
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;
});
},
findMethod(key) {
this.corpLoading = true;

@ -175,13 +175,13 @@
>打印
</el-button
>
<el-button
type="text"
size="small"
@click.native="printOrderDetailPDF(scope.row)"
>报表打印
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native="printOrderDetailPDF(scope.row)"-->
<!-- >报表打印-->
<!-- </el-button-->
<!-- >-->
<el-button
type="text"
size="small"

@ -150,7 +150,7 @@
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@ -159,14 +159,13 @@
>打印
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.status == 10"-->
<!-- @click.native.stop="reviewOrder(scope.row)"-->
<!-- >审核-->
<!-- </el-button-->
<!-- >-->
<el-button
type="text"
size="small"
@click.native="printOrderDetailPDF(scope.row)"
>报表打印
</el-button
>
<el-button
type="text"
size="small"
@ -464,7 +463,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 {getDeptListByUser} from "@/api/auth/authDept";
import DialogCheck from "@/views/inout/DialogCheck";
@ -782,6 +785,36 @@ export default {
this.total = 0;
});
},
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;
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.billNo = data.billNo;

Loading…
Cancel
Save