File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%
/**
* @Class Name : EgovHpcmRegist.jsp
* @Description : EgovHpcmRegist 화면
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2009.02.01 박정규 최초 생성
* 2016.06.13 김연호 표준프레임워크 v3.6 개선
*
* @author 공통서비스팀
* @since 2009.02.01
* @version 1.0
* @see
*
*/
%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
<c:if test="${!empty mjonPayVO.cashId}">
$('.no_modi').find('input').prop('readonly', true);
</c:if>
<c:if test="${empty mjonPayVO.cashId}">
$('.modi').remove();
</c:if>
// 소수점 둘째자리까지의 실수만 입력 허용
/* $('#cashInputId').off('input').on('input',function(e){
var str = $(this).val().replace(/[^-0-9\.]/g,'');
if(str.length > 0){
if(str.lastIndexOf("-")>0){ //중간에 -가 있다면 replace
if(str.indexOf("-")==0){ //음수라면 replace 후 - 붙여준다.
str = "-"+str.replace(/[-]/gi,'');
}else{
str = str.replace(/[-]/gi,'');
}
}
var regExp = /^-?\d*.?\d{0,2}$/;
if(!regExp.test(str)){
$(this).val(str.substring(0,str.length-1));
}
}
}); */
$('#cashInputId').off('input').on('input',function(e){
/* var value = $(this).val();
var regExp = /^-?\d*.?\d{0,2}$/;
if(!regExp.test(value)){
$(this).val(value.substring(0,value.length-1));
} */
var value = $(this).val();
var regExp =/^([-]?(\d*))(\.?\d{0,2})$/;
if(!regExp.test(value)){
value = value.substr(0, value.length - 1);
if(value.lastIndexOf("-")>0){ //중간에 -가 있다면 replace
if(value.indexOf("-")==0){ //음수라면 replace 후 - 붙여준다.
value = "-"+value.replace(/[-]/gi,'');
}else{
value = value.replace(/[-]/gi,'');
}
}
// alert("거짓 "+value)
}else{
// alert("참 "+value)
}
$(this).val(value);
});
});
function foucusOut(val){
var num = new Number(val.value);
$("#cashInputId").val(num.toFixed(2));
}
function cashInputCheck(value){
// 소수점 둘째자리까지의 실수만 입력 허용
var regExp = /^-?\d*.?\d{0,2}$/;
if(!regExp.test(this.value)){
return false;
}
return true;
}
/* 등록 */
function fn_insert(){
var userId = $('input[name=userId]').val();
$('input[name=userId]').val(userId.replace(/(\s*)/g, ""));
if("" == $('input[name=userId]').val().trim()){
alert("아이디는 필수 입니다.")
return false;
}
//회윈 존재유무 확인
fn_id_check($('input[name=userId]').val().trim()) ;
if(!existMemberId){
return false;
}
var cashInput = $('input[name=cash]').val();
if(cashInput == "0" || cashInput == "0.0" || cashInput == "0.00"){
alert("지급 케시에 0을 넣을 수 없습니다.")
return false;
}
if(cashInputCheck(cashInput)){
}
if(!confirm("등록하시겠습니까?")) {
return;
}
var frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pay/InsertCash.do'/>";
frm.submit();
}
/* 수정 */
function fn_modify(){
if(!confirm("수정하시겠습니까?")) {
return;
}
inputReplace();
var frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pay/UpdateCash.do'/>";
frm.submit();
}
function fn_delete(){
if(!confirm("삭제하시겠습니까?")) {
return;
}
frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/msg/SendMsgDelete.do' />";
frm.submit();
}
var existMemberId = false;
/*********************************************************
* 아이디 체크 AJAX
******************************************************** */
function fn_id_check(id){
$.ajax({
type:"POST",
url:"/uss/umt/user/ExistMemberIdAjax.do",
data:{
"checkId": id
},
dataType:'json',
timeout:(1000*30),
async: false,
success:function(returnData, status){
if(status == "success") {
if(returnData.usedCnt > 0 ){
existMemberId = true;
}else{
alert("아이디가 등록되어 있지 않습니다. 확인해 주세요.");
existMemberId = false;
}
}else{ alert("ERROR!");return;}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
function goList() {
inputReplace();
var frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pay/CashList.do'/>";
frm.submit();
}
function inputReplace(){
var cash = $("#cashInputId").val();
cash = cash.replace(/,/g, '');
$("#cashInputId").val(cash);
}
</script>
</head>
<body>
<form name="writeForm" id="writeForm" method="post">
<input type="hidden" name="cashId" value="${mjonPayVO.cashId}" />
<input name="searchCondition" type="hidden" value="${searchVO.searchCondition}" />
<input name="searchCondition2" type="hidden" value="${searchVO.searchCondition2}"/>
<input name="searchKeyword" type="hidden" value="${searchVO.searchKeyword}"/>
<input name="pageUnit" type="hidden" value="${searchVO.pageUnit}"/>
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">캐시정보(등록/수정)</h2>
<p class="tType6 c_999999">캐시정보 생성/수정 할 수 있습니다.</p>
</div>
<div class="pageCont">
<table class="tbType2">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr class="no_modi">
<th><span class="reqArea">아이디</span></th>
<td colspan="3">
<input type="text" placeholder="" name="userId" value="<c:out value='${mjonPayVO.userId}'/>" title="아이디" maxlength="100" />
</td>
</tr>
<tr class="no_modi">
<th><span class="reqArea">캐시</span></th>
<td colspan="3">
<fmt:formatNumber value="${cash}" pattern="#,###.00" var="cash"/>
<input type="text" step="0.01" id="cashInputId" name="cash" value="${cash}" title="캐시" maxlength="20" onblur="foucusOut(this)"/>
</td>
</tr>
<tr class="no_modi">
<th>상세내용</th>
<td colspan="3">
<c:if test="${empty mjonPayVO.cashId }">
<input type="text" name="memo" value="관리자지급" title="상세내용" maxlength="100" />
</c:if>
<c:if test="${!empty mjonPayVO.cashId }">
<input type="text" name="memo" value="${mjonPayVO.memo}" title="상세내용" maxlength="100" />
</c:if>
</td>
</tr>
<tr class="no_modi modi">
<th>주문번호</th>
<td colspan="3">
<input type="text" name="orderId" value="${mjonPayVO.orderId}" title="주문번호" maxlength="100" />
</td>
</tr>
<tr class="no_modi modi">
<th>메시지ID</th>
<td colspan="3">
<input type="text" name="msgGroupId" value="${mjonPayVO.msgGroupId}" title="메시지ID" maxlength="100" />
</td>
</tr>
<c:if test="${!empty mjonPayVO.cashId }">
<tr>
<th>상태</th>
<td colspan="3">
<ec:select codeId="ITN023" name="delFlag" id="delFlag" css="class='select'" selectedValue="${mjonPayVO.delFlag}"
defaultValue="" />
</td>
</tr>
</c:if>
<tr class="no_modi modi">
<th>등록일자</th>
<td colspan="3">
${mjonPayVO.frstRegistPnttm}
</td>
</tr>
</tbody>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList();return false;" />
<c:if test="${!empty mjonPayVO.cashId }">
<input type="button" class="btnType1" value="수 정" onclick="fn_modify(); return false;">
</c:if>
<c:if test="${empty mjonPayVO.cashId }">
<input type="button" class="btnType1" value="저 장" onclick="fn_insert(); return false;">
</c:if>
</div>
</div>
</div>
</form>
</body>
</html>