| 
					
				 | 
			
			
				@@ -10,6 +10,7 @@ var windowsNoYf = window.localStorage["winNo"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var printType = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var temporaryKeyList=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var timer=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+var printTimer = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     init_daterangepicker(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (groupNo == null || windowsNoYf == null) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,32 +27,30 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         cleanParams(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('input:radio').each(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('input:checkbox').each(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $(this).click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if ($(this).prop('checked')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $(':radio[name=autoPrint]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $(':checkbox[name=autoPrint]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $(':checkbox[name=printType]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $(this).prop('checked', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 var chk_value = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $('input[name="autoPrint"]:checked').each(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     chk_value = $(this).val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                printPrescriptions(chk_value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('input:checkbox').each(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $(this).click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ($(this).prop('checked')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $(':checkbox[name=printType]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $(this).prop('checked', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $('input[name="printType"]:checked').each(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     printType = $(this).val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!printTimer) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    printTimer = setInterval("autoPrintMzCf()",2000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                printType = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $(':checkbox[name=autoPrint]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $(':checkbox[name=printType]').removeAttr('checked'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                printType = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                clearTimeout(printTimer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                printTimer=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var chk_value = $('input[name="autoPrint"]:checked').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            printPrescriptions(chk_value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $("#cfxxModal").on('shown.bs.modal', function (t) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -639,14 +638,8 @@ function printPrescription(patientId, times, orderNo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //setPrint();//初始化默认打印机 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 3:打印血液中心的处方 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(printType == '3' && res.data.warnDeptCode == '1020510'){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    printView(res.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    successMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if(printType != '3' && res.data.warnDeptCode != '1020510'){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    printView(res.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    successMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                printView(res.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                successMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -689,6 +682,7 @@ function printDrugList(patientId, times, orderNo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let count = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 批量打印处方 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * @param chkValue 1:处方打印 2:药单打印 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1041,4 +1035,10 @@ function checkInput() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //清除定时器 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     clearTimeout(timer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     timer=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 定时器调用处方打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function autoPrintMzCf(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let v = $("#autoPrint").val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    printPrescriptions(v); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |