瀏覽代碼

费用执行问题

caipin 8 年之前
父節點
當前提交
4d561026f2

+ 38 - 0
global/js/receipt.js

@@ -150,6 +150,44 @@ $(function() {
 	});
 	
 	
+	$("a[id^=examineExe]").click(function(){
+		var rid=$(this).attr('data');
+		var url="/ajaxExamineExe";
+		
+		$.ajax({
+			url:url,
+			type: "post",
+			cache: false,
+			dataType: "json",
+			data: {
+				rid:rid
+			},
+			global: true,
+			success: function(data){
+				
+				if(data.status==0){
+					alert('参数错误');
+				}
+				
+				var count=data.receipt.length;
+				
+				if(count!=0){
+					window.location.href="/implement/"+data.receipt.ridKey+".html"; 
+					
+				}else
+					alert('没有需要审批的费用');
+				
+				
+				console.log(data);
+				
+			},
+			error:function(err){
+			}
+			});
+		
+		
+	});
+	
 	
 	
 	

+ 2 - 0
protected/config/routes.conf.php

@@ -179,6 +179,8 @@ $route['*']['/saeaLoanReceiptEdi/:rid'] = array('ReceiptController', 'saeaLoanRe
 
 $route['*']['/implement/:rid'] = array('ReceiptController', 'implement','extension'=>'.html');
 $route['*']['/implementDo'] = array('ReceiptController', 'implementDo');
+$route['*']['/ajaxExamineExe'] = array('ReceiptController', 'ajaxExamineExe');
+
 
 $route['*']['/remitAdd'] = array('ReceiptController', 'remitAdd');
 $route['*']['/remitAddDo'] = array('ReceiptController', 'remitAddDo');

文件差異過大導致無法顯示
+ 9815 - 8086
protected/controller/ReceiptController.php


+ 41 - 41
protected/plugin/TemplateTag.php

@@ -30,49 +30,49 @@ function isTimeTR($day = 3,$cTime) {
 	return $flag;
 }
 function isInvoiceNew($type = "GLOBAL") {
-	Doo::loadModel ( 'invoice' );
-	$invoice = new invoice ();
-	Doo::loadModel ( 'invoiceReceivables' );
-	$invoiceReceivables = new invoiceReceivables ();
-	Doo::loadModel ( 'staff' );
-	$staff = new staff ();
+// 	Doo::loadModel ( 'invoice' );
+// 	$invoice = new invoice ();
+// 	Doo::loadModel ( 'invoiceReceivables' );
+// 	$invoiceReceivables = new invoiceReceivables ();
+// 	Doo::loadModel ( 'staff' );
+// 	$staff = new staff ();
 	
-	$st = $staff->getUserByIdList ( $_COOKIE ["staff"] );
+// 	$st = $staff->getUserByIdList ( $_COOKIE ["staff"] );
 	
-	// 我的发票待处理
-	$pendingInvoice = $invoice->getOne ( array (
-			'where' => "(status=3 or status=4 or (status=2 and printStatus=1 and untreadStatus=0 ) or (status=2 and printStatus=1 and untreadStatus=2 )  )  and isDelete=0 and sid=" . $_COOKIE ["staff"],
-			'desc' => 'iid',
-			'asArray' => TRUE 
-	) );
-	// 我的收款待入账
-	$myClaim = $invoiceReceivables->getOne ( array (
-			'where' => " receivablesStaff like '" . $_COOKIE ["staff"] . "-%' and receivablesCategory like '" . $st [0] ['cid'] . ":%' and bindStatus=0",
-			'desc' => 'irid',
-			'asArray' => TRUE 
-	) );
-	// 发票审批
-	$approval = $invoice->getOne ( array (
-			'where' => 'status=1 and pendingApprovals=' . $_COOKIE ["staff"],
-			'desc' => 'iid',
-			'asArray' => true 
-	) );
-	// 发票邮寄
-	$post = $invoice->getOne ( array (
-			'where' => "postStatus=0 and doPost=1 and status=2",
-			'asArray' => TRUE 
-	) );
-	// 发票打印
-	$print = $invoice->getOne ( array (
-			'where' => "status=2 and printStatus=0 and moldManage like '%[\"" . $_COOKIE ["staff"] . "\",%'",
-			'desc' => 'iid',
-			'asArray' => TRUE 
-	) );
-	// 发票退票
-	$untread = $invoice->getOne ( array (
-			'where' => " printStatus=1 and untreadStatus=1 and status=2 ",
-			'asArray' => TRUE 
-	) );
+// 	// 我的发票待处理
+// 	$pendingInvoice = $invoice->getOne ( array (
+// 			'where' => "(status=3 or status=4 or (status=2 and printStatus=1 and untreadStatus=0 ) or (status=2 and printStatus=1 and untreadStatus=2 )  )  and isDelete=0 and sid=" . $_COOKIE ["staff"],
+// 			'desc' => 'iid',
+// 			'asArray' => TRUE 
+// 	) );
+// 	// 我的收款待入账
+// 	$myClaim = $invoiceReceivables->getOne ( array (
+// 			'where' => " receivablesStaff like '" . $_COOKIE ["staff"] . "-%' and receivablesCategory like '" . $st [0] ['cid'] . ":%' and bindStatus=0",
+// 			'desc' => 'irid',
+// 			'asArray' => TRUE 
+// 	) );
+// 	// 发票审批
+// 	$approval = $invoice->getOne ( array (
+// 			'where' => 'status=1 and pendingApprovals=' . $_COOKIE ["staff"],
+// 			'desc' => 'iid',
+// 			'asArray' => true 
+// 	) );
+// 	// 发票邮寄
+// 	$post = $invoice->getOne ( array (
+// 			'where' => "postStatus=0 and doPost=1 and status=2",
+// 			'asArray' => TRUE 
+// 	) );
+// 	// 发票打印
+// 	$print = $invoice->getOne ( array (
+// 			'where' => "status=2 and printStatus=0 and moldManage like '%[\"" . $_COOKIE ["staff"] . "\",%'",
+// 			'desc' => 'iid',
+// 			'asArray' => TRUE 
+// 	) );
+// 	// 发票退票
+// 	$untread = $invoice->getOne ( array (
+// 			'where' => " printStatus=1 and untreadStatus=1 and status=2 ",
+// 			'asArray' => TRUE 
+// 	) );
 	
 	$new = array (
 			'GLOBAL' => FALSE,

+ 3 - 1
protected/view/admin/hisImplement.html

@@ -39,8 +39,10 @@
 					
 	  					<li>
 	  					<a href="/hisImplement/teipts" <!-- if {{item}}=="teipts" --> class="now" <!-- endif --> >待执行</a>
+	  					<a href="/hisImplement/alerpts" <!-- if {{item}}=="alerpts" --> class="now" <!-- endif --> >已执行</a>
 	  					</li>
 	  					
+	  					
 	  					<li>
 	  					<select  id="Y" onchange="receiptYear();">
 	  					<!-- include 'year' -->
@@ -121,7 +123,7 @@
 							</td>
 							<td>
 							
-							<!-- if {{receiptList' value.Texe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
+							<!-- if {{receiptList' value.Texe}}=='true'&&{{receiptList' value.TRexe}}=='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>

+ 2 - 7
protected/view/admin/implement.html

@@ -23,7 +23,8 @@
 				
 				<div class="demandCate">
 					<ul class="cateList">
-	  					<li><a href="/hisImplement">历史数据</a></li>
+	  					<li><a href="/hisImplement">返回</a></li>
+	  					<li><a id="examineExe" data="{{receiptList.0.rid}}" href="javascript:void(0)">查看下一份费用执行</a></li>
 	  			</ul>
 	  			</div>
 				
@@ -31,14 +32,8 @@
 	  		<div class="saeaList ">
 	  			<!-- loop receiptList -->
 	  			
-	  			
-	  			
-	  			
 	  			<!-- if {{receiptList' value.Rtype}}==1 -->
-	  			
 	  				<div class="entry loan-list">
-	  				
-	  			
 	  				<div class="seTable">
 	  				
 	  					<!-- if {{receiptList' value.loanRid}}!=0&&{{receiptList' value.status}}==1 -->