|  | @@ -87,13 +87,15 @@ function dispensingMessage(data) {
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |          if (chk_value != '') {//自动打印
 | 
	
		
			
				|  |  |              for (var i = 0; i < data.orderNos.length; i++) {
 | 
	
		
			
				|  |  | +                var orderNo = data.orderNos[i];
 | 
	
		
			
				|  |  |                  if(chk_value == 1){
 | 
	
		
			
				|  |  |                      $.ajax({
 | 
	
		
			
				|  |  |                          type: "GET",
 | 
	
		
			
				|  |  | +                        async: false,
 | 
	
		
			
				|  |  |                          data: {
 | 
	
		
			
				|  |  |                              patientId: data.patient_id,
 | 
	
		
			
				|  |  |                              times: data.times,
 | 
	
		
			
				|  |  | -                            orderNo: data.orderNos[i]
 | 
	
		
			
				|  |  | +                            orderNo: orderNo
 | 
	
		
			
				|  |  |                          },
 | 
	
		
			
				|  |  |                          url: '/thmz/getPrintFlag',
 | 
	
		
			
				|  |  |                          contentType: "application/json;charset=UTF-8",
 | 
	
	
		
			
				|  | @@ -101,12 +103,12 @@ function dispensingMessage(data) {
 | 
	
		
			
				|  |  |                          headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
 | 
	
		
			
				|  |  |                          success: function (res) {
 | 
	
		
			
				|  |  |                              if (res.code == 0 && res.printFlag == 0) {
 | 
	
		
			
				|  |  | -                                printPrescription(data.patient_id, data.times,data.orderNos[i],1);
 | 
	
		
			
				|  |  | +                                printPrescription(data.patient_id, data.times,orderNo,1);
 | 
	
		
			
				|  |  |                              }
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  |                  }else if(chk_value == 2){
 | 
	
		
			
				|  |  | -                    printDrugList(data.patient_id, data.times,data.orderNos[i]);
 | 
	
		
			
				|  |  | +                    printDrugList(data.patient_id, data.times,orderNo);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |