Bläddra i källkod

修正费用审批 角色只有一位成员时,审批不能继续的问题

caipin 8 år sedan
förälder
incheckning
dcc6e61c33
1 ändrade filer med 12 tillägg och 23 borttagningar
  1. 12 23
      protected/controller/ReceiptController.php

+ 12 - 23
protected/controller/ReceiptController.php

@@ -3983,29 +3983,12 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 		$data['htmlLoan']=$htmlLoan;
 		
 		
-		/*
-		<!-- loop loanList.0.verifyList -->
-		  						
-		  						
-		  						
-			  						<li <!-- if {{loanList' value.status}}==1 --> class="done" <!-- elseif {{loanList'  value.status}}==3 --> class="undone"  <!-- endif -->>
-			  							<div class="avtra"><img src="{{loanList'  value.2}}_2.jpg"></div>
-			  							
-			  							<div class="comment">
-			  								<p class="colGray"><span class="fR">{{loanList'  value.date}}</span>{{loanList'  value.1}}<!-- if isset({{loanList'  value.rolename}}) --> ({{loanList' value.rolename}}) <!-- endif --></p>
-			  								<p>{{loanList'  value.opinion}}</p>
-			  							</div>
-			  							
-			  						</li>
-		  						
-		  						
-		  						<!-- endloop -->
-		*/
+		
 		//print_r($loanList);
 		
 		
 		
-		$Locate=0;$roleId=0;
+		$Locate=0;$roleId=0;$button=0;
 		if($ap==4)
 			$status=4;
 		foreach ($receiptList as $key=>$value){
@@ -4162,7 +4145,7 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 			$receiptList[$key]['relust']=$relust;
 			$receiptList[$key]['relustCN']=$this->num_to_rmb($relust);
 		}
-		
+		//print_r($receiptList);die;
 		//$data['verifyDetail']=$verifyDetail;
 		
 		$mothHtml="";
@@ -6227,7 +6210,7 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 				//还需加入是否已经进入角色审批
 				if ($verifyDetail[0][1]=='ROLE'){
 					
-					//print_r($verifyDetail);echo "ddd";
+					
 					$vStaffString=json_decode($verifyDetail[0][3]);
 					
 					foreach ($vStaffString as $key=>$value){
@@ -6238,8 +6221,13 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 					 
 					//print_r($verifyDetail);
 					//die;
-					$nowStaff=implode(',', $nowStaffList);
-					$verifyStaff=array($this->staff[0]['sid']."_R"=>array('date'=>date('Y-m-d'),'opinion'=>$opinion,'status'=>$status,'nextStaff'=>$verifyDetail[0][0],'ROLE'=>1));
+					if (!empty($nowStaffList)){
+						$nowStaff=implode(',', $nowStaffList);
+						$verifyStaff=array($this->staff[0]['sid']."_R"=>array('date'=>date('Y-m-d'),'opinion'=>$opinion,'status'=>$status,'nextStaff'=>$verifyDetail[0][0],'ROLE'=>1));
+					}else{
+						$nowStaff=$verifyDetail[1][0];
+						$verifyStaff=array($this->staff[0]['sid']."_R"=>array('date'=>date('Y-m-d'),'opinion'=>$opinion,'status'=>$status,'nextStaff'=>$verifyDetail[1][0]));
+					}
 				}else{
 					
 					if ($verifyDetail[1][1]=='ROLE'){
@@ -6265,6 +6253,7 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 				$vStaffString=json_encode($verifyStaff);
 				$receipt->nowStaff=$nowStaff;
 				$receipt->verifyStaff=$vStaffString;
+				
 			}else{
 				$VS=end($verifyStaff);