| 
					
				 | 
			
			
				@@ -6,8 +6,11 @@ var fskPrintIndex = window.localStorage["fskPrintIndex"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var winNo = window.localStorage["winNo"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var groupNo = window.localStorage["groupNo"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let coreId // 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let mzHistoryDays = 30 // 门诊历史处方前置天数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     init_daterangepicker(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 查看门诊历史处方前置天数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    mzHistoryDays = parseInt(!initSysParametersByCode('mzHistoryDays') ? '30' : initSysParametersByCode('mzHistoryDays')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $(".selectpicker").selectpicker({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dropuAuto: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -35,7 +38,7 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $('#btn_clean_history').click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $('#reportRangeList span').html(moment().subtract(30, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $('#reportRangeList span').html(moment().subtract(mzHistoryDays, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $("#btn_query_history").click(function (t) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         callHistoryDetail(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -356,15 +359,15 @@ function initTbTable(pageIndex) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 formatter: function (value, row, index) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     var str = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (sendRefundGroup == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        str = '<button type="button" class="registration-no-color-foot-button" title="打印" onclick="printInjectionOralMedicine(\'' + row.patientId + '\',\'' + row.orderNo + '\',\'' + row.realNo + '\',\'' + row.times + '\',\'' + row.receiptNo + '\',\'' + row.confirmFlag + '\');" style="color: #35D082;"><i class="fa fa-print"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        str = '<button type="button" class="btn btn-primary btn-sm" title="打印" onclick="printInjectionOralMedicine(\'' + row.patientId + '\',\'' + row.orderNo + '\',\'' + row.realNo + '\',\'' + row.times + '\',\'' + row.receiptNo + '\',\'' + row.confirmFlag + '\');" style="color: #35D082;">打印 <i class="fa fa-print"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (groupNo === '71' || groupNo === '83') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            str += '<button type="button" class="registration-no-color-foot-button" title="叫号" onclick="callNumber(\'' + row.patientId + '\',\'' + row.name + '\')"><i class="glyphicon glyphicon-bullhorn"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            str += '<button type="button" class="btn btn-primary btn-sm" title="叫号" onclick="callNumber(\'' + row.patientId + '\',\'' + row.name + '\')">叫号 <i class="glyphicon glyphicon-bullhorn"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (row.confirmFlag == 5 || row.confirmFlag == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            str += '<button type="button" class="registration-no-color-foot-button" title="发药" id="sendDrug" onclick="sendMedicineProcessing(\'' + row.realNo + '\',\'' + row.orderNo + '\',\'' + row.receiptNo + '\',\'' + row.times + '\',\'' + row.patientId + '\',\'' + row.name + '\')"><i class="fa fa-check-square-o"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            str += '<button type="button" class="btn btn-primary btn-sm" title="发药" id="sendDrug" onclick="sendMedicineProcessing(\'' + row.realNo + '\',\'' + row.orderNo + '\',\'' + row.receiptNo + '\',\'' + row.times + '\',\'' + row.patientId + '\',\'' + row.name + '\')">发药 <i class="fa fa-check-square-o"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        str += '<button type="button" class="registration-no-color-foot-button" title="详细" onclick="prescriptionDetail(\'' + row.realNo + '\',\'' + row.orderNo + '\',\'' + row.receiptNo + '\',\'' + row.times + '\',\'' + row.patientId + '\',\'' + row.confirmFlag + '\')"><i class="fa fa-plus"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        str += '<button type="button" class="registration-no-color-foot-button" title="历史处方" onclick="prescriptionHistoryDetail(\'' + row.patientId + '\',\'' + 0 +'\')"><i class="fa fa-eye"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        str += '<button type="button" class="btn btn-primary btn-sm" title="详细" onclick="prescriptionDetail(\'' + row.realNo + '\',\'' + row.orderNo + '\',\'' + row.receiptNo + '\',\'' + row.times + '\',\'' + row.patientId + '\',\'' + row.confirmFlag + '\')">详细 <i class="fa fa-plus"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        str += '<button type="button" class="btn btn-primary btn-sm" title="历史处方" onclick="prescriptionHistoryDetail(\'' + row.patientId + '\',\'' + 0 +'\')">历史处方 <i class="fa fa-eye"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return str; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1743,14 +1746,6 @@ function prescriptionHistoryDetail(patientId, type){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         daterangepickerNew('reportRangeList', 'center'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         initSelectHistory(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    let rePortRangeArr = getRePortRangeArr1(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    let temp = {   //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        patientId: patientId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        beginTime: rePortRangeArr[0], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        endTime: rePortRangeArr[1], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // pageSize: params.limit,   //页面大小 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // pageIndex: params.offset / params.limit,  //页码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $('#tb_table_history').bootstrapTable("destroy"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $historyTable = $('#tb_table_history').bootstrapTable({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         url: '/thmz/getMzBlRecordList',         //请求后台的URL(*) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1761,11 +1756,11 @@ function prescriptionHistoryDetail(patientId, type){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pagination: true,                   //是否显示分页(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sortable: true,                     //是否启用排序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sortOrder: "desc",                   //排序方式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        queryParams: temp,           //传递参数(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        queryParams: queryDataS,           //传递参数(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sidePagination: "server",           //分页方式:client客户端分页,server服务端分页(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageNumber: 1,                       //初始化加载第一页,默认第一页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageSize: 5,                       //每页的记录行数(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        pageList: [10, 15, 25, 50, 100],        //可供选择的每页的行数(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pageList: [5, 10, 15, 25, 30],        //可供选择的每页的行数(*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         search: false,                       //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         strictSearch: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         showColumns: false,                  //是否显示所有的列 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1996,6 +1991,18 @@ function showMzBlRecordModal(patientId, times, type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function queryDataS(params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var rePortRangeArr = getRePortRangeArr1(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var temp = {   //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        patientId: coreId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        beginTime: rePortRangeArr[0], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        endTime: rePortRangeArr[1], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pageSize: params.limit,   //页面大小 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pageIndex: params.offset / params.limit,  //页码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function getRePortRangeArr1() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     var rePortRange = $('#reportRangeList span').html(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     var rePortRangeArr = rePortRange.split(" - "); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2035,7 +2042,7 @@ function clearInput() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function initSelectHistory() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#reportRangeList span').html(moment().subtract(30, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#reportRangeList span').html(moment().subtract(mzHistoryDays, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //select 从后台加载数据,并保留之前选择的内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     dynamicSelectWithOri("editZd", '/thmz/getAllZdIcdCommonParams?commonParams=',false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //过敏源 
			 |