parent
2845573e83
commit
ed45613964
@ -0,0 +1,234 @@
|
||||
<#include "/m/include/index_top.ftl">
|
||||
|
||||
|
||||
<body class="bg_setting">
|
||||
<div class="wrap">
|
||||
<header class="header_wrapper">
|
||||
<a href="javascript:back.return_url()" class="side_Lbtn hidden pre_btn">이전으로</a>
|
||||
<h1 class="header_title">프로필</h1>
|
||||
<a href="#" class="side_Rbtn hidden"></a>
|
||||
</header>
|
||||
<main class="m_child_profile">
|
||||
<#-- FORM -->
|
||||
|
||||
<form id="frmChild" class="profile_wrap" name="frmChild" method="post" action="insert_bf_family.do" enctype="multipart/form-data">
|
||||
<input type="hidden" id="return_url" name="return_url" value="${model['return_url']!}" />
|
||||
<input type="hidden" id="bf_no" name="bf_no" value="${model['rm']['bf_no']!}" />
|
||||
|
||||
<div class="profile_header">
|
||||
|
||||
<h3 class="p_sub_title">부모선택</h3>
|
||||
|
||||
<div class="radio-toolbar">
|
||||
<input type="radio" id="BF_P_T_1" name="parent_tp" value="BF_P_T_1" <#if model['parent_tp']! == 'BF_P_T_1'>checked</#if>>
|
||||
<label for="BF_P_T_1">엄마</label>
|
||||
|
||||
<input type="radio" id="BF_P_T_2" name="parent_tp" value="BF_P_T_2"<#if model['parent_tp']! == 'BF_P_T_2'>checked</#if>>
|
||||
<label for="BF_P_T_2">아빠</label>
|
||||
</div>
|
||||
|
||||
<div class="profile_list">
|
||||
<h2 class="p_sub_title">이름</h2>
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="" class="p_label">이름</label>
|
||||
<div class="p_input_box">
|
||||
<input type="text" id="name" name="name" class="required" data-tit="이름" placeholder="이름 입력" maxlength="8" value="${model['rm']['name']!}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="p_sub_title">이메일</h2>
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="" class="p_label">이메일</label>
|
||||
<div class="p_input_box">
|
||||
<input type="text" id="email" name="email" data-tit="이메일" placeholder="이메일 입력" maxlength="50" value="${model['rm']['email']!}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="birthday" class="p_label">생년월일</label>
|
||||
<div class="p_input_box">
|
||||
<input readonly type="text" id="birthday" name="birthday" class="required" data-tit="생년월일" placeholder="생년월일 입력" value="<#if model['rm']['birthday']?exists>${model['rm']['birthday']!}</#if>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="weight_birth" class="p_label">체중</label>
|
||||
<div class="p_input_box">
|
||||
<#if (model['rm']['weight'])?has_content && model['rm']['weight'] != 0>
|
||||
<input type="number" step="0.1" id="weight" name="weight" class="" placeholder="체중 입력" value="${model['rm']['weight']?string('0.0')}">
|
||||
<#else>
|
||||
<input type="number" step="0.1" id="weight" name="weight" class="" placeholder="체중 입력">
|
||||
</#if>
|
||||
<span class="unit">kg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="height_birth" class="p_label">신장</label>
|
||||
<div class="p_input_box">
|
||||
<#if (model['rm']['height'])?has_content && model['rm']['height'] != 0>
|
||||
<input type="number" step="0.1" id="height" name="height" class="" placeholder="키 입력" value="${model['rm']['height']?string('0.0')}">
|
||||
<#else>
|
||||
<input type="number" step="0.1" id="height" name="height" class="" placeholder="키 입력">
|
||||
</#if>
|
||||
<span class="unit">cm</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="p_sub_title">질환</h2>
|
||||
<div class="p_list_item p_border_box">
|
||||
<div class="disease">
|
||||
<#if model['lm_f_disease']? has_content>
|
||||
<#list model['lm_f_disease'] as item>
|
||||
<div class="disease_item"><input type="checkbox" id="disease_cd_no_${item_index}" name="disease_cd_no" value="${item['cd_no']}" <#if item['is_check'] == 'Y'>checked=checked</#if> class="m-r-5" /><label for="disease_cd_no_${item_index}">${item['title']}</label></div>
|
||||
</#list>
|
||||
</#if>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile_btn_box">
|
||||
<button type="submit" name="submit" id="submit_btn" class="btns blue_btn">
|
||||
저장
|
||||
</button>
|
||||
<button type="button" class="btns grey_btn" onclick="javascript:back.return_url();">
|
||||
취소
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<#include "/m/include/index_bottom_info.ftl">
|
||||
</main>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var viewMemberChild = {
|
||||
|
||||
oldVal : '',
|
||||
is_loading : false,
|
||||
|
||||
init: function(){
|
||||
SNUtil.initInputAction()
|
||||
|
||||
SNUtil.makeAnyPicker('birthday', $("#birthday").val(), -80, '.');
|
||||
|
||||
$("input[name=parent_tp]").on("change",function(e){
|
||||
let parent_tp = $(this).val();
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/m/bf_family/ajax_select_bf_family.do',
|
||||
type:'post',
|
||||
data: {
|
||||
"parent_tp": parent_tp,
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
Swal.fire({text: '오류가 발생했습니다.'})
|
||||
},
|
||||
success:function(result){
|
||||
if(result.RESULT == 0 && result.rm !== null){
|
||||
$('#bf_no').val(result.rm.bf_no);
|
||||
$('#name').val(result.rm.name);
|
||||
$('#email').val(result.rm.email);
|
||||
$('#birthday').val(result.rm.birthday);
|
||||
$('#weight').val(result.rm.weight);
|
||||
$('#height').val(result.rm.height);
|
||||
|
||||
SNUtil.makeAnyPicker('birthday', $("#birthday").val(), -80, '.');
|
||||
|
||||
|
||||
// checkbox
|
||||
var disease_cd_no = document.getElementsByName('disease_cd_no');
|
||||
for(var i=0 ; i<disease_cd_no.length ; i++) { disease_cd_no[i].checked = false;} // init
|
||||
if(result.lm_f_disease !== null){
|
||||
result.lm_f_disease.forEach(function(item,index,arr2){
|
||||
for(var i=0 ; i<disease_cd_no.length ; i++) {
|
||||
if(item.cd_no == disease_cd_no[i].value && item.is_check == 'Y') {
|
||||
disease_cd_no[i].checked = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}else if(result.RESULT == 2){
|
||||
Swal.fire({text: '검색 조건이 부족합니다.'}).then((result)=>{ window.location.href = '${URL_ROOT}/m/index.do' })
|
||||
}else if(result.RESULT == 6){
|
||||
Swal.fire({text: result.msg}).then((result)=>{ window.location.href = '${URL_ROOT}/m/index.do' })
|
||||
}else if(result.RESULT == 7){
|
||||
Swal.fire({text: '로그인 세션이 만료되었습니다.'}).then((result)=>{ window.location.href = '${URL_ROOT}/m/index.do' })
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("#name").on("propertychange change keyup paste input", function() {
|
||||
var currentVal = $(this).val();
|
||||
if(currentVal == this.oldVal) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.oldVal = currentVal;
|
||||
if(currentVal == ''){
|
||||
$('#child_tit_name').text('신규등록')
|
||||
}else{
|
||||
$('#child_tit_name').text(currentVal)
|
||||
}
|
||||
});
|
||||
|
||||
$('#frmChild').on('submit',function(e){
|
||||
|
||||
if(!this.is_loading) {
|
||||
this.is_loading = true
|
||||
}else if(this.is_loading){
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. 필수 입력 항목 검사
|
||||
if (!SNValidator.validateWithAlert('#frmChild')) {
|
||||
this.is_loading = false
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 아이이름
|
||||
var name = $('#name').val()
|
||||
if(SNUtil.strByteLength(name) > 15){
|
||||
Swal.fire({
|
||||
text: '이름이 너무 깁니다. 다시 입력해주세요.'
|
||||
}).then((result)=>{ $('#name').focus() })
|
||||
this.is_loading = false
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. 신장 검사
|
||||
if($('#height').val() >= 210 || $('#height').val() < 0){
|
||||
Swal.fire({
|
||||
text: '신장범위(120~210cm)를 초과했습니다'
|
||||
}).then((result)=>{ $('#height').focus() })
|
||||
this.is_loading = false
|
||||
e.preventDefault()
|
||||
return;
|
||||
}else if($('#weight').val() >= 120 || $('#weight').val() < 0){
|
||||
Swal.fire({
|
||||
text: '체중범위(1~120kg)를 초과했습니다'
|
||||
}).then((result)=>{ $('#weight').focus() })
|
||||
this.is_loading = false
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
|
||||
$('#name').val($('#name').val())
|
||||
//$('#birthday').val( moment($('#birthday').val(),'YYYY.MM.DD').format('YYYY-MM-DD') )
|
||||
|
||||
this.is_loading = false
|
||||
})
|
||||
},
|
||||
}
|
||||
$(function(){
|
||||
viewMemberChild.init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<#include "/m/bf_family_baby/include_return_url.ftl">
|
||||
|
||||
</body>
|
||||
<#include "/m/include/index_bottom.ftl">
|
@ -0,0 +1,172 @@
|
||||
<#include "/m/include/index_top.ftl">
|
||||
|
||||
<body class="grey_bg">
|
||||
<div class="wrap">
|
||||
<header class="header_wrapper">
|
||||
<a href="javascript:history.back();" class="side_Lbtn hidden pre_btn">이전으로</a>
|
||||
<h1 class="header_title">아이디 찾기</h1>
|
||||
<a href="#" class="side_Rbtn hidden"></a>
|
||||
</header>
|
||||
<main class="m_pw_reset m_pw_reset_phone">
|
||||
|
||||
<div class="profile_wrap">
|
||||
<h1 class="l_title">가입시 사용한 휴대전화 번호를 입력하세요.</h1>
|
||||
<div class="pw_cont">
|
||||
<div class="l_list">
|
||||
<div class="p_list_item p_border_box">
|
||||
<div class="p_input_box">
|
||||
<input type="number" id="phone_num" name="phone_num" class="" placeholder="'-'없이 휴대전화 번호만 입력" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="m_set_account_btn"><button type="button" onclick="javascript:ajax_send_sms();" class="btns blue_btn join_member_btn">문자로 전송1<span class="hidden icon"></span></button></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var is_loading = false;
|
||||
|
||||
function ajax_send_sms() {
|
||||
if (is_loading == false) {
|
||||
is_loading = true;
|
||||
|
||||
var phone_num = $('#phone_num').val();
|
||||
|
||||
if(phone_num == ''){
|
||||
alert('휴대폰 번호를 입력해주세요');
|
||||
}else{
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/api/sms/send_id_sms.do?1=1',
|
||||
type:'post',
|
||||
data: {
|
||||
"pt": 0
|
||||
,"is_test":"N"
|
||||
,"phone_num": phone_num
|
||||
,"sms_use_cd_no": " SMS_USE_CODE_FIND"
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
},
|
||||
success:function(result){
|
||||
console.log(result);
|
||||
|
||||
var RESULT = result.RESULT;
|
||||
var RESULT_MSG = result.RESULT_MSG;
|
||||
var s_no = result.s_no;
|
||||
|
||||
if(s_no != ''){
|
||||
$('#s_no').val(s_no);
|
||||
alert('발송되었습니다');
|
||||
}else{
|
||||
alert(RESULT_MSG);
|
||||
}
|
||||
|
||||
is_loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ajax_confirm_sms() {
|
||||
if (is_loading == false) {
|
||||
is_loading = true;
|
||||
|
||||
var s_no = $('#s_no').val();
|
||||
var phone_num = $('#phone_num').val();
|
||||
var check_num = $('#check_num').val();
|
||||
|
||||
if(check_num == ''){
|
||||
alert('인증번호를 입력해주세요');
|
||||
is_loading = false;
|
||||
}else{
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/api/confirm_sms.do?1=1',
|
||||
type:'post',
|
||||
data: {
|
||||
"pt": 0
|
||||
,"is_test":"N"
|
||||
,"s_no": s_no
|
||||
,"phone_num": phone_num
|
||||
,"check_num": check_num
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
stop_timer();
|
||||
},
|
||||
success:function(result){
|
||||
var RESULT = result.RESULT;
|
||||
var RESULT_MSG = result.RESULT_MSG;
|
||||
|
||||
console.log(result);
|
||||
if(result.check_status == 'Y'){
|
||||
stop_timer();
|
||||
|
||||
$('#temp_pwd').val(result.temp_pwd);
|
||||
|
||||
// layer_open('#popup');
|
||||
}else{
|
||||
alert('인증에 실패했습니다');
|
||||
is_loading = false;
|
||||
}
|
||||
|
||||
$('#check_status').val(result.check_status);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//reset_btn클릭시 input 값 없애기
|
||||
function reset_onclick(inputID){
|
||||
var resetinput = document.getElementById(inputID);
|
||||
resetinput.value = "";
|
||||
$(resetinput).parents("label").siblings(".reset_btn").hide(200);
|
||||
};
|
||||
|
||||
function wordcheck(target) {
|
||||
//입력값이 있으면 reset버튼 보이게하기
|
||||
if( $(target).val().length != 0 ){
|
||||
$(target).parents("label").siblings(".reset_btn").show(200);
|
||||
}else{return false;}
|
||||
|
||||
//input 모두 입력시 버튼 색 변경
|
||||
if ( $("#phone_num").val().length != 0 ) {
|
||||
$("#id_phone_num").addClass("btn_green")
|
||||
} else { return false; };
|
||||
|
||||
|
||||
if ( $("#phone_num").val().length != 0 &&
|
||||
$("#check_num").val().length != 0 ) {
|
||||
$("#id_check_num").addClass("btn_yellow")
|
||||
} else {
|
||||
//실행할코드
|
||||
$("#id_check_num").removeClass("btn_yellow")
|
||||
};
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<#if model['script_msg']?has_content>
|
||||
<script>
|
||||
function fromServerMsg(){
|
||||
alert('${model['script_msg']}');
|
||||
}
|
||||
|
||||
fromServerMsg();
|
||||
</script>
|
||||
</#if>
|
||||
|
||||
<#include "/m/include/index_bottom.ftl">
|
@ -0,0 +1,169 @@
|
||||
<#include "/m/include/index_top.ftl">
|
||||
|
||||
<body class="grey_bg">
|
||||
<div class="wrap">
|
||||
<header class="header_wrapper">
|
||||
<a href="javascript:history.back();" class="side_Lbtn hidden pre_btn">이전으로</a>
|
||||
<h1 class="header_title">비밀번호 재설정</h1>
|
||||
<a href="#" class="side_Rbtn hidden"></a>
|
||||
</header>
|
||||
<main class="m_pw_reset m_pw_reset_phone">
|
||||
<div class="profile_wrap">
|
||||
<h1 class="l_title">가입시 사용한 휴대전화 번호를 입력하세요.</h1>
|
||||
<div class="pw_cont">
|
||||
<div class="l_list">
|
||||
<div class="p_list_item p_border_box">
|
||||
<div class="p_input_box">
|
||||
<input type="number" id="phone_num" name="phone_num" class="" placeholder="'-'없이 휴대전화 번호만 입력" >
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="javascript:ajax_send_sms();" class="btns blue_btn">문자로 전송</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var is_loading = false;
|
||||
|
||||
function ajax_send_sms() {
|
||||
if (is_loading == false) {
|
||||
is_loading = true;
|
||||
|
||||
var phone_num = $('#phone_num').val();
|
||||
|
||||
if(phone_num == ''){
|
||||
alert('휴대폰 번호를 입력해주세요');
|
||||
}else{
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/api/sms/send_pw_sms.do?1=1',
|
||||
type:'post',
|
||||
data: {
|
||||
"pt": 0
|
||||
,"is_test":"N"
|
||||
,"phone_num": phone_num
|
||||
,"sms_use_cd_no": " SMS_USE_CODE_FIND"
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
},
|
||||
success:function(result){
|
||||
var RESULT = result.RESULT;
|
||||
var RESULT_MSG = result.RESULT_MSG;
|
||||
var s_no = result.s_no;
|
||||
|
||||
if(s_no != ''){
|
||||
$('#s_no').val(s_no);
|
||||
alert('발송되었습니다');
|
||||
}else{
|
||||
alert(RESULT_MSG);
|
||||
}
|
||||
|
||||
is_loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ajax_confirm_sms() {
|
||||
if (is_loading == false) {
|
||||
is_loading = true;
|
||||
|
||||
var s_no = $('#s_no').val();
|
||||
var phone_num = $('#phone_num').val();
|
||||
var check_num = $('#check_num').val();
|
||||
|
||||
if(check_num == ''){
|
||||
alert('인증번호를 입력해주세요');
|
||||
is_loading = false;
|
||||
}else{
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/api/confirm_sms.do?1=1',
|
||||
type:'post',
|
||||
data: {
|
||||
"pt": 0
|
||||
,"is_test":"N"
|
||||
,"s_no": s_no
|
||||
,"phone_num": phone_num
|
||||
,"check_num": check_num
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
stop_timer();
|
||||
},
|
||||
success:function(result){
|
||||
var RESULT = result.RESULT;
|
||||
var RESULT_MSG = result.RESULT_MSG;
|
||||
|
||||
console.log(result);
|
||||
if(result.check_status == 'Y'){
|
||||
stop_timer();
|
||||
|
||||
$('#temp_pwd').val(result.temp_pwd);
|
||||
|
||||
// layer_open('#popup');
|
||||
}else{
|
||||
alert('인증에 실패했습니다');
|
||||
is_loading = false;
|
||||
}
|
||||
|
||||
$('#check_status').val(result.check_status);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//reset_btn클릭시 input 값 없애기
|
||||
function reset_onclick(inputID){
|
||||
var resetinput = document.getElementById(inputID);
|
||||
resetinput.value = "";
|
||||
$(resetinput).parents("label").siblings(".reset_btn").hide(200);
|
||||
};
|
||||
|
||||
function wordcheck(target) {
|
||||
//입력값이 있으면 reset버튼 보이게하기
|
||||
if( $(target).val().length != 0 ){
|
||||
$(target).parents("label").siblings(".reset_btn").show(200);
|
||||
}else{return false;}
|
||||
|
||||
//input 모두 입력시 버튼 색 변경
|
||||
if ( $("#phone_num").val().length != 0 ) {
|
||||
$("#id_phone_num").addClass("btn_green")
|
||||
} else { return false; };
|
||||
|
||||
|
||||
if ( $("#phone_num").val().length != 0 &&
|
||||
$("#check_num").val().length != 0 ) {
|
||||
$("#id_check_num").addClass("btn_yellow")
|
||||
} else {
|
||||
//실행할코드
|
||||
$("#id_check_num").removeClass("btn_yellow")
|
||||
};
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<#if model['script_msg']?has_content>
|
||||
<script>
|
||||
function fromServerMsg(){
|
||||
alert('${model['script_msg']}');
|
||||
}
|
||||
|
||||
fromServerMsg();
|
||||
</script>
|
||||
</#if>
|
||||
|
||||
<#include "/m/include/index_bottom.ftl">
|
Loading…
Reference in new issue