소스 검색

cld开票功能

caipin 7 년 전
부모
커밋
7f9da26748

+ 9 - 2
global/js/invoice.js

@@ -78,9 +78,12 @@ $(function() {
 		$("input[name='droppedIidKey']").val($(this).attr("diss-data"));
 	});
 	
+	/*
+	 * 废弃
 	$("a[node-invoice='untreadInvoice']").click(function() {
 		$("input[name='untreadIidKey']").val($(this).attr("diss-data"));
 	});
+	*/
 	
 	$('a[bind-receivables="true"]').click(function() {
 		console.log('ddd');
@@ -271,6 +274,8 @@ $(function() {
 		});
 	});
 	
+	/**
+	 * 废弃
 	$('a[node-recording="true"]').click(function() {
 		var postData =  $(this).attr("data-key");
 		$("input[name='key']").val(postData);
@@ -298,7 +303,9 @@ $(function() {
 			}
 		});
 	});
-	
+	 */
+	/**
+	 * 废弃
 	$('a[node-receivalbles="bind"]').click(function() {
 		var postData =  $(this).attr("diss-data");
 		
@@ -340,7 +347,7 @@ $(function() {
 			}
 		});
 	});
-	
+	*/
 	
 	$("a[node-invoiceReceivables='INFO']").click(function() {
 		var postData = $(this).attr("data-isKey");

+ 1 - 1
index.php

@@ -16,7 +16,7 @@ include $config['BASE_PATH'].'app/DooConfig.php';
 Doo::conf()->set($config);
 
 # remove this if you wish to see the normal PHP error view.
-include $config['BASE_PATH'].'diagnostic/debug.php';
+//include $config['BASE_PATH'].'diagnostic/debug.php';
 
 Doo::acl()->rules=$acl;
 

+ 4 - 2
protected/config/acl.conf.php

@@ -20,14 +20,16 @@ $acl ['ordinary'] ['allow'] = array (
 				'ajaxGetInvoiceInfoByType',
 				'ajaxGetInvoiceReceivables',
 				'ajaxGetInvoicePostDetail',
-				'ajaxGetInvoiceByStaff',
+				
+				//'ajaxGetInvoiceByStaff',
+				
 				'ajaxCompareInvoicePrice',
 				
 				
 				
 				//删除核销相关操作
 				//'invoiceUntreadDo',
-				'ajaxGetReceivalblesByStaff',
+				//'ajaxGetReceivalblesByStaff',
 				//'ajaxCompareClaimPrice',
 				//'ajaxReceivablesRemove'
 				//'invoiceEnterReceivables',

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

@@ -393,12 +393,15 @@ $route['get']['/invoiceReceivablesAchieve/:page/:date/:MebSea'] = array('Invoice
 
 $route['post']['/ajaxGetInvoiceInfoByType'] = array('InvoiceController', 'ajaxGetInvoiceInfoByType');
 $route['post']['/ajaxGetInvoiceReceivables'] = array('InvoiceController', 'ajaxGetInvoiceReceivables');
-$route['post']['/ajaxGetInvoiceByStaff'] = array('InvoiceController', 'ajaxGetInvoiceByStaff');
+
+//$route['post']['/ajaxGetInvoiceByStaff'] = array('InvoiceController', 'ajaxGetInvoiceByStaff');废弃
+
 $route['post']['/ajaxCompareInvoicePrice'] = array('InvoiceController', 'ajaxCompareInvoicePrice');
 
 
 
 
+
 //删除核销相关操作
 $route['post']['/invoiceUntreadDo'] = array('InvoiceController', 'invoiceUntreadDo');
 $route['post']['/ajaxGetReceivalblesByStaff'] = array('InvoiceController', 'ajaxGetReceivalblesByStaff');

+ 36 - 21
protected/controller/InvoiceController.php

@@ -100,12 +100,13 @@ class InvoiceController extends DooController {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		$sid = $XDeode->decode ( $_COOKIE ["staff"] );
-		$expressList = $express->getExpressByAll ();
+		//$expressList = $express->getExpressByAll ();
 		$invoiceList = $invoice->getMyInvoice ( $sid );
 		
 		// $list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
 		
-		$sql = 'status=2 and untreadStatus=3 and sid=' . $sid;
+		
+		$sql = 'status=2 and printStatus=1 and irid!="" and sid=' . $sid;
 		$list = $invoice->getInvoiceByUntreadStatusPage ( 4, $sql );
 		
 		// print_r($list);
@@ -113,7 +114,7 @@ class InvoiceController extends DooController {
 		$this->data ['isMonth'] = $isMonth;
 		$this->data ['htm'] = $htm;
 		
-		$this->data ['expressList'] = $expressList;
+		//$this->data ['expressList'] = $expressList;
 		$this->data ['invoiceList'] = $invoiceList;
 		
 		$this->data ['receivablesList'] = $list;
@@ -599,8 +600,8 @@ class InvoiceController extends DooController {
 		return "/invoice";
 	}
 	/**
+	 * @deprecated
 	 * 申请退票 --需求变更 废弃
-	 */
 	function invoiceUntreadDo() {
 		$untreadIidKey = $this->get_args ( 'untreadIidKey' ) ? $this->get_args ( 'untreadIidKey' ) : '';
 		$untreadReason = $this->get_args ( 'untreadReason' ) ? $this->get_args ( 'untreadReason' ) : "";
@@ -656,7 +657,8 @@ class InvoiceController extends DooController {
 		
 		return "/invoice";
 	}
-	
+	*/
+		
 	/**
 	 * 删除已终止的开票
 	 */
@@ -1164,7 +1166,10 @@ class InvoiceController extends DooController {
 		$category = $lCategory->getCategory ();
 		$staffList = $staff->getStaffByCid ( $this->staff [0] ['cid'] );
 		
-		$receivablesList = $invoiceReceivables->getInvoiceReceivablesByNew ();
+		$sql = 'bindStatus=1 and iid!=0';
+		$receivablesList = $invoiceReceivables->getInvoiceReceivablesByNew (4,$sql);
+
+		
 		// 获取未入账发票
 		$invoiceUnAccount = $invoice->getInvoiceByUnAccount ( $invoiceTC );
 		
@@ -1619,8 +1624,8 @@ class InvoiceController extends DooController {
 	}
 	
 	/**
-	 * 收款绑定发票 ,一个收款只能绑定一个发票
-	 */
+	 * @deprecated
+	 * 收款绑定发票 ,一个收款只能绑定一个发票 --废弃
 	function invoiceBindReceivables() {
 		$claimKey = $this->get_args ( 'key' ) ? $this->get_args ( 'key' ) : "";
 		$invoiceKey = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
@@ -1682,10 +1687,11 @@ class InvoiceController extends DooController {
 		
 		return "/invoiceReceivables";
 	}
+	*/
 	
 	/**
+	 * @deprecated
 	 * 发票收款完成--需求更变 废弃
-	 */
 	function invoiceEnterReceivables() {
 		$invoiceKey = $this->get_args ( 'key' ) ? $this->get_args ( 'key' ) : "";
 		// $invoiceClaim = $this->get_args ( 'invoiceClaim' ) ? $this->get_args ( 'invoiceClaim' ) : "";
@@ -1744,6 +1750,8 @@ class InvoiceController extends DooController {
 		
 		return "/invoice";
 	}
+	*/
+	
 	function invoiceAggregate() {
 		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
 		
@@ -2365,8 +2373,8 @@ class InvoiceController extends DooController {
 	}
 	
 	/**
-	 * 获得与我有关可收款的发票
-	 */
+	 * @deprecated
+	 * 获得与我有关可收款的发票  废弃
 	function ajaxGetInvoiceByStaff() {
 		$irid = $this->get_args ( 'key' ) ? $this->get_args ( 'key' ) : "";
 		Doo::loadModel ( 'invoice' );
@@ -2429,6 +2437,7 @@ class InvoiceController extends DooController {
 				'html' => $html 
 		) );
 	}
+	*/
 	
 	/**
 	 * 获取一条收款信息
@@ -2523,8 +2532,8 @@ class InvoiceController extends DooController {
 	}
 	
 	/**
+	 * @deprecated
 	 * --需求变更 废弃
-	 */
 	function ajaxCompareClaimPrice() {
 		$irid = $this->get_args ( 'irid' ) ? $this->get_args ( 'irid' ) : "";
 		$invoiceKey = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
@@ -2654,10 +2663,11 @@ class InvoiceController extends DooController {
 				'isReceivables' => $isReceivables 
 		) );
 	}
+	*/
 	
 	/**
+	 * @deprecated
 	 * 从发票中移除已经入账的收款 --需求变更 废弃
-	 */
 	function ajaxReceivablesRemove() {
 		$iridKey = $this->get_args ( 'key' ) ? $this->get_args ( 'key' ) : "";
 		$invoiceKey = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
@@ -2786,7 +2796,8 @@ class InvoiceController extends DooController {
 				'isReceivables' => $isReceivables 
 		) );
 	}
-	
+	*/
+		
 	/**
 	 * 我的收款中 选择哪个发票入账,进行金额判断
 	 */
@@ -2820,9 +2831,9 @@ class InvoiceController extends DooController {
 			) );
 	}
 	
-	/*
+	/**
+	 * @deprecated
 	 * 获得与我有关收款数据 --需求变更 废弃
-	 */
 	function ajaxGetReceivalblesByStaff() {
 		$iid = $this->get_args ( 'key' ) ? $this->get_args ( 'key' ) : "";
 		Doo::loadModel ( 'invoiceReceivables' );
@@ -2975,6 +2986,8 @@ class InvoiceController extends DooController {
 				'isReceivables' => $isReceivables 
 		) );
 	}
+	*/
+	
 	function ajaxGetInvoiceInfoByType() {
 		$type = $this->get_args ( 'type' ) ? $this->get_args ( 'type' ) : "";
 		$serial = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
@@ -3615,11 +3628,13 @@ class InvoiceController extends DooController {
 				'asArray' => TRUE 
 		) );
 		// 我的收款待入账
+		/*
 		$myClaim = $invoiceReceivables->getOne ( array (
 				'where' => " receivablesStaff like '" . $st [0] ['sid'] . "-%' and receivablesCategory like '" . $st [0] ['cid'] . ":%' and bindStatus=0",
 				'desc' => 'irid',
 				'asArray' => TRUE 
 		) );
+		*/
 		// 发票审批
 		$approval = $invoice->getOne ( array (
 				'where' => 'status=1 and pendingApprovals=' . $st [0] ['sid'],
@@ -3646,19 +3661,19 @@ class InvoiceController extends DooController {
 		$new = array (
 				'GLOBAL' => FALSE,
 				'pendingInvoice' => FALSE,
-				'myClaim' => FALSE,
+//				'myClaim' => FALSE,
 				'approval' => FALSE,
 				'post' => FALSE,
 				'print' => FALSE,
 				'untread' => FALSE 
 		);
-		
-		if (! empty ( $pendingInvoice ) || ! empty ( $myClaim ) || ! empty ( $approval ) || ! empty ( $post ) || ! empty ( $print ) || ! empty ( $untread ))
+		//|| ! empty ( $myClaim )
+		if (! empty ( $pendingInvoice )  || ! empty ( $approval ) || ! empty ( $post ) || ! empty ( $print ) || ! empty ( $untread ))
 			$new ['GLOBAL'] = TRUE;
 		if (! empty ( $pendingInvoice ))
 			$new ['pendingInvoice'] = TRUE;
-		if (! empty ( $myClaim ))
-			$new ['myClaim'] = TRUE;
+// 		if (! empty ( $myClaim ))
+// 			$new ['myClaim'] = TRUE;
 		if (! empty ( $approval ))
 			$new ['approval'] = TRUE;
 		if (! empty ( $post ))

+ 1 - 1
protected/model/invoice.php

@@ -435,7 +435,7 @@ class invoice extends DooModel {
 			
 			$list ['handleInvoice'] = $this->find ( array (
 					// 需求变更 -去除出票状态的数据 or (status=2 and printStatus=1 and untreadStatus=0 ) or (status=2 and printStatus=1 and untreadStatus=2 )
-					'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=" . $sid,
+					'where' => "(status=3 or status=4   )  and isDelete=0 and sid=" . $sid,
 					'desc' => 'iid',
 					'asArray' => TRUE 
 			) );

+ 4 - 1
protected/model/invoiceReceivables.php

@@ -52,8 +52,11 @@ class invoiceReceivables extends DooModel {
 	 * @param number $limit
 	 * @return unknown
 	 */
-	public function getInvoiceReceivablesByNew($limit = 4) {
+	public function getInvoiceReceivablesByNew($limit = 4,$con="") {
+		if ( empty ( $con ))
+			return array ();
 		$list = $this->find ( array (
+				'where' => $con,
 				'desc' => 'irid',
 				'limit' => $limit,
 				'asArray' => TRUE 

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

@@ -7,6 +7,6 @@
 <li><a href="/adminuser" <!-- if {{memu}}=="adminuser" --> class="selected" <!-- endif -->>员工列表</a></li>
 <li><a href="/adminproduct" <!-- if {{memu}}=="adminproduct" --> class="selected" <!-- endif -->>产品列表</a></li>
 <li><a href="/adminverify" <!-- if {{memu}}=="verify" --> class="selected" <!-- endif -->>报销审查组</a></li>
-<li><a style="display: none" href="/adminInvoice" <!-- if {{memu}}=="invoice" --> class="selected" <!-- endif -->>发票管理</a></li>
+<li><a href="/adminInvoice" <!-- if {{memu}}=="invoice" --> class="selected" <!-- endif -->>发票管理</a></li>
 <li><a href="/holidaygroup" <!-- if {{memu}}=="holiday" --> class="selected" <!-- endif -->>假期审查组</a></li>
 <!-- endif -->

+ 17 - 5
protected/view/admin/invoice.html

@@ -55,11 +55,14 @@
 										<span class="colOrange">已退回</span>
 										<!-- elseif {{pendingInvoice' value.status}}==4 -->
 										<span class="colRed">已终止</span>
+										
 										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==0  -->
-										<span class="colBlue">已出票</span>
+										<!--废弃 <span class="colBlue">已出票</span>  -->
 										<!-- if {{pendingInvoice' value.doPost}}==1 -->
-										<a href="#shipping" node-post="express-msg" post-data="{{invoicePost' value.iidKey}}" data-toggle="modal">邮寄</a>
+										<!--废弃 <a href="#shipping" node-post="express-msg" post-data="{{invoicePost' value.iidKey}}" data-toggle="modal">邮寄</a> -->
 										<!-- endif -->
+										
+										
 										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==2  -->
 										<span class="colRed">已退票</span>
 										<!-- endif -->
@@ -89,10 +92,12 @@
 										<!-- elseif {{pendingInvoice' value.status}}==4 -->
 										<a class="button btn-gray btn-block" href="/invoiceDelDo/{{pendingInvoice' value.iidKeyUrl}}.do">从待处理移除</a>
 										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==0 -->
+										<!--废弃
 										<div class="btn-group">
 										<a class="button btn-red  btn-inline" diss-data="{{pendingInvoice' value.iidKey}}" node-invoice="untreadInvoice" href="#return" data-toggle="modal">申请退票</a>
 										<a class="button btn-green" diss-data="{{pendingInvoice' value.iidKey}}" node-receivalbles="bind" href="#recorded" data-toggle="modal">发票核销</a>
 										</div>
+										-->
 										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==2  -->
 										<a class="button btn-gray btn-block" href="/invoiceDelDo/{{pendingInvoice' value.iidKeyUrl}}.do">从待处理移除</a>
 										<!-- endif -->
@@ -154,7 +159,7 @@
 							
 							
 							
-							<legend><div class="fR"><a href="/invoiceAchieve">查看更多</a></div>最近核销</legend>
+							<legend><div class="fR"><a href="/invoiceAchieve">查看更多</a></div>最近入账</legend>
 							<!-- if !empty({{receivablesList}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
@@ -230,7 +235,7 @@
 		</form>
 	</div>
 	<!--终止-->
-	<!--弹出 退票-->
+	<!--弹出 退票 废弃
 	<div class="modal hide fade" id="return">
 	<form action="/invoiceUntreadDo" method="post" name="untreadInvoice">
 	<input type="hidden" name='untreadIidKey' value="">
@@ -267,6 +272,7 @@
 							<!-- loop expressList -->
 											<option value="{{expressList' value.company}}:{{expressList' value.com}}">{{expressList' value.company}}</option>
 											<!-- endloop -->
+					<!--弹出 退票 废弃		
 							</select>
 							</td>
 						</tr>
@@ -289,8 +295,12 @@
 			</div></div>
 			</form>
 	</div>
+	
+	-->
+	
 	<!--退票-->
-	<!--弹出入账-->
+	
+<!--弹出入账 废弃
 <div class="modal hide fade" id="recorded">
 
 	<div class="modal-dialog modal-lg">
@@ -329,6 +339,8 @@
 			</div></div>
 	</form>
 </div>
+-->
+
     <!--入账-->
 	<!--弹出邮寄-->
 	<div class="modal hide fade" id="shipping">

+ 2 - 1
protected/view/admin/invoiceMenu.html

@@ -4,7 +4,8 @@
 			<!-- if {{receiptMemu}}=="invoice" --> class="selected" <!-- endif -->
 			>我的发票
 	</a></li>
-	<li  <!-- if {{new.myClaim}} --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="invoiceMyReceivables" --> class="selected" <!-- endif --> href="/invoiceMyReceivables">我的收款</a></li>
+<li><a <!-- if {{receiptMemu}}=="invoiceMyReceivables" --> class="selected" <!-- endif --> href="/invoiceMyReceivables">
+我的收款</a></li>
 	<li><a <!-- if {{receiptMemu}}=="invoiceReceivablesClaim" --> class="selected" <!-- endif --> href="/invoiceReceivablesClaim">收款认领</a></li>
 
 

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

@@ -46,7 +46,9 @@
 							<!-- if !empty({{list.myClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行到帐时间</th><th class="taC">收款处理</th><th class="taC" width="120">操作</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行到帐时间</th><th class="taC">收款处理</th>
+								
+								</tr>
 								<!-- loop list.myClaim -->
 								<tr>
 									<td><b>¥{{myClaim' value.receivablesPrice}}</b></td>
@@ -59,9 +61,11 @@
 									{{myClaim' value.username}} 认领  {{myClaim' value.confirmTime}}
 									<!-- endif -->
 									</td>
+									<!-- 废弃
 									<td width="">
 <a class="button btn-green  btn-block" data-key="{{myClaim' value.iidKey}}" node-recording="true" href="#recorded" data-toggle="modal">收款入账</a>
 									</td>
+									 -->
 								</tr>
 								<!-- endloop -->
 								
@@ -108,7 +112,7 @@
 	<div class="modal  fade" id="billing">
 		<div id="nr"></div>
 	</div>
-	<!--弹出入账-->
+	<!--弹出入账
 	<div class="modal hide fade" id="recorded">
 		<form action="/invoiceBindReceivables" method="post" >
 		<input type="hidden" name="key" value="">
@@ -137,6 +141,7 @@
 			</div></div>
 			</form>
 	</div>
+	-->
 	<!--入账-->
 <script type="text/javascript">autoFlashHeight();</script>	
 </body>

+ 3 - 0
protected/view/admin/invoiceReceivables.html

@@ -73,6 +73,7 @@
 					
 					
 					<div class="clearfix">
+					<!-- if !empty({{receivablesInput}}) -->
 							<legend><div class="fR"><a href="/invoiceReceivablesAS/1/Unclaimed/{{year}}/All/">查看所有</a></div>最近认领&amp;录入</legend>
 							<table class="table table-bordered table-condensed">
 								<tbody>
@@ -109,7 +110,9 @@
 								
 								</tbody>
 							</table>
+							<!-- else -->
 							<blockquote><p class="colGray">暂时没有已认领的收款</p></blockquote>
+							<!-- endif -->
 						</div>