300 lines
11 KiB
Plaintext
300 lines
11 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"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
|
|
<!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 type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$(document).ready(function(){
|
|
fnc_datepick();
|
|
});
|
|
|
|
//체크된 제품 목록의 상태 활성화 및 비활성화 변경
|
|
$(".btnActive").click(function(){
|
|
var buttonType = $(this).attr("buttonType");
|
|
|
|
var choice = [];
|
|
$("input[name='choice']:checked").each(function(i){
|
|
choice.push($(this).val());
|
|
});
|
|
if(choice == ''){
|
|
Swal.fire("제품을 선택하세요.");
|
|
}
|
|
else if(confirm("상태를 변경하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/admin/updateCheckExchangeRateStatus.do",
|
|
type:"POST",
|
|
data:{"actionType":buttonType, "choice":choice},
|
|
dataType:"text",
|
|
success:function(data){
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
})
|
|
}
|
|
});
|
|
|
|
//엑셀 다운로드
|
|
$("#btnExcel").click(function(){
|
|
document.form1.action = "/admin/getExchangeRateMngList.do?actionType=excel";
|
|
document.form1.submit();
|
|
});
|
|
|
|
//체크박스 전체선택/전체해제
|
|
$("#allCheck").click(function(){
|
|
if($("#allCheck").prop("checked")) {
|
|
$("input[type=checkbox]").prop("checked",true);
|
|
} else {
|
|
$("input[type=checkbox]").prop("checked",false);
|
|
}
|
|
});
|
|
|
|
// 부분체크해제
|
|
$("input[name=choice]").click(function(){
|
|
if($("#allCheck").is(":checked")){
|
|
$("#allCheck").prop("checked",false);
|
|
}
|
|
});
|
|
|
|
//제품수정
|
|
$(".btnModify").click(function(){
|
|
var objid = $(this).attr("data-OBJID");
|
|
var actionType = $(this).attr("data-actionType");
|
|
fnc_exchangeRateFormPopup(objid, actionType);
|
|
});
|
|
|
|
//엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
});
|
|
|
|
//제품 생성
|
|
function fnc_exchangeRateFormPopup(YYYY_MM, actionType){
|
|
var params = "";
|
|
params += "?YYYY_MM="+YYYY_MM;
|
|
params += "&actionType="+actionType;
|
|
//window.open("/admin/exchangeRateFormPopup.do"+params,"exchangeRateFormPopup","width=450,height=450");
|
|
|
|
var url = "/admin/exchangeRateFormPopup.do"+params;
|
|
var target = "exchangeRateFormPopup";
|
|
var popup_width = 450;
|
|
var popup_height = 450;
|
|
fn_centerPopup(popup_width, popup_height, url, target);
|
|
}
|
|
|
|
//제품 목록 리스트에서 상태만 변경
|
|
function fnc_updateExchangeRateStatus(productMidObjid, productMidStatus){
|
|
var modifyExchangeRateStatus = confirm("제품의 상태를 전환하시겠습니까?");
|
|
if(modifyExchangeRateStatus) {
|
|
$.ajax({
|
|
url:"/admin/updateExchangeRateStatus.do",
|
|
type:"POST",
|
|
data:{"productMidObjid":productMidObjid, "productMidStatus":productMidStatus},
|
|
dataType:"text",
|
|
success:function(data){
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
//검색조건에 따라 제품 목록 리스트 출력
|
|
function fn_search(){
|
|
//if(fnc_dateFormChk($("#search_fromDate").val(),$("#search_toDate").val())){
|
|
document.form1.action="/admin/getExchangeRateMngList.do";
|
|
document.form1.submit();
|
|
//}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="status" id="status">
|
|
<input type="hidden" name="actionType" id="actionType" value="" />
|
|
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span>환율 관리</span>
|
|
</h2>
|
|
<div class="btnArea">
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch" >
|
|
<input type="button" value="환율 등록" class="plm_btns" onclick="javascript:fnc_exchangeRateFormPopup('', 'regist')">
|
|
<!--
|
|
<input type="button" value="활성화" class="plm_btns btnActive" buttonType="active">
|
|
<input type="button" value="비활성화" class="plm_btns btnActive" buttonType="inActive">
|
|
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
|
-->
|
|
</div>
|
|
</div>
|
|
<div id="plmSearchZon">
|
|
<div style='width:;float:;'>
|
|
<table>
|
|
<tr>
|
|
<td><label>년월</label></td>
|
|
<td>
|
|
<select name="YYYY" id="YYYY" style="width:90px;" class="select2" autocomplete="off" type="select" required>
|
|
<option value="">선택</option>
|
|
<c:forEach begin="2020" end="${sysYear+5}" var="req_year">
|
|
<option value="${req_year}"${param.YYYY eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
<select name="MM" id="MM" style="width:90px;" class="select2" autocomplete="off" type="select" required>
|
|
<option value="">선택</option>
|
|
<c:forEach begin="1" end="12" var="req_month">
|
|
<option value="${req_month}"${param.MM eq req_month ? 'selected':'' }>${req_month<10?"0":""}${req_month}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
<%--
|
|
<td class="label"><label>등록자</label></td>
|
|
<td><input type="text" id="search_writer" name="search_writer" value="${param.search_writer}" maxlength="8"></td>
|
|
<td class="label"><label>상태</label></td>
|
|
<td><select id="search_status" name="search_status">
|
|
<option value="">전체선택</option>
|
|
<option value="active" ${param.search_status eq 'active'?'selected':''}>활성화</option>
|
|
<option value="inActive" ${param.search_status eq 'inActive'?'selected':''}>비활성화</option>
|
|
</select></td>
|
|
<td class="label"><label>등록일</label></td>
|
|
<td colspan="3"><input type="text" id="search_fromDate" name="search_fromDate" class="date_margin" value="${param.search_fromDate}" readonly>
|
|
~ <input type="text" id="search_toDate" name="search_toDate" value="${param.search_toDate}" readonly>
|
|
<input type="button" class="date_delete" value="x" onclick="javascript:fnc_date_empty()"></td>
|
|
--%>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<section class="contents_page_basic_margin">
|
|
<div class="plm_table_wrap">
|
|
<table class="plm_table" style="margin-left:0;">
|
|
<colgroup>
|
|
<col width="*"> <!-- 환율 -->
|
|
<col width="*"> <!-- USD -->
|
|
<col width="*"> <!-- EU -->
|
|
<col width="*"> <!-- JAPAN -->
|
|
<col width="*"> <!-- CHINA -->
|
|
<col width="*"> <!-- VIETNAM -->
|
|
<col width="*"> <!-- RUB-->
|
|
<!--
|
|
<col width="*"> INR
|
|
-->
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>년월</td>
|
|
<td>USD</td>
|
|
<td>EUR</td>
|
|
<td>JPY</td>
|
|
<td>CNY</td>
|
|
<td>VND</td>
|
|
<td>RUB</td>
|
|
<!--
|
|
<td>INR</td>
|
|
-->
|
|
</tr>
|
|
</thead>
|
|
<tbody id="">
|
|
<c:choose>
|
|
<c:when test="${!empty exchangeRateList}">
|
|
<c:forEach var="info" items="${exchangeRateList}" varStatus="status">
|
|
<tr>
|
|
<td><a href="#" style="cursor:pointer;" class="btnModify" data-OBJID="${info.YYYY_MM}" data-actionType="modify" title="${info.YYYY_MM}">${info.YYYY_MM}</a></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_USD}" pattern="#,###.###" /></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_EU}" pattern="#,###.###" /></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_JAPAN}" pattern="#,###.###" /></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_CHINA}" pattern="#,###.###" /></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_VIETNAM}" pattern="#,###.###" /></td>
|
|
<td title=""><fmt:formatNumber value="${info.COST_RUB}" pattern="#,###.###" /></td>
|
|
<%--
|
|
<td title=""><fmt:formatNumber value="${info.COST_INR}" pattern="#,###.###" /></td>
|
|
--%>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr>
|
|
<td colspan="7" align="center">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}">
|
|
<c:if test="${!empty productMidMngList}">
|
|
<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 id="adminPageCount">총 ${totalCount}건</p>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |