<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<form name="searchForm" method="post">
	<div class="pageinfo">	
		<ul class="right btn-style">	
			
			<li><a href="javascript:location.reload();" class="btn_reset"></a></li>
			<li><a class="btn_print" href="javascript:fn_goPrint();"></a></li>
			<li><a class="btn_excel" href="javascript:fn_goExcel();"></a></li>
		</ul>
	</div>
</form>

<div id="table">
	<table class="tbl_listview2" width="100%" border="0" cellpadding="0" cellspacing="0">
		<colgroup>
   			<col width="176"/>
   			<col width="60"/>
   			<col width="60"/>
   			<col width="60"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
   			<col width="46"/>
	    </colgroup>	   	
		<thead>
			<tr>
				<th rowspan=3>구분</th>
				<th colspan=3>정현원</th>
				<th colspan=14>계급별 현황</th>
			</tr>
			<tr>
				<th rowspan=2>정원</th>
				<th rowspan=2>현원</th>
				<th rowspan=2>과부족</th>
				<th colspan=2>총경</th>
				<th colspan=2>경정</th>
				<th colspan=2>경감</th>
				<th colspan=2>경위</th>
				<th colspan=2>경사</th>
				<th colspan=2>경장</th>
				<th colspan=2>순경</th>
			</tr>
			<tr>
				<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>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${resultList}" var="item">
			<tr>
				<td align="left"><c:out value="${item.codenm}"/></td>
				<td align="right"><c:out value="${item.tot_cnt}"/></td>
				<td align="right"><c:out value="${item.current_cnt}"/></td>
				<td align="right"><c:out value="${item.excess}"/></td>
				<td align="right"><c:out value="${item.position204}"/></td>
				<td align="right"><c:out value="${item.cnt_204}"/></td>
				<td align="right"><c:out value="${item.position203}"/></td>
				<td align="right"><c:out value="${item.cnt_203}"/></td>
				<td align="right"><c:out value="${item.position202}"/></td>
				<td align="right"><c:out value="${item.cnt_202}"/></td>
				<td align="right"><c:out value="${item.position201}"/></td>
				<td align="right"><c:out value="${item.cnt_201}"/></td>
				<td align="right"><c:out value="${item.position104}"/></td>
				<td align="right"><c:out value="${item.cnt_104}"/></td>
				<td align="right"><c:out value="${item.position103}"/></td>
				<td align="right"><c:out value="${item.cnt_103}"/></td>
				<td align="right"><c:out value="${item.position102}"/></td>
				<td align="right"><c:out value="${item.cnt_102}"/></td>
			</tr>			
			</c:forEach>
		</tbody>
	</table>
</div>
<script type="text/javaScript" defer="defer">
	<!--
    /* 화면 출력 function */
    function fn_goPrint() {
    	var printThis = document.getElementById("table").innerHTML;
    	printDiv(printThis);
    }
    
    /* 엑셀 다운로드 function */
    function fn_goExcel() {
       	document.searchForm.method = "post";
       	document.searchForm.action = "<c:url value='/fa/memberManagePersonnelExcel.do'/>";
       	document.searchForm.submit();
    }
	//-->
</script>