|
@@ -8,6 +8,7 @@
|
|
|
<el-button type="primary" icon="RefreshLeft" @click="chongZhiData" >清空</el-button>
|
|
|
<el-button type="warning" icon="Money" @click="openPos" >智能POS工具包</el-button>
|
|
|
</div>
|
|
|
+ <!-- <div style="text-align:center;font-weight: 700;margin-top: 15px;height:100px;r:1px solid red" id="qrcode"></div> -->
|
|
|
<PatientBaseList ref="patientBaseListRef" :inOutFlag="1" @selectPatientInfo="selectPatient"></PatientBaseList>
|
|
|
</header>
|
|
|
<div class="layout_main">
|
|
@@ -133,12 +134,12 @@
|
|
|
<el-table :data="zyFpInfoList" style="width: 100%" height="180">
|
|
|
<el-table-column label="操作" width="240" >
|
|
|
<template #default="scope">
|
|
|
- <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='0'" icon="Printer" type="success" @click="selectPrintZyFp(scope.row)">打印</el-button>
|
|
|
+ <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Printer" type="success" @click="selectPrintZyFp(scope.row)"></el-button>
|
|
|
<el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Upload" title="上传电子发票" type="primary" @click="uploadZyFp(scope.row,3)"></el-button>
|
|
|
- <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载电子发票" type="primary" @click="openDzfp(scope.row,3)"></el-button>
|
|
|
-
|
|
|
+ <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载电子发票" type="primary" @click="downDzFp(scope.row)"></el-button>
|
|
|
+
|
|
|
<el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Delete" title="作废电子发票" type="danger" @click="uploadZyFp(scope.row,4)"></el-button>
|
|
|
- <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载已作废电子发票" type="danger" @click="downDzFp(scope.row,4,'0')"></el-button>
|
|
|
+ <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载已作废电子发票" type="danger" @click="downDzFp(scope.row)"></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column property="ledgerSn" label="账页" />
|
|
@@ -223,196 +224,34 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<PosTransaction ref="posTransactionRef"></PosTransaction>
|
|
|
- <el-dialog v-model="zyFpPrintVisible" title="发票打印" width="800" center>
|
|
|
- <div style="width: 100%;height: 60px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- 起始发票号: <span style="display: inline-block;width: 110px;background-color: #0f5e0f;text-align: center;color: #2eff00;font-size: 18px">{{settData.currentNoStr}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-checkbox v-model="printFlag">更新发票号</el-checkbox>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-button type="success" icon="Printer" @click="printZyFp">打印</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- <div id="zyFpId" style="width: 640px;">
|
|
|
- <div style="width: 640px;border: 1px white solid">
|
|
|
- <div id="headDiv">
|
|
|
- <p style="margin-left: 478px;margin-top: 40px">
|
|
|
- {{settData.currentNoStr}}
|
|
|
- </p>
|
|
|
- <p style="margin-left: 170px;margin-top: -10px;">
|
|
|
- {{printZyFpInfo.responceTypeName}}
|
|
|
- </p>
|
|
|
- <p style="margin-left: 165px;margin-top: -10px">
|
|
|
- 住院总费用:{{printZyFpInfo.totalCharge}},其中医保统筹支付:{{printZyFpInfo.ybTcZfJe}}元,
|
|
|
- </p>
|
|
|
- <p style="margin-left: 165px;margin-top: -10px">
|
|
|
- 个人自付金额{{printZyFpInfo.grZfJe}},个人账户支付{{printZyFpInfo.grZhZfJe}}元
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div style="height: 20px">
|
|
|
- <div style="margin-left: 40px">
|
|
|
- {{printZyFpInfo.name}}
|
|
|
- {{printZyFpInfo.sexName}} <span style="display: inline-block;width: 270px"></span>
|
|
|
- {{printZyFpInfo.wardName}} <span style="display: inline-block;width: 40px"></span>
|
|
|
- {{printZyFpInfo.inpatientNo}}
|
|
|
+ <el-dialog v-model="zyFpPrintVisible" title="发票打印" width="450" center>
|
|
|
+ <div style="width: 100%;clear: both;" ref="dzfphtml">
|
|
|
+ <div style="clear: both;">
|
|
|
+ <div style="font-size:15px;float:left;width: 50%;">
|
|
|
+ <div><svg id="barcode" height="20"></svg></div>
|
|
|
+ <div style="margin-left: 3px;margin-top: 15px;">患者姓名:{{ dzfpData.name }}</div>
|
|
|
+ <div style="margin-left: 3px;">结算金额:{{ dzfpData.fee }}</div>
|
|
|
+ <div style="margin-left: 3px;">票据号码:{{ dzfpData.fpNo }}</div>
|
|
|
+ <div style="margin-left: 3px;">票据代码:{{ dzfpData.fpCode }}</div>
|
|
|
+ <div style="margin-left: 3px;">发票日期:{{ dzfpData.fpDate }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="font-size:15px;float:left;width: 50%;">
|
|
|
+ <div style="text-align:center;font-weight: 700;font-size:24px;padding-top: -14px">沭阳铭和医院</div>
|
|
|
+ <div style="text-align:center;font-weight: 700;font-size:18px;margin-top: 5px;">电子发票信息</div>
|
|
|
+ <div style="text-align:center;font-weight: 700;font-size:14px;margin-top: 25px;">扫码下载电子票据</div>
|
|
|
+ <div style="text-align:center;font-weight: 700;margin-top: 15px;" id="qrcode"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="margin-left: 19px">
|
|
|
- {{getYeay(printZyFpInfo.startDate)}} <span style="display: inline-block;width: 25px"></span>
|
|
|
- {{getMoth(printZyFpInfo.startDate)}}<span style="display: inline-block;width: 29px"></span>
|
|
|
- {{getDay(printZyFpInfo.startDate)}}<span style="display: inline-block;width: 70px"></span>
|
|
|
- {{getYeay(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 25px"></span>
|
|
|
- {{getMoth(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 29px"></span>
|
|
|
- {{getDay(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 65px"></span>
|
|
|
- {{printZyFpInfo.zyTs}}<span style="display: inline-block;width: 65px"></span>
|
|
|
- {{getYeay(getFormatDatetime(new Date()))}}<span style="display: inline-block;width: 25px"></span>
|
|
|
- {{getMoth(getFormatDatetime(new Date()))}}<span style="display: inline-block;width: 29px"></span>
|
|
|
- {{getDay(getFormatDatetime(new Date()))}}
|
|
|
- </div>
|
|
|
- <div class="comH"></div>
|
|
|
- <div class=" comH comM">
|
|
|
- <span class=" spanW " v-if="printZyFpInfo.charge1 !==0">{{printZyFpInfo.charge1}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge9 !==0">{{printZyFpInfo.charge9}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge17 !==0">{{printZyFpInfo.charge17}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge25 !==0">{{printZyFpInfo.charge25}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge2 !==0">{{printZyFpInfo.charge2}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge10 !==0">{{printZyFpInfo.charge10}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge18 !==0">{{printZyFpInfo.charge18}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" v-if="printZyFpInfo.charge26 !==0">其他</span>
|
|
|
- <span v-else class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge26 !==0">{{printZyFpInfo.charge26}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.ysHjJe !==0">{{printZyFpInfo.ysHjJe}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge3 !==0">{{printZyFpInfo.charge3}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge11 !==0">{{printZyFpInfo.charge11}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge19 !==0">{{printZyFpInfo.charge19}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan " v-if="printZyFpInfo.charge27 !==0">材料费</span>
|
|
|
- <span v-else class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge27 !==0">{{printZyFpInfo.charge27}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge4 !==0">{{printZyFpInfo.charge4}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge12 !==0">{{printZyFpInfo.charge12}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge20 !==0">{{printZyFpInfo.charge20}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" v-if="printZyFpInfo.charge28 !==0">中成药</span>
|
|
|
- <span v-else class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge28 !==0">{{printZyFpInfo.charge28}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.bsHjJe !==0">{{printZyFpInfo.bsHjJe}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge5 !==0">{{printZyFpInfo.charge5}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge13 !==0">{{printZyFpInfo.charge13}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge21 !==0">{{printZyFpInfo.charge21}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" ></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge6 !==0">{{printZyFpInfo.charge6}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge14 !==0">{{printZyFpInfo.charge14}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge22 !==0">{{printZyFpInfo.charge22}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" ></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.tkHjJe !==0">{{printZyFpInfo.tkHjJe}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge7 !==0">{{printZyFpInfo.charge7}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge15 !==0">{{printZyFpInfo.charge15}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge23 !==0">{{printZyFpInfo.charge23}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" ></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class=" comH comM" >
|
|
|
- <span class=" spanW" v-if="printZyFpInfo.charge8 !==0">{{printZyFpInfo.charge8}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge16 !==0">{{printZyFpInfo.charge16}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" v-if="printZyFpInfo.charge24 !==0">{{printZyFpInfo.charge24}}</span>
|
|
|
- <span v-else class="spanW"></span>
|
|
|
- <span class="comSpan" ></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- <span class="comSpan"></span>
|
|
|
- <span class="spanW" ></span>
|
|
|
- </div>
|
|
|
- <div style="margin-left: 100px">
|
|
|
- 个人支付合计:{{printZyFpInfo.grZfHjJe}}<br/>
|
|
|
- {{printZyFpInfo.grZfHjJeChinese}}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
+ <el-button @click="printZyFpToLodop">打印</el-button>
|
|
|
<el-button @click="zyFpPrintVisible = false">取消</el-button>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
+ <!-- <el-dialog
|
|
|
v-model="dzfpVisible"
|
|
|
width="400"
|
|
|
title="下载电子发票"
|
|
@@ -424,7 +263,7 @@
|
|
|
<el-button type="primary" @click="downDzFp(selectDzfpRow,selectDzfpTypeFlag,'0')">下载电子发票pdf文件</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
</template>
|
|
|
|
|
|
<script setup >
|
|
@@ -456,6 +295,8 @@ import {getDateDiffToDay, getFormatDatetime} from "@/utils/date";
|
|
|
import router from "@/router";
|
|
|
import {queryHospitalName} from "@/api/zy-gl/zy-daily.js";
|
|
|
import {queryLastWindowsIpAddress} from "@/api/zy-gl/admission-registration.js";
|
|
|
+import JsBarcode from 'jsbarcode'
|
|
|
+import {qrcanvas} from 'qrcanvas'
|
|
|
|
|
|
const hospitalName = ref('')
|
|
|
const zyFpPrintVisible = ref(false)
|
|
@@ -472,6 +313,7 @@ const patientInfo = ref({
|
|
|
)
|
|
|
const printCode = ref(-1)
|
|
|
const dzfpVisible = ref(false)
|
|
|
+const dzfpSerialNo = ref(null)
|
|
|
const setShowFlag = ref(false)
|
|
|
const patientBaseListRef = ref(null)
|
|
|
const posTransactionRef = ref(null)
|
|
@@ -487,6 +329,18 @@ const settData = ref({
|
|
|
ssJe:0,
|
|
|
currentNoStr:'',
|
|
|
})
|
|
|
+// 结算数据
|
|
|
+const dzfpData = ref({
|
|
|
+ inpatientNo:'',
|
|
|
+ admissTimes:'',
|
|
|
+ fee:'',
|
|
|
+ name:'',
|
|
|
+ fpCode:'',
|
|
|
+ fpNo:'',
|
|
|
+ fpDate:'',
|
|
|
+ qrcode:'',
|
|
|
+})
|
|
|
+const dzfphtml = ref(null)
|
|
|
|
|
|
const openPos = ()=>{
|
|
|
posTransactionRef.value.openOuter()
|
|
@@ -598,12 +452,14 @@ const selectPatient =(val)=>{
|
|
|
if(fpVersion.value ==='0'){
|
|
|
queryCurrentNo({cashId:userIdCode.value}).then(res=>{
|
|
|
settData.value.currentNoStr = res.currentNoStr
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
// 查询账页信息
|
|
|
queryPatientZyLedgerFile(val).then(res=>{
|
|
|
zyInfoList.value = res
|
|
|
if( res.length > 0){
|
|
|
+ dzfpSerialNo.value=res[0].zySerialNo;
|
|
|
let index = getSettInfoIndex(res)
|
|
|
if(index === -1){
|
|
|
dealSettData(res[res.length-1].inpatientNo,res[res.length-1].admissTimes,res[res.length-1].ledgerSn)
|
|
@@ -731,6 +587,20 @@ onMounted(()=>{
|
|
|
queryLastWindowsIpAddress().then(res=>{
|
|
|
printCode.value = res.zyPrintIndex
|
|
|
})
|
|
|
+
|
|
|
+// setTimeout(()=>{
|
|
|
+// const labelCanvas = qrcanvas({
|
|
|
+// data: "http://einvoice.jsczt.cn/d/4730209e87b15674ba6",
|
|
|
+// size: 50,
|
|
|
+// })
|
|
|
+
|
|
|
+// let src = canvasToBase64(labelCanvas);
|
|
|
+
|
|
|
+// let wxPayQrCardHtml =`<img src="${src}" style="width: 100px;height: 100px"/><div style="width: 140px;margin-top: 2px;"></img>`;
|
|
|
+// console.log("dzfpData",wxPayQrCardHtml)
|
|
|
+// document.getElementById('qrcode').innerHTML = '';
|
|
|
+// document.getElementById('qrcode').innerHTML = wxPayQrCardHtml
|
|
|
+// },1000)
|
|
|
})
|
|
|
|
|
|
|
|
@@ -1000,11 +870,91 @@ const printZyFp = ()=>{
|
|
|
|
|
|
const printZyFpInfo = ref({})
|
|
|
const selectPrintZyFp = (row)=>{
|
|
|
- queryPrintZyFpData(row).then(res=>{
|
|
|
- zyFpPrintVisible.value = true
|
|
|
- printZyFpInfo.value = res
|
|
|
+ console.log("dzfpData",row)
|
|
|
+ zyFpPrintVisible.value = true
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ inpatientNo:row.inpatientNo,
|
|
|
+ admissTimes:row.admissTimes,
|
|
|
+ // serialNo:dzfpSerialNo.value
|
|
|
+ }
|
|
|
+ selectDzfpUploadAboutSerialNo(params).then(res=>{
|
|
|
+ // console.log("row",JSON.stringify(res))
|
|
|
+ if(res.res_url){
|
|
|
+ dzfpData.value={
|
|
|
+ inpatientNo:row.inpatientNo,
|
|
|
+ admissTimes:row.admissTimes,
|
|
|
+ name:patientInfo.value.name,
|
|
|
+ fee:row.totalCharge,
|
|
|
+ fpCode:res.op_code,
|
|
|
+ fpNo:res.fp_no,
|
|
|
+ fpDate:res.blue_issue_date,
|
|
|
+ qrcode:res.res_url
|
|
|
+ }
|
|
|
+ JsBarcode('#barcode',row.inpatientNo, {
|
|
|
+ renderer: "svg",
|
|
|
+ lineColor: '#000000', //线条颜色
|
|
|
+ width: 1, //线宽
|
|
|
+ height: 30, //条码高度
|
|
|
+ displayValue: true, //是否显示文字信息
|
|
|
+ fontSize: 18,
|
|
|
+ });
|
|
|
+ const labelCanvas = qrcanvas({
|
|
|
+ data: dzfpData.value.res_url,
|
|
|
+ size: 50,
|
|
|
+ })
|
|
|
+
|
|
|
+ let src = canvasToBase64(labelCanvas);
|
|
|
+
|
|
|
+ let wxPayQrCardHtml =`<img src="${src}" style="width: 100px;height: 100px"/><div style="width: 140px;margin-top: 2px;"></img>`;
|
|
|
+ console.log("dzfpData",wxPayQrCardHtml)
|
|
|
+ document.getElementById('qrcode').innerHTML = '';
|
|
|
+ document.getElementById('qrcode').innerHTML = wxPayQrCardHtml
|
|
|
+ // console.log("dzfpData",dzfpData.value)
|
|
|
+ // printZyFpToLodop()
|
|
|
+
|
|
|
+ } else {
|
|
|
+ ElMessage.error("未获取到电子发票,请重新上传发票!");
|
|
|
+ }
|
|
|
+ dzfpVisible.value = false
|
|
|
})
|
|
|
}
|
|
|
+const printZyFpToLodop = ()=>{
|
|
|
+ console.log("dzfpData",dzfphtml.value.innerHTML)
|
|
|
+ zyFpPrintVisible.value = false
|
|
|
+ let LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INIT("检查检验申请单");
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, "148mm", "210mm", "");
|
|
|
+ LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width");
|
|
|
+ LODOP.SET_PRINT_MODE("PRINT_START_PAGE", 1);
|
|
|
+ LODOP.SET_PRINT_MODE("PRINT_END_PAGE", 1);
|
|
|
+ LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', dzfphtml.value.innerHTML)
|
|
|
+ // LODOP.ADD_PRINT_HTM("1mm", "1mm", "100%", "100%", dzfphtml.value);
|
|
|
+ LODOP.PREVIEW();
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const canvasToBase64=(canvas, type = 'image/png', quality = 0.92)=> {
|
|
|
+ try {
|
|
|
+ // 检查是否是有效的canvas元素
|
|
|
+ if (!(canvas instanceof HTMLCanvasElement)) {
|
|
|
+ throw new Error('传入的不是Canvas元素');
|
|
|
+ }
|
|
|
+
|
|
|
+ // toDataURL()方法参数:
|
|
|
+ // 第一个参数是图像格式,默认为'image/png'
|
|
|
+ // 第二个参数是质量,仅对'image/jpeg'和'image/webp'有效,范围0-1
|
|
|
+ const base64String = canvas.toDataURL(type, quality);
|
|
|
+
|
|
|
+ // 如果需要纯Base64字符串(去掉dataURL前缀),可以这样处理:
|
|
|
+ // const pureBase64 = base64String.split(',')[1];
|
|
|
+
|
|
|
+ return base64String;
|
|
|
+ } catch (error) {
|
|
|
+ console.error('转换Canvas到Base64失败:', error);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
const selectDzfpRow = ref({})
|
|
|
const selectDzfpTypeFlag = ref(null)
|
|
@@ -1036,9 +986,9 @@ const clearSelectDzfp = ()=>{
|
|
|
selectDzfpTypeFlag.value = null
|
|
|
}
|
|
|
|
|
|
-const downDzFp = (row,typeFlag,type)=>{
|
|
|
+const downDzFp = (row)=>{
|
|
|
|
|
|
- row['typeFlag'] = typeFlag
|
|
|
+ console.log("downDzFp",row)
|
|
|
let params = {
|
|
|
inpatientNo:row.inpatientNo,
|
|
|
admissTimes:row.admissTimes
|
|
@@ -1050,40 +1000,6 @@ const downDzFp = (row,typeFlag,type)=>{
|
|
|
} else {
|
|
|
ElMessage.error("未获取到电子发票,请重新上传发票!");
|
|
|
}
|
|
|
- // let LODOP = getLodop();
|
|
|
- // if(stringIsBlank(type) || type === '0'){
|
|
|
- // const link = document.createElement("a");
|
|
|
- // // 获取数据量
|
|
|
- // const blob = new Blob([base64ToArrayBuffer(res.fpInfo.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 = "93mm"
|
|
|
- // let bkimgWidth = "80mm"
|
|
|
- // LODOP.PRINT_INITA(6, 0, bkimgWidth, height, "泰和住院电子发票二维码打印");
|
|
|
- // //设置默认打印机
|
|
|
- // LODOP.SET_PRINTER_INDEX(printCode.value);
|
|
|
- // LODOP.SET_SHOW_MODE("BKIMG_WIDTH", bkimgWidth);
|
|
|
- // LODOP.SET_PRINT_PAGESIZE(3,bkimgWidth, height, "CreateCustomPage");
|
|
|
- // LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "住院电子发票二维码");//对新建的纸张重命名
|
|
|
- // LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
|
|
|
- // LODOP.ADD_PRINT_TEXT("1mm", "6mm", "80mm", "3mm", hospitalName.value+"住院电子发票凭证");
|
|
|
- // LODOP.ADD_PRINT_TEXT("7mm", "3mm", "35mm", "3mm", "姓名:"+res.zyReceipt.name);
|
|
|
- // LODOP.ADD_PRINT_TEXT("7mm", "37mm", "40mm", "3mm", "住院号:"+res.zyReceipt.inpatientNo);
|
|
|
- // LODOP.ADD_PRINT_TEXT("13mm", "3mm", "75mm", "3mm", "科别:"+res.zyReceipt.wardName);
|
|
|
- // LODOP.ADD_PRINT_TEXT("19mm", "3mm", "75mm", "3mm", "住院总费用:"+res.zyReceipt.totalCharge);
|
|
|
- // LODOP.ADD_PRINT_TEXT("25mm", "3mm", "80mm", "3mm", hospitalName.value+"住院发票二维码");
|
|
|
- // LODOP.ADD_PRINT_IMAGE("31mm", "3mm", "60mm", "60mm", "data:image/png;base64,"+res.fpInfo.qrcode);
|
|
|
- // LODOP.PRINT();
|
|
|
- // // LODOP.PREVIEW();
|
|
|
- // }
|
|
|
dzfpVisible.value = false
|
|
|
})
|
|
|
}
|