| 
					
				 | 
			
			
				@@ -24,8 +24,6 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //数据校验 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     init_validator(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //时间区间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    initMzWorkTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //初始频次下拉选 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     initOrderFrequencys("orderFrequency", true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //初始用药方式下拉选 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -58,24 +56,6 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         modifyPatient(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 挂号列表中的科室和医生列表初始化 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    initListSelect(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // $(".collapse-link").on("click", function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //     var a = $(this).closest(".x_panel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         , b = $(this).find("i") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         , c = a.find(".x_content"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //     a.attr("style") ? c.slideToggle(200, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         a.removeAttr("style").css("background", "#EBEBE4"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //     }) : (c.slideToggle(200), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         a.css("height", "auto").css("background", "#EBEBE4")), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         b.toggleClass("fa-chevron-up fa-chevron-down") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //折叠按钮初始化 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $('.collapse-link').on('click', function () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1616,174 +1596,7 @@ function initTemplateTypeSelect() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 初始科室下拉选 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param ampm 时间段区间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initDeptPlus() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //科室列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getUnitCodeByRequestDay?ampm=' + $("#ampm").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (data == '401' || data == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.each(data.data, function (commentIndex, comment) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                html += '<option value="' + comment.code + '">' + comment.name + '</option>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNo').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNo').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNo').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#chargeType').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#chargeType').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            emptyInput(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 初始医生下拉选 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param ampm 时间段区间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initEmployee() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //医生列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getDoctorCodeByRequestDay?unitCode=' + $('#deptNo').val() + "&m=" + $("#ampm").val() + "&chargeType=" + $("#chargeType").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var flag = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.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 (comment.employeeCode == -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    flag = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctor').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctor').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctor').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            validator.checkAll($("#regi_form")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //如果有无需选择医生的选项,默认选择 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $('#doctor').selectpicker('val', -1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $('#doctor').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                fitFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 初始门诊时间区间下拉选 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initMzWorkTime() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getMzWorkTime', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var ampm = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.each(res.data, function (commentIndex, comment) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                html += '<option value="' + comment.code + '">' + comment.name + '</option>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (ampm == null || (ampm != "a" && ampm != "p")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    var startTime = paseToFullTime(comment.startTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    var endTime = paseToFullTime(comment.endTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (range(startTime, endTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ampm = comment.code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#ampm').empty();   //清空resText里面的所有内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#ampm').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#ampm').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#ampm").selectpicker('val', ampm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#ampm').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            initDeptPlus(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 初始门诊号别下拉选 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initChargeType() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getChargeTypeByRequestDay?unitCode=' + $('#deptNo').val() + "&m=" + $("#ampm").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.each(res.data, function (commentIndex, comment) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                html += '<option value="' + comment.code + '">' + comment.name + '</option>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#chargeType').empty();   //清空resText里面的所有内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#chargeType').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#chargeType').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            validator.checkAll($("#regi_form")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            emptyInput(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 设置挂号费等费用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function fitFee() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var chargeType = $('#doctor').find("option:selected").attr('data-chargeType'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var checkFee = $('#doctor').find("option:selected").attr('data-checkFee'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#checkFee").val(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#amountMoney").text(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#amountMoneyConfirm").text(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#realMoney").val(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#cash").val(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#changeAmount").val(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getMzChargeTypeByCode?code=' + chargeType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#registrationFee").val(res.data.reqFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#hospitalFee").val(res.data.clinicFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            checkFee = parseFloat(checkFee) + parseFloat(res.data.reqFee) + parseFloat(res.data.clinicFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#amountMoney").text(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#amountMoneyConfirm").text(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#realMoney").val(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#cash").val(checkFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1925,31 +1738,7 @@ function initJyZdSample() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 日期值改变修改年龄字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param ev 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function changeDate(ev) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 表格类型切换事件  卡片展示或者列表形式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function listTypeChange(object) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //var indexNum = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#regi_List_type").find("button").each(function (index, element) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($(element).hasClass("btn-primary")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $(element).removeClass("btn-primary").addClass("btn-default"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // if (object == element) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     indexNum = index; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $(object).removeClass("btn-default").addClass("btn-primary"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    loadRegistrationList(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 保存当前药品到右边处方区域 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2742,87 +2531,12 @@ function clearJyJcItem() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $("#yshPartDiv").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * 设置当前处方金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param tableId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param totalRetprice 新项目金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param temporaryItemsAmount 原项目金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param index 0 西药 1 中药 2诊疗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param opFlag 0 保存药品或者项目   1 删除药品或者项目 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// function calculateCfAmount(tableId, totalRetprice, temporaryItemsAmount, index, opFlag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     if (opFlag == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         if (index == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //获取中药付数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var zyfs = $(tableId).find("input.zyfs").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //当前处方单付金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var singleAmount = $("#singleAmount").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (singleAmount == null || singleAmount == '') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 singleAmount = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //如果是修改,需要减去原来的费用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (temporaryItemsAmount != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 singleAmount = Minus(singleAmount, temporaryItemsAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             singleAmount = Add(singleAmount, totalRetprice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var cfAmount = Multiply(singleAmount, zyfs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $(tableId).find("span.cf_amount").html(cfAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //单张处方的价格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $("#singleAmount").val(singleAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //设置单张处方金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var cfAmount = $(tableId).find("span.cf_amount").html(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (cfAmount != null && cfAmount != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 cfAmount = parseFloat($(tableId).find("span.cf_amount").html()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //如果是修改,需要减去原来的费用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (temporaryItemsAmount != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 cfAmount = Minus(cfAmount, temporaryItemsAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             cfAmount = Add(cfAmount, totalRetprice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $(tableId).find("span.cf_amount").html(cfAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     } else if (opFlag == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         if (index == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //获取中药付数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var zyfs = $(tableId).find("input.zyfs").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //当前处方单付金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var singleAmount = $("#singleAmount").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (singleAmount == null || singleAmount == '') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 singleAmount = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             singleAmount = Minus(singleAmount, totalRetprice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var cfAmount = Multiply(singleAmount, zyfs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $(tableId).find("span.cf_amount").html(cfAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //单张处方的价格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $("#singleAmount").val(singleAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             //设置单张处方金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             var cfAmount = $(tableId).find("span.cf_amount").html(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             if (cfAmount != null && cfAmount != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                 cfAmount = parseFloat($(tableId).find("span.cf_amount").html()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             cfAmount = Minus(cfAmount, totalRetprice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//             $(tableId).find("span.cf_amount").html(cfAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     //计算结束都设置成新增药品或者项目 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     $("#update_flag").val(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 计算总金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function calculateTotalAmount() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // var cfAmounts = $("span.cf_amount"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // var totalAmount = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // if (cfAmounts != null && cfAmounts.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //     for (var i = 0; i < cfAmounts.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //         totalAmount = Add(totalAmount, parseFloat($(cfAmounts[i]).html())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // $("#totalAmount").html(totalAmount.toFixed(1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     var jsonData = getParamsForOrescription(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: "POST", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2913,43 +2627,7 @@ function billItemButtonChange(object, objectIndex) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $("#jcJyItem").webuiPopover('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 打开智能辅助医生系统窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function smartAssistModal() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //点击模态框外不关闭模态框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#smartAssistModal").modal({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        backdrop: "false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //$(".modal-backdrop").remove(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 打开退费信息窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function backNoModal(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#backNoModal").modal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 打开打印窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function printOrPreviewModal(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#printOrPreviewModal").modal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 打开打印内容窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function printModal(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#printOrPreviewModal").modal("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#printModal").modal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 打开快速接诊窗口 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -3064,41 +2742,7 @@ function clearRapidAccepts() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 校验收款金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function checkFee() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var cash = parseFloat($("#cash").val()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var realMoney = parseFloat($("#realMoney").val()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    realMoney = realMoney.toFixed(2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#realMoney").val(realMoney) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (cash < realMoney) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            title: '错误提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            text: "收款金额不能少于实收金额!", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else if (cash > realMoney) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($("#payType").val() == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var changeAmount = cash - realMoney; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#changeAmount").val(changeAmount.toFixed(2)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                title: '错误提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                text: "非现金收款金额不能大于实收金额!", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //计算和设置折扣比例 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var amountMoneyConfirm = parseFloat($("#amountMoneyConfirm").text()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var discount = realMoney / amountMoneyConfirm * 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#discount").text(discount.toFixed(2)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 根据病人姓名输入框内容动态加载病人列表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4775,60 +4419,6 @@ function calculateZyAmount() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function getByPatientId(patientId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/getByPatientId?patientId=' + patientId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (res.data != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#cardNo").val(res.data.icCardNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#cardNo").attr("title", res.data.icCardNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#cardNo").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#userName").val(res.data.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#userName").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#userNameReadOnly").val(res.data.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#age").val(res.data.age); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#age").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#gender").selectpicker('val', res.data.sex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#gender").selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#gender").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#birthDayReadonly").val(res.data.birthDayStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#birthDayReadonly").attr("title", res.data.birthDayStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#birthDayReadonly").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#birthDay").val(res.data.birthDayStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#birthDay").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#phoneNum").val(res.data.phoneNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#phoneNum").attr("title", res.data.phoneNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#phoneNum").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#patientsNature").selectpicker('val', res.data.responseType);//默认选中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $('#patientsNature').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#patientsNature").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#idCard").val(res.data.socialNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#idCard").attr("title", res.data.socialNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#idCard").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#address").val(res.data.address); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#address").blur(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $("#patientId").val(res.data.patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (res.data.name != null && res.data.name != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        $("#editUser").show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    readonlyOrNot(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 将病人信息填入患者信息修改form 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4865,161 +4455,9 @@ function fillPlusPatinet(patinet) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 关闭当前这个付款方式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function closeThisParent(obj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $(obj).parent().parent().remove(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 科室与时间区间下拉选改变时清空输入框内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function emptyInput() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#doctor').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#doctor').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#registrationFee").val(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#hospitalFee").val(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#checkFee").val(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#amountMoney").text(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#amountMoneyConfirm").text(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#realMoney").val(0.00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 给某些域增加title或者清除title 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param obj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function clearTextOrTitle(obj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if ($(obj).val() == null || $(obj).val().length == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $(obj).attr("title", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $(obj).attr("title", $(obj).val()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($(obj).attr("id") == "birthDay") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $(obj).blur() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 当按照卡号查询时,病人信息输入框不可编辑,当清空输入框时可编辑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * @param flag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function readonlyOrNot(flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#cardNo").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userName").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#age").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#gender").attr("disabled", "disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#phoneNum").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#patientsNature").attr("disabled", "disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#idCard").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#address").attr("readonly", "readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#birthDayReadonly").removeClass("hide").addClass("in"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#birthDayGroup").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userName").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userNameReadOnly").removeClass("hide").addClass("in"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#webuiPopover0").css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#cardNo").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userName").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#age").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#gender").removeAttr("disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#gender").next().removeClass("disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#phoneNum").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#patientsNature").removeAttr("disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#patientsNature").next().removeClass("disabled"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#idCard").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#address").removeAttr("readonly"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#birthDayReadonly").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#birthDayGroup").removeClass("hide").addClass("in"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userName").removeClass("hide").addClass("in"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#userNameReadOnly").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //$("#webuiPopover0").css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 保存窗口号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function saveWindows() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/saveWindows', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        data: JSON.stringify({"windowsNo": $("#windowsNum").val()}), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#editWindowsModal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '操作提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    text: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    type: 'success', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '错误提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    text: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 保存病人信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function savePatient() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/savePatient', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        data: JSON.stringify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "name": $("#userName").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "age": $("#age").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "sex": $("#gender").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "birthDay": $("#birthDay").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "icCardNo": $("#cardNo").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "phoneNo": $("#phoneNum").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "responseType": $("#patientsNature").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "socialNo": $("#idCard").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "address": $("#address").val() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $("#patientId").val(res.data.patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                saveMzyReqrec(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '错误提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    text: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5062,136 +4500,6 @@ function modifyPatient() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 保存挂号信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function saveMzyReqrec() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var mzyRequestId = $('#doctor').find("option:selected").attr('data-mzyRequestId'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/saveMzyReqrec', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        data: JSON.stringify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "mzyReqrec": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                "patientId": $("#patientId").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                "ampm": $("#ampm").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                "unitCode": $("#deptNo").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                "chargeType": $("#chargeType").val() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }, "responceType": $("#patientsNature").val(), "mzyRequestId": mzyRequestId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '操作提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    text: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    type: 'success', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $('#confirmFeeModal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                loadTableCount(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                loadRegistrationList(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new PNotify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '错误提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    text: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    hide: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    styling: 'bootstrap3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 挂号列表中的科室和医生列表初始化 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initListSelect() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    initListDeptSelect(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    initListDoctorSelect(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 挂号列表中的科室列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initListDeptSelect() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //科室列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/allMzUnitCode', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (data == '401' || data == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.each(data.data, function (commentIndex, comment) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                html += '<option value="' + comment.code + '">' + comment.name + '</option>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNoParam').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNoParam').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#deptNoParam').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 挂号列表中的医生列表初始化 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function initListDoctorSelect() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //医生列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '/thmz/listEmployeeByDepts?depts=' + $('#deptNoParam').val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var html = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.each(res.data, function (commentIndex, comment) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + '</option>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctorParam').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctorParam').html(html); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // $("#doctorParam").selectpicker({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //     size: 10 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $('#doctorParam').selectpicker('destroy').selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * 加载挂号列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  * @param flag 是否清空挂号卡片列表区域 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// function loadRegistrationList(flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         pageIndex = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         $("#card_regi_list").empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         $("div.page").removeClass("in").addClass("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     var regiListType = getIndex("regi_List_type"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     if (regiListType == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         loadCardList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     } else if (regiListType == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//         loadTableList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 获取按钮组选择的下标 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5222,17 +4530,6 @@ function getRePortRangeArr() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return rePortRangeArr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * 清空搜索参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function clearParams() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#deptNoParam").selectpicker('val', null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#deptNoParam").selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#doctorParam").selectpicker('val', null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#deptNoParam").selectpicker('refresh'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $("#userNameParam").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#reportrange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5895,53 +5192,6 @@ function getMzPrescriptionVoPaid(patientId, times, clnicId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var currentPatientId = $("#patientId").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //当前接诊的用户和操作接诊的是同一个人,不做任何操作 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (currentPatientId == patientId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (currentPatientId == null || currentPatientId == "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //当前没有人接诊,直接接诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        getMzPrescriptionVoPaidCommon(patientId, times, clnicId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //当前有人在接诊,提示是否需要切换和保存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#messagePrescriptionModal").modal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $("#confirmPrescriptionButton").off("click").on("click", function (t) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $("#messagePrescriptionModal").modal("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //先保存目前接诊信息,再切换就诊人 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var jsonData = getParamsForOrescription(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                type: "POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                url: '/thmz/savePrescription', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                data: JSON.stringify(jsonData), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        loadInClinicTableList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        loadClinicTableList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        getMzPrescriptionVoPaidCommon(patientId, times, clnicId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |