Browse Source

Squashed commit of the following:

commit 0843af8528ffe49a53c7355d29ab67cb4aed6eb2
Author: caipin <2865040457@qq.com>
Date:   Fri Mar 10 11:18:42 2017 +0800

    更新CLD共用MENU小红点功能

# Conflicts:
#	protected/config/routes.conf.php
likeku 8 năm trước cách đây
mục cha
commit
dfb415fdd4

+ 8 - 3
global/js/invoice.validator.js

@@ -59,17 +59,22 @@ $(function () {
 	    }
 	});
 	
-	
 	$("form[name='invoiceApproval']").validator({
 		timely: 3,
 	    focusCleanup: true,
 	    theme:"yellow_top",
-		
-       
 	    fields: {
 	        'opinion': 'required; '
 	    }
 	});
 	
+	$("form[name='invoicePrint']").validator({
+		timely: 3,
+	    focusCleanup: true,
+	    theme:"yellow_top",
+	    fields: {
+	        'invoiceNo': 'required; '
+	    }
+	});
 
 })

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

@@ -43,21 +43,14 @@ $route['*']['/adminExecute'] = array('AdminController', 'adminExecute');
 $route['*']['/addExecute'] = array('AdminController', 'addExecute');
 $route['*']['/delExecute/:uid/:eid'] = array('AdminController', 'delExecute');
 
-
 $route['*']['/adminlock'] = array('MainController', 'adminLock');
 
-
-
-
 //官网查询真伪
 $route['*']['/api/getAuthentication'] = array('AuthenticationController', 'getAuthentication', 'authFailURL' => './error/loginFail');
 $route['*']['/api/getAuthenticationBySerial'] = array('AuthenticationController', 'getAuthenticationBySerial', 'authFailURL' => './error/loginFail');
 
-
 $route['*']['/emailText'] = array('MainController', 'a');
 
-
-
 $route['*']['/'] = array('MainController', 'logStatistics');
 $route['*']['/index/:cid'] = array('MainController', 'index2');
 $route['*']['/index'] = array('MainController', 'index2');
@@ -362,13 +355,14 @@ $route['*']['/invoiceAddDo'] = array('InvoiceController', 'invoiceAddDo');
 $route['*']['/invoiceApproval'] = array('InvoiceController', 'invoiceApproval');
 $route['*']['/invoiceDetail/:iid'] = array('InvoiceController', 'invoiceDetail','extension'=>'.html');
 $route['*']['/invoiceApprovalDo'] = array('InvoiceController', 'invoiceApprovalDo');
-
+$route['*']['/invoicePrint'] = array('InvoiceController', 'invoicePrint');
+$route['*']['/invoicePrintDetail/:iid'] = array('InvoiceController', 'invoicePrintDetail','extension'=>'.html');
+$route['*']['/invoicePrintDo'] = array('InvoiceController', 'invoicePrintDo');
+$route['*']['/invoicePost'] = array('InvoiceController', 'invoicePost');
 //假期管理
 $route['*']['/myList'] = array('HolidayController', 'myList');
 $route['*']['/holidaygroup'] = array('AdminController', 'holidayGroup');
 $route['*']['/addholidayapprover'] = array('AdminController', 'addHolidayApprover');
 $route['*']['/hcsgroup'] = array('AdminController', 'holidayCSGroup');
 $route['*']['/addhcsgroup'] = array('AdminController', 'addHolidayCS');
-
-
 ?>

+ 1 - 3
protected/controller/AdminController.php

@@ -7,7 +7,7 @@
 class AdminController extends DooController {
 
 	public $staff;
-	public static $NEW = 0;
+	
 
 	public $nature=array('1'=>'设计',
 						'2'=>'造价管理',
@@ -43,8 +43,6 @@ class AdminController extends DooController {
 				Doo::loadModel ( 'staff' );
 				$staff = new staff ();
 				$this->staff=$staff->getUserByIdList($_COOKIE["adStaff"]);
-				self::$NEW= $this->getReceiptCount();include './protected/controller/ReceiptController.php';
-				ReceiptController::$NEW=self::$NEW;
 				
 				if ($this->staff[0]['isadmin']==1&&$this->staff[0]['username']=='admin'){
 					return "/adminoffice";

+ 3 - 6
protected/controller/ExpandController.php

@@ -7,7 +7,7 @@
 class ExpandController extends DooController {
 	
 	public $staff;
-	public static $NEW = 0;
+	
 	
 	public $nature=array('1'=>'设计',
 						'2'=>'造价管理',
@@ -45,11 +45,8 @@ class ExpandController extends DooController {
 				Doo::loadModel ( 'staff' );
 				$staff = new staff ();
 				$this->staff=$staff->getUserByIdList($_COOKIE["staff"]);
-				self::$NEW= $this->getReceiptCount();
-				include './protected/controller/ReceiptController.php';
-				include './protected/controller/MainController.php';
-				ReceiptController::$NEW=self::$NEW;
-				MainController::$NEW=self::$NEW;
+				
+				
 				return "/";
 			}
 		}

+ 196 - 16
protected/controller/InvoiceController.php

@@ -86,6 +86,13 @@ class InvoiceController extends DooController {
 		}
 	}
 	function invoice() {
+		Doo::loadModel ( 'invoice' );
+		$invoice = new invoice ();
+		
+		$pendingInvoice = $invoice->getPendingByInvoice ();
+		
+		$data ['pendingInvoice'] = $pendingInvoice;
+		
 		$data ['memu'] = "invoice";
 		$data ['staff'] = $this->staff;
 		$data ['receiptMemu'] = 'invoice';
@@ -115,7 +122,6 @@ class InvoiceController extends DooController {
 	 * 提交一份开票申请,并记录下操作日志
 	 *
 	 * @since 1.0.0
-	 *       
 	 * @var integer cid 办事处ID
 	 * @var integer invoiceType 发票类型
 	 * @var integer doPost 是否邮寄
@@ -214,11 +220,23 @@ class InvoiceController extends DooController {
 			
 			$item = array (
 					'date' => date ( "Y-m-d H:i:s" ),
+					'operation' => "创建",
+					'status' => 1,
+					'img' => $this->staff [0] ['avatar'],
+					'username' => $this->staff [0] ['username'],
+					'uid' => $this->staff [0] ['sid'],
+					'category' => $this->staff [0] ['category'],
+					'iid' => $iid 
+			);
+			$invoiceOperationLog->setInvoiceOperationLog ( $item );
+			$item = array (
+					'date' => date ( "Y-m-d H:i:s" ),
 					'operation' => "提交审批",
 					'status' => 1,
 					'img' => $this->staff [0] ['avatar'],
 					'username' => $this->staff [0] ['username'],
 					'uid' => $this->staff [0] ['sid'],
+					'category' => $this->staff [0] ['category'],
 					'iid' => $iid 
 			);
 			$invoiceOperationLog->setInvoiceOperationLog ( $item );
@@ -229,8 +247,6 @@ class InvoiceController extends DooController {
 	function invoiceApproval() {
 		Doo::loadModel ( 'invoice' );
 		$invoice = new invoice ();
-		Doo::loadModel ( 'invoiceManage' );
-		$invoiceManage = new invoiceManage ();
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		Doo::loadModel ( 'staff' );
@@ -278,16 +294,17 @@ class InvoiceController extends DooController {
 		
 		Doo::loadModel ( 'invoice' );
 		$invoice = new invoice ();
-		// Doo::loadModel('invoiceManage');
-		// $invoiceManage=new invoiceManage();
+		Doo::loadModel ( 'invoiceOperationLog' );
+		$invoiceOperationLog = new invoiceOperationLog ();
 		
 		$invoiceDetail = $invoice->getOne ( array (
 				'where' => 'status=1 and pendingApprovals=' . $this->staff [0] ['sid'] . ' and iid=' . $iid,
 				'asArray' => true 
 		) );
+		$invoiceOperationLogList = $invoiceOperationLog->getInvoiceOperationLogByIid ( $iid );
 		
 		$data ['invoiceDetail'] = $invoiceDetail;
-		
+		$data ['invoiceOperationLogList'] = $invoiceOperationLogList;
 		$data ['INVOICEKEY'] = $this->authcode ( $invoiceDetail ['iid'], '' );
 		$data ['memu'] = "invoice";
 		$data ['staff'] = $this->staff;
@@ -301,7 +318,6 @@ class InvoiceController extends DooController {
 	 * 对发票进行审批,其中操作有终止,退回,同意动作。操作成功并记录下操作日志
 	 *
 	 * @since 1.0.0
-	 *       
 	 * @var integer iid 开票ID 已加密
 	 * @var integer status 发票审批状态
 	 * @var integer opintion 审批发票的意见
@@ -394,6 +410,7 @@ class InvoiceController extends DooController {
 					'img' => $this->staff [0] ['avatar'],
 					'username' => $this->staff [0] ['username'],
 					'uid' => $this->staff [0] ['sid'],
+					'category' => $this->staff [0] ['category'],
 					'status' => $status,
 					'iid' => $iid 
 			);
@@ -403,6 +420,173 @@ class InvoiceController extends DooController {
 		}
 		die ( 'illegal request' );
 	}
+	
+	/**
+	 * 展示需要打印的发票数据
+	 *
+	 * @since 1.0.0
+	 */
+	function invoicePrint() {
+		Doo::loadModel ( 'invoice' );
+		$invoice = new invoice ();
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		
+		$toPrint = $invoice->find ( array (
+				'where' => 'status=2 ',
+				'desc' => 'iid',
+				'asArray' => true 
+		) );
+		
+		$printed = $invoice->find ( array (
+				'where' => 'status=5 ',
+				'desc' => 'iid',
+				'asArray' => true 
+		) );
+		
+		foreach ( $toPrint as $key => $value ) {
+			$toPrint [$key] ['iidKey'] = $XDeode->encode ( $value ['iid'] );
+			
+			$lastApprover = json_decode ( $value ['processApprovals'], true );
+			if (! empty ( $lastApprover )) {
+				$lastApproverKey = array_keys ( $lastApprover );
+				$lastApprover = end ( $lastApprover );
+				
+				$staffDetail = $staff->getOne ( array (
+						'where' => 'sid=' . end ( $lastApproverKey ),
+						'asArray' => true 
+				) );
+				$lastApprover ['username'] = $staffDetail ['username'];
+			}
+			$toPrint [$key] ['lastApprover'] = $lastApprover;
+		}
+		
+		foreach ( $printed as $key => $value ) {
+			$printed [$key] ['iidKey'] = $XDeode->encode ( $value ['iid'] );
+			
+			$lastApprover = json_decode ( $value ['processApprovals'], true );
+			if (! empty ( $lastApprover )) {
+				$lastApproverKey = array_keys ( $lastApprover );
+				$lastApprover = end ( $lastApprover );
+				
+				$staffDetail = $staff->getOne ( array (
+						'where' => 'sid=' . end ( $lastApproverKey ),
+						'asArray' => true 
+				) );
+				$lastApprover ['username'] = $staffDetail ['username'];
+			}
+			$printed [$key] ['lastApprover'] = $lastApprover;
+		}
+		
+		$data ['printed'] = $printed;
+		$data ['toPrint'] = $toPrint;
+		
+		$data ['memu'] = "invoice";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'invoicePrint';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/admin/invoicePrint", $data );
+	}
+	/**
+	 * 展示发票打印的详情页面
+	 *
+	 * @since 1.0.0
+	 */
+	function invoicePrintDetail() {
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		$iid = isset ( $this->params ['iid'] ) ? $this->params ['iid'] : "";
+		$iid = $XDeode->decode ( $iid );
+		if (! is_numeric ( $iid ))
+			die ( 'illegal request' );
+		
+		Doo::loadModel ( 'invoice' );
+		$invoice = new invoice ();
+		Doo::loadModel ( 'invoiceOperationLog' );
+		$invoiceOperationLog = new invoiceOperationLog ();
+		
+		$invoiceDetail = $invoice->getOne ( array (
+				'where' => 'status=2 and iid=' . $iid,
+				'asArray' => true 
+		) );
+		
+		$invoiceOperationLogList = $invoiceOperationLog->getInvoiceOperationLogByIid ( $iid );
+		
+		$data ['invoiceDetail'] = $invoiceDetail;
+		$data ['invoiceOperationLogList'] = $invoiceOperationLogList;
+		$data ['INVOICEKEY'] = $this->authcode ( $invoiceDetail ['iid'], '' );
+		$data ['memu'] = "invoice";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'invoicePrint';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/admin/invoicePrintDetail", $data );
+	}
+	/**
+	 * 填写票号并完成打印
+	 * @since 1.0.0
+	 */
+	function invoicePrintDo() {
+		$iid = $this->get_args ( 'invoiceKey' ) ? $this->get_args ( 'invoiceKey' ) : "";
+		$invoiceNo = $this->get_args ( 'invoiceNo' ) ? $this->get_args ( 'invoiceNo' ) : "";
+		$iid = $this->authcode ( $iid );
+		if (! is_numeric ( $iid ))
+			die ( 'illegal request' );
+		if (! empty ( $iid ) && ! empty ( $invoiceNo )) {
+			
+			Doo::loadModel ( 'invoice' );
+			$invoice = new invoice ();
+			Doo::loadModel ( 'invoiceOperationLog' );
+			$invoiceOperationLog = new invoiceOperationLog ();
+			
+			$invoicePrintDetail = $invoice->getInvoiceByPrint ( $iid );
+			if (empty ( $invoicePrintDetail ))
+				die ( 'illegal request' );
+			$item = array (
+					'iid' => $iid,
+					'status' => 5,
+					'updateTime'=>date ( "Y-m-d H:i:s" ),
+					'printTime'=>date ( "Y-m-d H:i:s" ),
+					'invoiceNo' => $invoiceNo 
+			);
+			$invoice->setPrintByInvoice ( $item );
+			$item = array (
+					'date' => date ( "Y-m-d H:i:s" ),
+					'operation' => $invoiceNo,
+					'status' => 5,
+					'img' => $this->staff [0] ['avatar'],
+					'username' => $this->staff [0] ['username'],
+					'uid' => $this->staff [0] ['sid'],
+					'category' => $this->staff [0] ['category'],
+					'iid' => $iid 
+			);
+			$invoiceOperationLog->setInvoiceOperationLog ( $item );
+			return "/invoicePrint";
+		}
+	}
+	/**
+	 * 需要邮寄的发票
+	 * @since 1.0.0
+	 */
+	function invoicePost() {
+		Doo::loadModel ( 'invoice' );
+		$invoice = new invoice ();
+		
+		$invoicePost=$invoice->getPostByInvoice();
+		
+		$data ['invoicePost'] = $invoicePost;
+		
+		$data ['memu'] = "invoice";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'invoicePost';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/admin/invoicePost", $data );
+	}
 	private function getExeCount() {
 		Doo::loadModel ( 'receipt' );
 		$receipt = new receipt ();
@@ -442,8 +626,7 @@ class InvoiceController extends DooController {
 	/**
 	 * 获取get或者POST值
 	 *
-	 * @param string $name
-	 *        	属性名称
+	 * @param string $name 属性名称
 	 * @return fixed 值
 	 */
 	function get_args($name) {
@@ -464,13 +647,10 @@ class InvoiceController extends DooController {
 	/**
 	 * 加密或解密指定字符串
 	 *
-	 * @param string $string
-	 *        	要加密或解密的字符串
-	 * @param string $operation
-	 *        	当取值为'DECODE'时表示解密,否则为加密
-	 * @param string $key
-	 *        	加解密的key
-	 * @param $expiry 超时值        	
+	 * @param string $string 要加密或解密的字符串
+	 * @param string $operation 当取值为'DECODE'时表示解密,否则为加密
+	 * @param string $key 加解密的key
+	 * @param $expiry 超时值
 	 *
 	 */
 	function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {

+ 18 - 23
protected/controller/MainController.php

@@ -7,8 +7,7 @@
 class MainController extends DooController {
 
 	public $staff;
-	public static $NEW = 0;
-	public static $NEW2 = 0;
+	
 	
 	public $nature=array('1'=>'设计',
 						'2'=>'造价管理',
@@ -46,11 +45,7 @@ class MainController extends DooController {
 				Doo::loadModel ( 'staff' );
 				$staff = new staff ();
 				$this->staff=$staff->getUserByIdList($_COOKIE["staff"]);
-				self::$NEW= $this->getReceiptCount();
-				self::$NEW2= $this->getExeCount();
-				include './protected/controller/ReceiptController.php';
-				ReceiptController::$NEW=self::$NEW;
-				ReceiptController::$NEW2=self::$NEW2;
+				
 				return "/";
 			}
 		}
@@ -5860,29 +5855,29 @@ $m="";
 	   return $str;
   	}
 
-	private function getReceiptCount(){
+// 	private function getReceiptCount(){
 
-		$status=2;
-		$year=date('Y');
+// 		$status=2;
+// 		$year=date('Y');
 
-		Doo::loadModel('receipt');
-		$receipt=new receipt();
+// 		Doo::loadModel('receipt');
+// 		$receipt=new receipt();
 
-		$dateCondition=" and Year(date) =".$year;
+// 		$dateCondition=" and Year(date) =".$year;
 
-		$approvalCondition=' and nowStaff like "%'.$this->staff[0]['sid'].'%" ';
-		$receiptList=$receipt->find(array('where'=>' status='.$status.$dateCondition.$approvalCondition,'desc'=>'rid','asArray'=>true));
+// 		$approvalCondition=' and nowStaff like "%'.$this->staff[0]['sid'].'%" ';
+// 		$receiptList=$receipt->find(array('where'=>' status='.$status.$dateCondition.$approvalCondition,'desc'=>'rid','asArray'=>true));
 		
-		return count($receiptList);
-	}
+// 		return count($receiptList);
+// 	}
 
-	private function getExeCount(){
-		Doo::loadModel('receipt');
-		$receipt=new receipt();
-		$receiptList=$receipt->find(array('where'=>'(executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and executeStaff NOT LIKE \'%'.$this->staff[0]['sid'].'%\' ) and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
+// 	private function getExeCount(){
+// 		Doo::loadModel('receipt');
+// 		$receipt=new receipt();
+// 		$receiptList=$receipt->find(array('where'=>'(executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and executeStaff NOT LIKE \'%'.$this->staff[0]['sid'].'%\' ) and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
 		
-		return count($receiptList);
-	}
+// 		return count($receiptList);
+// 	}
 	
 	/**
 	 * 格式化excel文件为数组

+ 20 - 21
protected/controller/ReceiptController.php

@@ -7,8 +7,8 @@ class ReceiptController extends DooController {
 	public $staff;
 	public $verifyId;
 	public $executeId;
-	public static $NEW = 0;
-	public static $NEW2 = 0;
+	
+	//public static $NEW2 = 0;
 	
 	public $AGENCY="日常相关费用";
 	public $TRAVEL="差旅相关费用";
@@ -33,29 +33,29 @@ class ReceiptController extends DooController {
 		fclose($fp);
 	}
 	
-	private function getExeCount(){
-		Doo::loadModel('receipt');
-		$receipt=new receipt();
-		$receiptList=$receipt->find(array('where'=>'(executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and executeStaff NOT LIKE \'%'.$this->staff[0]['sid'].'%\' ) and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
+// 	private function getExeCount(){
+// 		Doo::loadModel('receipt');
+// 		$receipt=new receipt();
+// 		$receiptList=$receipt->find(array('where'=>'(executeCopy like \'%["'.$this->staff[0]['sid'].'%\' and executeStaff NOT LIKE \'%'.$this->staff[0]['sid'].'%\' ) and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
 		
-		return count($receiptList);
-	}
+// 		return count($receiptList);
+// 	}
 	
-	private function getReceiptCount(){
+// 	private function getReceiptCount(){
 		
-		$status=2;
-		$year=date('Y');
+// 		$status=2;
+// 		$year=date('Y');
 		
-		Doo::loadModel('receipt');
-		$receipt=new receipt();
+// 		Doo::loadModel('receipt');
+// 		$receipt=new receipt();
 
-		$dateCondition=" and Year(date) =".$year;	
+// 		$dateCondition=" and Year(date) =".$year;	
 
-		$approvalCondition=' and (nowStaff like "%,'.$this->staff[0]['sid'].'%" or nowStaff like "%'.$this->staff[0]['sid'].',%" or nowStaff='.$this->staff[0]['sid'].' ) ';
-		$receiptList=$receipt->find(array('where'=>' status='.$status.$dateCondition.$approvalCondition,'desc'=>'rid','asArray'=>true));
+// 		$approvalCondition=' and (nowStaff like "%,'.$this->staff[0]['sid'].'%" or nowStaff like "%'.$this->staff[0]['sid'].',%" or nowStaff='.$this->staff[0]['sid'].' ) ';
+// 		$receiptList=$receipt->find(array('where'=>' status='.$status.$dateCondition.$approvalCondition,'desc'=>'rid','asArray'=>true));
 		
-		return count($receiptList);
-	}
+// 		return count($receiptList);
+// 	}
 	
 	private function collectHtml($receiptCollectList=array(),$itemCategory="日常相关费用",$classType="b"){
 		$collectHtml="";$sumPrice=0.00;
@@ -78,7 +78,7 @@ class ReceiptController extends DooController {
 		return $collectHtml;
 	}
 	
-	function __construct() { 
+	function __construct() {
 		if(isset($_COOKIE["staff"])){
 			
 			if(!empty($_COOKIE["staff"])){
@@ -128,8 +128,7 @@ class ReceiptController extends DooController {
 				
 				$this->verifyId=$list;
 				$this->staff=$staff->getUserByIdList($_COOKIE["staff"]);
-				self::$NEW= $this->getReceiptCount();
-				self::$NEW2= $this->getExeCount();
+				
 				return "/";
 			}
 		}

+ 244 - 45
protected/model/invoice.php

@@ -1,50 +1,249 @@
 <?php
-
-Doo::loadCore('db/DooModel');
-
+Doo::loadCore ( 'db/DooModel' );
+/**
+ * 发票审批相关信息及其操作业务逻辑
+ * @author CP.
+ * @version 1.0
+ * @namespace invoice
+ * @package invoiceModel
+ */
 class invoice extends DooModel {
-
-    public $iid;
-    public $status;
-    public $invoiceManage;
-    public $pendingApprovals;
-    public $processApprovals;
-    public $invoiceSerial;
-    public $invoicePrice;
-    
-    public $cid;
-    public $categoryName;
-    public $sid;
-    public $userName;
-    
-    public $remark;
-    public $invoiceElement;
-    public $invoiceType;
-    public $invoiceTitle;
-    
-    public $invoiceCompany;
-    public $TIN;
-    public $address;
-    public $phone;
-    
-    public $bank;
-    public $bankAccount;
-    public $doPost;
-    public $recipients;
-    
-    public $recipientsPhone;
-    public $recipientsAddress;
-    public $mailItems;
-    public $date;
-    public $updateTime;
-   
-    public $_table = 'CLD_invoice';
-    public $_primarykey = 'iid';
-    
-    public $_fields = array('iid','invoiceManage', 'pendingApprovals','processApprovals','invoiceSerial' ,'status' ,'invoicePrice', 'cid','categoryName', 'remark', 'invoiceElement','invoiceType', 'invoiceTitle', 'invoiceCompany'
-    , 'TIN', 'address','phone', 'bank', 'bankAccount','doPost', 'recipients', 'recipientsPhone','recipientsAddress', 'mailItems','sid','userName','date','updateTime');
-
-   
+	/**
+	 *
+	 * @var integer $iid 发票ID
+	 */
+	public $iid;
+	/**
+	 *
+	 * @var integer $status 审批状态
+	 */
+	public $status;
+	/**
+	 *
+	 * @var string $invoiceManage 当前审批组人员
+	 */
+	public $invoiceManage;
+	/**
+	 *
+	 * @var string $pendingApprovals 当前需要审批的人
+	 */
+	public $pendingApprovals;
+	/**
+	 *
+	 * @var string $processApprovals 已经审批过的人员
+	 */
+	public $processApprovals;
+	/**
+	 *
+	 * @var string $invoiceSerial 发票单号
+	 */
+	public $invoiceSerial;
+	/**
+	 *
+	 * @var integer $invoicePrice 发票金额
+	 */
+	public $invoicePrice;
+	/**
+	 *
+	 * @var integer $cid 办事处ID
+	 */
+	public $cid;
+	/**
+	 *
+	 * @var string $categoryName 办事处名称
+	 */
+	public $categoryName;
+	/**
+	 *
+	 * @var integer $sid 提交发票人ID
+	 */
+	public $sid;
+	/**
+	 *
+	 * @var string $userName 提交人名字
+	 */
+	public $userName;
+	/**
+	 *
+	 * @var string $remark 备注
+	 */
+	public $remark;
+	/**
+	 *
+	 * @var string $invoiceElement 发票内容
+	 */
+	public $invoiceElement;
+	/**
+	 *
+	 * @var string $invoiceType 发票类型
+	 */
+	public $invoiceType;
+	/**
+	 *
+	 * @var string $invoiceTitle 发票抬头
+	 */
+	public $invoiceTitle;
+	/**
+	 *
+	 * @var string $invoiceCompany 开票公司
+	 */
+	public $invoiceCompany;
+	/**
+	 *
+	 * @var string $invoiceNo 发票号
+	 */
+	public $invoiceNo;
+	/**
+	 *
+	 * @var string $TIN 纳税人识别码
+	 */
+	public $TIN;
+	/**
+	 *
+	 * @var string $address 注册地址
+	 */
+	public $address;
+	/**
+	 *
+	 * @var string $phone 电话
+	 */
+	public $phone;
+	/**
+	 *
+	 * @var string $bank 开户银行
+	 */
+	public $bank;
+	/**
+	 *
+	 * @var string $bankAccount 银行账户
+	 */
+	public $bankAccount;
+	/**
+	 *
+	 * @var integer $doPost 邮寄
+	 */
+	public $doPost;
+	/**
+	 *
+	 * @var string $recipients 收件人
+	 */
+	public $recipients;
+	/**
+	 *
+	 * @var string $recipientsPhone 收件人电话
+	 */
+	public $recipientsPhone;
+	/**
+	 *
+	 * @var string $recipientsAddress 收件地址
+	 */
+	public $recipientsAddress;
+	/**
+	 *
+	 * @var string $mailItems 邮寄物品
+	 */
+	public $mailItems;
+	/**
+	 *
+	 * @var date $date 提交时间
+	 */
+	public $date;
+	/**
+	 *
+	 * @var date $updateTime 更新时间
+	 */
+	public $updateTime;
+	/**
+	 * 
+	 * @var date $printTime 打印时间
+	 */
+	public $printTime;
+	public $_table = 'CLD_invoice';
+	public $_primarykey = 'iid';
+	public $_fields = array (
+			'iid',
+			'invoiceManage',
+			'pendingApprovals',
+			'processApprovals',
+			'invoiceSerial',
+			'status',
+			'invoicePrice',
+			'cid',
+			'categoryName',
+			'remark',
+			'invoiceElement',
+			'invoiceType',
+			'invoiceTitle',
+			'invoiceCompany',
+			'invoiceNo',
+			'TIN',
+			'address',
+			'phone',
+			'bank',
+			'bankAccount',
+			'doPost',
+			'recipients',
+			'recipientsPhone',
+			'recipientsAddress',
+			'mailItems',
+			'sid',
+			'userName',
+			'date',
+			'updateTime' ,
+			'printTime'
+	);
+	public function getInvoiceByIid($iid = 0) {
+	}
+	/**
+	 * 获取单个可以打印的发票数据
+	 * @param number $iid 发票id
+	 */
+	public function getInvoiceByPrint($iid = 0) {
+		$detail = array ();
+		if (! empty ( $iid ) && is_numeric ( $iid ))
+			$detail = $this->getOne ( array (
+					'where' => "iid= '" . $iid . "' and status=2",
+					'asArray' => TRUE 
+			) );
+		return $detail;
+	}
+	/**
+	 * 记录发票号并完成打印
+	 * @param array $item 发票号和完成打印状态数据
+	 * @return number 返回发票ID
+	 */
+	public function setPrintByInvoice($item = array()) {
+		$lid = 0;
+		if (is_array ( $item ) && ! empty ( $item )) {
+			foreach ( $item as $key => $value ) {
+				$this->$key = $value;
+			}
+			$lid = $this->update ();
+		}
+		return $lid;
+	}
+	/**
+	 * 获取待处理发票的数据 其中包括退回`终止
+	 * @return unknown
+	 */
+	public function getPendingByInvoice() {
+		$list = $this->find ( array (
+				'where' => "status=3 or status=4",
+				'asArray' => TRUE 
+		) );
+		return $list;
+	}
+	/**
+	 * 获取需要邮寄的发票
+	 * @return array 
+	 */
+	public function getPostByInvoice(){
+		$list = $this->find ( array (
+				'where' => "status=5 and doPost=1",
+				'asArray' => TRUE
+		) );
+		return $list;
+	}
 }
 
 ?>

+ 29 - 13
protected/model/invoiceOperationLog.php

@@ -14,15 +14,23 @@ class invoiceOperationLog extends DooModel {
 	/**
 	 *
 	 * @var integer $lid 操作日志ID
-	 *     
 	 */
 	public $lid;
 	/**
 	 *
-	 * @var string $username 操作员相关:名称,头像
-	 * @var string $img 操作员相关:名称,头像
+	 * @var string $username 操作员相关:名称
 	 */
-	public $username, $img;
+	public $username;
+	/**
+	 * 
+	 * @var string $category 办事处
+	 */
+	public $category;
+	/**
+	 *
+	 * @var string $img 操作员相关:头像
+	 */
+	public $img;
 	/**
 	 *
 	 * @var integer $uid 用户ID
@@ -30,50 +38,44 @@ class invoiceOperationLog extends DooModel {
 	public $uid;
 	/**
 	 * 操作时间
-	 *
 	 * @var datetime
 	 */
 	public $date;
 	/**
 	 * 操作动作
-	 *
 	 * @var string
 	 */
 	public $operation;
 	
 	/**
 	 * 开票ID
-	 *
 	 * @var integer
 	 */
 	public $iid;
 	/**
 	 * 发票操作时的状态
-	 *
 	 * @var integer
 	 */
 	public $status;
 	/**
 	 * 表名
-	 *
 	 * @var string
 	 */
 	public $_table = 'CLD_invoiceOperationLog';
 	/**
 	 * 表主键
-	 *
 	 * @var string
 	 */
 	public $_primarykey = 'lid';
 	/**
 	 * 表字段
-	 *
 	 * @var array
 	 */
 	public $_fields = array (
 			'lid',
 			'username',
 			'uid',
+			'category',
 			'date',
 			'operation',
 			'img',
@@ -86,8 +88,7 @@ class invoiceOperationLog extends DooModel {
 	/**
 	 * 添加相关开票操作日志
 	 *
-	 * @param array $item 要记录的相关发票操作数据        	
-	 *
+	 * @param array $item 要记录的相关发票操作数据
 	 * @return integer|0 返回操作ID
 	 */
 	public function setInvoiceOperationLog($item = array()) {
@@ -100,6 +101,21 @@ class invoiceOperationLog extends DooModel {
 		}
 		return $lid;
 	}
+	/**
+	 * 根据发票ID获取操作日志数据
+	 *
+	 * @param integer $iid 发票ID
+	 * @return array|array() 发票审批操作日志数据集
+	 */
+	public function getInvoiceOperationLogByIid($iid = 0) {
+		$list = array ();
+		if (! empty ( $iid ) && is_numeric ( $iid ))
+			$list = $this->find ( array (
+					'where' => ' iid=' . $iid,
+					'asArray' => true 
+			) );
+		return $list;
+	}
 }
 
 ?>

+ 62 - 24
protected/model/staff.php

@@ -1,9 +1,6 @@
 <?php
-
 Doo::loadCore ( 'db/DooModel' );
-
 class staff extends DooModel {
-	
 	public $sid;
 	public $username;
 	public $passwork;
@@ -23,34 +20,75 @@ class staff extends DooModel {
 	public $appDate;
 	public $hiredate;
 	public $nature;
-
 	public $_table = 'CLD_staff';
 	public $_primarykey = 'sid';
-	public $_fields = array ('sid', 'username','birthday','position', 'passwork','isadmin','cid','othercid','appDate','category','othercategory','gender','qq','phone','telephone','email','avatar','hiredate','nature' );
-	
-	public function checkUser($uid,$passwork){
-		return $this->find ( array ('select'=>'position,birthday,sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar,hiredate,nature',
-		'where' => "username= '".$uid."' and passwork = '".md5($passwork)."'", 'asArray' => TRUE ) );
+	public $_fields = array (
+			'sid',
+			'username',
+			'birthday',
+			'position',
+			'passwork',
+			'isadmin',
+			'cid',
+			'othercid',
+			'appDate',
+			'category',
+			'othercategory',
+			'gender',
+			'qq',
+			'phone',
+			'telephone',
+			'email',
+			'avatar',
+			'hiredate',
+			'nature' 
+	);
+	public function checkUser($uid, $passwork) {
+		return $this->find ( array (
+				'select' => 'position,birthday,sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar,hiredate,nature',
+				'where' => "username= '" . $uid . "' and passwork = '" . md5 ( $passwork ) . "'",
+				'asArray' => TRUE 
+		) );
 	}
-	
-	public function getStaff(){
-		
-		return $this->find ( array ('desc' => 'sid', 'asArray' => TRUE ) );
+	public function getStaff() {
+		return $this->find ( array (
+				'desc' => 'sid',
+				'asArray' => TRUE 
+		) );
 	}
-	
-	public function getStaffByCid($cid=0) {
-		return $this->find ( array ('asc' => 'sid','where' => "cid= '".$cid."'", 'asArray' => TRUE ) );
+	public function getStaffByCid($cid = 0) {
+		return $this->find ( array (
+				'asc' => 'sid',
+				'where' => "cid= '" . $cid . "'",
+				'asArray' => TRUE 
+		) );
 	}
-	
-	
-	public function getUserById($sid=0) {
-		return $this->find ( array ('asc' => 'sid','where' => "sid= '".$sid."'", 'asArray' => TRUE ) );
+	public function getUserById($sid = 0) {
+		return $this->find ( array (
+				'asc' => 'sid',
+				'where' => "sid= '" . $sid . "'",
+				'asArray' => TRUE 
+		) );
 	}
-
-	public function getUserByIdList($puid){
-		return $this->find ( array ('where' => "sid= '".$puid."'", 'asArray' => TRUE ) );
+	public function getUserByIdList($puid) {
+		return $this->find ( array (
+				'where' => "sid= '" . $puid . "'",
+				'asArray' => TRUE 
+		) );
+	}
+	/**
+	 * 根据用户ID获取相关信息
+	 * @param number $sid 用户ID
+	 */
+	public function getStaffBySid($sid = 0) {
+		$detail = array ();
+		if (! empty ( $sid ))
+			$detail = $this->getOne ( array (
+					'where' => "sid= '" . $sid . "'",
+					'asArray' => TRUE 
+			) );
+		return $detail;
 	}
-	
 }
 
 ?>

+ 96 - 66
protected/plugin/TemplateTag.php

@@ -1,91 +1,121 @@
 <?php
 
-//register global/PHP functions to be used with your template files
-//You can move this to common.conf.php   $config['TEMPLATE_GLOBAL_TAGS'] = array('isset', 'empty');
-//Every public static methods in TemplateTag class (or tag classes from modules) are available in templates without the need to define in TEMPLATE_GLOBAL_TAGS 
-Doo::conf()->TEMPLATE_GLOBAL_TAGS = array('upper', 'tofloat', 'sample_with_args', 'debug', 'url', 'url2', 'function_deny', 'isset', 'empty','make_date','inarray');
+// register global/PHP functions to be used with your template files
+// You can move this to common.conf.php $config['TEMPLATE_GLOBAL_TAGS'] = array('isset', 'empty');
+// Every public static methods in TemplateTag class (or tag classes from modules) are available in templates without the need to define in TEMPLATE_GLOBAL_TAGS
+Doo::conf ()->TEMPLATE_GLOBAL_TAGS = array (
+		'upper',
+		'tofloat',
+		'sample_with_args',
+		'debug',
+		'url',
+		'url2',
+		'function_deny',
+		'isset',
+		'empty',
+		'make_date',
+		'inarray' ,
+		'getGlobals'
+);
 
 /**
-Define as class (optional)
-
-class TemplateTag {
-    public static test(){}
-    public static test2(){}
+ * Define as class (optional)
+ * class TemplateTag { public static test(){} public static test2(){} }
+ */
+function getGlobals($var) {
+	if ($var=='NEW')
+	getReceiptCount();
+	elseif ($var=='NEW2')
+	getExeCount();
+	return $GLOBALS[$var] ;
 }
-**/
-
-function inarray($v1,$v2){
-	return in_array($v1, $v2);
+function inarray($v1, $v2) {
+	return in_array ( $v1, $v2 );
 }
-
-function make_date(){
+function make_date() {
 	return date ( "Y-m" );
 }
-
-function upper($str){
-    return strtoupper($str);
+function upper($str) {
+	return strtoupper ( $str );
 }
-
-function tofloat($str){
-    return sprintf("%.2f", $str);
+function tofloat($str) {
+	return sprintf ( "%.2f", $str );
 }
-
-function sample_with_args($str, $prefix){
-    return $str .' with args: '. $prefix;
+function sample_with_args($str, $prefix) {
+	return $str . ' with args: ' . $prefix;
+}
+function debug($var) {
+	if (! empty ( $var )) {
+		echo '<pre>';
+		print_r ( $var );
+		echo '</pre>';
+	}
 }
 
-function debug($var){
-    if(!empty($var)){
-        echo '<pre>';
-        print_r($var);
-        echo '</pre>';
-    }
+// This will be called when a function NOT Registered is used in IF or ElseIF statment
+function function_deny($var = null) {
+	echo '<span style="color:#ff0000;">Function denied in IF or ElseIF statement!</span>';
+	exit ();
 }
 
-//This will be called when a function NOT Registered is used in IF or ElseIF statment
-function function_deny($var=null){
-   echo '<span style="color:#ff0000;">Function denied in IF or ElseIF statement!</span>';
-   exit;
+// Build URL based on route id
+function url($id, $param = null, $addRootUrl = false) {
+	Doo::loadHelper ( 'DooUrlBuilder' );
+	// param pass in as string with format
+	// 'param1=>this_is_my_value, param2=>something_here'
+	
+	if ($param != null) {
+		$param = explode ( ', ', $param );
+		$param2 = null;
+		foreach ( $param as $p ) {
+			$splited = explode ( '=>', $p );
+			$param2 [$splited [0]] = $splited [1];
+		}
+		return DooUrlBuilder::url ( $id, $param2, $addRootUrl );
+	}
+	
+	return DooUrlBuilder::url ( $id, null, $addRootUrl );
 }
 
+// Build URL based on controller and method name
+function url2($controller, $method, $param = null, $addRootUrl = false) {
+	Doo::loadHelper ( 'DooUrlBuilder' );
+	// param pass in as string with format
+	// 'param1=>this_is_my_value, param2=>something_here'
+	
+	if ($param != null) {
+		$param = explode ( ', ', $param );
+		$param2 = null;
+		foreach ( $param as $p ) {
+			$splited = explode ( '=>', $p );
+			$param2 [$splited [0]] = $splited [1];
+		}
+		return DooUrlBuilder::url2 ( $controller, $method, $param2, $addRootUrl );
+	}
+	
+	return DooUrlBuilder::url2 ( $controller, $method, null, $addRootUrl );
+}
 
-//Build URL based on route id
-function url($id, $param=null, $addRootUrl=false){
-    Doo::loadHelper('DooUrlBuilder');
-    // param pass in as string with format
-    // 'param1=>this_is_my_value, param2=>something_here'
+function getReceiptCount(){
 
-    if($param!=null){
-        $param = explode(', ', $param);
-        $param2 = null;
-        foreach($param as $p){
-            $splited = explode('=>', $p);
-            $param2[$splited[0]] = $splited[1];
-        }
-        return DooUrlBuilder::url($id, $param2, $addRootUrl);
-    }
+	$status=2;
+	$year=date('Y');
 
-    return DooUrlBuilder::url($id, null, $addRootUrl);
-}
+	Doo::loadModel('receipt');
+	$receipt=new receipt();
 
+	$dateCondition=" and Year(date) =".$year;
 
-//Build URL based on controller and method name
-function url2($controller, $method, $param=null, $addRootUrl=false){
-    Doo::loadHelper('DooUrlBuilder');
-    // param pass in as string with format
-    // 'param1=>this_is_my_value, param2=>something_here'
+	$approvalCondition=' and nowStaff like "%'.$_COOKIE["staff"].'%" ';
+	$receiptList=$receipt->find(array('where'=>' status='.$status.$dateCondition.$approvalCondition,'desc'=>'rid','asArray'=>true));
 
-    if($param!=null){
-        $param = explode(', ', $param);
-        $param2 = null;
-        foreach($param as $p){
-            $splited = explode('=>', $p);
-            $param2[$splited[0]] = $splited[1];
-        }
-        return DooUrlBuilder::url2($controller, $method, $param2, $addRootUrl);
-    }
-
-    return DooUrlBuilder::url2($controller, $method, null, $addRootUrl);
+	$GLOBALS['NEW']= count($receiptList);
 }
+function getExeCount(){
+	Doo::loadModel('receipt');
+	$receipt=new receipt();
+	$receiptList=$receipt->find(array('where'=>'(executeCopy like \'%["'.$_COOKIE["staff"].'%\' and executeStaff NOT LIKE \'%'.$_COOKIE["staff"].'%\' ) and (status=1 or status=6)','desc'=>'rid','asArray'=>true));
 
+	$GLOBALS['NEW2']= count($receiptList);
+}
 ?>

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

@@ -34,6 +34,7 @@
 								</table>
 							</div>
 							<div class="clearfix">
+								<!-- if !empty({{pendingInvoice}}) -->
 								<legend><div class="fR"></div>待处理</legend>
 								<table class="table table-bordered table-condensed">
 									<tbody>
@@ -80,7 +81,9 @@
 									</tr>
 									</tbody>
 								</table>
+								<!-- else -->
 								<blockquote><p class="colGray">暂时没有需要处理的发票 </p></blockquote>
+								<!-- endif -->
 							</div>
 							<div class="clearfix">
 								<legend><div class="fR"></div>处理中</legend>

+ 4 - 0
protected/view/admin/invoiceApproval.html

@@ -24,6 +24,7 @@
                 <div class="borad-news">
                     <div class="saeaList">
                         <div class="clearfix">
+                        	<!-- if !empty({{invoiceList}}) -->
                             <legend><div class="fR"></div>待审批开票</legend>
                             <table class="table table-bordered table-condensed">
                                 <tbody>
@@ -53,8 +54,11 @@
                                 
                                 </tbody>
                             </table>
+                            <!-- else -->
                             <blockquote><p class="colGray">暂时没有需要审批的开票</p></blockquote>
+                            <!-- endif -->
                         </div>
+                        
                         <div class="clearfix">
                             <legend><div class="fR"><a href="invoice-approval-all.html">查看更多</a></div>最近审批完成</legend>
                             <table class="table table-bordered table-condensed">

+ 15 - 13
protected/view/admin/invoiceApprovalDetail.html

@@ -106,21 +106,23 @@
 							<tbody>
 								<tr><th width="60%" class="taC">审批流程</th><th class="taC">发票审批</th></tr>
 								<tr><td>
+									<!-- loop invoiceOperationLogList -->
 									<blockquote>
-										<p><span class="colGray">2016-11-10 11:03:11</span>&nbsp;广东办-刘飞&nbsp;创建</p>
-									</blockquote>
-									<blockquote>
-										<p><span class="colGray">2016-11-10 11:15:23</span>&nbsp;广东办-刘飞&nbsp;提交审批</p>
-									</blockquote>
-									<blockquote>
-										<p><span class="colGray">2016-11-11 09:54:01</span>&nbsp;总部-张少珊&nbsp;<span class="colGreen">同意</span> 审批意见文本</p>
-									</blockquote>
-									<blockquote>
-										<p><span class="colGray">2016-11-11 09:54:01</span>&nbsp;总部-张少珊&nbsp;<span class="colOrange">退回</span> 审批意见文本</p>
-									</blockquote>
-									<blockquote>
-										<p><span class="colGray">2016-11-11 09:54:01</span>&nbsp;总部-张少珊&nbsp;<span class="colRed">终止</span> 审批意见文本</p>
+										<p><span class="colGray">{{invoiceOperationLogList' value.date}}</span>&nbsp;
+										{{invoiceOperationLogList' value.category}}-{{invoiceOperationLogList' value.username}}&nbsp;
+										<!-- if {{invoiceOperationLogList' value.status}}==2 -->
+										<span class="colGreen">同意</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==3 -->
+										<span class="colOrange">退回</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==4 -->
+										<span class="colRed">终止</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==5 -->
+										<span class="colGreen">打印</span>
+										<!-- endif -->
+										{{invoiceOperationLogList' value.operation}}</p>
 									</blockquote>
+									<!-- endloop -->
+									
 								</td><td>
 									<textarea name="opinion" style="width:98%" placeholder="在这写下您的审批意见,选填。"></textarea>
 									<div class="invoButton clearfix">

+ 11 - 11
protected/view/admin/invoiceMenu.html

@@ -1,12 +1,12 @@
 <ul>
-						<li class="invoiceTitle">发票申请</li>
-						<li class="news"><a href="/invoice" <!-- if {{receiptMemu}}=="invoice" --> class="selected" <!-- endif --> >我的发票</a></li>
-						<li class="news"><a href="invoice-billing-my.html">我的收款</a></li>
-						<li><a href="invoice-billing.html">收款认领</a></li>
-						<li class="topLine"><a href="invoice-input-billing.html">收款录入</a></li>
-						<li><a <!-- if {{receiptMemu}}=="invoiceApproval" --> class="selected" <!-- endif --> href="/invoiceApproval">发票审批</a></li>
-						<li class="news"><a href="invoice-print.html">发票打印</a></li>
-						<li class="news"><a href="invoice-shipping.html">发票邮寄</a></li>
-						<li><a href="invoice-return.html">发票退票</a></li>
-						<li><a href="invoice-dlist-category-year.html">公司汇总</a></li>
-					</ul>
+	<li class="invoiceTitle">发票申请</li>
+	<li class="news"><a href="/invoice" <!-- if {{receiptMemu}}=="invoice" --> class="selected" <!-- endif --> >我的发票</a></li>
+	<li class="news"><a href="invoice-billing-my.html">我的收款</a></li>
+	<li><a href="invoice-billing.html">收款认领</a></li>
+	<li class="topLine"><a href="invoice-input-billing.html">收款录入</a></li>
+	<li><a <!-- if {{receiptMemu}}=="invoiceApproval" --> class="selected" <!-- endif --> href="/invoiceApproval">发票审批</a></li>
+	<li class="news"><a <!-- if {{receiptMemu}}=="invoicePrint" --> class="selected" <!-- endif --> href="/invoicePrint">发票打印</a></li>
+	<li class="news"><a <!-- if {{receiptMemu}}=="invoicePost" --> class="selected" <!-- endif --> href="/invoicePost">发票邮寄</a></li>
+	<li><a href="invoice-return.html">发票退票</a></li>
+	<li><a href="invoice-dlist-category-year.html">公司汇总</a></li>
+</ul>

+ 214 - 0
protected/view/admin/invoicePost.html

@@ -0,0 +1,214 @@
+<!-- include 'header' -->
+<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">
+				<div class="borad-menu">
+				</div>
+				<div class="borad-news">
+					<div class="saeaList">
+						<div class="clearfix">
+							<!-- if !empty({{invoicePost}}) -->
+							<legend><div class="fR"></div>待邮寄</legend>
+							<table class="table table-bordered table-condensed">
+								<tbody>
+								<tr><th class="taC">开票流水号</th><th class="taC">开票单位(抬头)</th><th class="taC">开票金额</th><th class="taC">提交开票</th><th class="taC">打印发票</th><th class="taC" width="120">操作</th></tr>
+								<!-- loop invoicePost -->
+								<tr>
+									<td><a href="#invdetail" data-toggle="modal">{{invoiceList' value.invoiceSerial}}</a></td>
+									<td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                   	{{invoiceList' value.invoiceCompany}}
+                                    <!-- else -->
+                                    {{invoiceList' value.invoiceTitle}}
+                                    <!-- endif -->
+                                    </td>
+									<td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b><sup>专</sup>
+                                    <!-- else -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b>
+                                    <!-- endif -->
+                                    </td>
+									<td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
+									<td>{{invoiceList' value.userName}}&nbsp;{{invoiceList' value.printTime}}</td>
+									<td><a class="button btn-block"  href="#addshipping" data-toggle="modal">邮寄发票</a></td>
+								</tr>
+								<!-- endloop -->
+								<tr>
+									<td><a href="#invdetail" data-toggle="modal">#F20160316001</a></td>
+									<td>珠海XXXX公司</td>
+									<td><b>¥3000.00</b><sup>专</sup></td>
+									<td>广东办刘飞 2016-03-03 12:20:20</td>
+									<td>赵淑燕 2016-03-03 12:20:20</td>
+									<td><a class="button btn-block"  href="#addshipping" data-toggle="modal">邮寄发票</a></td>
+								</tr>
+								</tbody>
+							</table>
+							<!-- else -->
+							<blockquote><p class="colGray">暂时没有需要邮寄的发票</p></blockquote>
+							<!-- endif -->
+						</div>
+						<div class="clearfix">
+							<legend><div class="fR"><a href="invoice-shipping-all.html">查看更多</a></div>最近邮寄发票</legend>
+							<table class="table table-bordered table-condensed">
+								<tbody>
+								<tr><th class="taC">开票流水号</th><th class="taC">开票单位(抬头)</th><th class="taC">开票金额</th><th class="taC">提交开票</th><th class="taC">快递信息</th><th class="taC">邮寄发票</th></tr>
+								<tr>
+									<td><a href="#invdetail" data-toggle="modal">#F20160316001</a></td>
+									<td>珠海XXXX公司</td>
+									<td><b>¥3000.00</b></td>
+									<td>广东办刘飞 2016-03-03 12:20:20</td>
+									<td>顺丰速运:<a href="#shipping" data-toggle="modal">01239812382398</a></td>
+									<td>赵淑燕 2016-03-03 12:20:20</td>
+								</tr>
+								<tr>
+									<td><a href="#invdetail" data-toggle="modal">#F20160316001</a></td>
+									<td>珠海XXXX公司</td>
+									<td><b>¥3000.00</b><sup>专</sup></td>
+									<td>广东办刘飞 2016-03-03 12:20:20</td>
+									<td>顺丰速运:<a href="#shipping" data-toggle="modal">01239812382398</a></td>
+									<td>赵淑燕 2016-03-03 12:20:20</td>
+								</tr>
+								</tbody>
+							</table>
+							<blockquote><p class="colGray">暂时没有已邮寄的发票</p></blockquote>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<!--弹出邮寄-->
+<div class="modal hide fade" id="addshipping">
+	<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="4" class="taC">申请邮寄信息</th>
+			</tr>
+			<tr>
+				<th class="taC" width="100">收件人</th><td>陈工</td>
+				<th class="taC" width="100">收件人手机/电话</th><td>12345678901</td>
+			</tr>
+			<tr>
+				<th class="taC" width="100">收件地址</th><td colspan="3">广东省珠海市XXX路XXX号</td>
+			</tr>
+			<tr>
+				<th class="taC" width="100">邮寄物品</th><td colspan="3">合同x1、锁套装x1</td>
+			</tr>
+			</tbody>
+		</table>
+		<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>
+				<select><option>顺丰速运</option><option>圆通速运</option></select></td>
+			</tr>
+			<tr>
+				<th class="taC" width="100"><span class="colRed">*</span>快递单号</th><td><input type="text" placeholder="请正确填写单号,方便跟踪查询。"></td></tr>
+			<tr>
+				<th class="taC" width="100"><span class="colRed">*</span>邮寄物品</th><td><textarea class="span4" placeholder="请详细填写邮寄的快递包含什么物件。"></textarea></td>
+			</tr>
+			</tbody>
+		</table>
+    </div>
+	<div class="modal-footer">
+	    <a href="#" class="button" data-dismiss="modal">确定邮寄</a>
+	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+	</div>
+			</div></div>
+</div>
+    <!--邮寄-->
+	<!--弹出快递跟踪-->
+<div class="modal hide fade" id="shipping">
+	<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="4" class="taC">申请邮寄信息</th>
+			</tr>
+			<tr>
+				<th class="taC" width="100">收件人</th><td>陈工</td>
+				<th class="taC" width="100">收件人手机/电话</th><td>12345678901</td>
+			</tr>
+			<tr>
+				<th class="taC" width="100">收件地址</th><td colspan="3">广东省珠海市XXX路XXX号</td>
+			</tr>
+			<tr>
+				<th class="taC" width="100">邮寄物品</th><td colspan="3">合同x1、锁套装x1</td>
+			</tr>
+			</tbody>
+		</table>
+		<table class="table table-bordered table-condensed">
+			<tbody>
+			<tr>
+				<th colspan="4" class="taC">实际邮寄信息</th>
+			</tr>
+			<tr>
+				<th class="taC" width="100">快递公司</th><td>顺丰速运</td><th class="taC" width="100">快递单号</th><td>01239812382398</td></tr>
+			</tr>
+			<tr>
+
+			<tr>
+				<th class="taC" width="100">邮寄物品</th><td colspan="3">合同x1、锁套装x1</td>
+			</tr>
+			</tbody>
+		</table>
+		<table class="table table-bordered table-condensed">
+			<tbody>
+			<tr>
+				<th class="taC">快递跟踪</th>
+			</tr>
+			<tr>
+				<td class="taC">
+					<blockquote>
+						<p><span class="colGray">2016-11-22 周二 15:40:53</span>&nbsp;您的包裹已出库</p>
+					</blockquote>
+					<blockquote>
+						<p><span class="colGray">2016-11-22 周二 15:40:53</span>&nbsp;包裹正在等待揽收</p>
+					</blockquote>
+					<blockquote>
+						<p><span class="colGray">2016-11-21 周一 18:04:23</span>&nbsp;[泰州市]申通快递 兴化恒通婴儿用品公司收件员 已揽件</p>
+					</blockquote>
+
+				</td>
+			</tr>
+			</tbody>
+		</table>
+    </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>

+ 205 - 0
protected/view/admin/invoicePrint.html

@@ -0,0 +1,205 @@
+<!-- include 'header' -->
+<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">
+
+				<div class="borad-menu">
+				</div>
+				<div class="borad-news">
+					<div class="saeaList">
+					
+						<div class="clearfix">
+							<!-- if !empty({{toPrint}}) -->
+							<legend><div class="fR"></div>待打印</legend>
+							<table class="table table-bordered table-condensed">
+								<tbody>
+								<tr><th class="taC">开票流水号</th><th class="taC">开票单位(抬头)</th><th class="taC">开票金额</th><th class="taC">提交开票</th><th class="taC">完成审批</th><th class="taC" width="120">操作</th></tr>
+								<!-- loop toPrint -->
+                                <tr>
+                                    <td><a href="#invdetail" data-toggle="modal">{{invoiceList' value.invoiceSerial}}</a></td>
+                                    <td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                   	{{invoiceList' value.invoiceCompany}}
+                                    <!-- else -->
+                                    {{invoiceList' value.invoiceTitle}}
+                                    <!-- endif -->
+                                    </td>
+                                    <td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b><sup>专</sup>
+                                    <!-- else -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b>
+                                    <!-- endif -->
+                                    </td>
+                                    <td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
+                                    <td>{{invoiceList' value.lastApprover.username}}&nbsp;{{invoiceList' value.lastApprover.date}}</td>
+                                    <td><a class="button btn-block" href="/invoicePrintDetail/{{invoiceList' vlaue.iidKey}}.html" >打印发票</a></td>
+                                </tr>
+                                <!-- endloop -->
+								</tbody>
+							</table>
+							<!-- else -->
+							<blockquote><p class="colGray">暂时没有需要打印的发票</p></blockquote>
+							<!-- endif -->
+						</div>
+						
+						
+						<div class="clearfix">
+							<legend><div class="fR"><a href="invoice-print-all.html">查看更多</a></div>最近打印发票</legend>
+							<!-- if !empty({{printed}}) -->
+							<table class="table table-bordered table-condensed">
+								<tbody>
+								<tr><th class="taC">开票流水号</th><th class="taC">开票单位(抬头)</th><th class="taC">开票金额</th><th class="taC">提交开票</th><th class="taC">发票号</th><th class="taC">打印发票</th></tr>
+								<!-- loop printed -->
+                                <tr>
+                                    <td><a href="#invdetail" data-toggle="modal">{{invoiceList' value.invoiceSerial}}</a></td>
+                                    <td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                   	{{invoiceList' value.invoiceCompany}}
+                                    <!-- else -->
+                                    {{invoiceList' value.invoiceTitle}}
+                                    <!-- endif -->
+                                    </td>
+                                    <td>
+                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b><sup>专</sup>
+                                    <!-- else -->
+                                    <b>¥{{invoiceList' value.invoicePrice}}</b>
+                                    <!-- endif -->
+                                    </td>
+                                    <td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
+                                    <td>{{invoiceList' value.invoiceNo}}</td>
+                                    <td>{{invoiceList' value.lastApprover.username}}&nbsp;{{invoiceList' value.printTime}}</td>
+                                </tr>
+                                <!-- endloop -->
+								</tbody>
+							</table>
+							<!-- else -->
+							<blockquote><p class="colGray">暂时没有已打印的发票</p></blockquote>
+							<!-- endif -->
+						</div>
+						
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!--弹出(发票详情)-->
+<div class="modal hide fade" id="invdetail">
+    <div class="modal-header">
+    <h3>发票单详情</h3>
+    </div>
+    <div class="modal-body">
+    	<table class="table">
+    		<thead>
+    			<tr><td><span class="contactsTag tagCol-02">已出票</span></td><td colspan="3">黄爱玲 邮寄 2016-11-01 11:03:03<br>圆通速运:1231243255232323</td></tr>
+    		</thead>
+			<tr>
+				<th>申请单号</th><td>#F20160316001</td>
+				<th>提交时间</th><td>2016-03-01 12:30:01</td>
+			</tr>
+    		<tr><th width="50">金额</th><td><b class="colOrange">¥3000.00</b>
+				<th width="50">发票号</th><td>No.07957263</td></td>
+    		</tr>
+    		<tr><th width="50">发票类型</th><td>普通发票</td>
+    			<th width="50">开票内容</th><td>纵横公路工程造价管理系统V9.0</td>
+    		</tr>
+    		<!--普通发票-->
+    		<tr><th width="50">发票抬头</th><td colspan="3">珠海纵横创建软件有限公司</td>
+    		</tr>
+    		<!--增值税发票-->
+    		<tr><th width="50">单位名称</th><td>珠海纵横创建软件有限公司</td>
+    			<th width="60" title="纳税人识别码">识别码</th><td>1212123123123</td>
+    		</tr>
+    		<tr>
+    			<th width="50">注册地址</th><td>广东省珠海市香洲区银桦路8号24D</td>
+    			<th width="50">注册电话</th><td>0756-34324</td>
+    		</tr>
+    		<tr>
+    			<th width="50">开户银行</th><td>广发银行</td>
+    			<th width="50">银行账号</th><td>234324234</td>
+    		</tr>
+    		<tr>
+    			<th>备注</th><td colspan="3">备注内容</td>
+    		</tr>
+    	</table>
+    	<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 colspan="3">广东省珠海市XXX路XXX号</td>
+    		</tr>
+    		<tr>
+    			<th>收件人</th><td>陈工</td>
+    			<th>手机/电话</th><td>12345678901</td>
+    		</tr>
+            <tr>
+                <th>申请物品</th><td colspan="3">合同x1、锁套装x1</td>
+            </tr>
+    	</table>
+    	<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>¥200000.00</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>张少珊 转入 陈特<br>2015-04-12 11:30:02</td>
+    		</tr>
+    	</table>
+    </div>
+	<div class="modal-footer">
+	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+	</div>
+</div>
+    <!--弹出内容-->   
+
+    <!--弹出(打印发票)-->
+<div class="modal hide fade" id="editprint">
+    <div class="modal-header">
+    <h3>修改打印信息</h3>
+    </div>
+    <div class="modal-body">
+		<form class="form-horizontal">
+			<div class="control-group">
+				<label class="control-label"><span class="colRed">*</span>发票号</label>
+				<div class="controls">
+					No.<input value="07957263" type="text">
+				</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>
+    <!--弹出内容-->                         	
+<script type="text/javascript">autoFlashHeight();</script>	
+</body>

+ 140 - 0
protected/view/admin/invoicePrintDetail.html

@@ -0,0 +1,140 @@
+<!-- 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>
+<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">
+				<div class="borad-news">
+					<div class="saeaList">
+						<legend>
+							打印发票
+						</legend>
+						<table class="table table-bordered table-condensed">
+							<tbody>
+							<tr>
+								<th class="taC" width="150">开票流水号</th><td>{{invoiceDetail.invoiceSerial}}</td>
+								<th class="taC" width="150">提交时间</th><td>{{invoiceDetail.date}}</td>
+							</tr>
+							<tr>
+								<th class="taC" width="150">所在办事处</th><td>{{invoiceDetail.categoryName}}</td>
+								<th class="taC" width="150">备注</th><td>{{invoiceDetail.remark}}</td>
+							</tr>
+							<tr>
+								<th class="taC">开票金额</th><td><b class="colOrange" style="font-size:18px">¥{{invoiceDetail.invoicePrice}}</b></td>
+								<th class="taC">开票内容</th><td>{{invoiceDetail.invoiceElement}}</td>
+							</tr>
+							</tbody>
+						</table>
+						
+						<!-- if {{invoiceDetail.invoiceType}}==0 -->
+						<table class="table table-bordered table-condensed">
+							<tbody>
+							<tr>
+								<th colspan="4" class="taC">增值税普通发票</th>
+							</tr>
+							<tr>
+								<th class="taC" width="150">发票抬头</th><td colspan="3">{{invoiceDetail.invoiceTitle}}</td>
+
+							</tr>
+							</tbody>
+						</table>
+						<!-- else -->
+						<table class="table table-bordered table-condensed">
+							<tbody>
+							<tr>
+								<th colspan="4" class="taC">增值税专用发票</th>
+							</tr>
+							<tr>
+								<th class="taC" width="150">单位名称</th><td>{{invoiceDetail.invoiceCompany}}</td>
+								<th class="taC" width="150">纳税人识别码</th><td>{{invoiceDetail.TIN}}</td>
+
+							</tr>
+							</tr>
+							<tr>
+								<th class="taC">注册地址</th><td>{{invoiceDetail.address}}</td>
+								<th class="taC">注册电话</th><td>{{invoiceDetail.phone}}</td>
+							</tr>
+							<tr>
+								<th class="taC">开户银行</th><td>{{invoiceDetail.bank}}</td>
+								<th class="taC">银行账户</th><td>{{invoiceDetail.bankAccount}}</td>
+							</tr>
+							</tbody>
+						</table>
+						<!-- endif -->
+						
+						<!-- if {{invoiceDetail.doPost}}==1 -->
+						<table class="table table-bordered table-condensed">
+							<tbody>
+							<tr>
+								<th colspan="4" class="taC">邮寄信息</th>
+							</tr>
+							<tr>
+								<th class="taC" width="150">收件人</th><td>{{invoiceDetail.recipients}}</td>
+								<th class="taC" width="150">收件人手机/电话</th><td>{{invoiceDetail.recipientsPhone}}</td>
+							</tr>
+							<tr>
+								<th class="taC" width="150">收件地址</th><td colspan="3">{{invoiceDetail.recipientsAddress}}</td>
+							</tr>
+							<tr>
+								<th class="taC" width="150">邮寄物品</th><td colspan="3">{{invoiceDetail.mailItems}}</td>
+							</tr>
+							</tbody>
+						</table>
+						<!-- endif -->
+						<form action="/invoicePrintDo" method="post"  name="invoicePrint">
+						<input type="hidden" name="invoiceKey" value="{{INVOICEKEY}}">
+						<table class="table table-bordered table-condensed">
+							<tbody>
+							<tr><th width="60%" class="taC">审批流程</th><th class="taC">发票打印</th></tr>
+							<tr><td>
+								<!-- loop invoiceOperationLogList -->
+									<blockquote>
+										<p><span class="colGray">{{invoiceOperationLogList' value.date}}</span>&nbsp;
+										{{invoiceOperationLogList' value.category}}-{{invoiceOperationLogList' value.username}}&nbsp;
+										<!-- if {{invoiceOperationLogList' value.status}}==2 -->
+										<span class="colGreen">同意</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==3 -->
+										<span class="colOrange">退回</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==4 -->
+										<span class="colRed">终止</span>
+										<!-- elseif {{invoiceOperationLogList' value.status}}==5 -->
+										<span class="colGreen">打印</span>
+										<!-- endif -->
+										{{invoiceOperationLogList' value.operation}}</p>
+									</blockquote>
+									<!-- endloop -->
+							</td><td>
+								<p><span class="colRed">*</span>No.<input name="invoiceNo" value="" type="text" placeholder="输入发票号"></p><br>
+								<div class="invoButton clearfix">
+									<input type="submit" class="buttonDone buttonBlock"  data-placement="top" data-toggle="ctooltip" data-original-title="完成后自动跳转下一张发票" value="完成打印">
+								</div></td></tr>
+							</tbody>
+						</table>
+						</form>
+						
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+		
+<script type="text/javascript">autoFlashHeight();</script>	
+</body>

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

@@ -6,7 +6,7 @@
 <li class="hide"><a href="#">E</a></li>
 <li class="hide"><a href="#">D</a></li> 
 
-<li data-placement="right" class="topLine" data-toggle="ctooltip" data-original-title="费用管理" <!-- if  ReceiptController::$NEW !=0 || ReceiptController::$NEW2 !=0 --> class=news <!-- endif -->><a href="/saeaBorad" class="icon- <!-- if {{memu}}=="receipt" --> selected <!-- endif -->" >U</a></li>  
+<li data-placement="right" class="topLine" data-toggle="ctooltip" data-original-title="费用管理" <!-- if  getGlobals('NEW2') !=0 ||  getGlobals('NEW') !=0 --> class=news <!-- endif -->><a href="/saeaBorad" class="icon- <!-- if {{memu}}=="receipt" --> selected <!-- endif -->" >U</a></li>  
  <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
 <a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>
 <li data-placement="right" data-toggle="ctooltip" data-original-title="假期管理">

+ 2 - 2
protected/view/admin/receipt_menu.html

@@ -6,10 +6,10 @@
 						
 						<!-- if inarray({{staff.0.sid}},{{verifyId}}) || inarray({{staff.0.sid}},{{executeId}}) -->
 						
-						<li  class="topLine <!-- if  ReceiptController::$NEW !=0 --> news <!-- endif --> "><a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses">费用审批</a></li>
+						<li  class="topLine <!-- if  getGlobals('NEW') !=0 --> news <!-- endif --> "><a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses">费用审批</a></li>
 						
 						<!-- if inarray({{staff.0.sid}},{{executeId}}) -->
-						<li <!-- if  ReceiptController::$NEW2 !=0 --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="implement" --> class="selected" <!-- endif --> href="/implement">费用执行</a></li>
+						<li <!-- if  getGlobals('NEW2') !=0 --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="implement" --> class="selected" <!-- endif --> href="/implement">费用执行</a></li>
 						<!-- endif -->
 						
 						<!-- if {{staff.0.cid}}==12 -->

+ 1 - 1
protected/view/menu.html

@@ -6,7 +6,7 @@
 <li class="hide"><a href="#">E</a></li>
 <li class="hide"><a href="#">D</a></li> 
  
-<li  data-placement="right" data-toggle="ctooltip" class="topLine" data-original-title="费用管理" <!-- if  MainController::$NEW !=0 || MainController::$NEW2 !=0 --> class=news <!-- endif -->><a href="/saeaBorad" class="icon- <!-- if {{memu}}=="receipt" --> selected <!-- endif -->" >U</a></li>  
+<li  data-placement="right" data-toggle="ctooltip" class="topLine" data-original-title="费用管理" <!-- if  getGlobals('NEW') !=0 || MainController::$NEW2 !=0 --> class=news <!-- endif -->><a href="/saeaBorad" class="icon- <!-- if {{memu}}=="receipt" --> selected <!-- endif -->" >U</a></li>  
 
 <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
 <a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>