caipin 7 лет назад
Родитель
Сommit
953db12af8

+ 15 - 8
global/js/invoice.js

@@ -1,6 +1,4 @@
 
-
-
 var notify = null;
 var isNotifyShowing = false;
 var isError = false;
@@ -70,19 +68,28 @@ else
 }
 
 
-
-
-
 function submitForm(){
 	var form = document.getElementById("iacd");
     form.submit();
 }
 
-
-
-
 $(function() {
 	
+	$('#invoiceNoStart').keyup(function() {
+		
+		var start=$(this).val();
+		var total=$('#invoiceNoTotal').val();
+		var s=Number(start)+Number(total); 
+		$('#invoiceNoEnd').val('No.'+s);
+	});
+	
+	$('#invoiceNoTotal').keyup(function() {
+		var start=$(this).val();
+		var total=$('#invoiceNoStart').val();
+		var s=Number(start)+Number(total); 
+		$('#invoiceNoEnd').val('No.'+s);
+	});
+	
 	$('a[node-claim="receivables"]').click(function() {
 		$("#iridKey").val($(this).attr("data-key"));
 		

+ 10 - 0
global/js/invoice.validator.js

@@ -190,6 +190,16 @@ $(function () {
 	    }
 	});
 	
+	$("#IPA").validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    fields: {
+	    	invoiceCode: 'required;',
+	    	invoiceNoStart: 'required;digits; ',
+	    	invoiceNoTotal: 'required;digits; ',
+	    }
+	});
+	
 	$('#invoiceQuantity').on('input',function(e) {
     	var invoiceUnitPrice=$('#invoiceUnitPrice').val();
     	var invoiceQuantity=$(this).val();

+ 1 - 0
protected/class/invoice.func.php

@@ -73,5 +73,6 @@ function excelTime($date, $time = false) {
 	return $date;
 }
 
+ 
 
 ?>

+ 8 - 0
protected/config/acl.conf.php

@@ -144,5 +144,13 @@ $acl ['公司汇总查阅'] ['allow'] = array (
 				'invoiceAggregateCategory'
 		)
 );
+$acl ['纸票管理'] ['allow'] = array (
+		'InvoiceController' => array (
+				'invoicePaper',
+				'invoicePaperAdd',
+				'invoicePaperDel',
+				'ajaxGetinvoicePaperAchieve'
+		)
+);
 
 ?>

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

@@ -561,7 +561,11 @@ $route['*']['/invoiceAggregateCategory/:cid'] = array('InvoiceController', 'invo
 
 //办事处汇总
 $route['*']['/invoiceAggregateCategoryDetail'] = array('InvoiceController', 'invoiceAggregateCategoryDetail');
-
+//纸票管理
+$route['*']['/invoicePaper'] = array('InvoiceController', 'invoicePaper');
+$route['*']['/invoicePaperAdd'] = array('InvoiceController', 'invoicePaperAdd');
+$route['*']['/invoicePaperDel/:ipidKey'] = array('InvoiceController', 'invoicePaperDel');
+$route['*']['/ajaxGetinvoicePaperAchieve'] = array('InvoiceController', 'ajaxGetinvoicePaperAchieve');
 
 
 //数据导入

+ 2 - 1
protected/controller/AdminController.php

@@ -843,7 +843,8 @@ class AdminController extends DooController {
 				'发票打印' => '',
 				'发票邮寄' => '',
 				'发票退票' => '',
-				'公司汇总查阅' => '' 
+				'公司汇总查阅' => '',
+				'纸票管理'=>''
 		);
 		foreach ( $list as $key => $value ) {
 			$name = json_decode ( $value ['staff'] );

+ 198 - 20
protected/controller/InvoiceController.php

@@ -169,21 +169,24 @@ class InvoiceController extends DooController {
 		$XDeode = new XDeode ( 5 );
 		$sid = $XDeode->decode ( $_COOKIE ["staff"] );
 		
-		
 		Doo::loadModel ( 'invoiceStatistics' );
 		$invoiceStatistics = new invoiceStatistics ();
 		
-		$isMonth = $invoiceStatistics->getStatisticsByMonth ($sid);
+		$isMonth = $invoiceStatistics->getStatisticsByMonth ( $sid );
 		
+		// 缓存统计结果
 		$year = date ( "Y" );
 		$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 );
-		$path = SITE_PATH . $this->INVOICECOLLECTPATH . "invoiceCollect_" . $year . "_" . $fm_forward_month . ".htm";
-		$htm = $this->showCache ( $path );
+		$path = SITE_PATH . $this->INVOICECOLLECTPATH . "invoiceCollect_" . $year . "_" . $fm_forward_month . "_" . $sid . ".htm";
 		
+		if (is_file ( $path ))
+			$htm = file_get_contents ( $path );
+		else
+			$htm = $this->showCache ( $path, $sid );
 		
 		$invoiceList = $invoice->getMyInvoice ( $sid );
 		
@@ -1927,6 +1930,7 @@ class InvoiceController extends DooController {
 		$invoiceList = $invoice->find ( array (
 				'where' => 'status=1 and pendingApprovals=' . $this->staff [0] ['sid'],
 				'desc' => 'iid',
+				'limit' => 10,
 				'asArray' => true 
 		) );
 		foreach ( $invoiceList as $key => $value ) {
@@ -2952,7 +2956,6 @@ class InvoiceController extends DooController {
 			$invoiceReceivables = new invoiceReceivables ();
 			$invoiceReceivables->setInvoiceReceivablesByCondition ( $item );
 			
-			
 			// 收款操作日志
 			$item = array (
 					'operation' => $this->staff [0] ['username'] . " 转入 公共待认领款项 ",
@@ -2966,10 +2969,10 @@ class InvoiceController extends DooController {
 			);
 			$invoiceROLog->setInvoiceROLog ( $item );
 			
-			if (empty($action))
-			return '/invoiceReceivables';
+			if (empty ( $action ))
+				return '/invoiceReceivables';
 			else
-			return "/invoiceReceivablesAS";
+				return "/invoiceReceivablesAS";
 		}
 		die ( 'illegal request' );
 	}
@@ -3430,7 +3433,7 @@ class InvoiceController extends DooController {
 		Doo::loadModel ( 'invoiceStatistics' );
 		$invoiceStatistics = new invoiceStatistics ();
 		
-		$isMonth = $invoiceStatistics->getStatisticsByMonth ($this->staff[0]['sid']);
+		$isMonth = $invoiceStatistics->getStatisticsByMonth ( $this->staff [0] ['sid'] );
 		
 		$year = date ( "Y" );
 		$tmp_date = date ( "Ym" );
@@ -3454,6 +3457,179 @@ class InvoiceController extends DooController {
 	}
 	
 	/**
+	 * 纸票管理
+	 */
+	function invoicePaper() {
+		$status = $this->get_args ( 'status' ) ? $this->get_args ( 'status' ) : 'ALL';
+		$invoiceType = $this->get_args ( 'invoiceType' ) ? $this->get_args ( 'invoiceType' ) : "ALL";
+		
+		$date = $this->get_args ( 'date' ) ? $this->get_args ( 'date' ) : "";
+		
+		$this->data ['dateString'] = $date;
+		$this->data ['status'] = $status;
+		$this->data ['invoiceType'] = $invoiceType;
+		
+		$this->data ['memu'] = "invoice";
+		$this->data ['staff'] = $this->staff;
+		$this->data ['receiptMemu'] = 'invoicePaper';
+		$this->render ( "/admin/invoicePaper", $this->data );
+	}
+	
+	/**
+	 * 获得纸票分页数据
+	 */
+	function ajaxGetinvoicePaperAchieve() {
+		Doo::loadModel ( 'invoicePaper' );
+		$invoicePaper = new invoicePaper ();
+		
+		$status = $this->get_args ( 'status' ) ? $this->get_args ( 'status' ) : 'ALL';
+		$invoiceType = $this->get_args ( 'invoiceType' ) ? $this->get_args ( 'invoiceType' ) : "ALL";
+		
+		$invoiceTrain = $this->get_args ( 'invoiceTrain' ) ? $this->get_args ( 'invoiceTrain' ) : "ORDINARY";
+		$date = $this->get_args ( 'date' ) ? $this->get_args ( 'date' ) : "";
+		
+		$page = $this->get_args ( 'start' ) && is_numeric ( $this->get_args ( 'start' ) ) ? $this->get_args ( 'start' ) : 0;
+		$draw = $this->get_args ( 'draw' ) && is_numeric ( $this->get_args ( 'draw' ) ) ? $this->get_args ( 'draw' ) : 1;
+		$length = $this->get_args ( 'length' ) && is_numeric ( $this->get_args ( 'length' ) ) ? $this->get_args ( 'length' ) : 10;
+		
+		$MebSea = $this->get_args ( 'search' );
+		$MebSea = $MebSea ['value'];
+		
+		$page_size = $length;
+		
+		$con = '';
+		if ($status == 'ALL')
+			$con = ' where 1 ';
+		elseif ($status == 'PRINTED')
+			$con = ' where b.isDelete=0  and b.status=2 and b.untreadStatus=0 and b.printStatus=1 ';
+		elseif ($status == 'UNPRINT')
+			$con = ' where b.isDelete=0  and b.status=2 and b.untreadStatus=0 and b.printStatus=0 ';
+		elseif ($status == 'TICKET')
+			$con = ' where b.isDelete=0  and b.untreadStatus=2';
+		
+		if ($invoiceType == 'ORDINARY')
+			$con .= ' and a.invoiceType=0 ';
+		elseif ($invoiceType == 'SPECIAL')
+			$con .= ' and a.invoiceType=1 ';
+
+		$dateArr = explode ( ':', $date );
+		$D1 = $dateString = '';
+		$D2 = '';
+		if (! empty ( $date )) {
+			$D1 = $dateArr [0];
+			if (isset ( $dateArr [1] ))
+				$D2 = $dateArr [1];
+			else
+				$D2 = '';
+			$dateString = $D1 . " : " . $D2;
+		}
+		if (! empty ( $D1 ) && ! empty ( $D2 ))
+			$con .= ' and b.printTime BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
+		elseif (! empty ( $D1 ) && empty ( $D2 ))
+			$con .= ' and b.printTime like "%' . $D1 . '%"  ';
+		
+		if (! empty ( $MebSea ))
+			$con .= ' and ( b.invoiceTitle like "%' . $MebSea . '%" or b.invoiceCompany like "%' . $MebSea . '%" or a.invoiceNo like "%' . $MebSea . '%"  )';
+			
+		$invoiceTotal = $invoicePaper->getInvoicePaperCount ();
+		
+		$sql = '  ' . $con;
+		$limit = $page . ',' . $page_size;
+		$list = $invoicePaper->getInvoicePaper ( $limit, $sql, 'desc' );
+		
+		$paperList = array ();
+		foreach ( $list as $key => $value ) {
+			$irDetail = array ();
+			if($value ['iid']==0)
+				array_push ( $irDetail, '<a href="javascript:if(window.confirm(\'确认删除?\'))window.location=\'/invoicePaperDel/' . $value ['ipidKey'] . '\'" >删除</a>' );
+			else 
+				array_push ( $irDetail, '' );
+			array_push ( $irDetail, $value ['invoiceCode'] );
+			array_push ( $irDetail, $value ['invoiceNo'] );
+			array_push ( $irDetail, '<a href="#approvalInvice" onclick="nodeInvoice(\'' . $value ['iidKey'] . '\')"  data-toggle="modal">' . $value ['invoiceSerial'] . '</a>' );
+			if ($value ['invoiceType'] == 1)
+				array_push ( $irDetail, $value ['invoiceCompany'] );
+			else
+				array_push ( $irDetail, $value ['invoiceTitle'] );
+			if ($value ['invoiceType'] == 1)
+				array_push ( $irDetail, '¥' . $value ['invoicePrice'] . '<sup>专</sup>' );
+			else
+				array_push ( $irDetail, '¥' . $value ['invoicePrice'] );
+			array_push ( $irDetail, $value ['invoiceElement'] );
+			array_push ( $irDetail, $value ['categoryName'] . '-' . $value ['userName'] );
+			array_push ( $irDetail, $value ['printTime'] );
+			
+			
+			
+			array_push ( $paperList, $irDetail );
+		}
+		// $approvalListJson = json_encode ( $approvalList );
+		
+		$recordsFiltered = $invoiceTotal;
+		
+		echo json_encode ( array (
+				"draw" => intval ( $draw ),
+				"recordsTotal" => intval ( $invoiceTotal ),
+				"recordsFiltered" => intval ( $recordsFiltered ),
+				"data" => $paperList 
+		), JSON_UNESCAPED_UNICODE );
+	}
+	
+	function invoicePaperDel(){
+		$ipidKey = isset ( $this->params ['ipidKey'] ) ? $this->params ['ipidKey'] : "";
+		
+		$XDeode = new XDeode ( 5 );
+		$ipid = $XDeode->decode ( $ipidKey );
+		
+		if (empty ( $ipid ))
+			die ( 'illegal request' );
+		
+		Doo::loadModel ( 'invoicePaper' );
+		$invoicePaper = new invoicePaper ();
+		$invoicePaper->delete ( array (
+				'where' => 'ipid=' . $ipid.' and iid!=0',
+				'limit' => 1
+		) );
+		
+		return '/invoicePaper';
+	}
+	
+	/**
+	 * 添加纸质发票号
+	 */
+	function invoicePaperAdd() {
+		$invoiceType = $this->get_args ( 'invoiceType' ) && is_numeric ( $this->get_args ( 'invoiceType' ) ) ? $this->get_args ( 'invoiceType' ) : '0';
+		$invoiceCode = $this->get_args ( 'invoiceCode' ) ? $this->get_args ( 'invoiceCode' ) : "";
+		$invoiceNoStart = $this->get_args ( 'invoiceNoStart' ) && is_numeric ( $this->get_args ( 'invoiceNoStart' ) ) ? $this->get_args ( 'invoiceNoStart' ) : 0;
+		$invoiceNoTotal = $this->get_args ( 'invoiceNoTotal' ) && is_numeric ( $this->get_args ( 'invoiceNoTotal' ) ) ? $this->get_args ( 'invoiceNoTotal' ) : 0;
+		
+		if ($invoiceType != '' && ! empty ( $invoiceCode ) && ! empty ( $invoiceNoStart ) && ! empty ( $invoiceNoTotal )) {
+			
+			$sum = $invoiceNoStart + $invoiceNoTotal;
+			if (empty ( $sum ))
+				die ( 'illegal request' );
+			
+			Doo::db ()->beginTransaction ();
+			// 批量存储纸质发票
+			$date = date ( "Y-m-d H:i:s" );
+			$sql = 'INSERT INTO CLD_invoicePaper (invoiceType, invoiceCode,invoiceNo,date)
+				  VALUES ';
+			$paperList = array ();
+			for($invoiceNoStart; $invoiceNoStart <= $sum; $invoiceNoStart ++) {
+				$paperSql = '(' . $invoiceType . ',"' . $invoiceCode . '","' . $invoiceNoStart . '","' . $date . '")';
+				array_push ( $paperList, $paperSql );
+			}
+			if (empty ( $paperList ))
+				die ( 'illegal request' );
+			$sql = $sql . implode ( ',', $paperList );
+			Doo::db ()->query ( $sql );
+			Doo::db ()->commit ();
+			return 'invoicePaper';
+		}
+		die ( 'illegal request' );
+	}
+	
+	/**
 	 * 收款绑定发票 ,一个收款只能绑定一个发票
 	 */
 	function invoiceBindReceivables() {
@@ -4398,12 +4574,6 @@ class InvoiceController extends DooController {
 		
 		$list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $con );
 		
-		// foreach ($list as $key=>$value){
-		// $list[$key]['rpSum']=0;
-		// if (!empty($value['irid']))
-		// $list[$key]['rpSum']=$invoiceReceivables->getSumOfReceivablesPrice($value['irid']);
-		// }
-		
 		$this->data ['MebSeaEn'] = $MebSea;
 		$this->data ['MebSea'] = urlencode ( $MebSea );
 		$this->data ['date'] = $date;
@@ -4457,14 +4627,15 @@ class InvoiceController extends DooController {
 			$con .= ' and ' . $descField . ' BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
 		elseif (! empty ( $D1 ) && empty ( $D2 ))
 			$con .= ' and ' . $descField . ' like "%' . $D1 . '%"  ';
-			
-			// echo $con;
+		
 		if ($status == 'Unclaimed')
 			$con .= ' and a.bindStatus=0';
 		elseif ($status == 'Credited')
 			$con .= ' and a.bindStatus=1';
 		elseif ($status == 'Claim')
 			$con .= ' and a.bindStatus=0 and a.receivablesStaff="PUBLIC"';
+		elseif ($status == 'BBN')
+			$con .= ' and a.bankBatchNumber!=""';
 		
 		$get = "/" . $status . "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
 		
@@ -4483,6 +4654,13 @@ class InvoiceController extends DooController {
 		$pageinfo = $this->getPageBySql ( $sql, $page, $page_size, "invoiceReceivablesAS", $get, "" );
 		$limit = $pageinfo ['lower'] . ',' . $page_size;
 		$list = $invoiceReceivables->getInvoiceReceivablesByConditionPage ( $limit, $con, 'desc', $descField );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['category'] = '';
+			if ($value ['receivablesCategory'] != 'PUBLIC') {
+				$receivablesCategory = explode ( ":", $value ['receivablesCategory'] );
+				$list [$key] ['category'] = $receivablesCategory [1];
+			}
+		}
 		// print_r($list);
 		
 		$this->data ['category'] = $category;
@@ -6269,14 +6447,14 @@ class InvoiceController extends DooController {
 		$num = count ( $pics );
 		return $pics [$num - 1];
 	}
-	function showCache($path = "") {
+	function showCache($path = "", $sid = 0) {
 		// if (file_exists ( $path )) {
 		// $htm = file_get_contents ( $path );
 		// } else {
 		Doo::loadModel ( 'invoiceStatistics' );
 		$invoiceStatistics = new invoiceStatistics ();
 		
-		$isBriefly = $invoiceStatistics->getBrieflyStatistics ();
+		$isBriefly = $invoiceStatistics->getBrieflyStatistics ( $sid );
 		$htm = '<tr><th class="taC">' . $isBriefly ['statisticsMonth'] [0] ['month'] . '月累计开票</th>
 				<td>¥' . $isBriefly ['statisticsMonth'] [0] ['invoicePrice'] . '</td>
 				<th class="taC">' . $isBriefly ['statisticsMonth'] [0] ['month'] . '月累计入账</th>
@@ -6284,7 +6462,7 @@ class InvoiceController extends DooController {
 		/*
 		 * '<tr><th class="taC">今年累计开票</th><td>¥' . $isBriefly ['statisticsYear'] [0] ['invoicePrice'] . '</td> <th class="taC">今年累计入账</th><td>¥' . $isBriefly ['statisticsYear'] [0] ['accountPrice'] . '</td></tr>';
 		 */
-		file_put_contents ( $path, $htm, FILE_APPEND );
+		file_put_contents ( $path, $htm );
 		// }
 		return $htm;
 	}

+ 1 - 1
protected/controller/ReceiptController.php

@@ -4096,7 +4096,7 @@ class ReceiptController extends DooController {
 				) );
 				
 				// 微信企业号通知
-				$this->setWXMsg ( $rid, 1 );
+				//$this->setWXMsg ( $rid, 1 );
 			}
 			
 			$receipt->amount = $amount;

+ 4 - 1
protected/model/invoice.php

@@ -547,11 +547,13 @@ class invoice extends DooModel {
 			$list = $this->find ( array (
 					'where' => "status=2 and printStatus=" . $status . " and untreadStatus=0 and moldManage like '%[\"" . $sid . "\",%'",
 					'desc' => 'approvalTime',
+					'limit'=>10,
 					'asArray' => TRUE 
 			) );
 		elseif (! empty ( $sid ) && ! empty ( $iid ))
 			$list = $this->getOne ( array (
 					'where' => "status=2 and printStatus=" . $status . " and untreadStatus=0 and moldManage like '%[\"" . $sid . "\",%' and iid=" . $iid,
+					
 					'asArray' => TRUE 
 			) );
 		return $list;
@@ -693,6 +695,7 @@ class invoice extends DooModel {
 		if (empty ( $iid )) {
 			$list = $this->find ( array ( // printStatus=1 and
 					'where' => " untreadStatus=" . $untreadStatus . " and status=2 ",
+					'limit'=>10,
 					'asArray' => TRUE 
 			) );
 			
@@ -737,7 +740,7 @@ class invoice extends DooModel {
 	 * @param number $status.
 	 * @param number $limit.
 	 */
-	function getInvoiceByProcessStatus($limit = 4, $desc = 'desc') {
+	function getInvoiceByProcessStatus($limit = 10, $desc = 'desc') {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		$list = $this->find ( array (

+ 4 - 1
protected/model/invoiceManage.php

@@ -41,7 +41,10 @@ class invoiceManage extends DooModel {
 					'where' => 'mold="' . $mold . '"',
 					'asArray' => TRUE 
 			) );
-			$detail ['staffList'] = json_decode ( $detail ['staff'], true );
+			if(empty($detail ['staff']))
+				$detail ['staffList'] = array();
+			else
+				$detail ['staffList'] = json_decode ( $detail ['staff'], true );
 		}
 		return $detail;
 	}

+ 1 - 1
protected/model/invoiceReceivables.php

@@ -183,7 +183,7 @@ class invoiceReceivables extends DooModel {
 		
 		if (! empty ( $cid )) {
 			$list ['csClaim'] = $this->find ( array (
-					'where' => "receivablesCategory='public' and receivablesStaff='public'  and bindStatus=0",
+					'where' => "receivablesCategory='public' and receivablesStaff='public'  and bindStatus=0 and bankBatchNumber=''",
 					'desc' => 'irid',
 					'asArray' => TRUE 
 			) );

+ 5 - 3
protected/model/invoiceStatistics.php

@@ -241,7 +241,7 @@ class invoiceStatistics extends DooModel {
 		}
 		return $list;
 	}
-	public function getBrieflyStatistics() {
+	public function getBrieflyStatistics($sid=0) {
 		$year = date ( "Y" );
 		$month = date ( "m" );
 		
@@ -253,7 +253,7 @@ class invoiceStatistics extends DooModel {
 		
 		$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,
+				'where' => " cid!=0 and staff='.$sid.' and Year(date) =" . $year . " and Month(date)=" . $fm_forward_month,
 				'groupby' => 'Month(date)',
 				'asArray' => TRUE 
 		) );
@@ -307,6 +307,7 @@ class invoiceStatistics extends DooModel {
 				where Month(date)=' . $month . ' and cid = ' . $cid . '
 					GROUP BY staff';
 		$query = Doo::db ()->query ( $sql );
+		//echo $sql;
 		return $result = $query->fetchAll ();
 	}
 	
@@ -338,9 +339,10 @@ class invoiceStatistics extends DooModel {
 		
 		$sql = 'select sum(invoicePrice) as invoicePrice,sum(receivablesPrice) as receivablesPrice,sum(accountPrice) as accountPrice ,cid,Month(date) as month
 				from ' . $this->_table . '
-				where Month(date)=' . $month . ' and cid = ' . $cid . '
+				where Month(date)=' . $month . ' and cid = ' . $cid . ' and staff!=0 
 					GROUP BY cid';
 		$query = Doo::db ()->query ( $sql );
+		//echo $sql;
 		return $result = $query->fetch ();
 	}
 }

+ 1 - 0
protected/plugin/TemplateTag.php

@@ -185,6 +185,7 @@ function isInvoiceMoldShow($sid = 0, $mold = '') {
 		$invoiceManage = new invoiceManage ();
 		$imList = $invoiceManage->getInvoiceByMold ( $mold );
 		$list = array ();
+		
 		foreach ( $imList ['staffList'] as $k => $v ) {
 			array_push ( $list, $v [0] );
 		}

+ 12 - 1
protected/view/admin/invoiceAS.html

@@ -58,7 +58,9 @@
 				<div class="saeaList">
 					<table class="table table-hover">
 						<tbody>
-						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>开票单位(抬头)</th><th>开票内容</th><th>出票时间</th><th>收款流水号</th><th>收款金额</th><th>操作</th></tr>
+						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>开票单位(抬头)</th><th>开票内容</th><th>出票时间</th><th>发票号</th><th>收款流水号</th><th>收款金额</th>
+						<th>状态</th>
+						<th>操作</th></tr>
 						<!-- loop list -->
 						<tr>
 							<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{list' value.iidKeyK}}" data-toggle="modal">{{list' value.invoiceSerial}}</a></td>
@@ -76,10 +78,12 @@
 	                                    {{list' value.invoiceTitle}}
 	                                    <!-- endif -->
 							</td>
+							<!-- <td>{{invoiceList' value.invoiceNo}}</td> -->
 							<td>{{list' value.invoiceElement}}</td>
 							<td>
 							{{list' value.printTime}}
 							</td>
+							<td>{{invoiceList' value.invoiceNo}}</td>
 							<td>
 							<!-- loop list' value.irList -->
 							<a href="#billing" node-invoice='INFO' data-type="receivables" data-isKey="{{list' value' value.iridKeyK}}" data-toggle="modal">{{list' value' value.receivablesSerial}}</a>&nbsp;
@@ -95,6 +99,13 @@
 							<b class="colRed">¥{{list' value.sumPrice}}</b>
 							<!-- endif -->
 							</td>
+							
+							<td>
+							<!-- if {{list' value.untreadStatus}}==2 -->
+	                                  	已退票
+	                        <!-- endif -->
+							</td>
+							
 							<td>
 							<!-- if ({{list' value.sumPrice}}<{{list' value.invoicePrice}}||{{list' value.sumPrice}}==0)&& {{list' value.untreadStatus}}==0 && {{list' value.status}}==2 && {{list' value.printStatus}}==1 -->
 							<a href="#recorded" node-invoiceReceivables='INFO' data-isKey="{{list' value.iidKeyK}}" data-toggle="modal">入账</a>

+ 0 - 1
protected/view/admin/invoiceApprovalAchieve.html

@@ -5,7 +5,6 @@
 <script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
 <link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.css"> 
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.min.js"></script>
-
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/dataTables.fixedColumns.min.js"></script>
 
 <body>

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

@@ -12,8 +12,11 @@
 
 
 
+<!-- if isInvoiceMoldShow({{staff.0.sid}},'纸票管理') -->
+<li class="topLine"><a <!-- if {{receiptMemu}}=="invoicePaper" --> class="selected" <!-- endif --> href="/invoicePaper">纸票管理</a></li>
+<!-- endif -->
 <!-- if isInvoiceMoldShow({{staff.0.sid}},'收款管理') -->
-	<li class="topLine"><a <!-- if {{receiptMemu}}=="invoiceReceivables" --> class="selected" <!-- endif --> href="/invoiceReceivables">收款录入</a></li>
+	<li ><a <!-- if {{receiptMemu}}=="invoiceReceivables" --> class="selected" <!-- endif --> href="/invoiceReceivables">收款录入</a></li>
 <!-- endif -->
 	<!-- if isInvoiceMoldShow({{staff.0.sid}},'发票审批') -->
 	<li <!-- if {{new.approval}} --> class="news" <!-- endif --> ><a

+ 9 - 4
protected/view/admin/invoiceReceivablesAS.html

@@ -37,6 +37,7 @@
 	  					<a <!-- if {{status}}=='Claim' --> class="now" <!-- endif --> title="未认领" href="/invoiceReceivablesAS/1/Claim">未认领</a>
 	  					<a <!-- if {{status}}=='Unclaimed' --> class="now" <!-- endif --> title="未入账" href="/invoiceReceivablesAS/1/Unclaimed" >未入账</a>
 	  					<a <!-- if {{status}}=='Credited' --> class="now" <!-- endif --> title="已入账" href="/invoiceReceivablesAS/1/Credited" >已入账</a>
+	  					<a <!-- if {{status}}=='BBN' --> class="now" <!-- endif --> title="已入账" href="/invoiceReceivablesAS/1/BBN" >批量导入</a>
 	  				</li>
 					
 					
@@ -64,9 +65,11 @@
 				<div class="saeaList">
 		  		<table class="table table-hover">
 					<tr class="thead">
-						<th>收款金额</th>
+						<th>银行到账时间</th>
 						<th>收款信息</th>
-						<th>到账银行/到账时间</th>
+						<th>办事处</th>
+						<th>收款银行</th>
+						<th>收款金额</th>
 						<th>录入收款</th>
 						<th>收款认领</th>
 						<th>发票入账</th>
@@ -76,9 +79,11 @@
 					
 					<!-- loop list -->
 						<tr>
-						<td><b>¥{{list' value.receivablesPrice}}</b></td>
+						<td>{{list' value.receivablesDate}}</td>
 						<td>{{list' value.receivablesMessage}}</td>
-						<td>{{list' value.receivablesBank}}<br>{{list' value.receivablesDate}}</td>
+						<td>{{list' value.category}}</td>
+						<td>{{list' value.receivablesBank}}</td>
+						<td><b>¥{{list' value.receivablesPrice}}</b></td>
 						<td>{{list' value.inputStaff}} <br>{{list' value.date}}</td>
 						<td>
 						<!-- if {{list' value.receivablesCategory}}!='PUBLIC' -->