<!-- include '../admin/header' -->

<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>
<script >
function receiptYear(){
	 var form = $('#up'); 
	 $('#year').val($('#Y').val());
	 form.submit();  
}
</script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include '../admin/menuReceipt' -->
					</ul>
			</div>
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<ul>
						<!-- include '../admin/receipt_menu' -->
					</ul>
				</div>
			</div>
			<div class="adminContent autoHeight" style="height: 821px;">
				<legend>办事处 全年费用汇总</legend>
			<div class="demandCate">
			
			
					<ul class="cateList">
					<form action="/receiptSummaryStatisticsByAgency" id="up" method="post">
					
	  					<li><a href="saea-dlist-category-year.html">办事处</a><a href="saea-dlist-category-year2.html" class="now">办事处明细</a><a href="saea-dlist-staff-year.html">员工</a></li>
	  					<li>
	  					<select name="year" id="Y" onchange="receiptYear();">
	  					{{dateHtml}}
	  					</select>
	  					</li>
	  					<li><a href="#view-setting" data-toggle="modal">显示设置</a></li>
	  					</form>
	  					
	  					<form action="/exportReceiptSummaryExcel"  method="post">
	  					<input type="hidden" name="summaryData" value="{{summarData}}">
	  					<input type="hidden" name="year" value="{{year}}">
	  					<li>
	  					<input type="submit" class="button" value="导出Excel">
	  					</li>
	  					</form>
	  			</ul>
	  		
	  			
	  		</div>
	  		<div class="saeaList">
	  			<div class="entry">
	  				<table id="example" class="table table-bordered table-condensed table-hover">
							<thead>
								<tr>
								<th class="taC" rowspan="3">费用项</th>
								<th class="taC" rowspan="2" colspan="6">收入</th>
								<th class="taC" colspan="56">支出</th>
								</tr>
								<tr>
								{{sectionHtml}}
								</tr>
								<tr>
								<th>利润</th>
								<th>利润占比</th>
								<th>收入合计</th>
								<th>软件收入</th>
								<th>培训及其他收入</th>
								<th class="colGreen">费用合计</th>
								
								{{sectionItemHtml}}
								
								
								</tr>
							</thead>
	  					<tbody>
	  					
	  					
	  					
							
							
							
							{{summaryDateHtml}}
							
							
  					
  					</table>
	  			</div>
			</div>
		</div>
	</div>
	<!--弹出 显示设置-->
<div class="modal hide fade" id="export">
	<div class="modal-dialog">
        <div class="modal-content">
		    <div class="modal-header">
		    <h3>显示设置</h3>
		    </div>
		    <div class="modal-body">
		    	<a href="#">2019办事处费用明细.xls</a>
		    </div>
			<div class="modal-footer">
			    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
			</div>
		</div>
	</div>
</div>
    <!--结束弹出 显示设置-->
    
<div class="modal hide fade" id="view-setting">
	<form action="/setSummaryCategory"  method="post">
	<div class="modal-dialog">
        <div class="modal-content">
		    <div class="modal-header">
		    <h3>显示设置</h3>
		    </div>
		    <div class="modal-body">
		    <!-- loop categoryList -->
		    	<label class="checkbox inline"><input type="checkbox" name="cidKey[]" {{categoryList' value.checked}} value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</label>
		    <!-- endloop -->
		    	
		    </div>
			<div class="modal-footer">
				<button type="submit"  class=" button " >确定</button>
			    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
			</div>
		</div>
	</div>
	</form>
</div>
    
   
   
<script type="text/javascript">
$(document).ready( function () {
	
	//var data = 
	var wHeight=$(window).height()-360;
	
	var table =$('#example').DataTable({
		//data:data,
		searching:false,
		paging:false,
		bInfo:false,
    	language: {
    		"sProcessing": "处理中...",
    		"sLengthMenu": "显示 _MENU_ 项结果",
    		"sSearch": "搜索:",
    		"sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
    		"sEmptyTable": "表中数据为空",
    		 "oPaginate": {
    	            "sFirst": "首页",
    	            "sPrevious": "上页",
    	            "sNext": "下页",
    	            "sLast": "末页"
    	        },
    		 "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
    	},
    	
    	scrollY:        wHeight+"px",
        scrollX:        true,
        scrollCollapse: true,
        
     	fixedColumns:   {
             leftColumns: 1
         }
    });
	
	
		

} );

</script>   
   
   
   
    
    
    
    
    
    
    
<script type="text/javascript">autoFlashHeight();</script>
</body>
