ERP-node/WebContent/WEB-INF/view/dashboard/dashboardMatermgmtInfoList.jsp

151 lines
5.1 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/dashboardMatermgmtInfoList.do";
document.form1.submit();
}
function fn_goOriginalList(targetValue){
var targetYear = $("#Year").val();
var hiddenForm = document.hiddenForm;
var target = "matermgmtListPopUp";
window.open("",target,"width=1800, height=800, menubars=no, scrollbars=yes, resizable=yes");
hiddenForm.action = "/materMgmt/matermgmtListPopUp.do?Year="+targetYear+"&order_month="+targetValue;
hiddenForm.target = target;
hiddenForm.submit();
}
</script>
</head>
<body class="backcolor">
<form name="hiddenForm" id="hiddenForm" action="" method="post">
<input type="hidden" name="order_fromDate" id="order_fromDate">
<input type="hidden" name="order_toDate" id="order_toDate">
</form>
<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>
<input type="button" value="조회" class="plm_btns" id="btnSearch">
</td>
</tr>
</tbody>
</table>
</div>
<section class="contents_page_basic_margin" style="overflow-y:hidden;">
<div class="plm_table_wrap">
<p>※ 총 발주 금액(원) : <fmt:formatNumber value="${SUM_MONTH_TOTAL}"/> / 총 ${totalCount}건</p>
<div style="margin-right:10px;">
<table class="plm_table">
<colgroup>
<col width="*" /> <!-- 합계금액 -->
<c:if test="${!empty monthList}">
<c:forEach var="info" items="${monthList}" varStatus="status">
<col width="7.6%">
</c:forEach>
</c:if>
</colgroup>
<thead>
<tr class="plm_thead">
<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>
<tbody>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="13">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<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}" />
<c:set var="monthVal" value="${month.MONTH}" />
<td style="text-align:right; padding:0px 8px 0px 0px;" title="${item[colName]}"><a href="#" onclick="fn_goOriginalList('${monthVal}');"><fmt:formatNumber value="${item[colName]}"/></a></td>
</c:forEach>
</c:if>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</div>
</section>
</div>
</div>
</form>
</body>
</html>