Parcourir la source

打印门诊结算单

hurugang il y a 3 ans
Parent
commit
c1d46882bf

+ 23 - 1
src/main/resources/static/css/toll_administration.css

@@ -67,4 +67,26 @@
 /*!*滚动条里面可以拖动的那部分移入效果*!*/
 /**::-webkit-scrollbar-thumb:hover{*/
 /*background-color: #A8A8A8;*/
-/*}*/
+/*}*/
+
+
+.container {
+    /* To position the loading */
+    position: relative;
+}
+
+.loading {
+    /* Absolute position */
+    left: 0;
+    position: absolute;
+    top: 0;
+
+    /* Take full size */
+    height: 100%;
+    width: 100%;
+
+    /* Center */
+    align-items: center;
+    display: flex;
+    justify-content: center;
+}

+ 47 - 47
src/main/resources/static/js/mz/toll_administration.js

@@ -5,7 +5,7 @@ var printIndex = -1;
 //选中的要退的费用收费编码
 var chargeItemCodes = null;
 //门诊结算单地址
-var mzjsdHost=null;
+var mzjsdHost = null;
 $(function () {
     //默认光标在卡号输入框
     $("#cardNo").focus();
@@ -69,7 +69,7 @@ $(function () {
                 window.location.href = '/thmz/login/view'
                 return;
             }
-            mzjsdHost=res.data;
+            mzjsdHost = res.data;
         }
     });
 
@@ -413,7 +413,7 @@ function initFeeTable() {
                                 str += '<button type="button" class="registration-no-color-foot-button" title="合作项目维护" onclick="matchProject(\'' + row.realNo + '\');"><i class="fa fa-plug"></i></button>';
                             }
                         }
-                        if(row.countYbZf>0){
+                        if (row.countYbZf > 0) {
                             str += '<button type="button" class="registration-no-color-foot-button" title="打印医保结算单" onclick="printYbjsd(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');"><i class="fa fa-file-word-o"></i></button>';
                         }
                         return str;
@@ -587,7 +587,7 @@ function initChargeDetailTablePublic(url, obj, params) {
         sidePagination: "client",           //分页方式:client客户端分页,server服务端分页(*)
         pageNumber: 1,                       //初始化加载第一页,默认第一页
         pageSize: 5,                       //每页的记录行数(*)
-        pageList: [5,10, 25, 50, 100],        //可供选择的每页的行数(*)
+        pageList: [5, 10, 25, 50, 100],        //可供选择的每页的行数(*)
         search: false,                       //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
         strictSearch: true,
         showColumns: false,                  //是否显示所有的列
@@ -843,9 +843,9 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
         $("#projectDiv").removeClass("in").addClass("hide");
     }
     var payTypeList = $("#payType").children();
-    if(payTypeList.length==1){
+    if (payTypeList.length == 1) {
         $('#payType').selectpicker('val', 'Y');
-    }else {
+    } else {
         $('#payType').selectpicker('val', 1);
     }
     $('#payType').selectpicker('refresh');
@@ -869,34 +869,34 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
     //医保报销金额
     var fundPay = $("#fundPay").val();
     //个人账户支付金额
-    var acctPay=$("#acctPay").val();
+    var acctPay = $("#acctPay").val();
     //医保卡类型
-    var cardType=$("#cardType").val();
-    var payTypeIndex=0;
+    var cardType = $("#cardType").val();
+    var payTypeIndex = 0;
     if (fundPay > 0) {
-        var payTypeId = "payType_"+payTypeIndex++;
+        var payTypeId = "payType_" + payTypeIndex++;
         addPayType(payTypeId);
-        $('#'+payTypeId).selectpicker('val', 2);
-        $('#'+payTypeId).selectpicker('refresh');
-        $('#'+payTypeId).parent().parent().next().children(':first').val(fundPay);
-        $('#'+payTypeId).parent().parent().next().next().children(':first').remove();
-        $('#'+payTypeId).attr("disabled", true);
-        $('#'+payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
+        $('#' + payTypeId).selectpicker('val', 2);
+        $('#' + payTypeId).selectpicker('refresh');
+        $('#' + payTypeId).parent().parent().next().children(':first').val(fundPay);
+        $('#' + payTypeId).parent().parent().next().next().children(':first').remove();
+        $('#' + payTypeId).attr("disabled", true);
+        $('#' + payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
         //payTypeIndex++;
     }
     if (acctPay > 0) {
-        var payTypeId = "payType_"+payTypeIndex++;
+        var payTypeId = "payType_" + payTypeIndex++;
         addPayType(payTypeId);
-        var ybkType=6;
-        if(cardType!=null && (cardType==2 || cardType=="2")){
-            ybkType=7;
+        var ybkType = 6;
+        if (cardType != null && (cardType == 2 || cardType == "2")) {
+            ybkType = 7;
         }
-        $('#'+payTypeId).selectpicker('val', ybkType);
-        $('#'+payTypeId).selectpicker('refresh');
-        $('#'+payTypeId).parent().parent().next().children(':first').val(acctPay);
-        $('#'+payTypeId).parent().parent().next().next().children(':first').remove();
-        $('#'+payTypeId).attr("disabled", true);
-        $('#'+payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
+        $('#' + payTypeId).selectpicker('val', ybkType);
+        $('#' + payTypeId).selectpicker('refresh');
+        $('#' + payTypeId).parent().parent().next().children(':first').val(acctPay);
+        $('#' + payTypeId).parent().parent().next().next().children(':first').remove();
+        $('#' + payTypeId).attr("disabled", true);
+        $('#' + payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
     }
     //总金额减医保报销
     var realMoney = Minus(data, fundPay);
@@ -909,9 +909,9 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
         //默认光标在现金输入框
         $("#cash").focus();
     }, 800);
-    if(payTypeList.length==1){
+    if (payTypeList.length == 1) {
         $('#payType').selectpicker('val', 'Y');
-    }else {
+    } else {
         $('#payType').selectpicker('val', 1);
     }
     $("#changeAmount").val(0.0);
@@ -1003,9 +1003,9 @@ function initChequeType(payType) {
             $('#' + payType).empty();
             $('#' + payType).html(html);
             $('#' + payType).selectpicker('refresh');
-            if(res.data.length==1){
+            if (res.data.length == 1) {
                 $('#' + payType).selectpicker('val', 'Y');
-            }else {
+            } else {
                 $('#' + payType).selectpicker('val', 1);
             }
             $('#' + payType).selectpicker('refresh');
@@ -1101,7 +1101,7 @@ function checkFee(flag) {
             $("#changeAmount").val(changeAmount);
             $("#addPayType").parent().removeClass("in").addClass("hide");
             if (!flag) {
-                sendPriceMessage(realMoney, totalAmount, changeAmount,  $("#patientIdHaveTally").val());
+                sendPriceMessage(realMoney, totalAmount, changeAmount, $("#patientIdHaveTally").val());
             }
         }
         //设置收费首页找零与应收和实收金额
@@ -1329,7 +1329,7 @@ function saveConfirmFee() {
     if (arr.length > 0) {
         for (var i = 0; i < arr.length; i++) {
             var temp = parseFloat($(arr[i]).find("input").val());
-            if(temp==null || temp==0){
+            if (temp == null || temp == 0) {
                 continue;
             }
             var tempJson = JSON.parse('{"chequeType":"","amount":"","contractId":""}');
@@ -1543,24 +1543,26 @@ function obsoleteAndRepPrint(patientId, times, receiptNo) {
  * @param receiptNo
  */
 function printYbjsd(patientId, times, receiptNo) {
-    if(mzjsdHost==null){
+    if (mzjsdHost == null) {
         errorMesageSimaple("医保结算单域名为空,操作失败!");
         return;
     }
-    var url =mzjsdHost+"/siSettleDetailList/"+patientId+"/"+times;
-    $("#ybjsdDiv").attr("src",url);
-    //window.open(url);
-    // $("#ybjsdDiv").load(url,function(data, textStatus,xmlRequest){
-    //     /*function里面包含三个参数:
-    //      * 1、返回请求的内容data
-    //      * 2、请求返回的状态:是否成功:success、error、notmodify、timeout
-    //      * 3、Xml请求对象
-    //      */
-    // });
+    const iframeEle = document.getElementById('ybjsdDiv');
+    const loadingEle = document.getElementById('loading');
+    //设置ififrame透明
+    iframeEle.style.opacity = 0;
+    loadingEle.style.display = 'block';
+    var url = mzjsdHost + "/siSettleDetailList/" + patientId + "/" + times;
+    $("#ybjsdDiv").attr("src", url);
+    iframeEle.addEventListener('load', function () {
+        // Hide the loading indicator
+        loadingEle.style.display = 'none';
+        // Bring the iframe back
+        iframeEle.style.opacity = 1;
+    });
     $("#ybjsdModal").modal();
 }
 
-
 /**
  * 匹配合作项目
  * @param realNo
@@ -2646,8 +2648,6 @@ function clearEditPayMode() {
 // }
 
 
-
-
 /**
  * 医保电子凭证读卡
  */
@@ -2666,7 +2666,7 @@ function siReadCard() {
             //console.log(res);
             if (res.code == 200) {
                 var data = JSON.parse(res.data);
-                queryUserInfoBySocialNoNotFillPatient('cardNo',""+data.data.idNo+"",initFeeTable,null);
+                queryUserInfoBySocialNoNotFillPatient('cardNo', "" + data.data.idNo + "", initFeeTable, null);
             } else {
                 errorMesage(res);
             }

+ 2 - 1
src/main/resources/templates/mz/toll_administration.html

@@ -693,7 +693,7 @@
 <!--医保结算单打印弹窗开始-->
 <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="ybjsdModal">
     <div class="modal-dialog modal-lg">
-        <div class="modal-content" style="width: 800px;margin-left: 200px;height: 550px;">
+        <div class="modal-content container" style="width: 800px;margin-left: 200px;height: 550px;">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                 </button>
@@ -702,6 +702,7 @@
             <!--<div class="modal-body" id="ybjsdDiv">-->
                 <!---->
             <!--</div>-->
+            <div class="loading" id="loading" align="center" width="100%" height="550px" style="line-height: 450px;font-size: 50px;">门诊结算单正在加载,请稍等...</div>
             <iframe id="ybjsdDiv" align="center" width="100%" height="550px"  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
             <!--<div class="modal-footer">-->
                 <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>-->