Jelajahi Sumber

发票退票相关功能

caipin 7 tahun lalu
induk
melakukan
31afbdf507

+ 1 - 1
global/js/invoice.js

@@ -122,7 +122,7 @@ $(function() {
 	});
 	
 	$("input[node-untread='post']").click(function() {
-		$("table[post-box='ture']").show();
+		//$("table[post-box='ture']").show();
 	});
 	
 	$("a[node-approval^='approval']").click(function() {

+ 1 - 1
global/js/invoice.validator.js

@@ -73,7 +73,7 @@ $(function () {
 	    focusCleanup: true,
 	    theme:"yellow_top",
 	    fields: {
-	        'invoiceNo': 'required; '
+	        'invoiceNo': 'required;remote[/ajaxCheckInvoiceNoUniqueness]'
 	    }
 	});
 

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

@@ -27,6 +27,7 @@ $acl ['ordinary'] ['allow'] = array (
 				//新加普通
 				'invoiceUntreadIsAchieve',
 				'invoiceMyUnAccountAchieve',
+				'invoiceUntreadMailDo',
 				//删除核销相关操作
 				'invoiceUntreadDo',
 				//'ajaxGetReceivalblesByStaff',
@@ -69,7 +70,9 @@ $acl ['发票打印'] ['allow'] = array (
 				'invoicePrint',
 				'invoicePrintDetail',
 				'invoicePrintDo',
-				'invoiceTAchieve'
+				'invoiceTAchieve',
+				//新增权限
+				'ajaxCheckInvoiceNoUniqueness'
 		) 
 );
 $acl ['发票邮寄'] ['allow'] = array (

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

@@ -398,8 +398,11 @@ $route['post']['/ajaxCompareInvoicePrice'] = array('InvoiceController', 'ajaxCom
 $route['get']['/invoiceUntreadIsAchieve'] = array('InvoiceController', 'invoiceUntreadIsAchieve');
 $route['get']['/invoiceUntreadIsAchieve/:page'] = array('InvoiceController', 'invoiceUntreadIsAchieve');
 $route['get']['/invoiceMyUnAccountAchieve'] = array('InvoiceController', 'invoiceMyUnAccountAchieve');
+$route['get']['/invoiceMyUnAccountAchieve/:page'] = array('InvoiceController', 'invoiceMyUnAccountAchieve');
 
+$route['post']['/invoiceUntreadMailDo'] = array('InvoiceController', 'invoiceUntreadMailDo');
 
+$route['post']['/ajaxCheckInvoiceNoUniqueness'] = array('InvoiceController', 'ajaxCheckInvoiceNoUniqueness');
 
 
 //删除核销相关操作

File diff ditekan karena terlalu besar
+ 339 - 806
protected/controller/InvoiceController.php


File diff ditekan karena terlalu besar
+ 165 - 141
protected/controller/ReceiptController.php


+ 9 - 3
protected/model/invoice.php

@@ -270,6 +270,11 @@ class invoice extends DooModel {
 			$Detail ['expressCom'] = '';
 		}
 		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		$Detail ['iidKeyUrl'] =$XDeode->encode ( $Detail ['iid'] );
+		
 		$Detail ['iidKey'] = $this->authcode ( $Detail ['iid'], '' );
 		Doo::loadModel ( 'L_category' );
 		$lCategory = new L_category ();
@@ -424,8 +429,8 @@ class invoice extends DooModel {
 			$list ['pendingInvoice'] = array ();
 			$list ['handleInvoice'] = array ();
 			$list ['pendingInvoice'] = $this->find ( array (//加入邮件中也为 处理中 已退票
-					'where' => "((status=1) or (status=2 and printStatus=0) or ( status=2 and printStatus=1 and untreadStatus=1) 
-					
+					'where' => "((status=1) or (status=2 and printStatus=0) or ( status=2 and printStatus=1 and untreadStatus=1 and untreadPost=1 and untreadNumber!='') or
+					( status=2 and printStatus=1 and untreadStatus=1 and untreadPost=0)
 					or (postStatus=0 and doPost=1 and status=2) )  and sid=" . $sid,
 					'desc' => 'iid',
 					'asArray' => TRUE 
@@ -437,7 +442,8 @@ class invoice extends DooModel {
 			
 			$list ['handleInvoice'] = $this->find ( array (
 					// 需求变更 -去除出票状态的数据 or (status=2 and printStatus=1 and untreadStatus=0 ) or (status=2 and printStatus=1 and untreadStatus=2 )
-					'where' => "(status=3 or status=4 or (status=2 and printStatus=1 and untreadStatus=2 )  )  and isDelete=0 and sid=" . $sid,
+					//新加入退票中 需要邮寄的发票
+					'where' => "(status=3 or status=4 or (status=2 and printStatus=1 and untreadStatus=2 ) or ( status=2 and printStatus=1 and untreadStatus=1 and untreadPost=1 and untreadNumber='')  )  and isDelete=0 and sid=" . $sid,
 					'desc' => 'iid',
 					'asArray' => TRUE 
 			) );

+ 3 - 0
protected/model/invoiceReceivables.php

@@ -63,8 +63,11 @@ class invoiceReceivables extends DooModel {
 		) );
 		Doo::loadModel ( 'invoiceROLog' );
 		$invoiceROLog = new invoiceROLog ();
+		Doo::loadModel ( 'invoice' );
+		$invoice = new invoice ();
 		foreach ( $list as $key => $value ) {
 			$list [$key] ['invoiceROLog'] = $invoiceROLog->getInvoiceROLogByIrid ( $value ['irid'], 'desc' );
+			$list [$key] ['invoiceDetail'] =$invoice->getInvoiceByIid($value ['iid']);
 		}
 		return $list;
 	}

+ 151 - 147
protected/model/invoiceStatistics.php

@@ -63,42 +63,42 @@ class invoiceStatistics extends DooModel {
 	 * @param string $bindStatus
 	 * @return mixed
 	 */
-	public function getInvoiceStatisticsByYear($year="", $cid = "0") {
+	public function getInvoiceStatisticsByYear($year = "", $cid = "0") {
 		$list = array ();
 		$sql = '';
-		if (empty($year))
-			$year=date("Y");
+		if (empty ( $year ))
+			$year = date ( "Y" );
 		if ($cid != 0)
 			$sql = " and cid=" . $cid;
-	
-			$list['statisticsMonthCid'] = $this->find ( array (
-					'select'=>'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-					'where' => " cid!=0 and staff!=0 and  Year(date) =" . $year . $sql,
-					'groupby'=>'cid,Month(date)',
-					'asArray' => TRUE
-			) );
-			
-			$list['statisticsYear'] = $this->find ( array (
-					'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
-					'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-					'groupby'=>'Year(date)',
-					'asArray' => TRUE
-			) );
-			
-			if (empty($list['statisticsYear'])){
-				$list['statisticsYear'][0]['invoicePrice']=0;
-				$list['statisticsYear'][0]['receivablesPrice']=0;
-				$list['statisticsYear'][0]['accountPrice']=0;
-			}
-				
-			$list['statisticsMonth'] = $this->find ( array (
-					'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-					'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-					'groupby'=>'Month(date)',
-					'asArray' => TRUE
-			) );
-			
-			return $list;
+		
+		$list ['statisticsMonthCid'] = $this->find ( array (
+				'select' => 'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and  Year(date) =" . $year . $sql,
+				'groupby' => 'cid,Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		$list ['statisticsYear'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'Year(date)',
+				'asArray' => TRUE 
+		) );
+		
+		if (empty ( $list ['statisticsYear'] )) {
+			$list ['statisticsYear'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsYear'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsYear'] [0] ['accountPrice'] = 0;
+		}
+		
+		$list ['statisticsMonth'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		return $list;
 	}
 	
 	/**
@@ -107,69 +107,67 @@ class invoiceStatistics extends DooModel {
 	 * @param string $cid
 	 * @return NULL[]
 	 */
-	public function getInvoiceStatisticsByStaff($year="", $cid = "0") {
+	public function getInvoiceStatisticsByStaff($year = "", $cid = "0") {
 		$list = array ();
 		$sql = '';
-		if (empty($year))
-			$year=date("Y");
-			if ($cid != 0)
-				$sql = " and cid=" . $cid;
-	
-				$list['statisticsMonthCid'] = $this->find ( array (
-						'select'=>'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'cid,Month(date)',
-						'asArray' => TRUE
-				) );
-				
-				$list['statisticsMonthStaff'] = $this->find ( array (
-						'select'=>'cid,staff,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'staff,Month(date)',
-						'asArray' => TRUE
-				) );
-				
-				$list['statisticsMonth'] = $this->find ( array (
-						'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'Month(date)',
-						'asArray' => TRUE
-				) );
-					
-				return $list;
+		if (empty ( $year ))
+			$year = date ( "Y" );
+		if ($cid != 0)
+			$sql = " and cid=" . $cid;
+		
+		$list ['statisticsMonthCid'] = $this->find ( array (
+				'select' => 'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'cid,Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		$list ['statisticsMonthStaff'] = $this->find ( array (
+				'select' => 'cid,staff,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'staff,Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		$list ['statisticsMonth'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		return $list;
 	}
-	
-	
-	public function getInvoiceStatisticsByCategory($year="", $cid = "0") {
+	public function getInvoiceStatisticsByCategory($year = "", $cid = "0") {
 		$list = array ();
 		$sql = '';
-		if (empty($year))
-			$year=date("Y");
-			if ($cid != 0)
-				$sql = " and cid=" . $cid;
-	
-				$list['statisticsMonthCid'] = $this->find ( array (
-						'select'=>'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'cid,Month(date)',
-						'asArray' => TRUE
-				) );
-	
-				$list['statisticsMonthStaff'] = $this->find ( array (
-						'select'=>'cid,staff,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'staff,Month(date)',
-						'asArray' => TRUE
-				) );
-	
-				$list['statisticsMonth'] = $this->find ( array (
-						'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-						'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
-						'groupby'=>'Month(date)',
-						'asArray' => TRUE
-				) );
-					
-				return $list;
+		if (empty ( $year ))
+			$year = date ( "Y" );
+		if ($cid != 0)
+			$sql = " and cid=" . $cid;
+		
+		$list ['statisticsMonthCid'] = $this->find ( array (
+				'select' => 'cid,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'cid,Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		$list ['statisticsMonthStaff'] = $this->find ( array (
+				'select' => 'cid,staff,sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'staff,Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		$list ['statisticsMonth'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . $sql,
+				'groupby' => 'Month(date)',
+				'asArray' => TRUE 
+		) );
+		
+		return $list;
 	}
 	
 	/**
@@ -178,86 +176,92 @@ class invoiceStatistics extends DooModel {
 	 * @param string $cid
 	 * @return NULL[]
 	 */
-	public function getInvoiceStatisticsByTote($year="", $cid = "0") {
+	public function getInvoiceStatisticsByTote($year = "", $cid = "0") {
 		$list = array ();
 		$sql = '';
-		if (empty($year))
-			$year=date("Y");
-			if ($cid != 0)
-				$sql = " and cid=" . $cid;
-		$list['statisticsYear'] = $this->find ( array (
-				'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
+		if (empty ( $year ))
+			$year = date ( "Y" );
+		if ($cid != 0)
+			$sql = " and cid=" . $cid;
+		$list ['statisticsYear'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
 				'where' => "  Year(date) =" . $year . $sql,
-				'groupby'=>'Year(date)',
-				'asArray' => TRUE
+				'groupby' => 'Year(date)',
+				'asArray' => TRUE 
 		) );
 		
-		if (empty($list['statisticsYear'])){
-			$list['statisticsYear'][0]['invoicePrice']=0;
-			$list['statisticsYear'][0]['receivablesPrice']=0;
-			$list['statisticsYear'][0]['accountPrice']=0;
+		if (empty ( $list ['statisticsYear'] )) {
+			$list ['statisticsYear'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsYear'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsYear'] [0] ['accountPrice'] = 0;
 		}
 		
 		return $list;
 	}
-	
-	public function getStatisticsByMonth(){
-		$month=date("m");
-		$year=date("Y");
-		$list['statisticsMonth'] = $this->find ( array (
-				'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . " and Month(date)=".$month,
-				'groupby'=>'Month(date)',
-				'asArray' => TRUE
+	public function getStatisticsByMonth() {
+		$month = date ( "m" );
+		$year = date ( "Y" );
+		$list ['statisticsMonth'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . " and Month(date)=" . $month,
+				'groupby' => 'Month(date)',
+				'asArray' => TRUE 
 		) );
-		if (empty($list['statisticsMonth'])){
-			$list['statisticsMonth'][0]['invoicePrice']=0;
-			$list['statisticsMonth'][0]['receivablesPrice']=0;
-			$list['statisticsMonth'][0]['accountPrice']=0;
-			$list['statisticsMonth'][0]['month']=$month;
+		if (empty ( $list ['statisticsMonth'] )) {
+			$list ['statisticsMonth'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsMonth'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['accountPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['month'] = $month;
 		}
-		$list['statisticsYear'] = $this->find ( array (
-				'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
-				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year ,
-				'groupby'=>'Year(date)',
-				'asArray' => TRUE
+		$list ['statisticsYear'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Year(date) as Year',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year,
+				'groupby' => 'Year(date)',
+				'asArray' => TRUE 
 		) );
-		if (empty($list['statisticsYear'])){
-			$list['statisticsYear'][0]['invoicePrice']=0;
-			$list['statisticsYear'][0]['receivablesPrice']=0;
-			$list['statisticsYear'][0]['accountPrice']=0;
-			$list['statisticsYear'][0]['month']=$month;
+		if (empty ( $list ['statisticsYear'] )) {
+			$list ['statisticsYear'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsYear'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsYear'] [0] ['accountPrice'] = 0;
+			$list ['statisticsYear'] [0] ['month'] = $month;
 		}
 		return $list;
 	}
-	
-	public function getBrieflyStatistics(){
-		$year=date("Y");
-		$month=date("m");
+	public function getBrieflyStatistics() {
+		$year = date ( "Y" );
+		$month = date ( "m" );
 		
-		$tmp_date=date("Ym");
-		$tmp_year=substr($tmp_date,0,4);
-		$tmp_mon =substr($tmp_date,4,2);
-		$tmp_forwardmonth=mktime(0,0,0,$tmp_mon-1,1,$tmp_year);
-		$fm_forward_month=date("m",$tmp_forwardmonth);
+		$tmp_date = date ( "Ym" );
+		$tmp_year = substr ( $tmp_date, 0, 4 );
+		$tmp_mon = substr ( $tmp_date, 4, 2 );
+		$tmp_forwardmonth = mktime ( 0, 0, 0, $tmp_mon - 1, 1, $tmp_year );
+		$fm_forward_month = date ( "m", $tmp_forwardmonth );
 		
-		$list['statisticsMonth'] = $this->find ( array (
-				'select'=>'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
-				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . " and Month(date)=".$fm_forward_month,
-				'groupby'=>'Month(date)',
-				'asArray' => TRUE
+		$list ['statisticsMonth'] = $this->find ( array (
+				'select' => 'sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice,Month(date) as month',
+				'where' => " cid!=0 and staff!=0 and Year(date) =" . $year . " and Month(date)=" . $fm_forward_month,
+				'groupby' => 'Month(date)',
+				'asArray' => TRUE 
 		) );
-		if (empty($list['statisticsMonth'])){
-			$list['statisticsMonth'][0]['invoicePrice']=0;
-			$list['statisticsMonth'][0]['receivablesPrice']=0;
-			$list['statisticsMonth'][0]['accountPrice']=0;
-			$list['statisticsMonth'][0]['month']=$fm_forward_month;
+		if (empty ( $list ['statisticsMonth'] )) {
+			$list ['statisticsMonth'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsMonth'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['accountPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['month'] = $fm_forward_month;
 		}
 		
+		return $list;
+	}
+	public function getInvoiceStatisticsByCondition($condition = '') {
+		if (empty ( $condition ))
+			return array ();
 		
+		$list = $this->find ( array (
+				'where' => $condition,
+				'asArray' => TRUE 
+		) );
 		return $list;
 	}
-	
 }
 
 ?>

+ 0 - 17
protected/view/admin/approvalExpenses.html

@@ -29,8 +29,6 @@
 				<div class="demandCate">
 				<form action="/approvalExpenses/{{status}}" id="up" method="get">
 				
-					
-	  				
 	  				<ul class=" cateList " >
 	  					<li>
 	  					
@@ -63,7 +61,6 @@
 	  					<input type="month" name="date" id="date" style="width:120px" onChange="receiptDate();" value="">
 	  					</li>
 	  					
-	  					
 	  					<li>
 						<select name="year" id="Y" onChange="receiptYear();">
 	  					<!-- include 'year' -->
@@ -91,7 +88,6 @@
 	  					<!-- endif -->
 	  				</ul>
 	  				
-	  				
 	  			</form>
 	  		</div>
 				
@@ -200,19 +196,6 @@
 			  		</ul>
 	  			<!-- endif -->
 	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
-	  			
 	  			</div>
 	  		
 	  		</div>

+ 60 - 10
protected/view/admin/invoice.html

@@ -54,24 +54,26 @@
 									<!-- loop invoiceList.handleInvoice -->
 									<tr>
 										<td>
-										<!-- if {{pendingInvoice' value.status}}==3  -->
+										<!-- if {{handleInvoice' value.status}}==3  -->
 										<span class="colOrange">已退回</span>
-										<!-- elseif {{pendingInvoice' value.status}}==4 -->
+										<!-- elseif {{handleInvoice' value.status}}==4 -->
 										<span class="colRed">已终止</span>
 										
-										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==0  -->
+										<!-- elseif {{handleInvoice' value.status}}==2 and {{handleInvoice' value.printStatus}}==1 and {{handleInvoice' value.untreadStatus}}==0  -->
 										<!--废弃 <span class="colBlue">已出票</span>  -->
-										<!-- if {{pendingInvoice' value.doPost}}==1 -->
+										<!-- if {{handleInvoice' value.doPost}}==1 -->
 										<!--废弃 <a href="#shipping" node-post="express-msg" post-data="{{invoicePost' value.iidKey}}" data-toggle="modal">邮寄</a> -->
 										<!-- endif -->
 										
 										
-										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==2  -->
+										<!-- elseif {{handleInvoice' value.status}}==2 and {{handleInvoice' value.printStatus}}==1 and {{handleInvoice' value.untreadStatus}}==2  -->
 										<span class="colRed">已退票</span>
+										<!-- elseif {{handleInvoice' value.status}}==2 and {{handleInvoice' value.printStatus}}==1 and {{handleInvoice' value.untreadStatus}}==1 and {{handleInvoice' value.untreadPost}}==1 -->
+										<span class="colRed">退票中</span>
 										<!-- endif -->
 										</td>
 										<td>
-										<!-- if !empty({{pendingInvoice' value.invoiceType}}) -->
+										<!-- if !empty({{handleInvoice' value.invoiceType}}) -->
 	                                   	{{pendingInvoice' value.invoiceCompany}}
 	                                    <!-- else -->
 	                                    {{pendingInvoice' value.invoiceTitle}}
@@ -103,6 +105,9 @@
 										-->
 										<!-- elseif {{pendingInvoice' value.status}}==2 and {{pendingInvoice' value.printStatus}}==1 and {{pendingInvoice' value.untreadStatus}}==2  -->
 										<a class="button btn-gray btn-block" href="/invoiceDelDo/{{pendingInvoice' value.iidKeyUrl}}.do">从待处理移除</a>
+										
+										<!-- elseif {{handleInvoice' value.status}}==2 and {{handleInvoice' value.printStatus}}==1 and {{handleInvoice' value.untreadStatus}}==1 and {{handleInvoice' value.untreadPost}}==1 -->
+										<a class="button btn-block" diss-data="{{handleInvoice' value.iidKey}}" node-invoice="untreadInvoice" data-toggle="modal" href="#return">填写快递</a>
 										<!-- endif -->
 										</td>
 									</tr>
@@ -165,11 +170,11 @@
 								<!-- if !empty({{myInvoiceUnAccount}}) -->
 								<table class="table table-bordered table-condensed">
 									<tbody>
-									<tr><th class="taC">开票单位(抬头)</th><th class="taC" width="90">开票金额</th><th class="taC">开票流水号</th><th class="taC" width="90">收款金额</th><th class="taC">出票时间</th></tr>
+									<tr><th class="taC">开票单位(抬头)</th><th class="taC" width="90">开票金额</th><th class="taC">开票流水号</th><th class="taC">出票时间</th></tr>
 									<!-- loop myInvoiceUnAccount -->
 									<tr>
 										<td>
-											<!-- if !empty({{myInvoiceUnAccount' value.invoiceType}}) -->
+										<!-- if !empty({{myInvoiceUnAccount' value.invoiceType}}) -->
 	                                   	{{myInvoiceUnAccount' value.invoiceCompany}}
 	                                    <!-- else -->
 	                                    {{myInvoiceUnAccount' value.invoiceTitle}}
@@ -183,8 +188,8 @@
 	                                    <!-- endif -->
 										</td>
 										<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{myInvoiceUnAccount' value.iidKeyK}}" data-toggle="modal">{{myInvoiceUnAccount' value.invoiceSerial}}</a></td>
-										<td><b>{{myInvoiceUnAccount' value.irList.0.price}}</b></td>
-										<td>2016-03-03 11:30:03</td>
+										
+										<td>{{myInvoiceUnAccount' value.printTime}}</td>
 									</tr>
 									<!-- endloop -->
 									
@@ -274,6 +279,51 @@
 		</form>
 	</div>
 	<!--终止-->
+	
+	
+	<!--弹出 退票-->
+	<div class="modal hide fade" id="return">
+	<form action="/invoiceUntreadMailDo" method="post" name="untreadInvoice">
+	<input type="hidden" name='untreadIidKey' value="">
+		<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>
+							<select name="untreadCompany">
+							<!-- loop expressList -->
+											<option value="{{expressList' value.company}}:{{expressList' value.com}}">{{expressList' value.company}}</option>
+											<!-- endloop -->
+											</select></td>
+						</tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>快递单号</th>
+							<td><input type="text" name="untreadNumber" placeholder="请正确填写单号,方便跟踪查询。"></td></tr>
+						<tr>
+							<th class="taC" width="100"><span class="colRed">*</span>邮寄物品</th>
+							<td><textarea class="span4" name="untreadItems" placeholder="请详细填写邮寄回总部的快递包含什么物件。"></textarea></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 class="modal hide fade" id="return">
 	<form action="/invoiceUntreadDo" method="post" name="untreadInvoice">

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

@@ -129,14 +129,22 @@
 							<!-- if !empty({{receivablesList}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行/到帐时间</th><th class="taC">收款录入</th><th class="taC">收款认领</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行/到帐时间</th>
+								<th class="taC">开票金额</th><th class="taC">开票单位</th><th class="taC">开票流水号</th></tr>
 								<!-- loop receivablesList -->
 								<tr>
 									<td><b>¥{{receivablesList' value.receivablesPrice}}</b></td>
 									<td>{{receivablesList' value.receivablesMessage}}</td>
 									<td>{{receivablesList' value.receivablesBank}} {{receivablesList' value.receivablesDate}}</td>
-									<td>{{receivablesList' value.inputStaff}} {{receivablesList' value.date}}</td>
-									<td>{{receivablesList' value.invoiceROLog.operation}} {{receivablesList' value.invoiceROLog.date}}</td>
+									<td>{{receivablesList' value.invoiceDetail.invoicePrice}}</td>
+									<td>
+									<!-- if !empty({{receivablesList' value.invoiceDetail.invoiceType}}) -->
+	                                   	{{receivablesList' value.invoiceDetail.invoiceCompany}}
+	                                    <!-- else -->
+	                                    {{receivablesList' value.invoiceDetail.invoiceTitle}}
+	                                    <!-- endif -->
+									</td>
+									<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{receivablesList' value.invoiceDetail.iidKeyUrl}}" data-toggle="modal">{{receivablesList' value.invoiceDetail.invoiceSerial}}</a></td>
 								</tr>
 								<!-- endloop -->
 								

+ 10 - 3
protected/view/admin/invoiceUntread.html

@@ -28,7 +28,8 @@
 							<!-- if !empty({{untreadInvoice}}) -->
 							<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>
+								<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><th class="taC" width="120">操作</th></tr>
 								
 								<!-- loop untreadInvoice -->
                                 <tr>
@@ -48,12 +49,18 @@
                                     <!-- endif -->
                                     </td>
                                     <td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
+                                    <td>{{invoiceList' value.untreadReason}}</td>
                                     <td>
-                                    <!-- if !empty({{invoiceList' value.untreadNumber}}) -->
+                                    <!-- if {{invoiceList' value.untreadPost}}==0 -->
+                                    	不需邮寄
+                                    <!-- elseif {{invoiceList' value.untreadPost}}==1&&empty({{invoiceList' value.untreadNumber}}) -->
+                                    	未填写快递
+                                    <!-- elseif !empty({{invoiceList' value.untreadNumber}}) -->
                                     {{invoiceList' value.untreadCompany}}:
                                     <a href="#shipping" title="{{invoiceList' value.untreadItems}}" node-express="untread" data-toggle="modal">{{invoiceList' value.untreadNumber}}</a> 
                                     <a target="_blank" href="http://www.kuaidi100.com/chaxun?com={{invoiceList' value.untreadCom}}&nu={{invoiceList' value.untreadNumber}}">查询快递</a> 
-                                    <!-- endif --></td>
+                                    <!-- endif -->
+                                    </td>
                                     <td><a class="button btn-block" diss-data="{{pendingInvoice' value.iidKey}}" node-invoice="untreadInvoice"  href="#return" data-toggle="modal">确认退票</a></td>
                                 </tr>
                                 <!-- endloop -->

+ 8 - 0
protected/view/contacts_company.html

@@ -164,6 +164,9 @@ function deleteTagCompany(tid,cid,obj){
 				<!--弹出(添加标签)-->
 				
 				<div class="modal hide fade" id="addTag">
+				<div class="modal-dialog">
+ <div class="modal-content">
+				
 				    <div class="modal-header">
 				    	<h3>添加标签</h3>
 				    </div>
@@ -185,6 +188,7 @@ function deleteTagCompany(tid,cid,obj){
 						<input type="submit" value="确定" class="button" ></input>
 					</div>
 				</div>
+				</div></div>
 				</form>
 				<!--弹出内容-->	
 				
@@ -450,6 +454,9 @@ function deleteTagCompany(tid,cid,obj){
 	</div>
 	 <!--弹出(编辑标签名)-->
 <div class="modal hide fade" id="editTag">
+<div class="modal-dialog">
+ <div class="modal-content">
+
     <div class="modal-header">
     <h3>编辑标签</h3>
     </div>
@@ -473,6 +480,7 @@ function deleteTagCompany(tid,cid,obj){
 	   	<input type="submit" class="button" value="确定">
 	</div>
 	</form>
+	</div></div>
 </div>
     <!--弹出内容-->