Parcourir la source

优化扫码按钮多次点击

hurugang il y a 2 ans
Parent
commit
1268daf58b

+ 18 - 0
src/main/java/cn/hnthyy/thmz/controller/zy/APatientMiController.java

@@ -215,9 +215,27 @@ public class APatientMiController {
         if (StringUtils.isBlank(aPatientMi.getHomeStreet())) {
             aPatientMi.setHomeStreet("-");
         }
+        if(aPatientMi.getHomeStreet().length()>16){
+            resultMap.put("code", -1);
+            resultMap.put("message", "家庭住址长度超长");
+            return true;
+        }
+        if (StringUtils.isBlank(aPatientMi.getAccountStreet())) {
+            aPatientMi.setAccountStreet("-");
+        }
+        if(aPatientMi.getAccountStreet().length()>10){
+            resultMap.put("code", -1);
+            resultMap.put("message", "户口址长度超长");
+            return true;
+        }
         if (StringUtils.isBlank(aPatientMi.getEmployerStreet())) {
             aPatientMi.setEmployerStreet("-");
         }
+        if(aPatientMi.getEmployerStreet().length()>16){
+            resultMap.put("code", -1);
+            resultMap.put("message", "单位地址长度超长");
+            return true;
+        }
         if(StringUtils.isNotBlank(aPatientMi.getSocialNo()) && !aPatientMi.getSocialNo().startsWith("K")){
             //校验身份证号码格式
             String checkResult = IDCardUtil.IdentityCardVerification(aPatientMi.getSocialNo());

+ 2 - 0
src/main/resources/static/js/mz/registration.js

@@ -2075,6 +2075,7 @@ function checkProChange(obj) {
  * 刷卡/扫码
  */
 function consume() {
+    $("#consume").attr("disabled", true);
     $("#saveConfirmFee").attr("disabled", true);
     var patientId = $("#patientId").val();
     var chequeType = $("#payType").val();
@@ -2107,6 +2108,7 @@ function consume() {
                 errorMesage(res);
             }
             $("#saveConfirmFee").attr("disabled", false);
+            $("#consume").attr("disabled", false);
         }
     });
 }

+ 2 - 0
src/main/resources/static/js/mz/toll_administration.js

@@ -2958,6 +2958,7 @@ function clearMztcbl() {
  * 刷卡/扫码,正常收费的的接口
  */
 function consume() {
+    $("#consume").attr("disabled", true);
     $("#saveConfirmFee").attr("disabled", true);
     var current = $("#payForm").find("div.pay-item").last();
     var patientId = $("#patientIdHaveTally").val();
@@ -2993,6 +2994,7 @@ function consume() {
                 errorMesage(res);
             }
             $("#saveConfirmFee").attr("disabled", false);
+            $("#consume").attr("disabled", false);
         }
     });
 }

+ 1 - 1
src/main/resources/templates/zy/hospitalized.html

@@ -447,7 +447,7 @@
             </div>
             <div class="item form-group" style="margin-top: 80px;">
                 <div class="col-md-12 col-sm-12 col-xs-12">
-                    <button type="button" class="btn btn-primary" id="confirmFee" style="width: 100%;" >
+                    <button type="button" class="btn btn-primary" id="confirmFee" style="width: calc(100% - 20px);" >
                         <span>入院登记</span>
                     </button>
                 </div>