瀏覽代碼

病人建档开发

hurugang 5 年之前
父節點
當前提交
24e6178db5
共有 2 個文件被更改,包括 18 次插入18 次删除
  1. 15 14
      src/main/resources/static/js/registration.js
  2. 3 4
      src/main/resources/templates/registration.html

+ 15 - 14
src/main/resources/static/js/registration.js

@@ -173,7 +173,7 @@ $(function () {
     $("#saveConfirmFee").on("click", function (t) {
         var patientId = $("#patientId").val();
         if (patientId == null || patientId == "") {
-            savePatient();
+            savePatient(true);
         } else {
             saveMzyReqrec();
         }
@@ -268,6 +268,7 @@ $(function () {
         }
         var returnAge=jsGetAge(birthDay);
         $("#age").val(returnAge);
+        $("#age").blur();
     });
 
     $("#editUserBirthDay").change(function(e){
@@ -791,7 +792,9 @@ function queryUserInfoByCardNo() {
                             $("#clearIcCardNo").show();
                         }
                         readonlyOrNot(true);
+                        $("#saveUser").hide();
                     } else {
+                        $("#saveUser").show();
                         $("#newCardModal").modal();
                     }
                 } else {
@@ -1288,13 +1291,11 @@ function setPrint() {
 // }
 
 
-
-
-
 /**
  * 保存病人信息
+ * @param flag true 继续调用挂号接口,false,只建档不挂号
  */
-function savePatient() {
+function savePatient(flag) {
     $.ajax({
         type: "POST",
         url: '/thmz/savePatient',
@@ -1318,16 +1319,15 @@ function savePatient() {
                 return;
             }
             if (res.code == 0) {
-                $("#patientId").val(res.data.patientId);
-                saveMzyReqrec();
+                if(flag){
+                    $("#patientId").val(res.data.patientId);
+                    saveMzyReqrec();
+                }else {
+                    clearRegistration();
+                    successMesage(res);
+                }
             } else {
-                new PNotify({
-                    title: '错误提示',
-                    text: res.message,
-                    type: 'error',
-                    hide: true,
-                    styling: 'bootstrap3'
-                });
+                errorMesage(res);
             }
         }
     });
@@ -1714,6 +1714,7 @@ function clearIcCardNo() {
                 return;
             }
             if (res.code == 0) {
+                clearRegistration();
                 successMesage(res);
             } else {
                 errorMesage(res);

+ 3 - 4
src/main/resources/templates/registration.html

@@ -57,6 +57,7 @@
                         <!--<a id="editPrint"><i class="fa fa-cog">&nbsp;打印设置</i></a>-->
                         <!--<a id="editWindows"><i class="fa fa-gears">&nbsp;窗口号设置</i></a>-->
                         <a id="clearIcCardNo" hidden onclick="clearIcCardNo()"><i class="fa fa-chain-broken">&nbsp;销卡</i></a>
+                        <a onclick="savePatient(false)" id="saveUser" hidden><i class="fa fa-user">&nbsp;患者建档</i></a>
                         <a onclick="editUserModal(null)" id="editUser" hidden><i class="fa fa-user">&nbsp;修改患者</i></a>
                         <a id="clearRegistration"><i class="fa fa-trash">&nbsp;清空</i></a>
                     </div>
@@ -74,8 +75,7 @@
                     </div>
                 </div>
                 <div class="col-md-3 col-sm-3 col-xs-12 item thmz_group_alert">
-                    <label class="control-label col-md-4 col-sm-4 col-xs-12" for="age">年龄 <span
-                            class="required">*</span>
+                    <label class="control-label col-md-4 col-sm-4 col-xs-12" for="age">年龄
                     </label>
                     <div class="col-md-8 col-sm-8 col-xs-12">
                         <div class="input-group input-group-own">
@@ -164,8 +164,7 @@
 
             <div class="item form-group">
                 <div class="col-md-4 col-sm-4 col-xs-12 item thmz_group_alert">
-                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="idCard" style="left: -1px;">身份证 <span
-                            class="required">*</span>
+                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="idCard" style="left: -1px;">身份证
                     </label>
                     <div class="col-md-9 col-sm-9 col-xs-12" style="left: -1px;">
                         <div class="input-group demo2 input-group-own">