|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
<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="frmHeight" method="POST">
|
|
|
|
|
<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">
|
|
|
|
@ -59,11 +59,29 @@
|
|
|
|
|
<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_second" name="eat_second" value="${model['height']!}" class="required" placeholder="섭취시간(분)" data-tit="키" step="0.1">
|
|
|
|
|
<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>
|
|
|
|
|
<input type="number" id="eat_minute" name="eat_minute" value="${model['weight']!}" class="required" placeholder="섭취시간(초)" data-tit="체중" step="0.1">
|
|
|
|
|
</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>
|
|
|
|
@ -117,49 +135,37 @@
|
|
|
|
|
<!-- //iyu_nav -->
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var growthBody = {
|
|
|
|
|
var commerce = {
|
|
|
|
|
|
|
|
|
|
init: function(){
|
|
|
|
|
SNUtil.initInputAction()
|
|
|
|
|
|
|
|
|
|
$('#frmHeight').on('submit',function(e){
|
|
|
|
|
$('#frmCommerce').on('submit',function(e){
|
|
|
|
|
|
|
|
|
|
if (!SNValidator.validateWithAlert('#frmHeight')) {
|
|
|
|
|
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() })
|
|
|
|
|
if (!SNValidator.validateWithAlert('#frmCommerce')) {
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.ajax_insert_growth_body()
|
|
|
|
|
this.ajax_insert_commerce()
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}.bind(this))
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ajax_insert_growth_body: function(){
|
|
|
|
|
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.height = $('#child_height').val()
|
|
|
|
|
data.weight = $('#child_weight').val()
|
|
|
|
|
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_growth_body/ajax_insert_bf_growth_body.do?1=1',
|
|
|
|
|
url:'${URL_ROOT}/m/bf_food/ajax_insert_commerce.do?1=1',
|
|
|
|
|
type:'post',
|
|
|
|
|
data: data,
|
|
|
|
|
dataType:'json',
|
|
|
|
@ -216,7 +222,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
growthBody.init();
|
|
|
|
|
commerce.init();
|
|
|
|
|
|
|
|
|
|
var today = moment().format('YYYY.MM.DD');
|
|
|
|
|
$("#input_date").val(today)
|
|
|
|
|