ERP-node/WebContent/WEB-INF/view/materMgmt/matermgmtInfoList.jsp

191 lines
6.4 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String connector = person.getUserId();
%>
<!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}" />
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<c:set var="connector" value="<%=connector %>" />
<script type="text/javascript">
$(function(){
$(document).ready(function(){
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
$("#search_sup_cd").val("${param.search_sup_cd}");
});
});
//수주활동 검색 기능
function fn_search(){
document.form1.action = "/materMgmt/matermgmtInfoList.do";
document.form1.submit();
}
</script>
</head>
<body class="backcolor">
<form name="form1" id="form1" method="post">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name">
<h2>
<span>자재관리_발주 현황</span>
</h2>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td><label for="Year">연도</label></td>
<td>
<select name="Year" id="Year" class="select2" autocomplete="off">
<option value="">선택</option>
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
<option value="${req_year}"${param.Year eq req_year ? 'selected':'' }>${req_year}</option>
</c:forEach>
</select>
</td>
<td class="align_r">
<label for="" class="">공급업체명</label>
</td>
<td>
<select name="search_sup_cd" id="search_sup_cd" style="width:200px;" class="select2" autocomplete="off">
<option value="">전체</option>
<c:forEach var="item" items="${supCDList}" varStatus="varStatus">
<option value="${item.CODE_ID}">${item.CODE_NAME}</option>
</c:forEach>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<section class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
</div>
</div>
<div class="plm_table_wrap">
<p style="color:red;">※ 총 발주 금액(원) : ${SUM_MONTH_TOTAL}</p>
<table class="plm_table">
<colgroup>
<col width="*" /> <!-- 공급업체명 -->
<col width="*" /> <!-- 합계금액 -->
<c:if test="${!empty monthList}">
<c:forEach var="info" items="${monthList}" varStatus="status">
<col width="7%">
</c:forEach>
</c:if>
</colgroup>
<thead>
<tr class="plm_thead">
<td>공급업체명</td>
<td>합계금액</td>
<c:if test="${!empty monthList}">
<c:forEach var="info" items="${monthList}" varStatus="status">
<td>${info.MONTH_TITLE}</td>
</c:forEach>
</c:if>
</tr>
</thead>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="14">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<td title="${item.SUP_NAME}">${item.SUP_NAME}</td>
<td title="${item.MONTH_TOTAL}"><fmt:formatNumber value="${item.MONTH_TOTAL}"/></fmt></td>
<c:if test="${!empty monthList}">
<c:forEach var="month" items="${monthList}" varStatus="status">
<c:set var="colName" value="${month.MONTH_COL_NAME}" />
<td style="text-align:right; padding:0px 8px 0px 0px;" title="${item[colName]}"><fmt:formatNumber value="${item[colName]}"/></fmt></td>
</c:forEach>
</c:if>
</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 align="center">
<tr>
<c:choose>
<c:when test="${nPage > 1}">
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
<td>&nbsp;&nbsp;&nbsp;</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>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
<td>&nbsp;&nbsp;&nbsp;</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>
<c:if test="${!empty LIST}">
<p id="adminPageCount">총 ${totalCount}건</p>
</c:if>
</div>
</c:if>
</div>
</section>
</div>
</div>
</form>
</body>
</html>