ERP-node/WebContent/WEB-INF/view/distribution/sendFileList.jsp

182 lines
5.3 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<!-- //JSTL 변수선언 -->
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
<c:set var="nPage" value="${empty param.page?1:param.page}" />
<c:set var="pageIndex" value="${(nPage-1)/10}" />
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
<script>
$(function(){
$(document).ready(function(){
$("#btn_search").click(function(){
fn_search();
});
//엔터키로 조회
$("input").keyup(function(e){
if(e.keyCode == 13){
fn_search();
}
});
//등록
$("#btnRegist").click(function(){
window.open("/distribution/sendFileFormPopup.do", "popup1", "width=920, height=555, resizable=no");
});
//상세
$(".btnDetail").click(function(){
var objId = $(this).attr("data-OBJID");
window.open("/distribution/sendFileDetailPopup.do?objId="+objId, "popup1", "width=920, height=555, resizable=no");
});
});
});
//팝업 호출
function fn_sendFileDetailPopup(objId){
var url = "/distribution/distributionDetailViewPopup.do?objId="+objId;
window.open(url, target, "width=920, height=415, resizable=no");
}
function fn_search(){
document.form1.action="/distribution/sendFileList.do";
document.form1.submit();
}
</script>
</head>
<body class="backcolor">
<form name="form1" id="form1" action="" method="post">
<section class="min_part_search">
<div class="plm_menu_name">
<h2>
<span>파일전송</span>
</h2>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="align_r">
<label>제목</label>
</td>
<td>
<input type="text" id="search_subject" name="search_subject" value="${param.subject}" style="width:250px;">
</td>
</tr>
</tbody>
</table>
</div>
<div class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="파일 등록" class="plm_btns" id="btnRegist">
<input type="button" value="조회" class="plm_btns" id="btn_search">
</div>
</div>
<div class="plm_table_wrap">
<table class="plm_table">
<colgroup>
<col width="3%" />
<col width="*" />
<col width="10%" />
<col width="20%" />
<col width="10%" />
</colgroup>
<tr class="plm_thead">
<td>No</td>
<td>제목</td>
<td>작성자</td>
<td>수신인</td>
<td>배포일</td>
</tr>
<c:choose>
<c:when test="${empty LIST}">
<tr>
<td colspan="5">조회된 정보가 없습니다.</td>
</c:when>
<c:otherwise>
<c:forEach var="info" items="${LIST}">
<tr>
<td>${info.RNUM}</td>
<td><a href="#" class="btnDetail" data-OBJID="${info.OBJID}">${info.TITLE}</a></td>
<td>${info.WRITER_DEPT_NAME} ${info.WRITER_USER_NAME}</td>
<td>
<c:choose>
<c:when test="${info.RECEIVER_CNT eq 0}">
-
</c:when>
<c:when test="${info.RECEIVER_CNT eq 1}">
${info.RECEIVER_USER_TYPE_NAME} ${info.RECEIVER_DEPT_NAME} ${info.RECEIVER_USER_NAME}
</c:when>
<c:when test="${info.RECEIVER_CNT > 1}">
${info.RECEIVER_USER_TYPE_NAME} ${info.RECEIVER_DEPT_NAME} ${info.RECEIVER_USER_NAME} 외 ${info.RECEIVER_CNT-1} 명
</c:when>
<c:otherwise>
${info.RECEIVERS}
</c:otherwise>
</c:choose>
</td>
<td>${info.REGDATE}</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
<div class="pdm_page">
<input type="hidden" name="page" id="page" value="${nPage}">
<c:if test="${!empty LIST}">
<div class="page_pro">
<table>
<tr>
<c:choose>
<c:when test="${nPage > 1}">
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
</c:otherwise>
</c:choose>
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
<c:if test="${status.index -1 < maxPage}">
<c:choose>
<c:when test="${status.index eq nPage}">
<td><a href="#" class="now_page">${nPage}</a></td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
<c:choose>
<c:when test="${nPage < maxPage}">
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
</c:when>
<c:otherwise>
<td class="no_more_page">next</td>
</c:otherwise>
</c:choose>
</tr>
</table>
<p class="page_counter">총 ${totalCount}건</p>
</div>
</c:if>
</div>
</div>
</section>
</form>
</body>
</html>