Przeglądaj źródła

报销单汇总相关修改

caipin 7 lat temu
rodzic
commit
85bc21e560

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

@@ -262,6 +262,12 @@ $route['*']['/ajaxGetReceiptOrder'] = array('ReceiptController', 'ajaxGetReceipt
 
 $route['*']['/swfupload'] = array('ReceiptController', 'swfupload');
 
+//报销单公司汇总
+$route['*']['/receiptStatisticsStaffDetail'] = array('ReceiptController', 'receiptStatisticsStaffDetail');
+
+
+
+
 //邮件群发
 $route['*']['/eMailTask'] = array('MainController', 'eMailTask');
 $route['*']['/createEmail'] = array('MainController', 'createEmail');

+ 38 - 10
protected/controller/InvoiceController.php

@@ -2025,6 +2025,9 @@ class InvoiceController extends DooController {
 		$iid = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
 		$status = $this->get_args ( 'status' ) && is_numeric ( $this->get_args ( 'status' ) ) ? $this->get_args ( 'status' ) : 0;
 		$opinion = $this->get_args ( 'opinion' ) ? $this->get_args ( 'opinion' ) : "";
+		
+		$divApproval = $this->get_args ( 'divApproval' ) ? $this->get_args ( 'divApproval' ) : "";
+		
 		$iid = $invoice->authcode ( $iid );
 		if (! is_numeric ( $iid ))
 			die ( 'illegal request' );
@@ -2119,8 +2122,10 @@ class InvoiceController extends DooController {
 					'iid' => $iid 
 			);
 			$invoiceOperationLog->setInvoiceOperationLog ( $item );
-			
-			return '/invoiceApproval';
+			if(empty($divApproval))
+				return '/invoiceApproval';
+			else 
+				return '/invoiceApprovalAchieve';
 		}
 		die ( 'illegal request' );
 	}
@@ -2316,6 +2321,7 @@ class InvoiceController extends DooController {
 		$invoice = new invoice ();
 		$iid = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
 		$invoiceNo = $this->get_args ( 'invoiceNo' ) ? $this->get_args ( 'invoiceNo' ) : "";
+		$invoicePrintType = $this->get_args ( 'invoicePrintType' ) ? $this->get_args ( 'invoicePrintType' ) : "";
 		
 		$iid = $invoice->authcode ( $iid );
 		if (! is_numeric ( $iid ))
@@ -2396,8 +2402,10 @@ class InvoiceController extends DooController {
 			$msg = '';
 			$url = 'http://m.cld.smartcost.com.cn/invoicePrintDetail/' . $XDeode->encode ( $invoicePrintDetail ['iid'] ) . '.html';
 			$hfreult = $this->msgSend ( $msg, $title2, $url, $username2 ['wxid'], $invoicePrintDetail ['sid'], 'print' );
-			
-			return "/invoicePrint";
+			if (empty($invoicePrintType))
+				return "/invoicePrint";
+			else 
+				return "/invoicePrintStayAchieve";
 		}
 	}
 	
@@ -4999,6 +5007,7 @@ class InvoiceController extends DooController {
 					<form action="/invoiceApprovalDo" method="post" name="invoiceApproval" class="nice-validator n-yellow" novalidate="novalidate">
 					<input type="hidden" name="invoiceKey" value="' . $detail ['iidKeyXD'] . '">
 					<input type="hidden" name="status" value="">
+					<input type="hidden" name="divApproval" value="divApproval">
 					
 						<div class="modal-dialog modal-lg">
 				<div class="modal-content"><div class="modal-header"><h3>发票审批详情</h3></div>
@@ -5093,9 +5102,9 @@ class InvoiceController extends DooController {
 				$html .= '</td></tr></tbody></table>';
 			}
 			$html .= '</div><div class="modal-footer">
-					<a href="javascript:void(0)" node-approval="approval" diss-data="2" class="button btn-done" data-placement="top" data-toggle="ctooltip" >同意</a>
-					<a href="javascript:void(0)" node-approval="approval" diss-data="3" class="button btn-back" data-placement="top" data-toggle="ctooltip" data-original-title="上报人修改后重新审批">退回</a>
-					<a href="javascript:void(0)" node-approval="approval" diss-data="4" class="button btn-undone" data-placement="top" data-toggle="ctooltip" data-original-title="终止发票申请">终止</a>
+					<a href="javascript:void(0)" node-approval="approval"  diss-data="2" class="button btn-done" data-placement="top" data-toggle="ctooltip" >同意</a>
+					<a href="javascript:void(0)" node-approval="approval"  diss-data="3" class="button btn-back" data-placement="top" data-toggle="ctooltip" data-original-title="上报人修改后重新审批">退回</a>
+					<a href="javascript:void(0)" node-approval="approval"  diss-data="4" class="button btn-undone" data-placement="top" data-toggle="ctooltip" data-original-title="终止发票申请">终止</a>
 					
 					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a></div></div></div>
 					</form>
@@ -5196,7 +5205,7 @@ class InvoiceController extends DooController {
 		foreach ( $list as $key => $value ) {
 			$irDetail = array ();
 			
-			if ($value ['status'] == 1) {
+			if ($value ['status'] == 1&&$value['pendingApprovals']==$this->staff[0]['sid']) {
 				array_push ( $irDetail, '<a href="#approvalInvice" onclick="nodeInvoiceApproval(\'' . $value ['iidKeyK'] . '\')" data-toggle="modal">审批发票</a>' );
 			} else
 				array_push ( $irDetail, '' );
@@ -5522,6 +5531,12 @@ class InvoiceController extends DooController {
 		$detail = $invoice->getInvoiceByIsid ( $serial, $this->staff [0] ['sid'] );
 		$invoiceOperationLogList = $invoiceOperationLog->getInvoiceOperationLogByIid ( $detail ['iid'] );
 		
+		
+		Doo::loadModel ( 'invoicePaper' );
+		$invoicePaper = new invoicePaper ();
+		
+		$invoicePaperList = $invoicePaper->getInvoicePaperByInvoiceType ( $detail ['invoiceType'] );
+		
 		if (empty ( $detail ))
 			$html = '';
 		else {
@@ -5529,7 +5544,7 @@ class InvoiceController extends DooController {
 					
 					<form action="/invoicePrintDo" method="post" name="invoicePrint" class="nice-validator n-yellow" onSubmit="return checkPrintForm()" novalidate="novalidate">
 						<input type="hidden" name="invoiceKey" value="' . $detail ['iidKeyXD'] . '">
-					
+						<input type="hidden" name="invoicePrintType" value="invoicePrintType">
 						<div class="modal-dialog modal-lg">
 								
 				<div class="modal-content"><div class="modal-header"><h3>发票单详情</h3></div>
@@ -5612,7 +5627,20 @@ class InvoiceController extends DooController {
 				}
 				$html .= '</td>
 						
-						<td><span class="colRed">*</span>No.<input name="invoiceNo" id="invoiceNo" value="" type="text" placeholder="输入发票号" aria-required="true" aria-invalid="true" class="n-invalid">
+						<td><span class="colRed">*</span>
+						
+						<select name="invoiceNo" id="invoiceNo" style="width:97%">';
+								
+								foreach($invoicePaperList as $key=>$value){
+									$html .= '<option value="'.$value['ipidKey'].'">No.'.$value['invoiceNo'].'</option>';
+								}  
+								
+								$html .= '</select>
+						
+						
+						
+						
+						
 								<span class="red" id="p-msg"></span>
 								</td>
 						

Plik diff jest za duży
+ 301 - 189
protected/controller/ReceiptController.php


+ 35 - 25
protected/model/accountItem.php

@@ -1,33 +1,43 @@
 <?php
-
-Doo::loadCore('db/DooModel');
-
+Doo::loadCore ( 'db/DooModel' );
 class accountItem extends DooModel {
-
-    public $aid;
-    public $category;
-    public $name;
-    
-    public $_table = 'CLD_accountItem';
-    public $_primarykey = 'aid';
-    
-    public $_fields = array('aid', 'category', 'name');
-
-    /*
-    function getClientByCid($cid){
-    	$sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid)  where a.cid= '".$cid."' " ;
+	public $aid;
+	public $category;
+	public $name;
+	public $_table = 'CLD_accountItem';
+	public $_primarykey = 'aid';
+	public $_fields = array (
+			'aid',
+			'category',
+			'name' 
+	);
+	
+	/**
+	 * 
+	 */
+	function getAccountItem(){
+		$sql = 'select category
+				from ' . $this->_table . '
+						 GROUP BY category ORDER BY  aid ASC  ';
+		$query = Doo::db ()->query ( $sql );
+		$itemCategory = $query->fetchAll ();
 		
-    	$query = Doo::db ()->query ( $sql );
+		$list = $this->find ( array (
+				'asArray' => TRUE
+		) );
 		
-		$result = $query->fetch ();
+		$acctionItem=array();
+		foreach ($itemCategory as $key=>$value){
+			$acctionItem[$value['category']]=array();
+			foreach ($list as $k=>$v){
+				if ($value['category']==$v['category']){
+					array_push($acctionItem[$value['category']], $v);
+				}
+			}
+		}
 		
-		return $result;
-    }
-    
-    public function getProjectByIdList($projectid){
-    	return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) );
-    }
-    */
+		return $acctionItem;
+	}
 }
 
 ?>

+ 175 - 0
protected/model/invoicePaper.php

@@ -0,0 +1,175 @@
+<?php
+Doo::loadCore ( 'db/DooModel' );
+/**
+ * 纸质发票相关信息及其操作业务逻辑
+ * @author CP.
+ * @version 1.0
+ * @namespace invoice
+ * @package invoiceModel
+ */
+class invoicePaper extends DooModel {
+	
+	/**
+	 *
+	 * @var integer $iid 发票ID
+	 */
+	public $ipid;
+	public $invoiceType;
+	public $invoiceCode;
+	public $invoiceNo;
+	public $iid;
+	public $date;
+	public $_table = 'CLD_invoicePaper';
+	public $_primarykey = 'ipid';
+	public $_fields = array (
+			'ipid',
+			'invoiceType',
+			'invoiceCode',
+			'invoiceNo',
+			'iid',
+			'date' 
+	);
+	function getInvoicePaper($limit = 0, $con = "", $desc = 'desc') {
+		if (empty ( $limit ) || empty ( $con ))
+			return array ();
+		
+		$field = 'a.invoiceType,a.invoiceCode,a.invoiceNo,a.iid,a.date as paperDate,a.ipid
+				 ,b.invoiceSerial,b.invoiceTitle,b.invoiceCompany,b.invoicePrice,b.invoiceElement,b.date as invoiceDate,b.userName,b.categoryName,b.printTime';
+		
+		$sql = "select " . $field . " from " . $this->_table . " as a left join CLD_invoice as b on (a.iid=b.iid)  " . $con . "  ORDER BY a.invoiceNo " . $desc . ' limit ' . $limit;
+		
+		$query = Doo::db ()->query ( $sql );
+		$list = $query->fetchAll ();
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['iidKey'] = $XDeode->encode ( $value ['iid'] );
+			$list [$key] ['ipidKey'] = $XDeode->encode ( $value ['ipid'] );
+		}
+		return $list;
+	}
+	function getInvoicePaperCount() {
+		$listCount = $this->count ( array (
+				'asArray' => TRUE 
+		) );
+		return $listCount;
+	}
+	/**
+	 *  根据发票类型获得未打印的发票号
+	 * @param number $invoiceType
+	 * @return unknown
+	 */
+	function getInvoicePaperByInvoiceType( $invoiceType = 0) {
+		
+		$list = $this->find ( array (
+				'where' => 'iid=0 and invoiceType='.$invoiceType,
+				'asArray' => TRUE 
+		) );
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['ipidKey'] = $XDeode->encode ( $value ['ipid'] );
+		}
+		return $list;
+	}
+	
+	/**
+	 * 根据ID获得纸票号
+	 * @param number $ipid
+	 */
+	function getInvoicePaperByIpid($ipid=0){
+		$detail = $this->getOne ( array (
+				'where' => 'iid=0 and ipid='.$ipid,
+				'asArray' => TRUE
+		) );
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		if (empty ( $detail ) )
+			return array ();
+		
+		$detail ['ipidKey'] = $XDeode->encode ( $detail ['ipid'] );
+		
+		return $detail;
+	}
+	
+	/**
+	 * 根据参数字段更新相应字段(主键ID必须传)
+	 * @param array $item 相关需要更新的字段信息
+	 * @return number 返回发票ID
+	 */
+	public function setInvoicePaperByCondition($item = array()) {
+		$lid = 0;
+		if (is_array ( $item ) && ! empty ( $item )) {
+			foreach ( $item as $key => $value ) {
+				$this->$key = $value;
+			}
+			$lid = $this->update ();
+		}
+		return $lid;
+	}
+	
+	/**
+	 * 加密或解密指定字符串
+	 *
+	 * @param string $string 要加密或解密的字符串
+	 * @param string $operation 当取值为'DECODE'时表示解密,否则为加密
+	 * @param string $key 加解密的key
+	 * @param $expiry 超时值
+	 *
+	 */
+	function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
+		$ckey_length = 4;
+		if (! $key) {
+			$key = $this->INVOICEKEY;
+		}
+		$key = md5 ( $key );
+		$keya = md5 ( substr ( $key, 0, 16 ) );
+		$keyb = md5 ( substr ( $key, 16, 16 ) );
+		$keyc = $ckey_length ? ($operation == 'DECODE' ? substr ( $string, 0, $ckey_length ) : substr ( md5 ( microtime () ), - $ckey_length )) : '';
+		
+		$cryptkey = $keya . md5 ( $keya . $keyc );
+		$key_length = strlen ( $cryptkey );
+		
+		$string = $operation == 'DECODE' ? base64_decode ( substr ( $string, $ckey_length ) ) : sprintf ( '%010d', $expiry ? $expiry + time () : 0 ) . substr ( md5 ( $string . $keyb ), 0, 16 ) . $string;
+		$string_length = strlen ( $string );
+		
+		$result = '';
+		$box = range ( 0, 255 );
+		
+		$rndkey = array ();
+		for($i = 0; $i <= 255; $i ++) {
+			$rndkey [$i] = ord ( $cryptkey [$i % $key_length] );
+		}
+		
+		for($j = $i = 0; $i < 256; $i ++) {
+			$j = ($j + $box [$i] + $rndkey [$i]) % 256;
+			$tmp = $box [$i];
+			$box [$i] = $box [$j];
+			$box [$j] = $tmp;
+		}
+		
+		for($a = $j = $i = 0; $i < $string_length; $i ++) {
+			$a = ($a + 1) % 256;
+			$j = ($j + $box [$a]) % 256;
+			$tmp = $box [$a];
+			$box [$a] = $box [$j];
+			$box [$j] = $tmp;
+			$result .= chr ( ord ( $string [$i] ) ^ ($box [($box [$a] + $box [$j]) % 256]) );
+		}
+		
+		if ($operation == 'DECODE') {
+			if ((substr ( $result, 0, 10 ) == 0 || substr ( $result, 0, 10 ) - time () > 0) && substr ( $result, 10, 16 ) == substr ( md5 ( substr ( $result, 26 ) . $keyb ), 0, 16 )) {
+				return substr ( $result, 26 );
+			} else {
+				return '';
+			}
+		} else {
+			return $keyc . str_replace ( '=', '', base64_encode ( $result ) );
+		}
+	}
+}
+
+?>

+ 20 - 1
protected/model/receipt.php

@@ -60,7 +60,6 @@ class receipt extends DooModel {
 			'coupletNumber','remittanceBankType');
 
 	function receiptByYear($dateCondition,$sid){
-    	//
     	$sql = "select sum(sum) as sum from " . $this->_table . " where staff= '".$sid."' ".$dateCondition." and status=2 ";
     	//echo '<div style="display:none">'.$sql.'</div>';
     	$query = Doo::db ()->query ( $sql );
@@ -69,6 +68,26 @@ class receipt extends DooModel {
 		return $result;
     }
     
+    function getReceiptBySid($sid='',$year='',$month=''){
+    	
+    	Doo::loadClass ( 'XDeode' );
+    	$XDeode = new XDeode ( 5 );
+    	
+    	if(empty($sid))
+    		return array();
+    	$sql = 'select a.*
+				from ' . $this->_table . ' as a left join CLD_receiptDetail as b on b.rid=a.rid
+				where b.staff =' . $sid . ' and Month(b.date)=' . $month . ' and Year(b.date)=' . $year.' and b.status=1
+				GROUP BY b.rid';
+    	
+    	$query = Doo::db ()->query ( $sql );
+    	$list = $query->fetchAll ();
+    	
+    	foreach ($list as $key=>$value){
+    		$list  [$key] ['ridKey'] = $XDeode->encode ( $value ['rid'] );
+    	}
+    	return $list;	
+    }
    
 }
 

+ 34 - 12
protected/model/receiptDetail.php

@@ -23,21 +23,43 @@ class receiptDetail extends DooModel {
     
     public $_fields = array('rdid', 'item', 'staff', 'itemCategory', 'price', 'date','pastDate', 'cid', 'rid', 'status');
 
-    /*
-    function getClientByCid($cid){
-    	$sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid)  where a.cid= '".$cid."' " ;
-		
-    	$query = Doo::db ()->query ( $sql );
-		
-		$result = $query->fetch ();
-		
-		return $result;
+    /**
+     * 按人员年月合计报销单项目金额
+     * @param string $sid
+     * @param string $year
+     * @param string $month
+     * @return unknown
+     */
+    function getReceiptTotalItem($sid='',$year='',$month=''){
+    	if(empty($sid))
+    		return array();
+    	$list=$this->find ( array (
+    			'select' => 'staff,item,sum(price) as price,itemCategory,Month(date) as month',
+    			'where' => 'staff=' . $sid . " and status=1 and Year(date)=" . $year . ' and Month(date)=' . $month,
+    			'groupby' => 'item,Month(date),itemCategory',
+    			'asArray' => true
+    	) );
+    	return $list;
     }
     
-    public function getProjectByIdList($projectid){
-    	return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) );
+    /**
+     * 按人员年月合计报销单大项金额
+     * @param string $sid
+     * @param string $year
+     * @param string $month
+     * @return unknown
+     */
+    function getReceiptTotalItemCategory($sid='',$year='',$month=''){
+    	if(empty($sid))
+    		return array();
+    	$list=$this->find ( array (
+    			'select' => 'staff,sum(price) as price,itemCategory,Month(date) as month',
+    			'where' => 'staff=' . $sid . " and status=1 and Year(date)=" . $year . ' and Month(date)=' . $month,
+    			'groupby' => 'Month(date),itemCategory',
+    			'asArray' => true
+    	) );
+    	return $list;
     }
-    */
 }
 
 ?>

+ 1 - 0
protected/model/staff.php

@@ -63,6 +63,7 @@ class staff extends DooModel {
 		) );
 	}
 	public function getStaffByName($username = '') {
+		
 		return $this->getOne ( array (
 				'asc' => 'sid',
 				'where' => "username= '" . $username . "'",

+ 18 - 5
protected/model/statistics.php

@@ -43,11 +43,24 @@ class statistics extends DooModel {
 		
 		return $result;
     }
-    /*
-    public function getProjectByIdList($projectid){
-    	return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) );
-    }
-    */
+    
+    /**
+     * 按员工年月获得报销单汇总信息
+     * @param string $sid
+     * @param string $year
+     * @param string $month
+     */
+	function getStatisticsBySid($sid='',$year='',$month=''){
+		if(empty($sid))
+			return array();
+		$stList = $this->getOne ( array (
+				'select' => 'sum(rePrice) as rePrice,sum(agPrice) as agPrice',
+				'where' => 'staff='.$sid.' and Month(date)=' . $month . " and Year(date)=" . $year,
+				'groupby' => 'Month(date)',
+				'asArray' => true
+		) );
+		return $stList;
+	}
 }
 
 ?>

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

@@ -166,7 +166,7 @@
 	  					</tbody>
 	  				
 	  				</table>
-	  			<!-- if {{status}}=='done' || {{status}}=='termination' --> 
+	  			<!-- if {{status}}=='done' || {{status}}=='termination'|| {{status}}=='finish' --> 
 	  				<ul class="pagination fR">
 	  							<!-- if {{page.previous}}==0 -->
 								<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>

+ 184 - 0
protected/view/admin/invoiceAggregateStaffDetail.html

@@ -0,0 +1,184 @@
+<!-- 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>
+<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">
+					<ul>
+						<!-- include 'invoiceMenu' -->
+					</ul>
+				</div>
+			</div>
+			<div class="adminContent autoHeight">
+				<legend>
+					{{staffDetail.username}}开票汇总 <a href="/invoiceAggregateStaffReceivablesDetail?&sidKey={{sidKey}}">{{staffDetail.username}}收款汇总</a>
+				</legend>
+				<div class="demandCate">
+				<form action="/invoiceAggregateStaffDetail/1/{{status}}?&sidKey={{sidKey}}" id="iaa" method="get">
+					<ul class="cateList">
+	  					<li>  
+	  					<a <!-- if {{status}}=='All' --> class="now" <!-- endif -->  href="/invoiceAggregateStaffDetail?&sidKey={{sidKey}}">所有</a>
+	  					<a <!-- if {{status}}=='UNRECORD' --> class="now" <!-- endif --> href="/invoiceAggregateStaffDetail/1/UNRECORD?&sidKey={{sidKey}}" title="未入账">未入账</a>
+	  					<a <!-- if {{status}}=='RECORD' --> class="now" <!-- endif --> href="/invoiceAggregateStaffDetail/1/RECORD?&sidKey={{sidKey}}" title="已入账">已入账</a>
+	  					<a <!-- if {{status}}=='BOUNCED' --> class="now" <!-- endif --> href="/invoiceAggregateStaffDetail/1/BOUNCED?&sidKey={{sidKey}}" title="已退票">已退票</a>
+	  					<a <!-- if {{status}}=='PARTRECORD' --> class="now" <!-- endif --> href="/invoiceAggregateStaffDetail/1/PARTRECORD?&sidKey={{sidKey}}" title="部分入账">部分入账</a>
+	  					</li>
+	  					<li>
+	  						<select name="sidKey" node-invoicetype>
+	  						<!-- loop staffList -->
+	  							<option <!-- if {{staffList' value.sid}}=={{staffDetail.sid}} --> selected <!-- endif --> value="{{staffList' value.sidKey}}">{{staffList' value.username}}</option>
+	  						<!-- endloop -->
+	  						</select>
+	  					</li>
+							<li>
+								<div class="search">
+									<div class="input-append">
+										<input class="datepicker-here span3" name="date" value="{{date}}" placeholder="按出票时间筛选" data-range="true" 
+										data-multiple-dates-separator=" : " data-language="zh" type="text">
+										<button class="btn btn-small" type="submit">查询</button>
+									</div>
+								</div>
+							</li>
+							<li><div class="search"><div class="input-append">
+									<input class="span3" placeholder="开票单位" name="MebSea" value="{{MebSeaEn}}" type="text">
+									<button class="btn btn-small" node-irmMebSea type="submit">搜索</button>
+								</div>
+							</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>
+							<th>出票时间</th>
+							<th>状态</th>
+							<th>收款流水号</th>
+							<th>收款金额</th>
+							</tr>
+							
+		  				
+		  				<!-- loop list -->
+						<tr>
+						
+						<td>{{list' value.userName}}</td>
+							<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{list' value.iidKeyK}}" data-toggle="modal">{{list' value.invoiceSerial}}</a></td>
+							<td>
+								<!-- if !empty({{list' value.invoiceType}}) -->
+	                        	<b>¥{{list' value.invoicePrice}}</b><sup>专</sup>
+	                          <!-- else -->
+	                          <b>¥{{list' value.invoicePrice}}</b>
+	                          <!-- endif -->
+							</td>
+							
+							<td>
+								<!-- if !empty({{list' value.invoiceType}}) -->
+	                                   	{{list' value.invoiceCompany}}
+	                                    <!-- else -->
+	                                    {{list' value.invoiceTitle}}
+	                                    <!-- endif -->
+							</td>
+							<!-- <td>{{invoiceList' value.invoiceNo}}</td> -->
+							<td>{{list' value.invoiceElement}}</td>
+							<td>
+							{{list' value.printTime}}
+							</td>
+							
+							<td>
+							<!-- if {{list' value.untreadStatus}}==2 -->
+	                                                                 已退票
+	                        <!-- endif -->
+							</td>
+							
+							<td>
+							<!-- loop list' value.irList -->
+							<a href="#billing" node-invoice='INFO' data-type="receivables" data-isKey="{{list' value' value.iridKeyK}}" data-toggle="modal">{{list' value' value.receivablesSerial}}</a>&nbsp;
+							<!-- endloop -->
+							</td>
+							<td>
+							<!-- if {{list' value.sumPrice}}==0 -->
+							<!-- elseif {{list' value.sumPrice}}=={{list' value.invoicePrice}} -->
+							<b >¥{{list' value.sumPrice}}</b>
+							<!-- elseif {{list' value.sumPrice}}>{{list' value.invoicePrice}} -->
+							<b class="colOrange">¥{{list' value.sumPrice}}</b>
+							<!-- elseif {{list' value.sumPrice}}<{{list' value.invoicePrice}} -->
+							<b class="colRed">¥{{list' value.sumPrice}}</b>
+							<!-- endif -->
+							</td>
+							
+							
+							
+							
+						</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="/invoiceAS/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
+								<!-- endif -->	
+								
+	  							<!-- if {{page.on_page}}>=3 -->
+	  							<li><a href="/invoiceAS/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="/invoiceAS/4{{get}}" >4</a></li>
+	  							<li><a href="/invoiceAS/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="/invoiceAS/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
+								<!-- endif -->
+			  					
+			  		</ul>
+			  	</div>	
+			</div>
+		</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>
+	<div class="modal  fade" id="billing">
+		<div id="nr"></div>
+	</div>
+	
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 168 - 0
protected/view/admin/invoiceAggregateStaffReceivablesDetail.html

@@ -0,0 +1,168 @@
+<!-- include 'header' -->
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css">
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.validator.js"></script>
+<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>
+<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>
+				
+				{{staffDetail.username}}收款汇总 <a href="/invoiceAggregateStaffDetail?&sidKey={{sidKey}}">{{staffDetail.username}}开票汇总</a>
+				
+				</legend>
+				<div class="demandCate">
+				<form action="/invoiceAggregateStaffReceivablesDetail/1/{{status}}?&sidKey={{sidKey}}" id="iaa" method="get">
+					<ul class="cateList">
+					<li>
+						<a <!-- if {{status}}=='All' --> class="now" <!-- endif --> href="/invoiceAggregateStaffReceivablesDetail/1/All?&sidKey={{sidKey}}&timeType=CREATE">所有</a>
+	  					
+	  					<a <!-- if {{status}}=='Unclaimed' --> class="now" <!-- endif --> title="未入账" href="/invoiceAggregateStaffReceivablesDetail/1/Unclaimed?&sidKey={{sidKey}}&timeType=CREATE" >未入账</a>
+	  					
+	  					<a <!-- if {{status}}=='Credited'  --> class="now" <!-- endif --> title="已入账" href="/invoiceAggregateStaffReceivablesDetail/1/Credited?&sidKey={{sidKey}}&timeType=BIND" >已入账</a>
+	  					<a <!-- if {{status}}=='BBN' --> class="now" <!-- endif --> title="部分入账" href="/invoiceAggregateStaffReceivablesDetail/1/BBN?&sidKey={{sidKey}}&timeType=BIND" >部分入账</a>
+	  					
+	  				</li>
+					
+					
+					<li>
+	  						<select name="sidKey" node-invoicetype>
+	  						<!-- loop staffList -->
+	  							<option <!-- if {{staffList' value.sid}}=={{staffDetail.sid}} --> selected <!-- endif --> value="{{staffList' value.sidKey}}">{{staffList' value.username}}</option>
+	  						<!-- endloop -->
+	  						</select>
+	  					</li>
+					
+	  					<li>
+	  					<div class="search">
+	  					<input type="radio" <!-- if {{timeType}}=='CREATE' --> checked <!-- endif --> refreshData=time name="timeType"  value="CREATE">按录入时间
+	  					<input type="radio" <!-- if {{timeType}}=='BIND' --> checked <!-- endif --> refreshData=time name="timeType" value="BIND">按入账时间
+	  					<div class="input-append">
+	  					
+	  					<input class="datepicker-here span3" name="date" value="{{date}}" placeholder="按出票时间筛选" data-range="true" data-multiple-dates-separator=" : " data-language="zh" type="text">
+	  					<button class="btn btn-small" type="submit">查询</button>
+	  					</div>
+	  					</div>
+	  					
+	  					</li>
+	  					
+						<li><div class="search"><div class="input-append">
+									<input class="span3" data-irmMebSea placeholder="收款金额,收款信息" name="MebSea" value="{{MebSeaEn}}" type="text">
+									<button class="btn btn-small" node-irmMebSea type="submit">搜索</button>
+								</div>
+							</div></li>
+					</ul>
+					</form>
+	  			</div>
+				<div class="saeaList">
+		  		<table class="table table-hover">
+		  		
+		  		<tr class="thead">
+								<th>收款金额</th>
+								<th>收款信息</th>
+								<th>到帐银行/到帐时间</th>
+								<th>录入收款</th>
+								<th>收款认领</th>
+								<th>发票入账</th>
+								<th>开票流水号</th>
+							</tr>
+		  		
+					<!-- loop list -->
+						<tr>
+						<td><b>¥{{list' value.receivablesPrice}}</b></td>
+						<td>{{list' value.receivablesMessage}}</td>
+						<td>{{list' value.receivablesBank}}<br/>{{list' value.receivablesDate}}</td>
+						<td>{{list' value.inputStaff}} <br>{{list' value.date}}</td>
+						<td>
+						<!-- if {{list' value.receivablesCategory}}!='PUBLIC' -->
+						{{list' value.irolg.operation}}<br/>{{list' value.confirmTime}}
+						<!-- endif -->
+						</td>
+						<td>
+						<!-- if {{list' value.bindStatus}}==1 -->
+						{{list' value.accountClerk}}&nbsp;入账<br/>{{list' value.bindDate}}
+						<!-- elseif {{list' value.bindStatus}}==0&&{{list' value.untreadStatus}}==1 -->
+						{{list' value.untreadStaff}}&nbsp;退票<br/>{{list' value.unbundlingTime}}
+						<!-- endif -->
+						</td>
+						<td>
+						<!-- loop list' value.invoiceList -->
+							<a href="#invdetail" node-invoice='INFO' data-isKey="{{halfList' value' key}}" data-toggle="modal">{{halfList' value' value}}</a>&nbsp;
+						<!-- endloop -->
+						</td>
+						
+						</tr>
+					<!-- endloop -->
+					
+					
+		  		</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="/invoiceAggregateStaffReceivablesDetail/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
+								<!-- endif -->	
+								
+	  							<!-- if {{page.on_page}}>=3 -->
+	  							<li><a href="/invoiceReceivablesAS/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="/invoiceAggregateStaffReceivablesDetail/4{{get}}" >4</a></li>
+	  							<li><a href="/invoiceAggregateStaffReceivablesDetail/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="/invoiceAggregateStaffReceivablesDetail/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
+								<!-- endif -->
+			  					
+			  		</ul>
+			  	</div>			
+			</div>
+		</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>

+ 278 - 0
protected/view/admin/invoicePaper.html

@@ -0,0 +1,278 @@
+<!-- include 'header' -->
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css">
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.validator.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.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>
+<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>
+<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="/invoicePaper" id="iaa" method="get" >
+				
+					<ul class="cateList">
+						<li>
+							<select name="invoiceType" node-invoiceType class="select">
+								<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="status" node-invoiceType class="select">
+								<option <!-- if {{status}}=='ALL' --> selected <!-- endif --> value="ALL" >全部</option>
+								<option <!-- if {{status}}=='PRINTED' --> selected <!-- endif --> value="PRINTED" >已打印</option>
+								<option <!-- if {{status}}=='UNPRINT' --> selected <!-- endif --> value="UNPRINT" >未打印</option>
+								<option <!-- if {{status}}=='TICKET' --> selected <!-- endif --> value="TICKET" >退票</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>
+						
+						<li>
+							<a class="button" href="#addpaper" data-toggle="modal">生成纸质发票</a>
+						</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>
+							</tr>
+						</thead>
+						<tbody>
+							
+						</tbody>
+						
+					</table>
+				
+				
+				
+				
+					
+				</div>
+				
+			</div>
+		</div>
+	</div>
+	<!--弹出 纸质-->
+	<div class="modal hide fade" id="addpaper">
+	<form action="/invoicePaperAdd" id="IPA" method="post">	
+		<div class="modal-dialog ">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>生成纸质发票</h3>
+				</div>
+				<div class="modal-body saeaList">
+					<table class="table table-bordered table-condensed">
+						<tbody>
+						<tr>
+							<th colspan="2" class="taC">填写生成规则</th>
+						</tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>发票类型</th>
+							<td>
+							<label for="invoicePlain" class="radio inline"><input type="radio" checked name="invoiceType" value="0" data-rule="checked"  >增值税普通发票</label>
+							<label for="invoiceSpecial" class="radio inline"><input type="radio" name="invoiceType" value="1" >增值税专用发票</label>
+							</td>
+						</tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>发票代码</th>
+							<td><input type="number" name="invoiceCode" id="invoiceCode" value=""></td>
+						</tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>起始编号</th>
+							<td><input type="number" name="invoiceNoStart" id="invoiceNoStart" value=""></td>
+						</tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>发票数量</th>
+							<td><input type="number" name="invoiceNoTotal" id="invoiceNoTotal" step="1"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="100">末张编号</th>
+							<td><input value="" id="invoiceNoEnd" disabled type="text"></td>
+						</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="modal-footer">
+				
+					<input type="submit" class="button" value="确认生成">
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				</div>
+			</div></div>
+		</form>
+	</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_ 项",
+    	},
+    	"paging":   false,
+        "ordering": false,
+        "info":     false,
+        //'filter':false,
+    	scrollY:        "700px",
+        scrollX:        true,
+        scrollCollapse: true,
+        paging:         true,
+        
+        serverSide: true,
+        ajax: {
+             url: '/ajaxGetinvoicePaperAchieve',
+             type: 'POST',
+             "data": function ( d ) {
+                 return $.extend( {}, d, {
+                   "status": '{{status}}',
+                   'invoiceType':'{{invoiceType}}',
+                   'date':'{{dateString}}',
+                 } );
+               }
+        }
+
+    });
+	
+	
+	 setSearchLo('invoicepaper');
+	
+} );
+
+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>

+ 5 - 5
protected/view/admin/invoicePrintStayAchieve.html

@@ -116,19 +116,19 @@
 	  							<!-- if {{page.previous}}==0 -->
 								<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
 								<!-- else -->
-								<li><a href="/invoicePrintAchieve/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
+								<li><a href="/invoicePrintStayAchieve/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
 								<!-- endif -->	
 								
 	  							<!-- if {{page.on_page}}>=3 -->
-	  							<li><a href="/invoicePrintAchieve/1{{get}}" title="上一页">1</a></li>
+	  							<li><a href="/invoicePrintStayAchieve/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="/invoicePrintAchieve/4{{get}}" >4</a></li>
-	  							<li><a href="/invoicePrintAchieve/5{{get}}" >5</a></li>
+	  							<li><a href="/invoicePrintStayAchieve/4{{get}}" >4</a></li>
+	  							<li><a href="/invoicePrintStayAchieve/5{{get}}" >5</a></li>
 	  							<!-- endif -->
 	  							
 	  							<!-- if {{page.total_page}}>3 -->
@@ -138,7 +138,7 @@
 			  					<!-- if {{page.next}}=={{page.on_page}} -->
 								<li><a href="javascript:void(0)" title="下一页">&gt;</a></li>
 								<!-- else -->
-								<li><a href="/invoicePrintAchieve/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
+								<li><a href="/invoicePrintStayAchieve/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
 								<!-- endif -->
 			  					
 			  		</ul>

+ 109 - 0
protected/view/admin/receiptStatisticsStaffDetail.html

@@ -0,0 +1,109 @@
+<!-- include 'header' -->
+<script src="<?= WEB_SITE_GLOBAL ?>js/receipt.js"></script>
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/fixedheadertable.css"> 
+<script src="<?= WEB_SITE_GLOBAL ?>js/jquery.fixedheadertable.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">
+					<ul>
+						<!-- include 'receipt_menu' -->
+					</ul>
+				</div>
+			</div>
+			<div class="adminContent autoHeight" style="height: 821px;">
+			
+			<form action="/receiptStatisticsStaffDetail" id="up" method="post">
+			<input type="hidden" name='username' value='{{username}}'>
+				<legend><div class="fL"><a class="icon- crumb" href="/staffCollectMonthDetail/{{year}}/{{month}}" title="返回上级">b</a></div>陈特 1月费用列表</legend>
+				<div class="demandCate">
+					<ul class="cateList">
+	  					<li><a href="saea-dlist-category-month-detail.html">办事处</a><a href="#" class="now">员工</a></li>
+	  					<li><select name="year" id="Y" onchange="receiptYear();">
+	  					<!-- include 'year' -->
+	  					</select> 
+	  					 <select name="month" id="M" onchange="receiptYear();">
+		{{monthHtml}}
+	</select> 
+	</li>
+	
+	  					<li><b>{{month}}月</b>报销总计:¥{{stList.rePrice}}</li>
+	  					<li><b>{{month}}月</b>同意支付:<span class="colGreen">¥{{stList.agPrice}}</span></li>
+	  					<li><b>{{month}}月</b>审批中:¥{{stList.skPrice}}</li>
+	  			</ul>
+	  		</div>
+	  		</form>
+	  		
+	  		
+	  		
+	  		
+	  		<div class="saeaList">
+	  			<div class="entry autoHeightI2">
+	  			<script type="text/javascript">$(document).ready(function() {
+    $('#saeaTable').fixedHeaderTable({ fixedColumns:2 });
+});</script>
+	  				<table class="table table-bordered table-condensed table-hover fancyTable" id="saeaTable">
+	  				<thead>
+	  						<tr>
+	  						<th class="taC" rowspan="3">员工/费用项</th>
+	  						<th class="taC" rowspan="3">{{year}}年{{month}}月费用合计</th>
+	  						{{itemHtml}}
+	  						<th class="taC" rowspan="2">报销金额调整<div class="fht-cell" style="width: 72px;"></div></th>
+	  						<th class="taC" rowspan="2" style="padding-right: 11px;">费用说明<div class="fht-cell" style="width: 60px;"></div></th>
+	  						</tr>
+	  						
+	  						<tr>
+	  						{{categoryHtml}}
+	  						
+	  						</tr>
+	  						
+	  						<tr class="warning">
+	  						{{receiptTotalHtml}}
+							</tr>
+	  				</thead>
+	  					<tbody>
+	  						<!-- loop list -->
+	  						<tr>
+	  						<th><a href="/receiptDetail" target="_blank">{{list' value.receiptOrder}}</th>
+	  						<td><b>{{list' value.sum}}</b></td>
+	  						{{list' value.receiptItemHtml}}
+	  						
+	  						</tr>
+	  						<!-- endloop -->
+	  						
+	  						
+	  						</tbody>
+	  					</table>
+	  			</div>
+			</div>
+		</div>
+	</div>
+	<!--弹出-->
+<div class="modal hide fade" id="detail">
+	<div class="modal-dialog">
+		<div class="modal-content">
+    <div class="modal-header">
+    	<h3>费用说明</h3>
+    </div>
+    <div class="modal-body">
+    	<p>这是报销说明的内容</p>
+    </div>
+		<div class="modal-footer">
+		    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+		</div>
+	</div>
+</div>
+</div>
+    <!--弹出内容-->
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 23 - 1
protected/view/admin/saeaCompanyCollect.html

@@ -26,7 +26,29 @@
 		href="/staffCollect">按员工</a></li>
 	<li><select name="year" id="Y" onchange="receiptYear();">
 		<!-- include 'year' -->
-	</select></li>
+	</select>
+	
+	<select onchange="javascript:location.href=this.value;">
+	<option value="/companyCategoryCollect">全年</option>
+	<option value="/companyMonthCollectDetail/{{year}}/1">1月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/2">2月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/3">3月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/4">4月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/5">5月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/6">6月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/7">7月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/8">8月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/9">9月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/10">10月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/11">11月</option>
+	<option value="/companyMonthCollectDetail/{{year}}/12">12月</option>
+	</select>
+	
+	
+	</li>
+	
+	
+	
 	<li>报销总计:¥{{stList.rePrice}}</li>
 	<li>同意支付:<span class="colGreen">¥{{stList.agPrice}}</span></li>
 	<li>审批中:¥{{stList.skPrice}}</li>

+ 19 - 0
protected/view/admin/saeaStaffCollectB.html

@@ -28,6 +28,25 @@
 	<li><select name="year" id="Y" onchange="receiptYear();">
 	  					<!-- include 'year' -->
 	  					</select> 
+	  					
+	  					
+	  					<select onchange="javascript:location.href=this.value;">
+	<option value="/staffCollect">全年</option>
+	<option value="/staffCollectMonthDetail/{{year}}/1">1月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/2">2月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/3">3月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/4">4月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/5">5月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/6">6月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/7">7月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/8">8月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/9">9月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/10">10月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/11">11月</option>
+	<option value="/staffCollectMonthDetail/{{year}}/12">12月</option>
+	</select>
+	  					
+	  					
 	  </li>
 
 	<li>报销总计:¥{{stList.rePrice}}</li>

+ 2 - 3
protected/view/admin/staffCollectMonthDetail.html

@@ -1,6 +1,6 @@
 <!-- include 'header' -->
-<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/fixedheadertable.css"> 
 <script src="<?= WEB_SITE_GLOBAL ?>js/receipt.js"></script>
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/fixedheadertable.css"> 
 <script src="<?= WEB_SITE_GLOBAL ?>js/jquery.fixedheadertable.js"></script>
 <body>
 	<div class="mainLayout">
@@ -112,8 +112,7 @@
 	  					
 	  						<!-- loop list -->
 	  						<tr>
-	  						<th>{{list' key}}</th>
-	  						
+	  						<th><a href="/receiptStatisticsStaffDetail?&username={{list' value.usernameEn}}&year={{year}}&month={{month}}">{{list' key}}</a></th>
 	  						
 	  						<!-- loop list' value -->
 	  						<!-- if {{list' value' key}}=='monthStaffPrice' -->