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.pointId}">
$('.no_modi').find('input').prop('readonly', true);
</c:if>
<c:if test="${empty mjonPayVO.pointId}">
$('.modi').remove();
</c:if>
// 소수점 둘째자리까지의 실수만 입력 허용
$('#pointInputId').keyup(function(event){
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,'');
}
}
}
$(this).val(str);
});
});
function test(val){
var check = /^[0-9]+$/;
if(!check.test(val.value)){
alert("숫자만 가능합니다.")
return false;
}
}
/* 등록 */
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;
}
if($('input[name=point]').val().trim() == ""){
alert("포인트를 입력헤주세요.")
return false;
}
else if($('input[name=point]').val() == "0"){
alert("포인트에 0보다 큰 수를 입력해주세요.")
return false;
}
if(!confirm("포인트를 캐시로 전환 하시겠습니까?")) {
return;
}
var frm = document.writeForm;
$.ajax({
type: "POST",
url: "/uss/ion/pay/InsertUsePointAdmAjax.do",
data: $("#writeForm").serialize(),
dataType:'json',
async: false,
success: function (data) {
if (data.isSuccess) {
alert("전환 완료했습니다.");
goList();
}
else {
alert(data.msg);
}
},
error: function (e) {
alert("ERROR : " + JSON.stringify(e));
}
});
}
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 form = document.writeForm;
form.action ='/uss/ion/pay/pointUseList.do'
form.submit();
}
function inputReplace(){
var point = $("#pointInputId").val();
point = point.replace(/,/g, '');
$("#pointInputId").val(point);
}
</script>
</head>
<body>
<form name="writeForm" id="writeForm" method="post">
<input type="hidden" name="pointId" value="${mjonPayVO.pointId}" />
<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" title="아이디" maxlength="100" />
</td>
</tr>
<tr class="no_modi">
<th><span class="reqArea">포인트</span></th>
<td colspan="3">
<input type="text" id="pointInputId" name="point" value="0" title="포인트" maxlength="20"/>
</td>
</tr>
<tr class="no_modi">
<th>상세내용</th>
<td colspan="3">
<input type="text" name="memo" value="포인트를 캐시로 전환" title="상세내용" maxlength="100" />
</td>
</tr>
</tbody>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;" />
<input type="button" class="btnType1" value="저 장" onclick="fn_insert(); return false;">
</div>
</div>
</div>
</form>
</body>
</html>