parent
25d506f98c
commit
a9eb8ac2b7
@ -1,79 +0,0 @@
|
||||
<#include "/m/include/index_top.ftl">
|
||||
|
||||
<link rel="stylesheet" href="${URL_STATIC_ROOT}/m/css/swiper.min.css">
|
||||
<script src="${URL_STATIC_ROOT}/m/js/swiper.min.js"></script>
|
||||
<script src="${URL_STATIC_ROOT}/m/js/jquery_popupoverlay.js"></script>
|
||||
<script src="${URL_STATIC_ROOT}/m/js/design.js"></script>
|
||||
|
||||
<body class="bg_nutrition">
|
||||
|
||||
<!-- wrap -->
|
||||
<div class="wrap">
|
||||
|
||||
<!-- header_sub -->
|
||||
<header class="header_wrapper">
|
||||
<a href="javascript:back.return_url();" class="side_Lbtn hidden pre_btn">이전으로</a>
|
||||
<h1 class="header_title">모유/젖병</h1>
|
||||
<div class="side_Rbtn">
|
||||
</div>
|
||||
</header>
|
||||
<!-- //header_sub -->
|
||||
|
||||
<!-- main_nutrition -->
|
||||
<main class="main_nutrition">
|
||||
|
||||
<!-- nutrition_search_main -->
|
||||
<div class="nutrition_search_main">
|
||||
|
||||
<div class="cart_list_btn">
|
||||
<a href="#" id="save">저장</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- //nutrition_search_main -->
|
||||
|
||||
</main>
|
||||
<!-- //main_nutrition -->
|
||||
|
||||
</div>
|
||||
<!-- //wrap -->
|
||||
|
||||
<!-- 하단 네비 iyu_nav -->
|
||||
<#include "/m/include/index_bottom_menu.ftl">
|
||||
<!-- //iyu_nav -->
|
||||
|
||||
<#include "/m/bf_food/include_return_url.ftl">
|
||||
|
||||
</body>
|
||||
<#include "/m/include/index_bottom.ftl">
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(function() { //전체선택 체크박스 클릭
|
||||
$("#save").click(function() {
|
||||
debugger;
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/m/bf_bottle/ajax_insert_bottle.do',
|
||||
type:'post',
|
||||
data:{
|
||||
"dbi_no":'84',
|
||||
"title": '테스트 타이틀 입니다.',
|
||||
"member_id":'${model['member_id']!}'
|
||||
},
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
},
|
||||
success:function(result){
|
||||
if(result.RESULT==1)
|
||||
alert('카트에 분유수유가 추가되었습니다.');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
@ -0,0 +1,285 @@
|
||||
<#include "/m/include/index_top.ftl">
|
||||
<link rel="stylesheet" href="${URL_STATIC_ROOT}/m/css/anypicker-all.css">
|
||||
<!-- 달력 datepicker -->
|
||||
<script type="text/javascript" src="${URL_STATIC_ROOT}/m/js/anypicker.min.js"></script>
|
||||
<link rel="stylesheet" href="${URL_STATIC_ROOT}/m/css/datepicker.css" type="text/css" />
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
|
||||
|
||||
<#assign thumb_path = (model['rm_child']['append_300_img_file'])!>
|
||||
<#if thumb_path?has_content>
|
||||
<#assign thumb_path="/file/get_img.do?mt_file_seq="+thumb_path >
|
||||
<#if thumb_path?index_of("http") != 0><#assign thumb_path = URL_ROOT + thumb_path></#if>
|
||||
<#else>
|
||||
<#if (model['rm_child']['gender'])! == 'F'>
|
||||
<#assign thumb_path = '/bf/m/img/child/child_pic_04.png' >
|
||||
<#else>
|
||||
<#assign thumb_path = '/bf/m/img/child/child_pic_03.png' >
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<script>
|
||||
function CMD_MEASUREMENT_HEIGHT(smc_no) {
|
||||
var cmd = 'CMD_MEASUREMENT_HEIGHT';
|
||||
var args = {
|
||||
smc_no: smc_no,
|
||||
};
|
||||
try{
|
||||
window.interface.executeInterface(function(r){console.log('sussess:', r);}, function(r){console.log('fail:', r);}, cmd, args);
|
||||
}catch(e){
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<body><!--grey_bg / blue_w_bg /blue_g_bg-->
|
||||
<div class="wrap">
|
||||
<header class="header_wrapper">
|
||||
<a href="javascript:back.return_url()" class="side_Lbtn hidden pre_btn">이전으로</a>
|
||||
<h1 class="header_title">${model['rm_child']['name']} 분유 추가</h1>
|
||||
<div class="side_Rbtn">
|
||||
<a href="#" class="growth_cal">
|
||||
<input type="text" id="date">
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<main class="m_child_direct_input" id="top_move">
|
||||
<div class="profile_wrap">
|
||||
<input type="hidden" id="smc_no" class="required" name="smc_no" value="${model['smc_no']}" data-tit="아이 코드"/>
|
||||
<form class="profile_header" id="frmLacMilk" method="POST">
|
||||
<div class="p_header_pic">
|
||||
<div class="pic hidden" style="background: url(${thumb_path})">프로필 사진</div>
|
||||
<div class="child_tit">
|
||||
<div class="name"><a href="javascript:CMD_MEASUREMENT_HEIGHT('${model['rm_child']['smc_no']}');">${model['rm_child']['name']}</a></div>
|
||||
<div class="age">${model['rm_child']['age_y']!}세 ${model['rm_child']['age_m']!}개월</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile_list">
|
||||
<h2 class="p_title">정보입력</h2>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="child_height" class="p_label">분유 선택</label>
|
||||
<div class="p_select_box">
|
||||
<select id="dm_fg_cd" name="dm_fg_cd" value="${model['dm_fg_cd']!}" class="form-control m-r-3" >
|
||||
<option value="1">분유</option>
|
||||
<option value="2">유축수유</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="child_height" class="p_label">섭취시간</label>
|
||||
<div class="p_input_box">
|
||||
<input type="number" id="dm_minute" name="dm_minute" value="${model['dm_minute']!}" class="required" placeholder="섭취시간(분)" data-tit="섭취시간(분)" step="1">
|
||||
<span class="unit">분</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="child_height" class="p_label">섭취시간</label>
|
||||
<div class="p_input_box">
|
||||
<input type="number" id="dm_second" name="dm_second" value="${model['dm_second']!}" class="required" placeholder="섭취시간(초)" data-tit="섭취시간(초)" step="1">
|
||||
<span class="unit">초</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="child_height" class="p_label">수유량</label>
|
||||
<div class="p_input_box">
|
||||
<input type="number" id="dm_lac" name="dm_lac" value="${model['dm_lac']!}" class="required" placeholder="수유량" data-tit="수유량" step="1">
|
||||
<span class="unit">ml</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p_list_item p_border_box">
|
||||
<label for="child_height" class="p_label">메모</label>
|
||||
<div class="p_input_box">
|
||||
<input type="text" id="memo" name="memo" value="${model['memo']!}" class="required" placeholder="메모" data-tit="메모" step="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" id="" name="" class="btns">저장</button>
|
||||
</div>
|
||||
<p class="p_info">
|
||||
<span class="blue_tit">※ 입력하신 내용을 저장하시면 아래 목록에 추가됩니다.</span>
|
||||
<span class="blue_tit">※ 동일한 날짜에 여러번 측정 혹은 입력하였을 시, 해당 날짜의 마지막 측정기록만 저장됩니다.</span>
|
||||
</p>
|
||||
</form>
|
||||
<#if (model['lm_lac_milk'])??>
|
||||
<div class="direct_input_wrap">
|
||||
<h2 class="title"><span class="blue_tit">분유/유축수유 섭취</span> 리스트</h2>
|
||||
<div class="result_list_box">
|
||||
<#list model['lm_lac_milk'] as item>
|
||||
<div class="r_list_item">
|
||||
<div>
|
||||
<div class="result_num_box">
|
||||
<div class="height_result result_num">[${item['dm_fg_nm']}] ${item['dm_minute']?string('0.0')}<span class="unit">분</span> / ${item['dm_second']?string('0.0')}<span class="unit">초</span></div>
|
||||
</div>
|
||||
<div class="date">
|
||||
<span><span class="hidden icon">입력일 아이콘</span>입력일</span>${item['reg_dt']?string('yyyy. MM. dd')}
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="" name="" class="hidden del_btn" onclick="javascript:frmLacMilk.ajax_delete_lac_milk(${item['dm_no']})" >삭제</button>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#--페이지네이션-->
|
||||
<ul class="pagination">
|
||||
<@b.Paging url="${URL_PATH}/list_bf_milk.do"
|
||||
pageCount="${model['page']['pageCount']?c}"
|
||||
rowCount="${model['page']['rowCount']?c}"
|
||||
rowMax="${model['page']['rowMax']?c}"
|
||||
nowPage="${model['page']['nowPage']?c}"
|
||||
params="smc_no=${model['smc_no']}&is_search=${model['is_search']!}&search_col=${model['search_col']!}&search_text=${model['search_text']!}&search_col_dt=${model['search_col_dt']!}&search_s_dt=${model['search_s_dt']!}&search_e_dt=${model['search_e_dt']!}&return_url=${model['return_url']!}&"
|
||||
|
||||
class_page_active=" active"
|
||||
|
||||
is_prev_first="N"
|
||||
is_next_end="N"
|
||||
/>
|
||||
</ul>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- 하단 네비 iyu_nav -->
|
||||
<#include "/m/include/index_bottom_menu.ftl">
|
||||
<!-- //iyu_nav -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var frmLacMilk = {
|
||||
|
||||
init: function(){
|
||||
SNUtil.initInputAction()
|
||||
|
||||
$('#frmLacMilk').on('submit',function(e){
|
||||
|
||||
if (!SNValidator.validateWithAlert('#frmLacMilk')) {
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
/*
|
||||
if($('#child_height').val() >= 210 || $('#child_height').val() < 30){
|
||||
Swal.fire({
|
||||
text: '신장범위(30~210cm)를 초과했습니다'
|
||||
}).then((result)=>{ $('#child_height').focus() })
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
if($('#child_weight').val() >= 100 || $('#child_weight').val() < 1){
|
||||
Swal.fire({
|
||||
text: '체중범위(1~100Kg)를 초과했습니다'
|
||||
}).then((result)=>{ $('#child_weight').focus() })
|
||||
e.preventDefault()
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
this.ajax_insert_lac_milk();
|
||||
e.preventDefault()
|
||||
return;
|
||||
|
||||
}.bind(this))
|
||||
},
|
||||
|
||||
ajax_insert_lac_milk: function(){
|
||||
var data = {}
|
||||
data.smc_no = $('#smc_no').val()
|
||||
data.base_dt = moment( $('#input_date').val(),'YYYY. MM. DD' ).format('YYYYMMDD')
|
||||
data.dm_fg_cd = $('#dm_fg_cd').val()
|
||||
data.dm_minute = $('#dm_minute').val()
|
||||
data.dm_second = $('#dm_second').val()
|
||||
data.dm_minute = $('#dm_minute').val()
|
||||
data.dm_lac = $('#dm_lac').val()
|
||||
data.memo = $('#memo').val()
|
||||
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/m/bf_food/ajax_insert_lac_milk.do?1=1',
|
||||
type:'post',
|
||||
data: data,
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
Swal.fire({text:"등록되지 않았습니다"})
|
||||
},
|
||||
success:function(result){
|
||||
console.log(result)
|
||||
var RESULT = result.RESULT
|
||||
if(RESULT == 0){ //0:RESULT_SUCCESS
|
||||
Swal.fire({text:"입력되었습니다"}).then((result) => { location.replace('./list_bf_milk.do?smc_no=${(model["smc_no"])!}') })
|
||||
}else{
|
||||
Swal.fire({text:"등록되지 않았습니다"})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
ajax_delete_lac_milk: function(dm_no){
|
||||
if(!dm_no){return}
|
||||
|
||||
var data = {}
|
||||
data.dm_no = dm_no
|
||||
|
||||
Swal.fire({
|
||||
text: "기록을 삭제하시겠습니까?",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: '네',
|
||||
cancelButtonText: '취소'
|
||||
}).then((result) => {
|
||||
if(result.value){
|
||||
$.ajax({
|
||||
url:'${URL_ROOT}/m/bf_food/ajax_delete_lac_milk.do?1=1',
|
||||
type:'post',
|
||||
data: data,
|
||||
dataType:'json',
|
||||
error:function(request,status,error){
|
||||
Swal.fire({text:"삭제되지 않았습니다"})
|
||||
},
|
||||
success:function(result){
|
||||
console.log(result)
|
||||
var RESULT = result.RESULT
|
||||
if(RESULT == 0){ //0:RESULT_SUCCESS
|
||||
location.replace('./list_bf_milk.do?smc_no=${(model["smc_no"])!}')
|
||||
}else{
|
||||
Swal.fire({text:"삭제되지 않았습니다"})
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
frmLacMilk.init();
|
||||
debugger;
|
||||
var today = moment().format('YYYY.MM.DD');
|
||||
$("#input_date").val(today)
|
||||
var input_date = SNUtil.makeAnyPicker('input_date', $("#input_date").val(), -80, '.');
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 달력 datepicker
|
||||
jQuery("#date").datepicker({
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '년',
|
||||
showOn: "button",
|
||||
buttonImage: "${URL_STATIC_ROOT}/m/img/growth/growth_cal_ico.png",
|
||||
buttonImageOnly: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
nextText: '다음 달',
|
||||
prevText: '이전 달',
|
||||
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토']
|
||||
});
|
||||
</script>
|
||||
|
||||
<#include "/m/bf_growth_body/include_return_url.ftl">
|
||||
</body>
|
||||
<#include "/m/include/index_bottom.ftl">
|
Loading…
Reference in new issue