204 lines
6.9 KiB
Plaintext
204 lines
6.9 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
|
|
<%@include file= "/init.jsp" %>
|
|
|
|
<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>
|
|
<link rel="stylesheet" href="css/basic.css">
|
|
<script>
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
var actionType = "${actionType}";
|
|
if(actionType == 'modify'){
|
|
$('#overlapCheckId').remove();
|
|
$('#overlapStatus').remove();
|
|
}
|
|
});
|
|
|
|
//fnc_addClassNumberOnly();
|
|
|
|
//엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
fnc_save();
|
|
}
|
|
});
|
|
$("#YYYY,#MM").change(function(){
|
|
var yyyy = $("#YYYY").val();
|
|
var mm = fnc_checkNull($("#MM").val());
|
|
$("#YYYY_MM").val(yyyy+(mm.length < 2 ? "0" : "")+mm);
|
|
var url = "/admin/exchangeRateFormPopup.do?"+$("#form1").serialize();
|
|
//window.open(url, "", "width=550, height=300");
|
|
window.location = url;
|
|
});
|
|
});
|
|
|
|
//공백 및 중복확인
|
|
function fnc_overlapCheck(){
|
|
var result;
|
|
var productMidName = $('#productMidName').val();
|
|
var productMidCode = $('#productMidCode').val();
|
|
if(!fnc_valitate('form1')){
|
|
$('#overlapStatus').empty();
|
|
}else{
|
|
$.ajax({
|
|
url:"/admin/productMidOverlapCheck.do",
|
|
type:"POST",
|
|
data:{"search_productMidName":productMidName},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(overlap){
|
|
if(overlap.PRODUCT_NAME == productMidName){
|
|
$('#overlapStatus').text("등록된 정보입니다.");
|
|
$('#productMidName').focus();
|
|
}else{
|
|
$('#overlapStatus').text("등록 가능한 정보입니다.");
|
|
$('#productMidName').focus();
|
|
}
|
|
result = overlap;
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
}
|
|
|
|
//저장
|
|
function fnc_save(){
|
|
|
|
if(fnc_valitate("form1")){
|
|
//var productMidDescription = $('#productMidDescription').val();
|
|
//var status = $('#status').val();
|
|
var actionType = "${param.actionType}";
|
|
|
|
if(confirm("저장하시겠습니까?")){
|
|
|
|
var yyyy = $("#YYYY").val();
|
|
var mm = fnc_checkNull($("#MM").val());
|
|
$("#YYYY_MM").val(yyyy+(mm.length < 2 ? "0" : "")+mm);
|
|
|
|
$.ajax({
|
|
url:"/admin/mergeExchangeRate.do",
|
|
type:"POST",
|
|
//data:{"productMidName":productMidName, "productMidObjid":productMidObjid, "status":status, "actionType":actionType,
|
|
// "productGroupObjid":productGroupObjid, "productMidCode":productMidCode, "productMidDescription":productMidDescription},
|
|
data: $("#form1").serialize(),
|
|
dataType:"text",
|
|
async:false,
|
|
success:function(data){
|
|
opener.fn_search();
|
|
alert('저장하였습니다.');
|
|
self.close(0);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form id="form1" name="form1" method="post">
|
|
<input type="hidden" id="YYYY_MM" name="YYYY_MM" value="${param.YYYY_MM}">
|
|
<section id="commonSection" class="admin_min">
|
|
<div class="admin_title">
|
|
<h2>환율 관리</h2>
|
|
</div>
|
|
<div id="adminPopupFormWrap">
|
|
<table id="adminPopupForm">
|
|
<colgroup>
|
|
<col width="30%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tbody>
|
|
<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}"${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}"${MM eq req_month ? 'selected':'' }>${req_month<10?"0":""}${req_month}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>USD</label></td>
|
|
<td><input type="number" title="USD" id="COST_USD" name="COST_USD" value="${exchangeRateInfo.COST_USD}" maxlength="10" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>EUR</label></td>
|
|
<td><input type="number" title="EU" id="COST_EU" name="COST_EU" value="${exchangeRateInfo.COST_EU}" maxlength="10" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>JPY</label></td>
|
|
<td><input type="number" title="JAPAN" id="COST_JAPAN" name="COST_JAPAN" value="${exchangeRateInfo.COST_JAPAN}" maxlength="10" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>CNY</label></td>
|
|
<td><input type="number" title="CHINA" id="COST_CHINA" name="COST_CHINA" value="${exchangeRateInfo.COST_CHINA}" maxlength="10" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>VND</label></td>
|
|
<td><input type="number" title="VIETNAM" id="COST_VIETNAM" name="COST_VIETNAM" value="${exchangeRateInfo.COST_VIETNAM}" maxlength="10" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>RUB</label></td>
|
|
<td><input type="number" title="RUB" id="COST_RUB" name="COST_RUB" value="${exchangeRateInfo.COST_RUB}" maxlength="10" ></td>
|
|
</tr>
|
|
<%--
|
|
<tr>
|
|
<td><label>INR</label></td>
|
|
<td><input type="number" title="INR" id="COST_INR" name="COST_INR" value="${exchangeRateInfo.COST_INR}" maxlength="10" ></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><label>설명</label></td>
|
|
<td><input type="text" id="productMidDescription" name="productMidDescription" value="${exchangeRateInfo.PRODUCT_DESC}" maxlength="50"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>활성화 여부</label></td>
|
|
<td>
|
|
<select id="status" name="status">
|
|
<option value="active" ${exchangeRateInfo.STATUS eq 'active'?'selected':''}>활성화</option>
|
|
<option value="inActive" ${exchangeRateInfo.STATUS eq 'inActive'?'selected':''}>비활성화</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
--%>
|
|
</tbody>
|
|
</table>
|
|
<div id="adminPopupBtnWrap">
|
|
<span id="overlapStatus"></span>
|
|
<input type="button" value="저장" class="btns" onclick="javascript:fnc_save();">
|
|
<!--
|
|
<input type="button" value="중복확인" class="btns" id="overlapCheckId" onclick="javascript:fnc_overlapCheck();">
|
|
-->
|
|
</div>
|
|
</div>
|
|
<div class="btnCenterWrap">
|
|
<div class="center_btns_wrap">
|
|
<input type="button" value="닫기" name="" id="btn_close" class="btns" onclick="javascript:self.close();">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |