|
|
|
@ -58,8 +58,8 @@
|
|
|
|
|
<div class="p_list_item child_box">
|
|
|
|
|
<label for="child_birthday" class="p_label">생년월일<span style="color:#FF9C01">*</span></label>
|
|
|
|
|
<div class="p_input_box">
|
|
|
|
|
<#if item??><input type="text" onkeyup="this.value = date_mask(this.value)" id="birthday" name="birthday" value="${model['rm_child']['birthday']?string('yyyy.MM.dd')}" class="" placeholder="YYYY.MM.DD">
|
|
|
|
|
<#else><input type="text" onkeyup="this.value = date_mask(this.value)" id="birthday" name="birthday" value="" class="" placeholder="YYYY.MM.DD"></#if>
|
|
|
|
|
<#if item??><input type="text" onkeyup="date_mask(this)" id="birthday" name="birthday" maxlength="10" value="${model['rm_child']['birthday']?string('yyyy.MM.dd')}" class="" placeholder="YYYY.MM.DD">
|
|
|
|
|
<#else><input type="text" onkeyup="date_mask(this)" id="birthday" name="birthday" maxlength="10" value="" class="" placeholder="YYYY.MM.DD"></#if>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="p_list_item child_box">
|
|
|
|
@ -125,7 +125,7 @@
|
|
|
|
|
<div class="p_list_item child_box">
|
|
|
|
|
<label for="disease_fever" class="p_label">${item['title']}
|
|
|
|
|
<#if item['cd_no'] == 'BF_B_D_8'>
|
|
|
|
|
<label for="disease_fever" class="p_label">(<input type="text" name="disease_text" value="${item['disease_text']!}">)</label>
|
|
|
|
|
<label for="disease_fever" class="p_label">(<input type="text" name="disease_text" style="width: 150px;" value="${item['disease_text']!}">)</label>
|
|
|
|
|
</#if>
|
|
|
|
|
</label>
|
|
|
|
|
<div class="fe_input_box">
|
|
|
|
@ -189,20 +189,33 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 날짜를 yyyy-mm-dd 형식으로 만들어 줌.
|
|
|
|
|
function date_mask(objValue) {
|
|
|
|
|
var v = objValue.replace("--", ".");
|
|
|
|
|
v = objValue.replace("..", ".");
|
|
|
|
|
|
|
|
|
|
if (v.match(/^\d{4}$/) !== null) {
|
|
|
|
|
v = v + '.';
|
|
|
|
|
} else if (v.match(/^\d{4}\.\d{2}$/) !== null) {
|
|
|
|
|
v = v + '.';
|
|
|
|
|
function date_mask(obj) {
|
|
|
|
|
// DELETE 키버튼이 눌리지 않은 경우에만 실행
|
|
|
|
|
if(event.keyCode != 8) {
|
|
|
|
|
// 숫자와 점(.)기호의 값만 존재하는 경우 실행
|
|
|
|
|
if(obj.value.replace(/[0-9 \.]/g, "").length == 0) {
|
|
|
|
|
// 점(.)기호를 제거한다.
|
|
|
|
|
let number = obj.value.replace(/[^0-9]/g,"");
|
|
|
|
|
let ymd = "";
|
|
|
|
|
// 문자열의 길이에 따라 Year, Month, Day 앞에 점(.)기호를 삽입한다.
|
|
|
|
|
if(number.length < 4) {
|
|
|
|
|
return number;
|
|
|
|
|
} else if(number.length < 6){
|
|
|
|
|
ymd += number.substr(0, 4);
|
|
|
|
|
ymd += ".";
|
|
|
|
|
ymd += number.substr(4);
|
|
|
|
|
} else {
|
|
|
|
|
ymd += number.substr(0, 4);
|
|
|
|
|
ymd += ".";
|
|
|
|
|
ymd += number.substr(4, 2);
|
|
|
|
|
ymd += ".";
|
|
|
|
|
ymd += number.substr(6);
|
|
|
|
|
}
|
|
|
|
|
obj.value = ymd;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
v = v.replace(/[a-zA-Z]/g, "");
|
|
|
|
|
v = v.replace( /[\{\}\[\]\/?,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "");
|
|
|
|
|
v = v.replace(/ /gi, '');
|
|
|
|
|
|
|
|
|
|
return v;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|