Sfoglia il codice sorgente

费用执行添加员工筛选功能

caipin 8 anni fa
parent
commit
6d95eccb06

+ 0 - 3
.gitignore

@@ -1,3 +0,0 @@
-/protected/config/db.conf.php
-/protected/config/common.conf.php
-/protected/viewc

+ 10 - 0
global/js/receipt.js

@@ -26,6 +26,16 @@ function receiptDay(){
 	 form.submit();  
 }
 
+function receiptSop(){
+	 var form = $('#up'); 
+	 $('#year').val($('#Y').val());
+	 $('#month').val($('#M').val());
+	 $('#day').val($('#D').val());
+	 $('#sop').val($('#S').val());
+	 form.submit();  
+}
+
+
 function updateApprovalReceipt(status,rid){
 	 var form = $('#verifyOpinion_'+rid); 
 	 $('#status_'+rid).val(status);

+ 3 - 1
protected/controller/InvoiceController.php

@@ -130,7 +130,9 @@ class InvoiceController extends DooController {
 			$lCategory=new L_category();
 			Doo::loadModel('invoiceManage');
 			$invoiceManage=new invoiceManage();
-
+            
+			
+			
 			$categoryDetil=$lCategory->getOne(array('SELECT'=>'title','where'=>'cid='.$cid,'asArray'=>true));
 			$invoiceManageDetail=$invoiceManage->getOne(array('SELECT'=>'title','where'=>'mold="发票审批"','asArray'=>true));
 

+ 28 - 6
protected/controller/ReceiptController.php

@@ -4230,6 +4230,7 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 		$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");
+		$sop=$this->get_args('sop')?$this->get_args('sop'):'SOP';
 		Doo::loadModel('receipt');
 		$receipt=new receipt();
 		
@@ -4249,21 +4250,30 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 			$condition=" and Rtype=0 ";
 		elseif ($item=="remits")
 			$condition=" and Rtype=2 ";
-		
+		$sopString="";
 		$dateCondition=" and Year(executeDate) =".$year;	
 		if($moth!='MONTH'){
 			$dateCondition=" and Year(executeDate) =".$year." and Month(executeDate) = ".$moth;
 			
 		}
-		
 		if($day!='DAY')
 			$dateCondition=" and Year(executeDate) =".$year." and Month(executeDate) = ".$moth." and day(executeDate)=".$day;
-			
+		if ($sop!='SOP')
+			$sopString=" and staff=".$sop;
+		
 		$noPassSum=$receipt->receiptByYear($year,$this->staff[0]['sid']);
 			
-		$receiptList=$receipt->find(array('where'=>' (status=8 or status=9 )'.$condition.$dateCondition,'desc'=>'rid','asArray'=>true));
+		$receiptList=$receipt->find(array('where'=>' (status=8 or status=9 )'.$condition.$dateCondition.$sopString,'desc'=>'rid','asArray'=>true));
 
-		$Locate=0;$roleId=0;$button=0;	
+		//员工筛选
+		$receiptList2=$receipt->find(array('where'=>' (status=8 or status=9 )'.$condition.$dateCondition,'desc'=>'rid','asArray'=>true));
+		$sopStaff=array();
+		foreach ($receiptList2 as $key=>$value){
+			$staffDetail=$staff->getOne(array('where'=>'sid='.$value['staff'],'asArray'=>true));
+			$sopStaff[$value['staff']]=$staffDetail['username'];
+		}
+		
+		$Locate=0;$roleId=0;$button=0;
 		foreach ($receiptList as $key=>$value){
 			$receiptList[$key]['Locate']=$Locate;$Locate++;
 			$receiptList[$key]['reviseDetail']=array();
@@ -4390,10 +4400,11 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 
 			$receiptList[$key]['verifyList']=$verifyList;
 			$receiptList[$key]['staffDetail']=$staff->getOne(array('where'=>'sid='.$value['staff'],'asArray'=>true));
+			
 			$receiptList[$key]['button']=$button;
 		}
 		
-		//print_r($receiptList);die;
+		//print_r($sopStaff);
 		$mothHtml="";
 		for($i=1;$i<=12;$i++){
 			if($moth==$i)
@@ -4410,6 +4421,16 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 				$dayHtml.='<option value="'.$i.'" >'.$i.'日</option>';
 		}
 		}
+		$sopHtml="";
+		foreach ($sopStaff as $key=>$value){
+			if($sop==$key)
+				$sopHtml.='<option value="'.$key.'" selected >'.$value.'</option>';
+			else
+				$sopHtml.='<option value="'.$key.'" >'.$value.'</option>';
+			
+		}
+		
+		$data['sopHtml']=$sopHtml;
 		$data['dayHtml']=$dayHtml;
 		$data['mothHtml']=$mothHtml;
 		$data['receiptList']=$receiptList;
@@ -4422,6 +4443,7 @@ $verifyDetail=$verify->find(array('where'=>' (staff not like "%\"'.$this->staff[
 		$data['year']=$year;
 		$data['moth']=$moth;
 		$data['day']=$day;
+		$data['sop']=$sop;
 		$this->render ( "/admin/hisImplement", $data );
 	}
 	

+ 8 - 0
protected/view/admin/hisImplement.html

@@ -27,6 +27,7 @@
 					<input type="hidden" name="year" id="year"  />
 					<input type="hidden" name="moth" id="month" value="MONTH"  />
 					<input type="hidden" name="day" id="day" value="DAY"  />
+					<input type="hidden" name="sop" id="sop" value="SOP"  />
 					
 					<ul class="cateList ">
 						<li>
@@ -50,6 +51,11 @@
 	  					<option value="DAY" <!-- if {{day}}=='DAY' --> selected <!-- endif --> >所有</option>
 	  					{{dayHtml}}
 	  					</select>
+	  					<select  id="S" onchange="receiptSop();">
+	  					<option value="SOP" <!-- if {{sop}}=='SOP' --> selected <!-- endif --> >所有</option>
+	  					{{sopHtml}}
+	  					</select>
+	  					
 	  					</li>
 	  					
 	  			</ul>
@@ -66,6 +72,8 @@
 						<tbody>
 						<!-- loop receiptList -->
 						<tr>
+						<td><div class="avtra"><img src="{{receiptList' value.staffDetail.avatar}}_2.jpg" width="32"><br>{{receiptList' value.staffDetail.username}}</div></td>
+						
 							<td>
 							<!-- if {{receiptList' value.Rtype}}==1 -->
 			  					借款申请