Procházet zdrojové kódy

上线审批列表后

caipin před 7 roky
rodič
revize
38f691e259

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

@@ -98,8 +98,8 @@ $acl ['发票审批'] ['allow'] = array (
 				'invoiceApprovalDo',
 				'invoiceApprovalAchieve',
 				//开票开发中方法
-				'invoiceApprovalAchieveDevelopment',
-				'ajaxGetinvoiceApprovalAchieveDevelopment',
+				
+				'ajaxGetinvoiceApprovalAchieve',
 				'ajaxGetInvoiceApprovalDetail',
 				
 				'ajaxInvoicePushNotice'

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

@@ -453,16 +453,16 @@ $route['post']['/invoiceEnterReceivables'] = array('InvoiceController', 'invoice
 $route['*']['/invoiceApproval'] = array('InvoiceController', 'invoiceApproval');
 $route['*']['/invoiceDetail/:iid'] = array('InvoiceController', 'invoiceDetail','extension'=>'.html');
 $route['*']['/invoiceApprovalDo'] = array('InvoiceController', 'invoiceApprovalDo');
-$route['get']['/invoiceApprovalAchieve'] = array('InvoiceController', 'invoiceApprovalAchieve');
-$route['get']['/invoiceApprovalAchieve/:page'] = array('InvoiceController', 'invoiceApprovalAchieve');
-$route['get']['/invoiceApprovalAchieve/:page/:date'] = array('InvoiceController', 'invoiceApprovalAchieve');
-$route['get']['/invoiceApprovalAchieve/:page/:date/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieve');
+// $route['get']['/invoiceApprovalAchieve'] = array('InvoiceController', 'invoiceApprovalAchieve');
+// $route['get']['/invoiceApprovalAchieve/:page'] = array('InvoiceController', 'invoiceApprovalAchieve');
+// $route['get']['/invoiceApprovalAchieve/:page/:date'] = array('InvoiceController', 'invoiceApprovalAchieve');
+// $route['get']['/invoiceApprovalAchieve/:page/:date/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieve');
 
 //开发中
-$route['get']['/invoiceApprovalAchieveDevelopment'] = array('InvoiceController', 'invoiceApprovalAchieveDevelopment');
-$route['get']['/invoiceApprovalAchieveDevelopment/:status'] = array('InvoiceController', 'invoiceApprovalAchieveDevelopment');
-$route['get']['/invoiceApprovalAchieveDevelopment/:status/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieveDevelopment');
-$route['post']['/ajaxGetinvoiceApprovalAchieveDevelopment'] = array('InvoiceController', 'ajaxGetinvoiceApprovalAchieveDevelopment');
+$route['get']['/invoiceApprovalAchieve'] = array('InvoiceController', 'invoiceApprovalAchieve');
+$route['get']['/invoiceApprovalAchieve/:status'] = array('InvoiceController', 'invoiceApprovalAchieve');
+$route['get']['/invoiceApprovalAchieve/:status/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieve');
+$route['post']['/ajaxGetinvoiceApprovalAchieve'] = array('InvoiceController', 'ajaxGetinvoiceApprovalAchieve');
 
 $route['post']['/ajaxGetInvoiceApprovalDetail'] = array('InvoiceController', 'ajaxGetInvoiceApprovalDetail');
 

+ 76 - 57
protected/controller/InvoiceController.php

@@ -3762,7 +3762,7 @@ class InvoiceController extends DooController {
 		$categoryList = $category->getCategoryInCid ( implode ( ',', $cidList ) );
 		
 		$cid = $XDeode->decode ( $cidKey );
-		
+		$month=date("m", strtotime("-1 month"));
 		$redis = new Redis ();
 		$redis->connect ( '127.0.0.1', '6379' );
 		
@@ -3774,8 +3774,11 @@ class InvoiceController extends DooController {
 			$isMC = $invoiceStatistics->getInvoiceStatistiscsMothByCategory ( $cid );
 			$schedule = $invoice->getInvoiceScheduleByCid ( $cid );
 			
+			
+			
 			// 获得办事处人员下的汇总
 			$slist = $staff->getStaffByCid ( $cid );
+			$ismsbMonth = $invoiceStatistics->getISMSByCategoryByMonth( $cid,$month );//上一个月的汇总
 			$ismsb = $invoiceStatistics->getISMSByCategory ( $cid ); // 当月汇总
 			$ISAS = $invoiceStatistics->getISASByCategory ( $cid ); // 全部汇总
 			$scheduleStaff = $invoice->getInvoiceScheduleByCidGroupSid ( $cid ); // 完成度
@@ -3788,6 +3791,17 @@ class InvoiceController extends DooController {
 				$slist [$key] ['receivablesAllPrice'] = 0;
 				$slist [$key] ['accountAllPrice'] = 0;
 				$slist [$key] ['schedule'] = 0;
+				$slist [$key] ['invoiceMonthPrice'] = 0;
+				$slist [$key] ['receivablesMonthPrice'] = 0;
+				$slist [$key] ['accountMonthPrice'] = 0;
+				
+				foreach ($ismsbMonth as $y=>$l){
+					if ($value ['sid'] == $l ['staff']) {
+						$slist [$key] ['invoiceMonthPrice'] = $l ['invoicePrice'];
+						$slist [$key] ['receivablesMonthPrice'] = $l ['receivablesPrice'];
+						$slist [$key] ['accountMonthPrice'] = $l ['accountPrice'];
+					}
+				}
 				
 				foreach ( $ismsb as $k => $v ) {
 					if ($value ['sid'] == $v ['staff']) {
@@ -3827,6 +3841,7 @@ class InvoiceController extends DooController {
 			$this->data ['schedule'] = json_decode ( $redisValue [0], true );
 		}
 		
+		$this->data ['month'] = $month;
 		$this->data ['categoryList'] = $categoryList;
 		
 		$this->data ['memu'] = "invoice";
@@ -4316,52 +4331,52 @@ class InvoiceController extends DooController {
 		$this->data ['receiptMemu'] = 'invoiceReceivables';
 		$this->render ( "/admin/invoiceReceivablesAS", $this->data );
 	}
-	function invoiceApprovalAchieve() {
-		Doo::loadModel ( 'invoice' );
-		$invoice = new invoice ();
-		
-		$MebSea = isset ( $this->params ['MebSea'] ) ? urldecode ( $this->params ['MebSea'] ) : '';
-		
-		$page_size = 12;
-		$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
-		$date = isset ( $this->params ['date'] ) ? $this->params ['date'] : 'MONTHO';
-		
-		$get = "/" . $date;
-		
-		$con = '';
-		if ($date == 'MONTHO')
-			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
-		elseif ($date == 'MONTHT')
-			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 3 MONTH)';
-		elseif ($date == 'MONTHY')
-			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 1 YEAR)';
-		
-		if (! empty ( $MebSea )) {
-			$con .= ' and ( invoiceTitle like "%' . $MebSea . '%" or invoiceCompany like "%' . $MebSea . '%" or invoicePrice like "%' . $MebSea . '%" )';
-			$get .= "/" . $MebSea;
-		}
-		$pageinfo ['page'] = array (
-				'previous' => '' 
-		);
-		$sql = '(status=1 or status=2 or status=3 or status=4) and processApprovals!=""' . $con; // echo $sql;
-		$pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, "invoiceApprovalAchieve", $get, "" );
-		
-		$limit = $pageinfo ['lower'] . ',' . $page_size;
-		
-		$list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $sql, 'desc', 2 );
-		// print_r($list);
-		$this->data ['MebSeaEn'] = $MebSea;
-		$this->data ['MebSea'] = urlencode ( $MebSea );
-		$this->data ['get'] = $get;
-		$this->data ['page'] = $pageinfo;
-		$this->data ['list'] = $list;
-		$this->data ['date'] = $date;
-		
-		$this->data ['memu'] = "invoice";
-		$this->data ['staff'] = $this->staff;
-		$this->data ['receiptMemu'] = 'invoiceApproval';
-		$this->render ( "/admin/invoiceApprovalAchieve", $this->data );
-	}
+// 	function invoiceApprovalAchieve() {
+// 		Doo::loadModel ( 'invoice' );
+// 		$invoice = new invoice ();
+		
+// 		$MebSea = isset ( $this->params ['MebSea'] ) ? urldecode ( $this->params ['MebSea'] ) : '';
+		
+// 		$page_size = 12;
+// 		$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
+// 		$date = isset ( $this->params ['date'] ) ? $this->params ['date'] : 'MONTHO';
+		
+// 		$get = "/" . $date;
+		
+// 		$con = '';
+// 		if ($date == 'MONTHO')
+// 			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
+// 		elseif ($date == 'MONTHT')
+// 			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 3 MONTH)';
+// 		elseif ($date == 'MONTHY')
+// 			$con = ' and approvalTime>DATE_SUB(CURDATE(), INTERVAL 1 YEAR)';
+		
+// 		if (! empty ( $MebSea )) {
+// 			$con .= ' and ( invoiceTitle like "%' . $MebSea . '%" or invoiceCompany like "%' . $MebSea . '%" or invoicePrice like "%' . $MebSea . '%" )';
+// 			$get .= "/" . $MebSea;
+// 		}
+// 		$pageinfo ['page'] = array (
+// 				'previous' => '' 
+// 		);
+// 		$sql = '(status=1 or status=2 or status=3 or status=4) and processApprovals!=""' . $con; // echo $sql;
+// 		$pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, "invoiceApprovalAchieve", $get, "" );
+		
+// 		$limit = $pageinfo ['lower'] . ',' . $page_size;
+		
+// 		$list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $sql, 'desc', 2 );
+// 		// print_r($list);
+// 		$this->data ['MebSeaEn'] = $MebSea;
+// 		$this->data ['MebSea'] = urlencode ( $MebSea );
+// 		$this->data ['get'] = $get;
+// 		$this->data ['page'] = $pageinfo;
+// 		$this->data ['list'] = $list;
+// 		$this->data ['date'] = $date;
+		
+// 		$this->data ['memu'] = "invoice";
+// 		$this->data ['staff'] = $this->staff;
+// 		$this->data ['receiptMemu'] = 'invoiceApproval';
+// 		$this->render ( "/admin/invoiceApprovalAchieve", $this->data );
+// 	}
 	
 	/**
 	 * 获得审批发票的信息以及审批页面
@@ -4516,7 +4531,7 @@ class InvoiceController extends DooController {
 /**
  * 获得审批发票分页数据
  */
-function ajaxGetinvoiceApprovalAchieveDevelopment() {
+function ajaxGetinvoiceApprovalAchieve() {
 	Doo::loadModel ( 'invoice' );
 	$invoice = new invoice ();
 	Doo::loadModel ( 'staff' );
@@ -4538,11 +4553,11 @@ function ajaxGetinvoiceApprovalAchieveDevelopment() {
 	
 	$con = '';
 	if ($status == 'ALL')
-		$con = ' and isDelete=0 ';
+		$con = ' (status=1 or status=2 or status=3 or status=4) and isDelete=0 ';
 	elseif ($status == 'PEND')
-		$con = ' and isDelete=0  and status=1';
+		$con = '  isDelete=0  and status=1';
 	elseif ($status == 'APPROVED')
-		$con = ' and isDelete=0  and status=2';
+		$con = '  isDelete=0  and status=2';
 	
 	if ($invoiceType == 'ORDINARY')
 		$con .= ' and invoiceType=0 ';
@@ -4577,7 +4592,7 @@ function ajaxGetinvoiceApprovalAchieveDevelopment() {
 	$pageinfo ['page'] = array (
 			'previous' => '' 
 	);
-	$sql = '(status=1 or status=2 or status=3 or status=4)  ' . $con;
+	$sql = '  ' . $con;
 	$pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, "invoiceApprovalAchieve", '', "" );
 	
 	$limit = $page . ',' . $page_size;
@@ -4594,6 +4609,12 @@ function ajaxGetinvoiceApprovalAchieveDevelopment() {
 	foreach ( $list as $key => $value ) {
 		$irDetail = array ();
 		
+		
+		if ($value ['status'] == 1) {
+			array_push ( $irDetail, '<a href="#approvalInvice" onclick="nodeInvoiceApproval(\'' . $value ['iidKeyK'] . '\')" data-toggle="modal">审批发票</a>' );
+		} else
+			array_push ( $irDetail, '' );
+		
 		array_push ( $irDetail, '<a href="#approvalInvice" onclick="nodeInvoice(\'' . $value ['iidKeyK'] . '\')"  data-toggle="modal">' . $value ['invoiceSerial'] . '</a>' );
 		
 		if ($value ['invoiceType'] == 1)
@@ -4628,9 +4649,7 @@ function ajaxGetinvoiceApprovalAchieveDevelopment() {
 			array_push ( $irDetail, '<span class="colOrange">退回</span>' . $value ['OL'] ['username'] . $value ['OL'] ['date'] );
 		elseif ($value ['status'] == 4)
 			array_push ( $irDetail, '<span class="colRed">终止</span>' . $value ['OL'] ['username'] . $value ['OL'] ['date'] );
-		elseif ($value ['status'] == 1) {
-			array_push ( $irDetail, '<a href="#approvalInvice" onclick="nodeInvoiceApproval(\'' . $value ['iidKeyK'] . '\')" data-toggle="modal">审批发票</a>' );
-		} else
+		else 
 			array_push ( $irDetail, '' );
 		
 		array_push ( $approvalList, $irDetail );
@@ -4650,7 +4669,7 @@ function ajaxGetinvoiceApprovalAchieveDevelopment() {
 /**
  * 审批发票查看更多--重构
  */
-function invoiceApprovalAchieveDevelopment() {
+function invoiceApprovalAchieve() {
 	$status = isset ( $this->params ['status'] ) ? $this->params ['status'] : 'ALL';
 	$invoiceType = $this->get_args ( 'invoiceType' ) ? $this->get_args ( 'invoiceType' ) : "ALL";
 	$invoiceTrain = $this->get_args ( 'invoiceTrain' ) ? $this->get_args ( 'invoiceTrain' ) : "ORDINARY";
@@ -4685,7 +4704,7 @@ function invoiceApprovalAchieveDevelopment() {
 	$this->data ['memu'] = "invoice";
 	$this->data ['staff'] = $this->staff;
 	$this->data ['receiptMemu'] = 'invoiceApproval';
-	$this->render ( "/admin/invoiceApprovalAchieveDevelopment", $this->data );
+	$this->render ( "/admin/invoiceApprovalAchieve", $this->data );
 }
 function invoiceTAchieve() {
 	Doo::loadModel ( 'invoice' );

+ 28 - 14
protected/model/invoiceStatistics.php

@@ -270,14 +270,30 @@ class invoiceStatistics extends DooModel {
 	 * 获得办事处下成员本月的开票汇总
 	 * @param number $cid
 	 */
+	public function getISMSByCategoryByMonth($cid = 0, $month) {
+		if (empty ( $cid ))
+			return array ();
+		
+		$sql = 'select sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice ,cid,staff,Month(date) as month
+				from ' . $this->_table . '
+				where Month(date)=' . $month . ' and cid = ' . $cid . '
+					GROUP BY staff';
+		$query = Doo::db ()->query ( $sql );
+		return $result = $query->fetchAll ();
+	}
+	
+	/**
+	 * 获得办事处下成员本月的开票汇总
+	 * @param number $cid
+	 */
 	public function getISMSByCategory($cid = 0) {
-		if (empty($cid))
-			return array();
+		if (empty ( $cid ))
+			return array ();
 		$month = date ( "m" );
-				
+		
 		$sql = 'select sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice ,cid,staff,Month(date) as month
 				from ' . $this->_table . '
-				where Month(date)=' . $month.' and cid = '.$cid.'
+				where Month(date)=' . $month . ' and cid = ' . $cid . '
 					GROUP BY staff';
 		$query = Doo::db ()->query ( $sql );
 		return $result = $query->fetchAll ();
@@ -287,33 +303,31 @@ class invoiceStatistics extends DooModel {
 	 * 获得办事处成员全部个人汇总数据
 	 * @param unknown $cid
 	 */
-	public function getISASByCategory($cid){
-		if (empty($cid))
-			return array();
+	public function getISASByCategory($cid) {
+		if (empty ( $cid ))
+			return array ();
 		$month = date ( "m" );
 		
 		$sql = 'select sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice ,cid,staff,Month(date) as month
 				from ' . $this->_table . '
-				where cid = '.$cid.'
+				where cid = ' . $cid . '
 					GROUP BY staff';
 		$query = Doo::db ()->query ( $sql );
 		return $result = $query->fetchAll ();
 	}
 	
-	
-	
 	/**
 	 * 获得某办事处本月汇总
 	 */
 	public function getInvoiceStatistiscsMothByCategory($cid = 0) {
-		if (empty($cid))
-			return array();
+		if (empty ( $cid ))
+			return array ();
 		
 		$month = date ( "m" );
-			
+		
 		$sql = 'select sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice ,cid,Month(date) as month
 				from ' . $this->_table . '
-				where Month(date)=' . $month.' and cid = '.$cid.'
+				where Month(date)=' . $month . ' and cid = ' . $cid . '
 					GROUP BY cid';
 		$query = Doo::db ()->query ( $sql );
 		return $result = $query->fetch ();

+ 13 - 1
protected/view/admin/invoiceAggregateCategoryDetail.html

@@ -44,10 +44,22 @@
 								<legend>办事处汇总</legend>
 								<table class="table table-bordered table-condensed">
 									<tbody>
-									<tr><th class="taC" width="55">姓名</th><th class="taC">本月开票金额</th><th class="taC">本月收款金额</th><th class="taC">本月入账金额</th><th class="taC">累计开票金额合计</th><th class="taC">累计收款金额合计</th><th class="taC">累计入账金额合计</th><th class="taC" width="90">入账完成度</th></tr>
+									<tr><th class="taC" width="55">姓名</th>
+									
+									<th class="taC">{{month}}月开票金额</th>
+									<th class="taC">{{month}}月收款金额</th>
+									<th class="taC">{{month}}月入账金额</th>
+									
+									<th class="taC">本月开票金额</th>
+									<th class="taC">本月收款金额</th>
+									<th class="taC">本月入账金额</th>
+									<th class="taC">累计开票金额合计</th><th class="taC">累计收款金额合计</th><th class="taC">累计入账金额合计</th><th class="taC" width="90">入账完成度</th></tr>
 									<!-- loop slist -->
 									<tr>
 										<td>{{slist' value.username}}</td>
+										<td>¥{{slist' value.invoiceMonthPrice}}</td>
+										<td>¥{{slist' value.receivablesMonthPrice}}</td>
+										<td>¥{{slist' value.accountMonthPrice}}</td>
 										<td><a href="javascript:void(0)">¥{{slist' value.invoicePrice}}</a></td>
 										<td><a href="javascript:void(0)">¥{{slist' value.receivablesPrice}}</a></td>
 										<td><a href="javascript:void(0)">¥{{slist' value.accountPrice}}</a></td>

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

@@ -63,7 +63,7 @@
                         
                         <div class="clearfix">
                         	
-                            <legend><div class="fR"><a href="/invoiceApprovalAchieveDevelopment">查看更多</a></div>最近审批完成</legend>
+                            <legend><div class="fR"><a href="/invoiceApprovalAchieve">查看更多</a></div>最近审批完成</legend>
                             <!-- if !empty({{ilist}}) -->
                             <table class="table table-bordered table-condensed">
                                 <tbody>

+ 198 - 171
protected/view/admin/invoiceApprovalAchieve.html

@@ -1,5 +1,13 @@
 <!-- include 'header' -->
 <script src="<?= WEB_SITE_GLOBAL ?>js/invoice.js"></script>
+<link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
+<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.css"> 
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.min.js"></script>
+
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/dataTables.fixedColumns.min.js"></script>
+
 <body>
 	<div class="mainLayout">
 		<div class="mainMenu">
@@ -18,197 +26,216 @@
 			</div>
 			<div class="adminContent autoHeight">
 				<legend>
-					审批发票
+					审批发票
 				</legend>
 				<div class="demandCate">
-					<ul class="cateList">
-						<li><a <!-- if {{date}}=='MONTHO' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/1/MONTHO/{{MebSea}}">最近一个月</a>
-	  					<a <!-- if {{date}}=='MONTHT' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/1/MONTHT/{{MebSea}}">最近三个月</a>
-	  					<a <!-- if {{date}}=='MONTHY' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/1/MONTHY/{{MebSea}}" >今年</a>
-	  					<a <!-- if {{date}}=='MONTHA' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/1/MONTHA/{{MebSea}}" >更旧</a></li>
+				
+				<form action="/invoiceApprovalAchieve/{{status}}" id="iaa" method="get" >
+				<ul class="cateList">
 						<li>
-							<div class="search">
+							<a <!-- if {{status}}=='ALL' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/ALL">所有</a>
+							<a <!-- if {{status}}=='PEND' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/PEND" title="待审批发票">待审批发票</a>
+							<a <!-- if {{status}}=='APPROVED' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/APPROVED" title="已审批发票">已审批发票</a>
+						</li>
+						<li>
+							<select name="invoiceType" node-invoiceType >
+								<option <!-- if {{invoiceType}}=='ALL' --> selected <!-- endif --> value="ALL">类型</option>
+								<option <!-- if {{invoiceType}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">普通发票</option>
+								<option <!-- if {{invoiceType}}=='SPECIAL' --> selected <!-- endif --> value="SPECIAL">专用发票</option>
+							</select>
+						</li>
+						<li>
+							<select name="invoiceTrain" node-invoiceTrain >
+								<option <!-- if {{invoiceTrain}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">个人发票</option>
+								<option <!-- if {{invoiceTrain}}=='TRAIN' --> selected <!-- endif --> value="TRAIN">培训班发票</option>
+							</select>
+						</li>
+						<li>
+						<div class="search">
 								<div class="input-append">
-									<form action="/invoiceApprovalAchieve/1/{{date}}" id="ira" method="get" >
-								<input class="span3" type="text"  data-irmMebSea value="{{MebSeaEn}}" placeholder="发票抬头、开票金额">
-								<button class="btn btn-small" node-iramMebSea type="button">搜索</button>
-								</form>
+									<input class="datepicker-here span3" name="date" value="{{dateString}}" placeholder="按时间筛选" type="text" data-range="true" data-multiple-dates-separator=" : " data-language="zh">
+									<button class="btn btn-small" type="submit">查询</button>
 								</div>
-							</div></li>
+							</div>
+						</li>
+						
 					</ul>
+					</form>
+				
+				
+				
+				
+				
+					
 				</div>
 				<div class="saeaList">
-					<table class="table table-hover">
-						<tbody>
-						<tr class="thead"><th>开票流水号</th><th>开票单位(抬头)</th><th>开票金额</th><th>提交开票</th><th>完成审批</th></tr>
-						
-						<!-- loop list -->
-						<tr>
-							<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{pendingInvoice' value.iidKeyK}}" data-toggle="modal">{{list' value.invoiceSerial}}</a></td>
-							<td><!-- if !empty({{list' value.invoiceType}}) -->
-	                                   	{{list' value.invoiceCompany}}
-	                                    <!-- else -->
-	                                    {{list' value.invoiceTitle}}
-	                                    <!-- endif --></td>
-							
-							<td>
-							<!-- if !empty({{list' value.invoiceType}}) -->
-	                        <b>¥{{list' value.invoicePrice}}</b><sup>专</sup>
-	                          <!-- else -->
-	                          <b>¥{{list' value.invoicePrice}}</b>
-	                          <!-- endif -->
-							</td>
+				
+				
+				<table id="example" class="stripe row-border order-column" cellspacing="0" width="2400" >
+						<thead>
+							<tr class="thead">
+							<th>操作</th>
+							<th>开票流水号</th>
+							<th>开票单位(抬头)</th>
+							<th>纳税人识别码</th>
+							<th>注册地址~电话</th>
+							<th>开户银行~账号</th>
+							<th>发票备注</th>
+							<th>收件人~电话</th>
+							<th>收件地址</th>
+							<th>邮寄物品</th>
 							
-							<td>{{list' value.categoryName}}{{list' value.userName}} {{list' value.date}}</td>
-							<td>
-							  <!-- if {{ilist' value.OL.status}}==2 -->
-                                    <span class="colGreen">同意</span> 
-                                   <!-- elseif {{ilist' value.OL.status}}==3 -->
-                                   <span class="colOrange">退回</span>
-                                   <!-- elseif {{ilist' value.OL.status}}==4 -->
-                                   <span class="colRed">终止</span>
-                                   <!-- endif -->
-                                    	{{ilist' value.OL.username}} {{ilist' value.OL.date}}
-							</td>
+							<th>开票内容</th>
+							<th>数量</th>
+							<th>单价</th>
+							<th>开票金额</th>
+							<th>提交开票</th>
+							<th>审批意见</th>
+							<th>完成审批</th>
+							</tr>
+						</thead>
+						<tbody>
 							
-						</tr>
-						<!-- endloop -->
-						
-						
 						</tbody>
+						
 					</table>
+				
+				
+				
+				
+				
+				
+					
 				</div>
-						  		<!--翻页-->
-				<div class="demandPage">
-					<ul class="pagination fL">
-	  							<!-- if {{page.previous}}==0 -->
-								<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
-								<!-- else -->
-								<li><a href="/invoiceApprovalAchieve/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
-								<!-- endif -->	
-								
-	  							<!-- if {{page.on_page}}>=3 -->
-	  							<li><a href="/invoiceApprovalAchieve/1{{get}}" title="上一页">1</a></li>
-	  							<li class="point"><span>...</span></li>
-	  							<!-- endif -->
-	  							
-	  							{{page.page}}
-	  							
-	  							<!-- if {{page.on_page}}<3 && {{page.total_page}}>5 -->
-	  							<li><a href="/invoiceApprovalAchieve/4{{get}}" >4</a></li>
-	  							<li><a href="/invoiceApprovalAchieve/5{{get}}" >5</a></li>
-	  							<!-- endif -->
-	  							
-	  							<!-- if {{page.total_page}}>3 -->
-	  							<li class="point"><span>...</span></li>
-			  					<!-- endif -->
-			  					
-			  					<!-- if {{page.next}}=={{page.on_page}} -->
-								<li><a href="javascript:void(0)" title="下一页">&gt;</a></li>
-								<!-- else -->
-								<li><a href="/invoiceApprovalAchieve/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
-								<!-- endif -->
-			  					
-			  		</ul>
-			  	</div>				
+						  		
+			  	
 			</div>
 		</div>
 	</div>
-	<!--弹出(录入收款)-->
-<div class="modal hide fade" id="inputbill">
-    <div class="modal-header">
-    <h3>录入收款</h3>
-    </div>
-    <div class="modal-body">
-    	<form>
-    		<div class="control-group">
-              <label class="control-label"><span class="colRed">*</span>到款金额</label>
-              <div class="controls">
-                <input value="0" placeholder="输入开票金额" pattern="[0-9]" min="0" step="0.01" type="number">
-              </div>
-            </div>
-    		<div class="control-group">
-              <label class="control-label"><span class="colRed">*</span>到款信息</label>
-              <div class="controls">
-                <input type="text">
-              </div>
-            </div>
-    		<div class="control-group">
-              <label class="control-label"><span class="colRed">*</span>到款银行</label>
-              <div class="controls">
-                <select>
-	            	<option>广发银行珠海分行柠溪支行</option>
-	            </select>
-              </div>
-            </div>
-    		<div class="control-group">
-              <label class="control-label"><span class="colRed">*</span>银行到款时间</label>
-              <div class="controls">
-                <input type="date">
-              </div>
-            </div>
-    		<div class="control-group">
-              <label class="control-label">指定认领人</label>
-              <div class="controls">
-                <select>
-	            	<option>待认领款项</option>
-	            	<option>广东办-刘飞</option>
-	            </select>
-              </div>
-            </div>
-    		<div class="control-group">
-              <label class="control-label">未收款发票</label>
-              <div class="controls">
-                <select>
-	            	<option>¥30000.00-珠海XXXXXXX公司-441027465</option>
-	            	<option>¥40000.00-珠海XXXXXXX公司-441027465</option>
-	            </select>
-              </div>
-            </div>
-    	</form>
-    </div>
-	<div class="modal-footer">
-	    <a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认录入</a>
-	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
-	</div>
-</div>
-    <!--弹出内容-->
-	<!--弹出(录入收款)-->
-<div class="modal hide fade" id="receive">
-    <div class="modal-header">
-    <h3>认领收款</h3>
-    </div>
-    <div class="modal-body">
-    	<table class="table">
-    		<thead><tr><th width="50">收款信息</th><td></td>
-    			<th width="60"></th><td></td></tr></thead>
-    		<tr>
-    		</tr>
-    		<tr>
-    			<th>收款金额</th><td><b class="colOrange">¥200000.00</b></td>
-    			<th>收款信息</th><td>陈宇</td>
-    		</tr>
-    		<tr>
-    			<th>收款银行</th><td>广发银行珠海分行柠溪支行</td>
-    			<th>银行到账</th><td>2016-04-11</td>
-    		</tr>
-    		<tr>
-    			<th>录入收款</th><td>张少珊<br>2015-04-12 11:30:02</td>
-    			<th></th><td></td>
-    		</tr>
-    	</table>
-    	<p class="colRed">请确认该收款属于您</p>
-    </div>
-	<div class="modal-footer">
-	    <a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认认领</a>
-	    <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 class="modal  fade" id="approvalInvice">
 		
 		<div id="nc"></div>
 	</div>
     <!--弹出内容-->        	
 <script type="text/javascript">autoFlashHeight();</script>	
+<script type="text/javascript">
+$(document).ready( function () {
+	
+	var table =$('#example').DataTable({
+		
+    	language: {
+    		"sProcessing": "处理中...",
+    		"sLengthMenu": "显示 _MENU_ 项结果",
+    		"sSearch": "搜索:",
+    		"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
+    		"sEmptyTable": "表中数据为空",
+    		 "oPaginate": {
+    	            "sFirst": "首页",
+    	            "sPrevious": "上页",
+    	            "sNext": "下页",
+    	            "sLast": "末页"
+    	        },
+    		 "sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
+    	},
+    	"paging":   false,
+        "ordering": false,
+        "info":     false,
+        //'filter':false,
+    	scrollY:        "700px",
+        scrollX:        true,
+        scrollCollapse: true,
+        paging:         true,
+        
+        serverSide: true,
+        ajax: {
+             url: '/ajaxGetinvoiceApprovalAchieve',
+             type: 'POST',
+             "data": function ( d ) {
+                 return $.extend( {}, d, {
+                   "status": '{{status}}',
+                   'invoiceType':'{{invoiceType}}',
+                   'invoiceTrain':'{{invoiceTrain}}',
+                   'date':'{{dateString}}',
+                 } );
+               }
+        }
+
+    });
+	
+	
+	 
+	
+} );
+
+function nodeInvoiceApproval(iidKey){
+	var postData = iidKey;
+	var type =$(this).attr("data-type");
+	$("#nc").html('');
+	
+	$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
+	var url = "/ajaxGetInvoiceApprovalDetail";
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : postData
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#nc").html(data.html);
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+}
+
+function nodeInvoice(iidKey){		
+	
+	var postData = iidKey;
+	var type =$(this).attr("data-type");
+	$("#nc").html('');
+	var po='INVOICE';
+	
+	$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
+	var url = "/ajaxGetInvoiceInfoByType";
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : postData,
+			type:po
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("div[loading-msg='true']").html("");
+				if(type=='receivables')
+					$("#nr").html(data.html);
+				else
+					$("#nc").html(data.html);
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+	}
+
+</script>
+
+
 </body>

+ 0 - 237
protected/view/admin/invoiceApprovalAchieveDevelopment.html

@@ -1,237 +0,0 @@
-<!-- include 'header' -->
-<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.js"></script>
-<link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
-<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
-<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
-<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.css"> 
-<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.min.js"></script>
-
-<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/dataTables.fixedColumns.min.js"></script>
-
-<body>
-	<div class="mainLayout">
-		<div class="mainMenu">
-			<div class="menuItem">
-				<a href="#" class="mLogo">CLD</a>
-				<ul>
-					<!-- include 'menuReceipt' -->
-				</ul>
-			</div>
-		</div>
-		<div class="warpContent">
-			<div class="subMenu fL">
-				<div class="menuItem">
-					<!-- include 'invoiceMenu' -->
-				</div>
-			</div>
-			<div class="adminContent autoHeight">
-				<legend>
-					审批发票
-				</legend>
-				<div class="demandCate">
-				
-				<form action="/invoiceApprovalAchieveDevelopment/{{status}}" id="iaa" method="get" >
-				<ul class="cateList">
-						<li>
-							<a <!-- if {{status}}=='ALL' --> class="now" <!-- endif --> href="/invoiceApprovalAchieveDevelopment/ALL">所有</a>
-							<a <!-- if {{status}}=='PEND' --> class="now" <!-- endif --> href="/invoiceApprovalAchieveDevelopment/PEND" title="待审批发票">待审批发票</a>
-							<a <!-- if {{status}}=='APPROVED' --> class="now" <!-- endif --> href="/invoiceApprovalAchieveDevelopment/APPROVED" title="已审批发票">已审批发票</a>
-						</li>
-						<li>
-							<select name="invoiceType" node-invoiceType >
-								<option <!-- if {{invoiceType}}=='ALL' --> selected <!-- endif --> value="ALL">类型</option>
-								<option <!-- if {{invoiceType}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">普通发票</option>
-								<option <!-- if {{invoiceType}}=='SPECIAL' --> selected <!-- endif --> value="SPECIAL">专用发票</option>
-							</select>
-						</li>
-						<li>
-							<select name="invoiceTrain" node-invoiceTrain >
-								<option <!-- if {{invoiceTrain}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">个人发票</option>
-								<option <!-- if {{invoiceTrain}}=='TRAIN' --> selected <!-- endif --> value="TRAIN">培训班发票</option>
-							</select>
-						</li>
-						<li>
-						<div class="search">
-								<div class="input-append">
-									<input class="datepicker-here span3" name="date" value="{{dateString}}" placeholder="按时间筛选" type="text" data-range="true" data-multiple-dates-separator=" : " data-language="zh">
-									<button class="btn btn-small" type="submit">查询</button>
-								</div>
-							</div>
-						</li>
-						
-					</ul>
-					</form>
-				
-				
-				
-				
-				
-					
-				</div>
-				<div class="saeaList">
-				
-				
-				<table id="example" class="stripe row-border order-column" cellspacing="0" width="2400" >
-						<thead>
-							<tr class="thead">
-							<th>开票流水号</th>
-							<th>开票单位(抬头)</th>
-							<th>纳税人识别码</th>
-							<th>注册地址~电话</th>
-							<th>开户银行~账号</th>
-							<th>发票备注</th>
-							<th>收件人~电话</th>
-							<th>收件地址</th>
-							<th>邮寄物品</th>
-							
-							<th>开票内容</th>
-							<th>数量</th>
-							<th>单价</th>
-							<th>开票金额</th>
-							<th>提交开票</th>
-							<th>审批意见</th>
-							<th>完成审批</th>
-							</tr>
-						</thead>
-						<tbody>
-							
-						</tbody>
-						
-					</table>
-				
-				
-				
-				
-				
-				
-					
-				</div>
-						  		
-			  	
-			</div>
-		</div>
-	</div>
-	
-	
-	
-	
-<div loading-msg='true' style="position:absolute;  left:50%;  top:50%;  "></div>
-	<div class="modal  fade" id="approvalInvice">
-		
-		<div id="nc"></div>
-	</div>
-    <!--弹出内容-->        	
-<script type="text/javascript">autoFlashHeight();</script>	
-<script type="text/javascript">
-$(document).ready( function () {
-	
-	var table =$('#example').DataTable({
-		
-    	language: {
-    		"sProcessing": "处理中...",
-    		"sLengthMenu": "显示 _MENU_ 项结果",
-    		"sSearch": "搜索:",
-    		"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
-    		"sEmptyTable": "表中数据为空",
-    		 "oPaginate": {
-    	            "sFirst": "首页",
-    	            "sPrevious": "上页",
-    	            "sNext": "下页",
-    	            "sLast": "末页"
-    	        },
-    		 "sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
-    	},
-    	
-    	scrollY:        "700px",
-        scrollX:        true,
-        scrollCollapse: true,
-        paging:         true,
-        
-        serverSide: true,
-        ajax: {
-             url: '/ajaxGetinvoiceApprovalAchieveDevelopment',
-             type: 'POST',
-             "data": function ( d ) {
-                 return $.extend( {}, d, {
-                   "status": '{{status}}',
-                   'invoiceType':'{{invoiceType}}',
-                   'invoiceTrain':'{{invoiceTrain}}',
-                   'date':'{{dateString}}',
-                 } );
-               }
-        }
-
-    });
-	
-	
-	 
-	
-} );
-
-function nodeInvoiceApproval(iidKey){
-	var postData = iidKey;
-	var type =$(this).attr("data-type");
-	$("#nc").html('');
-	
-	$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
-	var url = "/ajaxGetInvoiceApprovalDetail";
-	$.ajax({
-		url : url,
-		type : "post",
-		cache : false,
-		dataType : "json",
-		data : {
-			serial : postData
-		},
-		global : true,
-		success : function(data) {
-			if (data.status == 1) {
-				$("#nc").html(data.html);
-			} else
-				$("div[loading-msg='true']").html("illegal request");
-		},
-		error : function(err) {
-			$("div[loading-msg='true']").html("");
-		}
-	});
-}
-
-function nodeInvoice(iidKey){		
-	
-	var postData = iidKey;
-	var type =$(this).attr("data-type");
-	$("#nc").html('');
-	var po='INVOICE';
-	
-	$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
-	var url = "/ajaxGetInvoiceInfoByType";
-	$.ajax({
-		url : url,
-		type : "post",
-		cache : false,
-		dataType : "json",
-		data : {
-			serial : postData,
-			type:po
-		},
-		global : true,
-		success : function(data) {
-			if (data.status == 1) {
-				$("div[loading-msg='true']").html("");
-				if(type=='receivables')
-					$("#nr").html(data.html);
-				else
-					$("#nc").html(data.html);
-			} else
-				$("div[loading-msg='true']").html("illegal request");
-		},
-		error : function(err) {
-			$("div[loading-msg='true']").html("");
-		}
-	});
-	}
-
-</script>
-
-
-</body>