Quellcode durchsuchen

定时清理数据

hurugang vor 5 Jahren
Ursprung
Commit
d718eb49b3

+ 44 - 11
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -127,7 +127,7 @@ public interface ChargeFeeVoMapper {
             "         mz_receipt_serial.operator_id=#{userIdCode} and " +
             "         mz_receipt_serial.patient_id*=b.patient_id and " +
             "         mz_receipt_serial.times     *=b.times and" +
-            "         mz_receipt_serial.receipt_no*=b.receipt_no and "  +
+            "         mz_receipt_serial.receipt_no*=b.receipt_no and " +
             "         mz_receipt_serial.receipt_sn*=b.receipt_sn and " +
             "         b.cheque_type  <> 'Z' " +
             "group by mz_receipt_serial.receipt_sn,mz_receipt_serial.receipt_bill,b.cheque_type,mz_receipt_serial.pay_mark,b.op_id " +
@@ -512,6 +512,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 查询收费作废发票明细
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
@@ -584,6 +585,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 查询挂号收入构成表格数据
+     *
      * @param userIdCode
      * @param dcountDate
      * @param beginDate
@@ -651,7 +653,7 @@ public interface ChargeFeeVoMapper {
                     " sum ( case when isnull ( paymode , '1' ) <![CDATA[<>]]> 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjebhjz," +
                     " sum ( clinic_fee ) zcsr," +
                     " sum ( oth_fee ) jcsr," +
-                    " sum ( req_fee ) ghsr "+
+                    " sum ( req_fee ) ghsr " +
                     "FROM mzy_reqrec " +
                     " where 1=1 " +
                     "<when test='userIdCode!=null'>",
@@ -673,9 +675,9 @@ public interface ChargeFeeVoMapper {
     List<ReqrecVo> selectMzReceiptSerialCount(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
 
-
     /**
      * 查询退号明细
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
@@ -702,6 +704,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 判断是否有退费后没重收的数据
+     *
      * @param userIdCode
      * @return
      */
@@ -715,6 +718,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 查询是否有可以日结的收费数据
+     *
      * @param userIdCode
      * @return
      */
@@ -724,6 +728,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 查询是否有可以日结的挂号数据
+     *
      * @param userIdCode
      * @return
      */
@@ -732,6 +737,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 查询总计金额
+     *
      * @param userIdCode
      * @return
      */
@@ -740,43 +746,48 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 发票表结算  所用发票号码
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
      */
     @Update("update mz_receipt_serial set dcount_no =1 , dcount_date =#{dcountDate} where operator_id =#{userIdCode} and dcount_no =0 ")
-    int dcountReceipt(@Param("userIdCode") String userIdCode,@Param("dcountDate") Date dcountDate);
+    int dcountReceipt(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate);
 
 
     /**
      * 发票表结算  各种费用结算
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
      */
     @Update("update mz_receipt_serial set charge_dcount_no =1 , charge_dcount_date =#{dcountDate} where pay_id =#{userIdCode} and charge_dcount_no =0 ")
-    int dcountReceiptChargeCount(@Param("userIdCode") String userIdCode,@Param("dcountDate") Date dcountDate);
+    int dcountReceiptChargeCount(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate);
 
     /**
      * 收费方式表结算
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
      */
     @Update("update mz_deposit_file set dcount_no =1 , dcount_date =#{dcountDate} where op_id =#{userIdCode} and dcount_no =0")
-    int dcountDeposit(@Param("userIdCode") String userIdCode,@Param("dcountDate") Date dcountDate);
+    int dcountDeposit(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate);
 
     /**
      * 挂号表结算
+     *
      * @param userIdCode
      * @param dcountDate
      * @return
      */
     @Update("update mzy_reqrec set dcount_no =1 , closing_date =#{dcountDate} where op_id =#{userIdCode} and dcount_no =0 ")
-    int dcountReqrec(@Param("userIdCode") String userIdCode,@Param("dcountDate") Date dcountDate);
+    int dcountReqrec(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate);
 
     /**
      * 在发票表中查询当前日期范围内有收款记录的收费员
+     *
      * @param beginDate
      * @param endDate
      * @return
@@ -786,6 +797,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 在挂号表中查询当前日期范围内有收款记录的收费员
+     *
      * @param beginDate
      * @param endDate
      * @return
@@ -795,6 +807,7 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 挂号工作量一览表
+     *
      * @param beginDate
      * @param endDate
      * @return
@@ -813,10 +826,11 @@ public interface ChargeFeeVoMapper {
             " b.unit_code<>'0000000' " +
             "group by b.op_id,b.closing_date " +
             "order by b.op_id ")
-    List<WorkloadVo> selectGhWorkloadVo(@Param("tableName") String tableName,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+    List<WorkloadVo> selectGhWorkloadVo(@Param("tableName") String tableName, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
     /**
      * 门诊收费一览表
+     *
      * @param beginDate
      * @param endDate
      * @return
@@ -834,11 +848,12 @@ public interface ChargeFeeVoMapper {
             "      dcount_date<=#{endDate} " +
             "group by op_id,dcount_date " +
             "order by op_id ")
-    List<WorkloadVo>  selectSfWorkloadVo(@Param("tableName") String tableName,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+    List<WorkloadVo> selectSfWorkloadVo(@Param("tableName") String tableName, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
 
     /**
      * 门诊收据分类统计表
+     *
      * @param beginDate
      * @param endDate
      * @return
@@ -867,20 +882,21 @@ public interface ChargeFeeVoMapper {
             "            a.bill_item_code<>'TC' " +
             "group by c.audit_code " +
             "order by c.audit_code  ")
-    List<ChargeDetailVo> selectChargeDetailVos(@Param("tableName") String tableName,@Param("tableName1") String tableName1,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+    List<ChargeDetailVo> selectChargeDetailVos(@Param("tableName") String tableName, @Param("tableName1") String tableName1, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
 
     /**
      * 数据清洗,将已经做了日结的发票数据清洗,设置 charge_dcount_date 和 charge_dcount_no
+     *
      * @return
      */
     @Update("update mz_receipt_serial set charge_dcount_date =dcount_date,charge_dcount_no =dcount_no where operator_id = pay_id and (charge_dcount_date is null or charge_dcount_no =0)")
     int dataRefsh();
 
 
-
     /**
      * 数据清洗,将在老系统日结的普通收费员数据清洗一次
+     *
      * @return
      */
     @Update("update mz_receipt_serial set pay_id =operator_id,charge_dcount_date=dcount_date,charge_dcount_no=dcount_no where operator_id <> '99999'  and (pay_id  is null or pay_id ='') ")
@@ -888,8 +904,25 @@ public interface ChargeFeeVoMapper {
 
     /**
      * 数据清洗,将在老系统日结的微信自助数据清洗一次
+     *
      * @return
      */
     @Update("update mz_receipt_serial set charge_dcount_date=dcount_date,charge_dcount_no=dcount_no  where operator_id = '99999'  and (charge_dcount_date  is null or charge_dcount_date ='') ")
     int refeshZzPayManData();
+
+    /**
+     * 刷新退费数据
+     *
+     * @return
+     */
+    @Update("update mz_receipt_serial set pay_id = operator_id,charge_dcount_date=dcount_date,charge_dcount_no=dcount_no where pay_id='99999' and operator_id <> '99999' and isnull(cheque_type,1)='Y'  and receipt_no<0")
+    int refeshRefund();
+
+    /**
+     * 刷新退费产生的新数据
+     *
+     * @return
+     */
+    @Update("update mz_receipt_serial set pay_id = operator_id,charge_dcount_date=dcount_date,charge_dcount_no=dcount_no where pay_id='99999' and operator_id <> '99999' and isnull(cheque_type,1)<> 'Y'  and receipt_no>0  and charge_dcount_date is null and dcount_date is not null")
+    int refeshRefundNewData();
 }

+ 16 - 13
src/main/java/cn/hnthyy/thmz/service/impl/his/ChargeFeeVoServiceImpl.java

@@ -130,7 +130,7 @@ public class ChargeFeeVoServiceImpl implements ChargeFeeVoService {
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     public Date dcountCharge(String userIdCode) {
-        Date dcountDate= new Date();
+        Date dcountDate = new Date();
         chargeFeeVoMapper.dcountReceipt(userIdCode, dcountDate);
         chargeFeeVoMapper.dcountReceiptChargeCount(userIdCode, dcountDate);
         chargeFeeVoMapper.dcountDeposit(userIdCode, dcountDate);
@@ -140,48 +140,48 @@ public class ChargeFeeVoServiceImpl implements ChargeFeeVoService {
 
     @Override
     public List<String> queryAllOperatorFromReceipt(Date beginDate, Date endDate) {
-        return chargeFeeVoMapper.selectAllOperatorFromReceipt(beginDate,endDate);
+        return chargeFeeVoMapper.selectAllOperatorFromReceipt(beginDate, endDate);
     }
 
     @Override
     public List<String> queryAllOperatorFromReqrec(Date beginDate, Date endDate) {
-        return chargeFeeVoMapper.selectAllOperatorFromReqrec(beginDate,endDate);
+        return chargeFeeVoMapper.selectAllOperatorFromReqrec(beginDate, endDate);
     }
 
     @Override
     public List<WorkloadVo> queryGhWorkloadVo(YesNoEnum hisDate, Date beginDate, Date endDate) {
         String tableName = "mzy_reqrec";
-        if(YesNoEnum.YES.equals(hisDate)){
+        if (YesNoEnum.YES.equals(hisDate)) {
             tableName = "mzy_reqrec_b";
         }
-        return chargeFeeVoMapper.selectGhWorkloadVo(tableName,beginDate,endDate);
+        return chargeFeeVoMapper.selectGhWorkloadVo(tableName, beginDate, endDate);
     }
 
     @Override
     public List<WorkloadVo> querySfWorkloadVo(YesNoEnum hisDate, Date beginDate, Date endDate) {
         String tableName = "mz_deposit_file";
-        if(YesNoEnum.YES.equals(hisDate)){
+        if (YesNoEnum.YES.equals(hisDate)) {
             tableName = "mz_deposit_file_b";
         }
-        return chargeFeeVoMapper.selectSfWorkloadVo(tableName,beginDate,endDate);
+        return chargeFeeVoMapper.selectSfWorkloadVo(tableName, beginDate, endDate);
     }
 
     @Override
     public List<ChargeDetailVo> queryChargeDetailVos(YesNoEnum hisDate, Date beginDate, Date endDate) {
         String tableName = "mz_charge_detail";
         String tableName1 = "mz_receipt_serial";
-        if(YesNoEnum.YES.equals(hisDate)){
+        if (YesNoEnum.YES.equals(hisDate)) {
             tableName = "mz_charge_detail_b";
             tableName1 = "mz_receipt_serial_b";
         }
-        return chargeFeeVoMapper.selectChargeDetailVos(tableName,tableName1,beginDate,endDate);
+        return chargeFeeVoMapper.selectChargeDetailVos(tableName, tableName1, beginDate, endDate);
     }
 
     @Override
     public Integer queryCountCanDaily(String userIdCode) {
-       Integer chargeCount=chargeFeeVoMapper.selectChargeCountCanDaily(userIdCode);
-       Integer requecCount=chargeFeeVoMapper.selectRequecCountCanDaily(userIdCode);
-        return chargeCount+requecCount;
+        Integer chargeCount = chargeFeeVoMapper.selectChargeCountCanDaily(userIdCode);
+        Integer requecCount = chargeFeeVoMapper.selectRequecCountCanDaily(userIdCode);
+        return chargeCount + requecCount;
     }
 
     @Override
@@ -192,6 +192,9 @@ public class ChargeFeeVoServiceImpl implements ChargeFeeVoService {
     @Override
     public int refeshPayManData() {
         chargeFeeVoMapper.refeshNomalPayManData();
-        return chargeFeeVoMapper.refeshZzPayManData();
+        chargeFeeVoMapper.refeshZzPayManData();
+        chargeFeeVoMapper.refeshRefund();
+        return chargeFeeVoMapper.refeshRefundNewData();
+
     }
 }

+ 65 - 73
src/main/resources/static/js/registration.js

@@ -132,7 +132,7 @@ $(function () {
     cardNoChange();
 
     //病人姓名输入改变事件
-   // userNameChange();
+    // userNameChange();
     //数据校验
     init_validator();
     //时间区间
@@ -229,9 +229,9 @@ $(function () {
     // });
 
     //每隔三秒读一次身份证
-    setInterval(function(){
+    setInterval(function () {
         new Device().startFun();
-    },3000);
+    }, 3000);
 
 
     // $("#birthDay").keypress(function () {   // keypress:输入框每获取一个字符,就触发一次该事件。
@@ -240,14 +240,14 @@ $(function () {
     //
     // });
 
-    $("#birthDay").change(function(e){
-        var birthDay= $("#birthDay").val();
-        if(birthDay.length==8 && birthDay.indexOf("-")<=0){
-            birthDay=birthDay.substring(0,4)+"-"+birthDay.substring(4,6)+"-"+birthDay.substring(6);
+    $("#birthDay").change(function (e) {
+        var birthDay = $("#birthDay").val();
+        if (birthDay.length == 8 && birthDay.indexOf("-") <= 0) {
+            birthDay = birthDay.substring(0, 4) + "-" + birthDay.substring(4, 6) + "-" + birthDay.substring(6);
             $("#birthDay").val(birthDay);
         }
-        var dateFormat =/^(\d{4})-(\d{2})-(\d{2})$/;
-        if(!dateFormat.test(birthDay)){
+        var dateFormat = /^(\d{4})-(\d{2})-(\d{2})$/;
+        if (!dateFormat.test(birthDay)) {
             new PNotify({
                 title: '错误提示',
                 text: '生日日期错误',
@@ -256,8 +256,8 @@ $(function () {
                 styling: 'bootstrap3'
             });
         }
-        var arr =birthDay.split("-");
-        if(!checkDate(arr[0],arr[1],arr[2])){
+        var arr = birthDay.split("-");
+        if (!checkDate(arr[0], arr[1], arr[2])) {
             new PNotify({
                 title: '错误提示',
                 text: '生日日期错误',
@@ -266,19 +266,19 @@ $(function () {
                 styling: 'bootstrap3'
             });
         }
-        var returnAge=jsGetAge(birthDay);
+        var returnAge = jsGetAge(birthDay);
         $("#age").val(returnAge);
         $("#age").blur();
     });
 
-    $("#editUserBirthDay").change(function(e){
-        var editUserBirthDay= $("#editUserBirthDay").val();
-        if(editUserBirthDay.length==8 && editUserBirthDay.indexOf("-")<=0){
-            editUserBirthDay=editUserBirthDay.substring(0,4)+"-"+editUserBirthDay.substring(4,6)+"-"+editUserBirthDay.substring(6);
+    $("#editUserBirthDay").change(function (e) {
+        var editUserBirthDay = $("#editUserBirthDay").val();
+        if (editUserBirthDay.length == 8 && editUserBirthDay.indexOf("-") <= 0) {
+            editUserBirthDay = editUserBirthDay.substring(0, 4) + "-" + editUserBirthDay.substring(4, 6) + "-" + editUserBirthDay.substring(6);
             $("#editUserBirthDay").val(editUserBirthDay);
         }
-        var dateFormat =/^(\d{4})-(\d{2})-(\d{2})$/;
-        if(!dateFormat.test(editUserBirthDay)){
+        var dateFormat = /^(\d{4})-(\d{2})-(\d{2})$/;
+        if (!dateFormat.test(editUserBirthDay)) {
             new PNotify({
                 title: '错误提示',
                 text: '生日日期错误',
@@ -287,8 +287,8 @@ $(function () {
                 styling: 'bootstrap3'
             });
         }
-        var arr =editUserBirthDay.split("-");
-        if(!checkDate(arr[0],arr[1],arr[2])){
+        var arr = editUserBirthDay.split("-");
+        if (!checkDate(arr[0], arr[1], arr[2])) {
             new PNotify({
                 title: '错误提示',
                 text: '生日日期错误',
@@ -297,32 +297,32 @@ $(function () {
                 styling: 'bootstrap3'
             });
         }
-        var returnAge=jsGetAge(editUserBirthDay);
+        var returnAge = jsGetAge(editUserBirthDay);
         $("#editUserAge").val(returnAge);
     });
 
-    $("#idCard").change(function(e){
+    $("#idCard").change(function (e) {
         queryUserInfoBySocialNo();
     });
-    $("#editUserIdCard").change(function(e){
+    $("#editUserIdCard").change(function (e) {
         var editUserIdCard = $("#editUserIdCard").val();
-        var birthday = editUserIdCard.substring(6,14);
-        birthday =birthday.substring(0,4)+"-"+birthday.substring(4,6)+"-"+birthday.substring(6);
+        var birthday = editUserIdCard.substring(6, 14);
+        birthday = birthday.substring(0, 4) + "-" + birthday.substring(4, 6) + "-" + birthday.substring(6);
         $("#editUserBirthDay").val(birthday);
-        var returnAge=jsGetAge(birthday);
+        var returnAge = jsGetAge(birthday);
         $("#editUserAge").val(returnAge);
-        var gender = editUserIdCard.substring(16,17);
-        if (gender%2 ==0){
+        var gender = editUserIdCard.substring(16, 17);
+        if (gender % 2 == 0) {
             $("#editUserGender").val(2);
-        }else {
+        } else {
             $("#editUserGender").val(1);
         }
         $('#editUserGender').selectpicker('refresh');
     });
-    $("#phoneNum").change(function(e){
+    $("#phoneNum").change(function (e) {
         queryUserInfoByphoneNo();
     });
-    $("#userName").change(function(e){
+    $("#userName").change(function (e) {
         queryUserInfoByName();
     });
 
@@ -330,9 +330,9 @@ $(function () {
 
 
 //判断给定日期是否合法
-function checkDate(year,month,date){
-    var now = new Date(year,month -1,date);
-    if(now.getDate()==date&&now.getFullYear()==year&&now.getMonth()==(month-1)){
+function checkDate(year, month, date) {
+    var now = new Date(year, month - 1, date);
+    if (now.getDate() == date && now.getFullYear() == year && now.getMonth() == (month - 1)) {
         return true;
     }
     return false;
@@ -353,8 +353,6 @@ function checkDate(year,month,date){
 // }
 
 
-
-
 /**
  * 初始化性别下拉选
  */
@@ -428,7 +426,7 @@ function initDeptPlus() {
             }
             var html = '';
             $.each(data.data, function (commentIndex, comment) {
-                html += '<option value="' + comment.code + '">' + comment.name + '('+comment.pyCode+')</option>';
+                html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
             });
             $('#deptNo').empty();
             $('#deptNo').html(html);
@@ -459,19 +457,19 @@ function initEmployee() {
                 return;
             }
             var html = '';
-            var defaultCode=null;
+            var defaultCode = null;
             $.each(res.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.employee.employeeCode + '" data-chargeType="' + comment.chargeType + '"  data-checkFee="' + comment.checkFee + '" data-mzyRequestId="' + comment.mzyRequestId + '">' + comment.employee.employeeName + '</option>';
-                if(res.data.length==1){
+                if (res.data.length == 1) {
                     //如果只有一个号别,默认选中
-                    defaultCode=comment.employee.employeeCode;
+                    defaultCode = comment.employee.employeeCode;
                 }
             });
             $('#doctor').empty();
             $('#doctor').html(html);
             $('#doctor').selectpicker('refresh');
             //validator.checkAll($("#regi_form"));
-            if (defaultCode!=null) {
+            if (defaultCode != null) {
                 //如果有无需选择医生的选项,默认选择
                 $('#doctor').selectpicker('val', defaultCode);
                 $('#doctor').selectpicker('refresh');
@@ -534,18 +532,18 @@ function initChargeType() {
                 return;
             }
             var html = '';
-            var defaultCode=null;
+            var defaultCode = null;
             $.each(res.data, function (commentIndex, comment) {
-                if(res.data.length==1){
+                if (res.data.length == 1) {
                     //如果只有一个号别,默认选中
-                    defaultCode=comment.code;
+                    defaultCode = comment.code;
                 }
                 html += '<option value="' + comment.code + '">' + comment.name + '</option>';
             });
             $('#chargeType').empty();   //清空resText里面的所有内容
             $('#chargeType').html(html);
             $('#chargeType').selectpicker('refresh');
-            if (defaultCode!=null) {
+            if (defaultCode != null) {
                 //如果有默认选项,默认选择
                 $('#chargeType').selectpicker('val', defaultCode);
                 $('#chargeType').selectpicker('refresh');
@@ -662,8 +660,6 @@ function listTypeChange(object) {
 }
 
 
-
-
 /**
  * 打开编辑用户信息窗口
  * @param data
@@ -705,8 +701,6 @@ function editUserModal(data) {
 }
 
 
-
-
 /**
  * 打开打印内容窗口
  * @param data
@@ -754,7 +748,7 @@ function formatCheck() {
  */
 function queryUserInfoByCardNo() {
     var cardNo = $("#cardNo").val();
-    if (cardNo.indexOf("-")>0 || cardNo.length == 8) {
+    if (cardNo.indexOf("-") > 0 || cardNo.length == 8) {
         $("#cardNo").attr("title", cardNo);
         $.ajax({
             type: "GET",
@@ -803,6 +797,13 @@ function queryUserInfoByCardNo() {
                     } else {
                         $("#saveUser").show();
                         $("#newCardModal").modal();
+                        $(document).keydown(function (event) { //监听键盘按下时的事件
+                            if (event.keyCode == 13) {
+                                //回车键
+                                $('#newCardModal').modal('hide');
+                            }
+
+                        });
                     }
                 } else {
                     new PNotify({
@@ -1190,7 +1191,7 @@ function readonlyOrNot(flag) {
  * 查询默认打印机
  */
 function setPrint() {
-    if(printIndex>=0){
+    if (printIndex >= 0) {
         return;
     }
     $.ajax({
@@ -1206,9 +1207,9 @@ function setPrint() {
                 return;
             }
             if (res.code == 0) {
-                printIndex=res.data.printIndex;
+                printIndex = res.data.printIndex;
             } else {
-                printIndex=-1;
+                printIndex = -1;
             }
         }
     });
@@ -1326,10 +1327,10 @@ function savePatient(flag) {
                 return;
             }
             if (res.code == 0) {
-                if(flag){
+                if (flag) {
                     $("#patientId").val(res.data.patientId);
                     saveMzyReqrec();
-                }else {
+                } else {
                     clearRegistration();
                     successMesage(res);
                 }
@@ -1454,7 +1455,7 @@ function saveMzyReqrec() {
                     styling: 'bootstrap3'
                 });
                 $('#confirmFeeModal').modal('hide');
-                prn1Print(patientId,-1);
+                prn1Print(patientId, -1);
                 // loadTableCount();
                 // loadRegistrationList(true);
                 clearRegistration();
@@ -1535,10 +1536,6 @@ function initListDoctorSelect() {
 }
 
 
-
-
-
-
 /**
  * 清空搜索参数
  */
@@ -1632,11 +1629,11 @@ function clearRegistration() {
  * 直接打印发票
  * @param patientId
  */
-function prn1Print(patientId,times) {
+function prn1Print(patientId, times) {
     setPrint();
     $.ajax({
         type: "GET",
-        url: '/thmz/printMzyReqrecRecept?patientId=' + patientId+"&times="+times,
+        url: '/thmz/printMzyReqrecRecept?patientId=' + patientId + "&times=" + times,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -1657,7 +1654,7 @@ function prn1Print(patientId,times) {
                 LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "120mm");
                 LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "93mm");
                 LODOP.SET_PRINT_PAGESIZE(1, "120mm", "93mm", "CreateCustomPage");
-                LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME","门诊发票");//对新建的纸张重命名
+                LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
                 LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
                 LODOP.ADD_PRINT_TEXT("6mm", "0mm", "45mm", "3mm", "湖南泰和医院管理有限公司");
                 LODOP.ADD_PRINT_TEXT("6mm", "59mm", "30mm", "3mm", "流水号:");
@@ -1683,10 +1680,10 @@ function prn1Print(patientId,times) {
                 LODOP.ADD_PRINT_TEXT("79mm", "53mm", "23mm", "3mm", res.user.userName);//收费员
                 //LODOP.PREVIEW();
                 LODOP.PRINT();
-                if(times>0){
+                if (times > 0) {
                     loadRegistrationList(true);
                 }
-            } else if(res.code == -1){
+            } else if (res.code == -1) {
                 new PNotify({
                     title: '错误提示',
                     text: res.message,
@@ -1700,11 +1697,6 @@ function prn1Print(patientId,times) {
 };
 
 
-
-
-
-
-
 /**
  * 销卡
  * @param data
@@ -1736,7 +1728,7 @@ function clearIcCardNo() {
  * 根据手机号码查询病人信息
  */
 function queryUserInfoByphoneNo() {
-   var phoneNo =$("#phoneNum").val();
+    var phoneNo = $("#phoneNum").val();
     if (phoneNo.length == 11) {
         $.ajax({
             type: "GET",
@@ -1764,11 +1756,11 @@ function queryUserInfoByphoneNo() {
  */
 function queryUserInfoByName() {
     var userName = $('#userName').val();
-   // var cardNo=$("#cardNo").val();
+    // var cardNo=$("#cardNo").val();
     if (userName == null || userName == "") {
         return;
     }
-    if (userName.length >0) {
+    if (userName.length > 0) {
         $.ajax({
             type: "GET",
             url: '/thmz/getPatientMiByName?name=' + userName,

+ 7 - 4
src/main/resources/static/js/toll_administration.js

@@ -398,10 +398,10 @@ function initFeeTable() {
                     "rows": {}   //数据
                 };
             }
-            if(ress.pageViewVo.total==0){
-                $("#cardNo").val(null);
-                $("#name").val(null);
-            }
+            // if(ress.pageViewVo.total==0){
+            //     $("#cardNo").val(null);
+            //     $("#name").val(null);
+            // }
             return {
                 "total": ress.pageViewVo.total,//总页数
                 "rows": ress.pageViewVo.data   //数据
@@ -1127,6 +1127,9 @@ function saveConfirmFee() {
                 });
                 $("#confirmFeeModal").modal("hide");
                 initFeeTable();
+                $("#patientId").val(null);
+                $("#cardNo").val(null);
+                $("#name").val(null);
                 //默认光标在卡号输入框
                 $("#cardNo").focus();
             } else {