Ver código fonte

银行到账入收款相关功能

caipin 7 anos atrás
pai
commit
c3085a0038

+ 37 - 0
global/css/global.css

@@ -3783,3 +3783,40 @@ td div.dlLev3{
 .btn-undone:active{
   background:#2a4f00;
 }
+
+
+
+
+.search-dataTablestran{
+  position: absolute ;
+  top:-45px;
+  left:450px;
+}
+.dataTables-labeltran{
+  height:26px;
+  line-height: 26px;
+}
+.dataTables-inputtran{
+  width:250px;
+  border:1px solid #ccc;
+  border-radius: 4px;
+  height:26px !important;
+  padding:2px !important;
+}
+
+.search-dataTablesapproval{
+  position: absolute ;
+  top:-45px;
+  left:675px;
+}
+.dataTables-labelapproval{
+  height:26px;
+  line-height: 26px;
+}
+.dataTables-inputapproval{
+  width:250px;
+  border:1px solid #ccc;
+  border-radius: 4px;
+  height:26px !important;
+  padding:2px !important;
+}

+ 6 - 0
global/js/global.js

@@ -1,3 +1,9 @@
+function setSearchLo(className){
+	$('#example_filter').addClass("search-dataTables"+className);
+	$('#example_filter label').addClass("dataTables-label"+className);
+	$('#example_filter input').addClass("dataTables-input"+className);
+}
+
 function autoFlashHeight(){
   var infoHeight = $(".contactInfo").height();
   var headerHeight = $(".header").height();

+ 4 - 5
global/js/invoice.js

@@ -83,11 +83,10 @@ function submitForm(){
 
 $(function() {
 	
-	
-	
-	
-	
-	
+	$('a[node-claim="receivables"]').click(function() {
+		$("#iridKey").val($(this).attr("data-key"));
+		
+	});
 	
 	$('select[node-itSChange]').change(function() {
 		 var itsStatus=$(this).val();

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

@@ -0,0 +1,76 @@
+<?php
+function formatExcelToArrayBank($file_url = ""){
+	if (! file_exists ( $file_url )) {
+		return array ();
+	}
+	
+	Doo::loadClass ( 'PHPExcel1.7.9/PHPExcel' );
+	
+	$PHPExcel = new PHPExcel ();
+	$PHPReader = new PHPExcel_Reader_Excel2007 ();
+	
+	if (! $PHPReader->canRead ( $file_url )) {
+		$PHPReader = new PHPExcel_Reader_Excel5 ();
+		if (! $PHPReader->canRead ( $file_url )) {
+	
+			echo 'no Excel';
+			return;
+		}
+	}
+	
+	$PHPExcel = $PHPReader->load ( $file_url );
+	/* * 读取excel文件中的第一个工作表 */
+	$currentSheet = $PHPExcel->getSheet ( 0 );
+	/* * 取得最大的列号 */
+	$allColumn = $currentSheet->getHighestColumn ();
+	/* * 取得一共有多少行 */
+	$allRow = $currentSheet->getHighestRow ();
+	$excel_array = array ();
+	
+	for($currentRow = 2; $currentRow <= $allRow; $currentRow ++) {
+		$excel_column = array ();
+		// 后期改进
+		if ($allColumn == 'AM')
+			$allColumn = 'Z';
+	
+			/* * 从第A列开始输出 */
+			for($currentColumn = 'A'; $currentColumn <= $allColumn; $currentColumn ++) {
+				$val = $currentSheet->getCellByColumnAndRow ( ord ( $currentColumn ) - 65, $currentRow )->getValue ();
+				if ($val instanceof PHPExcel_RichText)
+					$val = $val->__toString ();
+				
+					if ($currentColumn == 'A') {
+						$excel_column ['receivablesPrice'] = $val;
+					} elseif ($currentColumn == 'B')
+					$excel_column ['receivablesMessage'] = $val;
+					elseif ($currentColumn == 'C') {
+						$excel_column ['receivablesBank'] = $val;
+					} elseif ($currentColumn == 'D') {
+						$excel_column ['receivablesDate'] = excelTime ( $val );
+					} 
+			}
+			if (! empty ( $excel_column ['receivablesPrice'] ) && ! empty ( $excel_column ['receivablesMessage'] ) && ! empty ( $excel_column ['receivablesBank'] )&& ! empty ( $excel_column ['receivablesDate'] ))
+				array_push ( $excel_array, $excel_column );
+	}
+	return $excel_array;
+}
+
+function excelTime($date, $time = false) {
+	if (function_exists ( 'GregorianToJD' )) {
+		if (is_numeric ( $date )) {
+			$jd = GregorianToJD ( 1, 1, 1970 );
+			$gregorian = JDToGregorian ( $jd + intval ( $date ) - 25569 );
+			$date = explode ( '/', $gregorian );
+			$date_str = str_pad ( $date [2], 4, '0', STR_PAD_LEFT ) . "-" . str_pad ( $date [0], 2, '0', STR_PAD_LEFT ) . "-" . str_pad ( $date [1], 2, '0', STR_PAD_LEFT ) . ($time ? " 00:00:00" : '');
+			return $date_str;
+		}
+	} else {
+		$date = $date > 25568 ? $date + 1 : 25569;
+		/* There was a bug if Converting date before 1-1-1970 (tstamp 0) */
+		$ofs = (70 * 365 + 17 + 2) * 86400;
+		$date = date ( "Y-m-d", ($date * 86400) - $ofs ) . ($time ? " 00:00:00" : '');
+	}
+	return $date;
+}
+
+?>

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

@@ -59,7 +59,6 @@ $acl ['ordinary'] ['allow'] = array (
 				'invoiceExpress',
 				'invoiceReceivablesTitleMarkSet',
 				
-				
 				//办事处汇总查询权限--现加入普通权限中->另外在做权限判定
 				'invoiceAggregateCategoryDetail',
 				
@@ -87,7 +86,11 @@ $acl ['收款管理'] ['allow'] = array (
 				'invoiceUnBundLing',
 				'ajaxCheckInvoicePrice',
 				'ajaxGetInvoiceReceivablesByInvoice',
-				'invoiceCompareClaimPrice'
+				'invoiceCompareClaimPrice',
+				//开发中
+				'invoiceReceivablesImport',
+				'setInvoiceReceivablesClaim',
+				'invoiceReceivablesBankUpload'
 				
 		) 
 );

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

@@ -458,7 +458,7 @@ $route['*']['/invoiceApprovalDo'] = array('InvoiceController', 'invoiceApprovalD
 // $route['get']['/invoiceApprovalAchieve/:page/:date'] = array('InvoiceController', 'invoiceApprovalAchieve');
 // $route['get']['/invoiceApprovalAchieve/:page/:date/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieve');
 
-//开发中
+
 $route['get']['/invoiceApprovalAchieve'] = array('InvoiceController', 'invoiceApprovalAchieve');
 $route['get']['/invoiceApprovalAchieve/:status'] = array('InvoiceController', 'invoiceApprovalAchieve');
 $route['get']['/invoiceApprovalAchieve/:status/:MebSea'] = array('InvoiceController', 'invoiceApprovalAchieve');
@@ -532,7 +532,9 @@ $route['get']['/invoiceAS/:page'] = array('InvoiceController', 'invoiceAS');
 $route['get']['/invoiceAS/:page/:status'] = array('InvoiceController', 'invoiceAS');
 
 $route['post']['/invoiceUnBundLing'] = array('InvoiceController', 'invoiceUnBundLing');
-
+//开发中
+$route['*']['/invoiceReceivablesBankUpload'] = array('InvoiceController', 'invoiceReceivablesBankUpload');
+$route['*']['/invoiceReceivablesImport'] = array('InvoiceController', 'invoiceReceivablesImport');
 
 
 
@@ -547,6 +549,8 @@ $route['post']['/ajaxGetInvoiceReceivablesByTitle'] = array('InvoiceController',
 $route['post']['/ajaxCheckInvoicePrice'] = array('InvoiceController', 'ajaxCheckInvoicePrice');
 $route['post']['/ajaxGetInvoiceReceivablesByInvoice'] = array('InvoiceController', 'ajaxGetInvoiceReceivablesByInvoice');
 
+$route['post']['/setInvoiceReceivablesClaim'] = array('InvoiceController', 'setInvoiceReceivablesClaim');
+
 
 //公司汇总查阅
 $route['*']['/invoiceAggregate'] = array('InvoiceController', 'invoiceAggregate');

Diferenças do arquivo suprimidas por serem muito extensas
+ 1008 - 858
protected/controller/InvoiceController.php


+ 31 - 16
protected/model/invoiceReceivables.php

@@ -33,6 +33,7 @@ class invoiceReceivables extends DooModel {
 	public $unbundlingTime;
 	public $accountClerk;
 	public $sourcePrice;
+	public $bankBatchNumber;
 	public $_table = 'CLD_invoiceReceivables';
 	public $_primarykey = 'irid';
 	public $_fields = array (
@@ -59,7 +60,8 @@ class invoiceReceivables extends DooModel {
 			'bindDate',
 			'unbundlingTime',
 			'accountClerk',
-			'sourcePrice' 
+			'sourcePrice',
+			'bankBatchNumber' 
 	);
 	public function getSumOfReceivablesPrice($iridString = "") {
 		if (empty ( $iridString ))
@@ -102,19 +104,35 @@ class invoiceReceivables extends DooModel {
 		}
 		return $list;
 	}
+	public function getInvoiceReceivablesByBBN($bankBatchNumber = "") {
+		if (empty ( $bankBatchNumber ))
+			return array ();
+		$list = $this->find ( array (
+				'where' => "bankBatchNumber= '".$bankBatchNumber."'",
+				'asArray' => TRUE 
+		) );
+		return $list;
+	}
 	
 	/**
 	 * 获得最近录入发票,不包含已经绑定的
 	 */
 	public function getInvoiceReceivablesByInput() {
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
 		$list = $this->find ( array (
-				'where' => "bindStatus=0",
+				'where' => "bindStatus=0 and iid=0",
 				'desc' => 'irid',
 				'asArray' => TRUE 
 		) );
 		
 		foreach ( $list as $key => $value ) {
-			$list [$key] ['receivablesCategory'] = explode ( ':', $value ['receivablesCategory'] );
+			if ($value ['receivablesCategory'] != 'PUBLIC')
+				$list [$key] ['receivablesCategory'] = explode ( ':', $value ['receivablesCategory'] );
+			
+			$list [$key]['iridKeyXD'] = $XDeode->encode ( $value ['irid'] );
 			
 			if ($value ['receivablesStaff'] != 'PUBLIC')
 				$list [$key] ['receivablesStaff'] = explode ( '-', $value ['receivablesStaff'] );
@@ -137,7 +155,7 @@ class invoiceReceivables extends DooModel {
 		$query = Doo::db ()->query ( $sql );
 		$list = $query->fetchAll ();
 		
-		if (empty($list))
+		if (empty ( $list ))
 			return array ();
 		if ($list [0] ['irid'] == NULL) {
 			return array ();
@@ -160,7 +178,6 @@ class invoiceReceivables extends DooModel {
 		return $list;
 	}
 	public function getInvoiceReceivablesByClaim($cid = 0, $sid = 0) {
-		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		
@@ -196,7 +213,7 @@ class invoiceReceivables extends DooModel {
 				$staff = explode ( "-", $value ['receivablesStaff'] );
 				$list ['arClaim'] [$key] ['sid'] = $staff [0];
 				$list ['arClaim'] [$key] ['username'] = $staff [1];
-				$list ['arClaim'] [$key]['iridKey']=$XDeode->encode ( $value ['irid'] );
+				$list ['arClaim'] [$key] ['iridKey'] = $XDeode->encode ( $value ['irid'] );
 			}
 			
 			$list ['myClaim'] = $this->find ( array (
@@ -405,7 +422,6 @@ class invoiceReceivables extends DooModel {
 		}
 		return $list;
 	}
-	
 	function getInvoiceReceivablesByConditionPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
 		if (empty ( $limit ))
 			return array ();
@@ -413,9 +429,9 @@ class invoiceReceivables extends DooModel {
 		$sql = 'select group_concat(b.invoiceSerial) as invoiceSerial ,group_concat(b.iid) as invoiceId ,a.*,b.invoicePrice
 				from ' . $this->_table . ' as a left join CLD_invoice as b on
 				   find_in_set(b.iid,a.iidExtend) or a.iid=b.iid 
-				where ' . $con . ' group by a.irid ORDER BY  ' . $descField . ' '.$desc.' limit ' . $limit . '
+				where ' . $con . ' group by a.irid ORDER BY  ' . $descField . ' ' . $desc . ' limit ' . $limit . '
 				';
-
+		
 		$query = Doo::db ()->query ( $sql );
 		$list = $query->fetchAll ();
 		
@@ -428,11 +444,11 @@ class invoiceReceivables extends DooModel {
 			
 			$invoiceSerial = explode ( ',', $value ['invoiceSerial'] );
 			$invoiceId = explode ( ",", $value ['invoiceId'] );
-			if (empty($invoiceSerial[0]))
-				$list [$key] ['invoiceList'] =array();
-			else{
+			if (empty ( $invoiceSerial [0] ))
+				$list [$key] ['invoiceList'] = array ();
+			else {
 				foreach ( $invoiceId as $k => $v ) {
-					if (!empty($v))
+					if (! empty ( $v ))
 						$invoiceId [$k] = $XDeode->encode ( $v );
 				}
 				$list [$key] ['invoiceList'] = array_combine ( $invoiceId, $invoiceSerial );
@@ -440,14 +456,13 @@ class invoiceReceivables extends DooModel {
 			
 			$list [$key] ['iridKeyK'] = $XDeode->encode ( $value ['irid'] );
 			$list [$key] ['iridKey'] = $this->authcode ( $value ['irid'], '' );
-
+			
 			$list [$key] ['irolg'] = $invoiceROLog->getInvoiceROLogByIrid ( $value ['irid'], 'desc' );
 		}
-		//print_r($list);
+		// print_r($list);
 		
 		return $list;
 	}
-	
 	function getReceivablesByUntreadStatusPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
 		if (empty ( $limit ))
 			return array ();

+ 14 - 3
protected/model/invoiceStatistics.php

@@ -201,12 +201,23 @@ class invoiceStatistics extends DooModel {
 		
 		return $list;
 	}
-	public function getStatisticsByMonth() {
+	public function getStatisticsByMonth($sid=0) {
 		$month = date ( "m" );
 		$year = date ( "Y" );
+		if(empty($sid)){
+			$list ['statisticsMonth'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsMonth'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['accountPrice'] = 0;
+			$list ['statisticsMonth'] [0] ['month'] = $month;
+			$list ['statisticsYear'] [0] ['invoicePrice'] = 0;
+			$list ['statisticsYear'] [0] ['receivablesPrice'] = 0;
+			$list ['statisticsYear'] [0] ['accountPrice'] = 0;
+			$list ['statisticsYear'] [0] ['month'] = $month;
+			return $list;
+		}
 		$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,
+				'where' => " cid!=0 and staff=".$sid." and Year(date) =" . $year . " and Month(date)=" . $month,
 				'groupby' => 'Month(date)',
 				'asArray' => TRUE 
 		) );
@@ -218,7 +229,7 @@ class invoiceStatistics extends DooModel {
 		}
 		$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,
+				'where' => " cid!=0 and staff=".$sid." and Year(date) =" . $year,
 				'groupby' => 'Year(date)',
 				'asArray' => TRUE 
 		) );

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

@@ -81,14 +81,18 @@
 							<th>注册地址~电话</th>
 							<th>开户银行~账号</th>
 							<th>发票备注</th>
-							<th>收件人~电话</th>
-							<th>收件地址</th>
-							<th>邮寄物品</th>
 							
 							<th>开票内容</th>
 							<th>数量</th>
 							<th>单价</th>
 							<th>开票金额</th>
+							
+							
+							<th>收件人~电话</th>
+							<th>收件地址</th>
+							<th>邮寄物品</th>
+							
+							
 							<th>提交开票</th>
 							<th>审批意见</th>
 							<th>完成审批</th>
@@ -168,7 +172,7 @@ $(document).ready( function () {
     });
 	
 	
-	 
+	 setSearchLo('approval');
 	
 } );
 
@@ -232,6 +236,7 @@ function nodeInvoice(iidKey){
 		error : function(err) {
 			$("div[loading-msg='true']").html("");
 		}
+
 	});
 	}
 

+ 137 - 2
protected/view/admin/invoiceReceivables.html

@@ -1,9 +1,61 @@
 <!-- include 'header' -->
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.queue.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/fileprogress.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/handlers.js"></script>
+
 <link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css">
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
 <script src="<?= WEB_SITE_GLOBAL ?>js/invoice.validator.js"></script>
 <script src="<?= WEB_SITE_GLOBAL ?>js/invoice.js"></script>
+
+<script type="text/javascript">
+		var swfu;
+
+		window.onload = function() {
+			var settings = {
+				flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
+				upload_url: "/invoiceReceivablesBankUpload",	// Relative to the SWF file
+				
+				file_size_limit : "8 MB",
+				file_types : "*.xlsx",
+				file_types_description : "*.xlsx",
+				file_upload_limit : 8,
+				file_queue_limit : 1,
+				custom_settings : {
+					progressTarget : "fsUploadProgress",
+					cancelButtonId : "btnCancel"
+				},
+				debug: false,
+
+				// Button settings
+				button_image_url: "<?= WEB_SITE_GLOBAL ?>images/btn-normal1.jpg",	// Relative to the Flash file
+				
+				button_width: "200",
+				button_height: "40",
+				button_placeholder_id: "spanButtonPlaceHolder",
+				//button_text: '<span class="theFont">浏览</span>',
+				//button_text_style: ".theFont { font-size: 16; }",
+				//button_text_left_padding: 12,
+				//button_text_top_padding: 3,
+
+				// The event handler functions are defined in handlers.js
+				file_queued_handler : fileQueued,
+				file_queue_error_handler : fileQueueError,
+				file_dialog_complete_handler : fileDialogComplete,
+				upload_start_handler : uploadStart,
+				upload_progress_handler : uploadProgress,
+				upload_error_handler : uploadError,
+				upload_success_handler : uploadSuccess,
+				upload_complete_handler : uploadComplete,
+				queue_complete_handler : queueComplete	// Queue plugin event
+			};
+
+			swfu = new SWFUpload(settings);
+	     };
+	</script>
+
 <body>
 	<div class="mainLayout">
 		<div class="mainMenu">
@@ -24,6 +76,7 @@
 			<div class="adminContent autoHeight">
 				<div class="borad-menu">
 					<a href="#inputbill" data-toggle="modal" class="invoice">录入收款</a>
+					<a href="#batch" data-toggle="modal" class="invoice">导入银行到款</a>
 				</div>
 				
 				<div class="borad-news">
@@ -82,7 +135,8 @@
 							<!-- if !empty({{receivablesInput}}) -->
 							<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><th class="taC">开票单位</th><th class="taC" width="80">绑定发票</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>
+								<th class="taC" width="160">绑定发票</th></tr>
 								
 								<!-- loop receivablesInput -->
 								<tr>
@@ -106,8 +160,12 @@
 									{{receivablesInput' value.recepitTitleMark}}
 									</td>
 									<td>
-									<!-- if {{receivablesInput' value.bindStatus}}==0&&{{receivablesInput' value.receivablesStaff}}!='PUBLIC'  -->
+									
+									<!-- if {{receivablesInput' value.bindStatus}}==0&&{{receivablesInput' value.receivablesCategory}}!='PUBLIC'  -->
 									<a class="button btn-block" href="#search-invoice" bind-invoice='receivables' node-key="{{receivablesInput' value.iridKey}}" data-toggle="modal">查询发票</a>
+									<!-- elseif {{receivablesInput' value.bindStatus}}==0&&{{receivablesInput' value.receivablesCategory}}=='PUBLIC' -->
+									<a class="button btn-inline" href="#claim" node-claim="receivables" data-key="{{receivablesInput' value.iridKeyXD}}" data-toggle="modal">设置认领</a>
+									<a class="button btn-inline" href="#search-invoice" bind-invoice='receivables' node-key="{{receivablesInput' value.iridKey}}" data-toggle="modal">查询发票</a>
 									<!-- endif -->
 									</td>
 								</tr>
@@ -302,6 +360,42 @@
 </div>
 	
 	
+	<form action="/invoiceReceivablesImport" method="post" name="receivablesInvoice" class="nice-validator n-default" novalidate="novalidate">
+	<input type="hidden" id="enclosurName" name="bankName" value="">
+	<div class="modal hide fade" id="batch">
+		<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 class="taC" colspan="4">选择Excel文件</th>
+						</tr>
+						<tr>
+							<td>
+<div class="controls">
+			            	<span id="spanButtonPlaceHolder"></span>	
+							<input id="btnCancel" type="button" value="取消所有上传" style="display:none"  onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />			
+			            </div>
+						<span class="fieldset flash" id="fsUploadProgress"></span>
+						<span id="divStatus">0 个文件已上传</span>
+
+
+							</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>
+	</div>
+	</form>
 	
 	
 	
@@ -414,7 +508,48 @@
 			</div>
 		</div>
 	</div>
+	</form>
+</div>
+	
+
+	
+
+	<div class="modal hide fade" id="claim">
+	<form action="/setInvoiceReceivablesClaim" id="SIRC" method="post">	
+	<input type="hidden" name="iridKey" id="iridKey" value="">
+	<div class="modal-dialog">
+		<div class="modal-content">
+		<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">
+					<select name="receivablesCategory">
+
+					<option post-data="PUBLIC" value="PUBLIC" >公共待认领款项</option>
+					<!-- loop category -->
+					<option <!-- if {{category' value.cid}} == {{staff.0.cid}}  --> selected <!-- endif --> post-data="{{category' value.cid}}" value="{{category' value.cid}}:{{category' value.title}}" >{{category' value.title}}</option>
+					<!-- endloop -->
+
+
+					</select>
+				</div>
+			</div>
+		</form>
+		</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>
+
 	
 	<!--弹出内容-->
 <script type="text/javascript">autoFlashHeight();</script>	

+ 47 - 1
protected/view/admin/invoiceReceivablesAS.html

@@ -81,7 +81,7 @@
 						<td>{{list' value.receivablesBank}}<br>{{list' value.receivablesDate}}</td>
 						<td>{{list' value.inputStaff}} <br>{{list' value.date}}</td>
 						<td>
-						<!-- if {{list' value.receivablesStaff}}!='PUBLIC' -->
+						<!-- if {{list' value.receivablesCategory}}!='PUBLIC' -->
 						{{list' value.irolg.operation}}<br/>{{list' value.confirmTime}}
 						<!-- endif -->
 						</td>
@@ -116,6 +116,12 @@
 						<!-- elseif {{list' value.bindStatus}}==0 &&(!empty({{list' value.iid}})||!empty({{list' value.iidExtend}})) -->
 						<a href="#Unbundling" data-isKey="{{list' value.iridKey}}" node-unBundLing data-toggle="modal">解绑</a>
 						<!-- endif -->
+						
+						<br/>
+						<!-- if {{list' value.receivablesCategory}}=='PUBLIC' -->
+						<a  href="#claim" node-claim="receivables" data-key="{{receivablesInput' value.iridKeyK}}" data-toggle="modal">设置认领</a>
+						<!-- endif -->
+						
 						</td>
 						</tr>
 					<!-- endloop -->
@@ -363,8 +369,48 @@
 			</div>
 		</div>
 	</div>
+	</form>
+</div>
+	
+	
+	<div class="modal hide fade" id="claim">
+	<form action="/setInvoiceReceivablesClaim" id="SIRC" method="post">	
+	<input type="hidden" name="iridKey" id="iridKey" value="">
+	<input type="hidden" name="action"  value="invoiceReceivablesAS">
+	<div class="modal-dialog">
+		<div class="modal-content">
+		<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">
+					<select name="receivablesCategory">
+
+					<option post-data="PUBLIC" value="PUBLIC" >公共待认领款项</option>
+					<!-- loop category -->
+					<option <!-- if {{category' value.cid}} == {{staff.0.cid}}  --> selected <!-- endif --> post-data="{{category' value.cid}}" value="{{category' value.cid}}:{{category' value.title}}" >{{category' value.title}}</option>
+					<!-- endloop -->
+
+
+					</select>
+				</div>
+			</div>
+		</form>
+		</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>
 	
+	
 	<!--弹出内容-->
 <script type="text/javascript">autoFlashHeight();</script>	
 </body>

+ 11 - 13
protected/view/admin/invoiceTrainingDetail.html

@@ -13,6 +13,7 @@
 
 
 <style type="text/css"> 
+
  div.dataTables_wrapper {
         width: 100%;
     }
@@ -20,6 +21,7 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 </style> 
 
 <script type="text/javascript">
+
 		var swfu;
 
 		window.onload = function() {
@@ -453,18 +455,13 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 							<tr><th class="taC" width="150">Excel模板</th><td><a href="/upload/invoiceTraining/培训班模板.xlsx">下载</a></td></tr>
 							<tr><th class="taC" width="150">选择Excel文件</th>
 							<td>
-						<div class="controls">
-							
-							
-			            <span id="spanButtonPlaceHolder"></span>
-										
-						<input id="btnCancel" type="button" value="取消所有上传" style="display:none"  onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
-									
-										
-			             </div>
 							
-							<span class="fieldset flash" id="fsUploadProgress"></span>
-									<span id="divStatus">0 个文件已上传</span>
+						<div class="controls">
+			            	<span id="spanButtonPlaceHolder"></span>	
+							<input id="btnCancel" type="button" value="取消所有上传" style="display:none"  onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />			
+			            </div>
+						<span class="fieldset flash" id="fsUploadProgress"></span>
+						<span id="divStatus">0 个文件已上传</span>
 							
 							
 							</td></tr>
@@ -515,7 +512,7 @@ $(document).ready( function () {
 //     	fixedColumns:   {
 //             leftColumns: 3
 //         }
-    	
+
     	
     });
 	
@@ -570,8 +567,9 @@ $(document).ready( function () {
 			$("input[id=appBatchStoreKey]").val(idstr);
 			
 		});
-	 
 	
+		setSearchLo('tran');
+
 } );
 
 </script>