Merge branch 'devs' of https://gitlab.com/big.imcloud/badyfeed/bf.git into devs
commit
17ec1e2989
@ -0,0 +1,271 @@
|
|||||||
|
<#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="frmCommerce" 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="nutrition_kinds_basic">
|
||||||
|
<h2>내가만든이유식을 선택해주세요.</h2>
|
||||||
|
<div class="nutrition_kinds_search">
|
||||||
|
<!-- 이전입력 -->
|
||||||
|
<p class="search_pre_input">이전 입력
|
||||||
|
<a href="javascript:void(0);" id="last_prd_nm" class=""></a>
|
||||||
|
</p>
|
||||||
|
<!-- 검색input -->
|
||||||
|
<p class="search_input">
|
||||||
|
<input type="text" id="prd_nm" name="prd_nm" placeholder="내가만든이유식 검색창"><a href="javascript:list_more('Y');">검색</a>
|
||||||
|
</p>
|
||||||
|
<!-- 검색결과 -->
|
||||||
|
<ul id="ul_board" class="search_result">
|
||||||
|
</ul>
|
||||||
|
</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="eat_minute" name="eat_minute" value="${model['df_minute']!}" class="required" placeholder="섭취시간(분)" data-tit="분" step="0.1">
|
||||||
|
<span class="unit">분</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="p_list_item p_border_box">
|
||||||
|
<label for="child_weight" class="p_label">섭취시간</label>
|
||||||
|
<div class="p_input_box">
|
||||||
|
<input type="number" id="eat_second" name="eat_second" value="${model['df_second']!}" class="required" placeholder="섭취시간(초)" data-tit="초" step="0.1">
|
||||||
|
<span class="unit">초</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="p_list_item p_border_box">
|
||||||
|
<label for="child_weight" class="p_label">섭취량</label>
|
||||||
|
<div class="p_input_box">
|
||||||
|
<input type="number" id="eat_lac" name="eat_lac" value="${model['df_lac']!}" class="required" placeholder="섭취량" data-tit="ml" step="0.1">
|
||||||
|
<span class="unit">ml</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="p_list_item p_border_box">
|
||||||
|
<label for="child_weight" class="p_label">메모</label>
|
||||||
|
<div class="p_input_box">
|
||||||
|
<input type="text" id="memo" name="memo" value="${model['memo']!}" class="required" placeholder="메모" data-tit="ml" step="0.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_commerce'])??>
|
||||||
|
<div class="direct_input_wrap">
|
||||||
|
<h2 class="title"><span class="blue_tit">시판이유식</span> 리스트</h2>
|
||||||
|
<div class="result_list_box">
|
||||||
|
<#list model['lm_lac_commerce'] as item>
|
||||||
|
<div class="r_list_item">
|
||||||
|
<div>
|
||||||
|
<div class="result_num_box">
|
||||||
|
<div class="height_result result_num"> ${item['df_minute']?string('0')}<span class="unit">분</span> ${item['df_second']?string('0')}<span class="unit">초</span>
|
||||||
|
${item['df_lac']?string('0')}<span class="unit">ml</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:frmCommerce.ajax_delete_lac_commerce(${item['df_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 frmCommerce = {
|
||||||
|
|
||||||
|
init: function(){
|
||||||
|
SNUtil.initInputAction()
|
||||||
|
|
||||||
|
$('#frmCommerce').on('submit',function(e){
|
||||||
|
|
||||||
|
if (!SNValidator.validateWithAlert('#frmCommerce')) {
|
||||||
|
e.preventDefault()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ajax_insert_commerce()
|
||||||
|
e.preventDefault()
|
||||||
|
return;
|
||||||
|
|
||||||
|
}.bind(this))
|
||||||
|
},
|
||||||
|
|
||||||
|
ajax_insert_commerce: function(){
|
||||||
|
|
||||||
|
var data = {}
|
||||||
|
data.smc_no = $('#smc_no').val()
|
||||||
|
data.base_dt = moment( $('#input_date').val(),'YYYY. MM. DD' ).format('YYYYMMDD')
|
||||||
|
data.df_minute = $('#eat_minute').val()
|
||||||
|
data.df_second = $('#eat_second').val()
|
||||||
|
data.df_lac = $('#eat_lac').val()
|
||||||
|
data.memo = $('#memo').val()
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url:'${URL_ROOT}/m/bf_food/ajax_insert_commerce.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('./view_bf_commerce_input.do?smc_no=${(model["smc_no"])!}') })
|
||||||
|
}else{
|
||||||
|
Swal.fire({text:"등록되지 않았습니다"})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
ajax_delete_lac_commerce: function(df_no){
|
||||||
|
if(!df_no){return}
|
||||||
|
|
||||||
|
var data = {}
|
||||||
|
data.df_no = df_no
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
text: "기록을 삭제하시겠습니까?",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: '네',
|
||||||
|
cancelButtonText: '취소'
|
||||||
|
}).then((result) => {
|
||||||
|
if(result.value){
|
||||||
|
$.ajax({
|
||||||
|
url:'${URL_ROOT}/m/bf_food/ajax_delete_lac_commerce.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('./view_bf_commerce_input.do?smc_no=${(model["smc_no"])!}')
|
||||||
|
}else{
|
||||||
|
Swal.fire({text:"삭제되지 않았습니다"})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
frmCommerce.init();
|
||||||
|
|
||||||
|
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