<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page import="kcg.faics.sec.LoginUserVO"%>
<% 
	LoginUserVO userVO = (LoginUserVO) session.getAttribute("userVO");
%>
<script type="text/javaScript" defer="defer">
	<!--
	window.onload = function() {
		if (${fail}) {
			alert('입력에 실패하였습니다.');
		}
	}
	/* 목록 화면 function */
    function fn_searchList() {
       	document.searchForm.action = "<c:url value='/equip/useStateList.do'/>";
       	document.searchForm.submit();
    }
	/* 등록 function */
    function fn_goAdd() {
       	document.searchForm.action = "<c:url value='/equip/useStateAdd.do'/>";
       	document.searchForm.submit();
    }
	//-->
</script>
<div id="table">
	<form:form commandName="searchVO" name="searchForm" method="post">
		<form:hidden path="year"/>
		<form:hidden path="quater"/>
		<form:hidden path="police"/>
		<form:hidden path="type"/>
		<!--  -->
		<div id="print_area">
		<div id="this_title" class="title" style="display: none;margin: 10px 0 10px 0;"> 외사장비 사용실적 출력  <span>(출력일자 : {=date('Y-m-d')})</span></div>
		
		<div class="pageinfo">
			<ul class="left">
				<li>${searchVO.year}년도 <em>${searchVO.quater} / 4분기&nbsp;&nbsp;</em></li>	
				<li>${userVO.place1Str}</li>
			</ul>	
    	</div>
		
		<table class="tbl_add" border="0" cellspacing="0" cellpadding="0" >
			<colgroup>
	  			<col width="180">
	  			<col width="">  			
	  			<col width="">  			
	  			<col width="">  			
	  			<col width="">  			
  			</colgroup>
			<thead>
				<tr class="border">
					<th align="center">구분</th>
					<th align="center">장비사용</th>
					<th align="center">사용실적</th>
					<th align="center">점검횟수</th>
					<th align="center">장비상태</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="equip" items="${equipList}" varStatus="status">
					<tr>
						<td class="title text" ><c:out value="${equip.codenm}" /></td>
						<td class="number"><input type="text" name="<c:out value="${equip.code2}" />_cnt" value="<c:out value="${equip.eu_cnt}" />"></td>
						<td class="text"><textarea rows="" cols="" name="<c:out value="${equip.code2}" />_detail"><c:out value="${equip.eu_detail}" /></textarea></td>
						<td class="number"><input type="text" name="<c:out value="${equip.code2}" />_check" value="<c:out value="${equip.eu_check}" />"></td>
						<td class="data"><input type="text" name="<c:out value="${equip.code2}" />_state" value="<c:out value="${equip.eu_state}" />"></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		</div>
		
		<div class="boardviewinfo">
			<ul class="right btn-style">
				<c:if test="${userVO.authAdmin == '1' && userVO.place1 == searchVO.police}">
				<li><a href="javascript:fn_goAdd();"><spring:message code="button.save" /></a></li>
				<li><a href="javascript:fn_searchList();"><spring:message code="button.cancel" /></a></li>
				</c:if>
				<li><a href="javascript:fn_searchList();"><spring:message code="button.list" /></a></li>
			</ul>
		</div>
		
		<!-- <ul style="float:left">
			<c:if test="${userVO.authAdmin == '1' && userVO.place1 == searchVO.police}">
				<li>
       	            <span class="btn_blue_l">
       	                <a href="javascript:fn_goAdd();"><spring:message code="button.save" /></a>
       	                <img src="<c:url value='/images/rte/btn_bg_r.gif'/>" style="margin-left:6px;" alt=""/>
       	            </span>
       	        </li>
				<li>
       	            <span class="btn_blue_l">
       	                <a href="javascript:fn_searchList();"><spring:message code="button.cancel" /></a>
       	                <img src="<c:url value='/images/rte/btn_bg_r.gif'/>" style="margin-left:6px;" alt=""/>
       	            </span>
       	        </li>
			</c:if>
				<li>
       	            <span class="btn_blue_l">
       	                <a href="javascript:fn_searchList();"><spring:message code="button.list" /></a>
       	                <img src="<c:url value='/images/rte/btn_bg_r.gif'/>" style="margin-left:6px;" alt=""/>
       	            </span>
       	        </li>
			</ul> -->
	</form:form>
</div>