|
@@ -405,7 +405,7 @@
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button type="success" @click="downDzFp(selectDzfpRow,selectDzfpTypeFlag,'1')">打印电子发票二维码</el-button>
|
|
|
- <el-button type="primary" @click="downDzFp(selectDzfpRow,selectDzfpTypeFlag,'0')">打印电子发票pdf文件</el-button>
|
|
|
+ <el-button type="primary" @click="downDzFp(selectDzfpRow,selectDzfpTypeFlag,'0')">下载电子发票pdf文件</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -1002,30 +1002,17 @@ const downDzFp = (row,typeFlag,type)=>{
|
|
|
downDzInvoice(row).then(res=>{
|
|
|
let LODOP = getLodop();
|
|
|
if(stringIsBlank(type) || type === '0'){
|
|
|
- // const link = document.createElement("a");
|
|
|
- // // 获取数据量
|
|
|
- // const blob = new Blob([base64ToArrayBuffer(res.pdfFileStr)]);
|
|
|
- // // 下载文件
|
|
|
- // const objectUrl = URL.createObjectURL(blob);
|
|
|
- // link.href = objectUrl;
|
|
|
- // var timestamp = Date.parse(new Date());
|
|
|
- // link.download = timestamp + ".pdf";
|
|
|
- // link.click();
|
|
|
- // URL.revokeObjectURL(objectUrl);
|
|
|
- // link.remove();
|
|
|
- let height = "175mm"
|
|
|
- let bkimgWidth = "110mm"
|
|
|
- LODOP.PRINT_INITA(6, 0, bkimgWidth, height, "泰和门诊电子发票二维码打印");
|
|
|
- //设置默认打印机
|
|
|
- LODOP.SET_PRINTER_INDEX(-1);
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_WIDTH", bkimgWidth);
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", height);
|
|
|
- LODOP.SET_PRINT_PAGESIZE(2,bkimgWidth, height, "CreateCustomPage");
|
|
|
- LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊电子发票二维码");//对新建的纸张重命名
|
|
|
- LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
|
|
|
- LODOP.ADD_PRINT_PDF(0,0,"100%","100%",res.pdfFileStr);
|
|
|
- LODOP.PRINT();
|
|
|
- // LODOP.PREVIEW();
|
|
|
+ const link = document.createElement("a");
|
|
|
+ // 获取数据量
|
|
|
+ const blob = new Blob([base64ToArrayBuffer(res.pdfFileStr)]);
|
|
|
+ // 下载文件
|
|
|
+ const objectUrl = URL.createObjectURL(blob);
|
|
|
+ link.href = objectUrl;
|
|
|
+ var timestamp = Date.parse(new Date());
|
|
|
+ link.download = timestamp + ".pdf";
|
|
|
+ link.click();
|
|
|
+ URL.revokeObjectURL(objectUrl);
|
|
|
+ link.remove();
|
|
|
}else {
|
|
|
//打印二维码
|
|
|
let height = "70mm"
|