Prechádzať zdrojové kódy

优化复制身份证

hurugang 3 rokov pred
rodič
commit
5ba3249e40

+ 6 - 1
src/main/resources/static/js/mz/registration.js

@@ -7,6 +7,7 @@ var pageIndex = 0;
 var LODOP; //声明为全局变量
 //默认打印机下标
 var printIndex = -1;
+var clipboard=null;
 var TableInit = function () {
     var oTableInit = new Object();
     //初始化Table
@@ -365,6 +366,7 @@ $(function () {
     setTimeout(function () {
         getLodop();
     }, 800);
+
 });
 
 
@@ -2072,7 +2074,10 @@ function chargeFeeHybridTest() {
  * 复制地址
  */
 function copyAddress() {
-    new ClipboardJS('#copyAddress',{
+    if(clipboard!=null){
+        clipboard.destroy();
+    }
+    clipboard = new ClipboardJS('#copyAddress',{
         text: function(trigger) {
             alert("复制成功!");
             return trigger.getAttribute('data-clipboard-text');

+ 44 - 59
src/main/resources/static/js/mz/toll_administration.js

@@ -82,7 +82,7 @@ $(function () {
     /**
      * 核酸检测跳转过来的直接刷新待收费列表
      */
-    if(patientIdFullForNucleicAcid!=null && patientIdFullForNucleicAcid!=""){
+    if (patientIdFullForNucleicAcid != null && patientIdFullForNucleicAcid != "") {
         $("#cardNo").val(patientIdFullForNucleicAcid);
         $("#patientId").val(patientIdFullForNucleicAcid);
         initFeeTable();
@@ -216,7 +216,7 @@ function initCooperativeEnterprisesSelect() {
             }
             var html = '';
             $.each(res.data, function (commentIndex, comment) {
-                html += '<option value="' + comment.id + '">' + comment.projectName + " "+comment.contractNo+'</option>';
+                html += '<option value="' + comment.id + '">' + comment.projectName + " " + comment.contractNo + '</option>';
             });
             $('#project').empty();
             $('#project').html(html);
@@ -229,7 +229,6 @@ function initCooperativeEnterprisesSelect() {
 }
 
 
-
 var $table_1;
 
 /**
@@ -413,7 +412,7 @@ function initFeeTable() {
                         return str;
                     }
                     if (payMarkGroup == 1) {
-                       // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
+                        // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
                         str += '<button type="button" class="registration-no-color-foot-button" title="退费" onclick="refundFee(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ',' + row.printFlag + ');"><i class="fa fa-reply"></i></button>';
                         if (row.printFlag == 0) {
                             str += '<button type="button" id="button_' + row.realNo + '" class="registration-no-color-foot-button" title="发票打印" onclick="prn1PrintHand(\'' + row.patientId + '\',' + row.times + ',true,' + row.receiptNo + ',' + row.realNo + ');" style="color: #35D082;"><i class="fa fa-print"></i></button>';
@@ -422,16 +421,16 @@ function initFeeTable() {
                             str += '<button type="button" class="registration-no-color-foot-button" title="发票作废重打" onclick="obsoleteAndRepPrint(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');" style="color: #E73E48;"><i class="fa fa-print"></i></button>';
                         }
                         //是否有权限设置合同编号
-                        var buttonCodes= localStorage.getItem("buttonCodes");
-                        if(buttonCodes!=null){
-                            if(isInArray("contract_match",buttonCodes)){
+                        var buttonCodes = localStorage.getItem("buttonCodes");
+                        if (buttonCodes != null) {
+                            if (isInArray("contract_match", buttonCodes)) {
                                 str += '<button type="button" class="registration-no-color-foot-button" title="合作项目维护" onclick="matchProject(\'' + row.realNo + '\');"><i class="fa fa-plug"></i></button>';
                             }
                         }
                         return str;
                     }
                     if (payMarkGroup == 2) {
-                       // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
+                        // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
                         return str;
                     }
                 }
@@ -662,9 +661,9 @@ function initChargeDetailTablePublic(url, obj, params) {
                 align: "center",
                 valign: 'middle',
                 formatter: function (value, row, index) {
-                   if(value!=undefined && value!=null){
-                       return value.toFixed(2);
-                   }
+                    if (value != undefined && value != null) {
+                        return value.toFixed(2);
+                    }
                 }
             }, {
                 field: 'unitPrice',
@@ -844,16 +843,16 @@ function getRePortRangeArr() {
  * 打开收费窗口
  */
 function confirmFeeModal(times, totalCharge, receiptNo) {
-   var buttonCodes= localStorage.getItem("buttonCodes");
-   if(buttonCodes!=null){
-      if(isInArray("contract_match",buttonCodes)){
-          $("#projectDiv").removeClass("hide").addClass("in");
-      }else {
-          $("#projectDiv").removeClass("in").addClass("hide");
-      }
-   }else {
-       $("#projectDiv").removeClass("in").addClass("hide");
-   }
+    var buttonCodes = localStorage.getItem("buttonCodes");
+    if (buttonCodes != null) {
+        if (isInArray("contract_match", buttonCodes)) {
+            $("#projectDiv").removeClass("hide").addClass("in");
+        } else {
+            $("#projectDiv").removeClass("in").addClass("hide");
+        }
+    } else {
+        $("#projectDiv").removeClass("in").addClass("hide");
+    }
     $('#payType').selectpicker('val', 1);
     $('#payType').selectpicker('refresh');
     var data = parseFloat($("#dataIdHaveTally").val());
@@ -880,8 +879,8 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
         $('#payType_0').selectpicker('refresh');
         $("#payType_0").parent().parent().next().children(':first').val(fundPay);
         $("#payType_0").parent().parent().next().next().children(':first').remove();
-        $("#payType_0").attr("disabled",true);
-        $("#payType_0").parent().parent().next().children(':first').attr("readonly","readonly");
+        $("#payType_0").attr("disabled", true);
+        $("#payType_0").parent().parent().next().children(':first').attr("readonly", "readonly");
     }
     var realMoney = Minus(data, fundPay);
     $("#realMoney").val(data);
@@ -1325,7 +1324,7 @@ function saveConfirmFee() {
         $("#saveConfirmFee").attr("disabled", false);
         return;
     }
-    var project=$("#project").val();
+    var project = $("#project").val();
     var jsonData = JSON.parse('{"patientId":"","times":"","receiptNo":"","mzDepositFiles":[]}');
     var patientId = $("#patientIdHaveTally").val();
     var times = $("#timesHaveTally").val();
@@ -1344,8 +1343,8 @@ function saveConfirmFee() {
                 temp = temp - $("#changeAmount").val();
                 temp = temp.toFixed(2);
             }
-            if(project!=null && project!="null" && project!=""){
-                tempJson.contractId=project;
+            if (project != null && project != "null" && project != "") {
+                tempJson.contractId = project;
             }
             tempJson.amount = temp;
             jsonData.mzDepositFiles[i] = tempJson;
@@ -1365,30 +1364,20 @@ function saveConfirmFee() {
             }
             if (res.code == 0) {
                 prn1Print(patientId, times, true, res.receiptNo);
-                new PNotify({
-                    title: '操作提示',
-                    text: res.message,
-                    type: 'success',
-                    hide: true,
-                    styling: 'bootstrap3'
-                });
+                successMesage(res);
                 $("#confirmFeeModal").modal("hide");
                 $("#patientId").val(null);
                 $("#cardNo").val(null);
                 $("#name").val(null);
                 $("#fundPay").val(0);
+                //缴费成功后清空全局参数
+                patientIdFullForNucleicAcid = null;
                 initFeeTable();
                 //默认光标在卡号输入框
                 $("#cardNo").focus();
                 postCMD("appraise", localStorage.getItem("userID"), '000000', '收费项目', 0, 0, 0, '', '祝您早日康复', 0, 0, 0);
             } else {
-                new PNotify({
-                    title: '错误提示',
-                    text: res.message,
-                    type: 'error',
-                    hide: true,
-                    styling: 'bootstrap3'
-                });
+                errorMesage(res);
             }
             $("#saveConfirmFee").attr("disabled", false);
         }
@@ -1396,17 +1385,15 @@ function saveConfirmFee() {
 }
 
 
-
-
 /**
  * 保存合作项目
  */
 function saveProject() {
-    var projectRealNo=$("#projectRealNo").val();
-    var projectCharged=$("#projectCharged").val();
+    var projectRealNo = $("#projectRealNo").val();
+    var projectCharged = $("#projectCharged").val();
     $.ajax({
         type: "GET",
-        url: '/thmz/setMzDepositFileSetContractId?contractId='+projectCharged+'&serialNo='+projectRealNo,
+        url: '/thmz/setMzDepositFileSetContractId?contractId=' + projectCharged + '&serialNo=' + projectRealNo,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -1416,11 +1403,11 @@ function saveProject() {
                 return;
             }
             if (res.code == 0) {
-               successMesage(res);
+                successMesage(res);
                 $("#projectRealNo").val(null);
                 $('#projectCharged').selectpicker('val', null);
                 $('#projectCharged').selectpicker('refresh');
-               $("#projectModal").modal("hide");
+                $("#projectModal").modal("hide");
             } else {
                 errorMesage(res);
             }
@@ -1431,7 +1418,6 @@ function saveProject() {
 }
 
 
-
 /**
  * 直接打印发票
  * @param patientId
@@ -2446,7 +2432,7 @@ function showChequType(patientId, times, receiptNo) {
     $("#depositFileModal").modal();
     $('#deposit_file_detail_table').bootstrapTable("destroy");
     $('#deposit_file_detail_table').bootstrapTable({
-        url: '/thmz/getAllDepositFileForThisTime?patientId=' + patientId + "&times=" + times+"&receiptNo="+Math.abs(receiptNo),         //请求后台的URL(*)
+        url: '/thmz/getAllDepositFileForThisTime?patientId=' + patientId + "&times=" + times + "&receiptNo=" + Math.abs(receiptNo),         //请求后台的URL(*)
         method: 'get',                      //请求方式(*)
         toolbar: '#toolbar',                //工具按钮用哪个容器
         striped: true,                      //是否显示行间隔色
@@ -2484,12 +2470,12 @@ function showChequType(patientId, times, receiptNo) {
                 title: '病人编号',
                 align: "center",
                 valign: 'middle'
-            },  {
+            }, {
                 field: 'times',
                 title: '就诊次数',
                 align: "center",
                 valign: 'middle',
-            },{
+            }, {
                 field: 'amount',
                 title: '支付金额(元)',
                 align: "center",
@@ -2506,7 +2492,7 @@ function showChequType(patientId, times, receiptNo) {
             }
         ],
         onDblClickRow: function (row) {
-            editChequType(row.receiptSn,row.chequeType,row.dcountNo,row.chequeTypeName);
+            editChequType(row.receiptSn, row.chequeType, row.dcountNo, row.chequeTypeName);
         },
         responseHandler: function (res) {
             if (res == '401' || res == 401) {
@@ -2538,17 +2524,16 @@ function showChequType(patientId, times, receiptNo) {
 }
 
 
-
 /**
  * 修改收款方式
  * @param patientId
  * @param times
  * @param paymode
  */
-function editChequType(receiptSn,chequType,dcountNo,chequeTypeName) {
-    var message = "当前病人本次门诊缴费的支付方式为【"+chequeTypeName+"】,确定需要修改吗?";
-    if(dcountNo==1){
-        message = "当前病人本次门诊缴费的支付方式为【"+chequeTypeName+"】,且本次缴费已经结算,确定需要修改吗?如仍需继续修改,会影响已经结算的报表,请重新打印本次缴费所在日期的【日结报表】!";
+function editChequType(receiptSn, chequType, dcountNo, chequeTypeName) {
+    var message = "当前病人本次门诊缴费的支付方式为【" + chequeTypeName + "】,确定需要修改吗?";
+    if (dcountNo == 1) {
+        message = "当前病人本次门诊缴费的支付方式为【" + chequeTypeName + "】,且本次缴费已经结算,确定需要修改吗?如仍需继续修改,会影响已经结算的报表,请重新打印本次缴费所在日期的【日结报表】!";
     }
     $("#editPayModeTip").html(message);
     $("#receiptSn").val(receiptSn);
@@ -2563,10 +2548,10 @@ function editChequType(receiptSn,chequType,dcountNo,chequeTypeName) {
 /**
  * 提交修改收款方式
  */
-function saveEditPayMode(){
+function saveEditPayMode() {
     $.ajax({
         type: "GET",
-        url: '/thmz/updateChequType?oldChequeType=' + $("#chequType").val() + "&receiptSn=" + $("#receiptSn").val()+"&chequeType="+$("#payTypeEditPayMode").val(),
+        url: '/thmz/updateChequType?oldChequeType=' + $("#chequType").val() + "&receiptSn=" + $("#receiptSn").val() + "&chequeType=" + $("#payTypeEditPayMode").val(),
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},

+ 0 - 1
src/main/resources/templates/mz/registration.html

@@ -66,7 +66,6 @@
                         <a onclick="editUserModal(null)" id="editUser" hidden><i class="fa fa-edit">&nbsp;修改患者</i></a>
                         <a id="siReadCard"><i class="fa fa-barcode">&nbsp;医保电子凭证读卡</i></a>
                         <a id="copyAddress" hidden><i class="fa fa-copyright" onclick="copyAddress()">&nbsp;复制身份证地址</i></a>
-                        <input id="idAddress" type="hidden"/>
                         <a id="clearRegistration"><i class="fa fa-trash">&nbsp;清空</i></a>
                     </div>
                 </div>