caipin 8 lat temu
rodzic
commit
d9ee6a84ac

+ 1 - 1
protected/config/routes.conf.php

@@ -177,7 +177,7 @@ $route['*']['/saeaLoanReceiptAddDo'] = array('ReceiptController', 'saeaLoanRecei
 
 $route['*']['/saeaLoanReceiptEdi/:rid'] = array('ReceiptController', 'saeaLoanReceiptEdi');
 
-$route['*']['/implement'] = array('ReceiptController', 'implement');
+$route['*']['/implement/:rid'] = array('ReceiptController', 'implement','extension'=>'.html');
 $route['*']['/implementDo'] = array('ReceiptController', 'implementDo');
 
 $route['*']['/remitAdd'] = array('ReceiptController', 'remitAdd');

+ 11 - 9
protected/controller/InvoiceController.php

@@ -2723,16 +2723,18 @@ class InvoiceController extends DooController {
 				if (! empty ( $invoiceOperationLogList )) {
 					$html .= '<table class="table table-bordered table-condensed"><tbody><tr><th width="60%" class="taC">审批流程</th></tr><tr><td>';
 					foreach ( $invoiceOperationLogList as $key => $value ) {
-						$html .= '<blockquote><p><span class="colGray">' . $value ['date'] . '</span>&nbsp;
-						' . $value ['category'] . '-' . $value ['username'] . '&nbsp;';
-						if ($value ['status'] == 2) {
-							$html .= '<span class="colGreen">同意</span>';
-						} elseif ($value ['status'] == 3) {
-							$html .= '<span class="colOrange">退回</span>';
-						} elseif ($value ['status'] == 5) {
-							$html .= '<span class="colGreen">打印</span>';
+						if($value ['status']==1||$value ['status']==2||$value ['status']==3||$value ['status']==4){
+							$html .= '<blockquote><p><span class="colGray">' . $value ['date'] . '</span>&nbsp;
+							' . $value ['category'] . '-' . $value ['username'] . '&nbsp;';
+							if ($value ['status'] == 2) {
+								$html .= '<span class="colGreen">同意</span>';
+							} elseif ($value ['status'] == 3) {
+								$html .= '<span class="colOrange">退回</span>';
+							} elseif ($value ['status'] == 5) {
+								$html .= '<span class="colGreen">打印</span>';
+							}
+							$html .= $value ['operation'] . '</p></blockquote>';
 						}
-						$html .= $value ['operation'] . '</p></blockquote>';
 					}
 					$html .= '</td></tr></tbody></table>';
 				}

+ 27 - 11
protected/controller/ReceiptController.php

@@ -3418,10 +3418,12 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 	
 	function implement(){
 
+		$rid=isset($this->params['rid'])?$this->params['rid']:0;
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
 		Doo::loadModel('receipt');
 		$receipt=new receipt();
 		
-		
 		Doo::loadModel('L_category');
 		$Lcategory=new L_category();
 		Doo::loadModel('verify');
@@ -3433,7 +3435,9 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 		Doo::loadModel("execute");
 		$execute=new execute();
 		
-		$receiptList=$receipt->find(array('where'=>'executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
+		$rid = $XDeode->decode ( $rid );
+		
+		$receiptList=$receipt->find(array('where'=>'executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and (status=1 or status=6) and rid='.$rid,'desc'=>'rid','asArray'=>true));
 
 		Doo::loadModel('loanReceipt');
 		$loanReceipt=new loanReceipt();
@@ -4283,8 +4287,8 @@ $receiptList[$key]['verifyList']=$verifyList;
 			$item=$this->get_args('item')?$this->get_args('item'):"";
 		
 		$year=$this->get_args('year')?$this->get_args('year'):date("Y");
-		$moth=$this->get_args('moth')?$this->get_args('moth'):date("m");
-		$day=$this->get_args('day')?$this->get_args('day'):date("d");
+		$moth=$this->get_args('moth')?$this->get_args('moth'):'MONTH';
+		$day=$this->get_args('day')?$this->get_args('day'):'DAY';
 		$sop=$this->get_args('sop')?$this->get_args('sop'):'SOP';
 		Doo::loadModel('receipt');
 		$receipt=new receipt();
@@ -4297,6 +4301,9 @@ $receiptList[$key]['verifyList']=$verifyList;
 		$verify=new verify();
 		Doo::loadModel('staff');
 		$staff=new staff();
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
 		
 		$condition="";
 		if($item=="expenses")
@@ -4306,22 +4313,25 @@ $receiptList[$key]['verifyList']=$verifyList;
 		elseif ($item=="remits")
 			$condition=" and Rtype=2 ";
 		$sopString="";
-		$dateCondition=" and Year(executeDate) =".$year;	
+		$dateCondition=" and Year(date) =".$year;	
 		if($moth!='MONTH'){
-			$dateCondition=" and Year(executeDate) =".$year." and Month(executeDate) = ".$moth;
+			$dateCondition=" and Year(date) =".$year." and Month(date) = ".$moth;
 			
 		}
 		if($day!='DAY')
-			$dateCondition=" and Year(executeDate) =".$year." and Month(executeDate) = ".$moth." and day(executeDate)=".$day;
+			$dateCondition=" and Year(date) =".$year." and Month(date) = ".$moth." and day(date)=".$day;
 		if ($sop!='SOP')
 			$sopString=" and staff=".$sop;
 		
-		//$noPassSum=$receipt->receiptByYear($year,$this->staff[0]['sid']);
+		$statusCon='(status=8 or status=9 or status=1 or status=6 )';	
+		if ($item=='teipts')
+			$statusCon='(status=1 or status=6 )';
+		//$noPassSum=$receipt->receiptByYear($year,$this->staff[0]['sid']); and (status=1 or status=6)
 			
-		$receiptList=$receipt->find(array('where'=>' (status=8 or status=9 )'.$condition.$dateCondition.$sopString,'desc'=>'rid','asArray'=>true));
+		$receiptList=$receipt->find(array('where'=>$statusCon.$condition.$dateCondition.$sopString,'desc'=>'rid','asArray'=>true));
 
 		//员工筛选
-		$receiptList2=$receipt->find(array('where'=>' (status=8 or status=9 )'.$condition.$dateCondition,'desc'=>'rid','asArray'=>true));
+		$receiptList2=$receipt->find(array('where'=>$statusCon.$condition.$dateCondition,'desc'=>'rid','asArray'=>true));
 		$sopStaff=array();
 		foreach ($receiptList2 as $key=>$value){
 			$staffDetail=$staff->getOne(array('where'=>'sid='.$value['staff'],'asArray'=>true));
@@ -4330,6 +4340,12 @@ $receiptList[$key]['verifyList']=$verifyList;
 		
 		$Locate=0;$roleId=0;$button=0;
 		foreach ($receiptList as $key=>$value){
+			$receiptList [$key] ['ridKey'] = $XDeode->encode ( $value ['rid'] );
+			$receiptList[$key]['Texe']='false';
+			if (strstr($value['executeCopy'],'["'.$this->staff[0]['sid'].'"')!=false){
+				$receiptList[$key]['Texe']='true';
+			}
+			
 			$receiptList[$key]['Locate']=$Locate;$Locate++;
 			$receiptList[$key]['reviseDetail']=array();
 			if (!empty($value['reviseDetail']))
@@ -4459,7 +4475,7 @@ $receiptList[$key]['verifyList']=$verifyList;
 			$receiptList[$key]['button']=$button;
 		}
 		
-		//print_r($sopStaff);
+		//print_r($receiptList);
 		$mothHtml="";
 		for($i=1;$i<=12;$i++){
 			if($moth==$i)

+ 16 - 4
protected/view/admin/hisImplement.html

@@ -37,7 +37,9 @@
 						<a href="/hisImplement/remits" <!-- if {{item}}=="remits" --> class="now" <!-- endif --> >对公汇款</a>
 						</li>
 					
-	  					
+	  					<li>
+	  					<a href="/hisImplement/teipts" <!-- if {{item}}=="teipts" --> class="now" <!-- endif --> >待执行</a>
+	  					</li>
 	  					
 	  					<li>
 	  					<select  id="Y" onchange="receiptYear();">
@@ -96,7 +98,7 @@
 							<td>
 							<!-- if {{receiptList' value.status}}==1 -->
 								执行中
-								<p class="colGray">{{receiptList' value.pastDate}}</p>
+								<p class="colGray ">{{receiptList' value.pastDate}}</p>
 							<!-- elseif {{receiptList' value.status}}==2 -->
 								审批中
 							<!-- elseif {{receiptList' value.status}}==3 -->
@@ -113,10 +115,20 @@
 							借款完成
 							<!-- elseif ({{receiptList' value.status}}==8 and {{receiptList' value.Rtype}}!=1 ) or {{receiptList' value.status}}==9 -->
 							费用完成
-							<!-- endif -->
 							{{receiptList' value.executeDate}}
+							<!-- endif -->
+							
+							</td>
+							<td>
+							
+							<!-- if {{receiptList' value.Texe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
+								<a href="/implement/{{receiptList' value.ridKey}}.html" class="button" target="_blank">去审批</a>
+							<!-- else -->
+							<a href="/expensesDoc/{{receiptList' value.rid}}" target="_blank">详情</a>
+							
+							<!-- endif -->
+							
 							</td>
-							<td><a href="/expensesDoc/{{receiptList' value.rid}}" target="_blank">详情</a></td>
 						</tr>
 						<!-- endloop -->
 						

+ 5 - 0
protected/view/admin/invoiceApprovalAchieve.html

@@ -204,6 +204,11 @@
 	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
 	</div>
 </div>
+<div loading-msg='true' style="position:absolute;  left:50%;  top:50%;  "></div>
+	<div class="modal  fade" id="invdetail">
+		
+		<div id="nc"></div>
+	</div>
     <!--弹出内容-->        	
 <script type="text/javascript">autoFlashHeight();</script>	
 </body>

+ 1 - 1
protected/view/admin/receipt_menu.html

@@ -9,7 +9,7 @@
 						<li  class="topLine <!-- if  getGlobals('NEW') !=0 --> news <!-- endif --> "><a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses">费用审批</a></li>
 						
 						<!-- if inarray({{staff.0.sid}},{{executeId}}) -->
-						<li <!-- if  getGlobals('NEW2') !=0 --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="implement" --> class="selected" <!-- endif --> href="/implement">费用执行</a></li>
+						<li <!-- if  getGlobals('NEW2') !=0 --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="implement" --> class="selected" <!-- endif --> href="/hisImplement">费用执行</a></li>
 						<!-- endif -->
 						
 						<!-- if {{staff.0.cid}}==12 -->