Merge branch 'jiwoo'

This commit is contained in:
JIWOO 2025-10-20 18:11:26 +09:00
commit 872b427d0d
8 changed files with 128 additions and 9 deletions

View File

@ -99,7 +99,12 @@
, #addrDetail#
, #post#
, #email#
<isNotEmpty property="reqPnttm">
, to_timestamp(#reqPnttm#, 'YYYY-MM-DD')
</isNotEmpty>
<isEmpty property="reqPnttm">
, NOW()
</isEmpty>
, #vntYear#
, #vntNmbr#
, #cmptntAthrt#
@ -329,7 +334,12 @@
, addr_detail = #addrDetail#
, post = #post#
, email = #email#
<isNotEmpty property="reqPnttm">
, req_pnttm = to_timestamp(#reqPnttm#, 'YYYY-MM-DD')
</isNotEmpty>
<isEmpty property="reqPnttm">
, req_pnttm = NOW()
</isEmpty>
, vnt_year = #vntYear#
, vnt_nmbr = #vntNmbr#
, cmptnt_athrt = #cmptntAthrt#

View File

@ -99,7 +99,12 @@
, #addrDetail#
, #post#
, #email#
<isNotEmpty property="reqPnttm">
, to_timestamp(#reqPnttm#, 'YYYY-MM-DD')
</isNotEmpty>
<isEmpty property="reqPnttm">
, NOW()
</isEmpty>
, #vntYear#
, #vntNmbr#
, #cmptntAthrt#
@ -329,7 +334,12 @@
, addr_detail = #addrDetail#
, post = #post#
, email = #email#
<isNotEmpty property="reqPnttm">
, req_pnttm = to_timestamp(#reqPnttm#, 'YYYY-MM-DD')
</isNotEmpty>
<isEmpty property="reqPnttm">
, req_pnttm = NOW()
</isEmpty>
, vnt_year = #vntYear#
, vnt_nmbr = #vntNmbr#
, cmptnt_athrt = #cmptntAthrt#

View File

@ -367,7 +367,7 @@
<div id="calendar">
<div class="calendar_wrap">
<c:set var="reqPnttm" value="${fn:substring(info.reqPnttm, 0, 10)}" />
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
<input type="text" class="calendar_hyphen" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
</div>
</div>
</td>

View File

@ -52,11 +52,11 @@
$('.picker__button--today').removeAttr('disabled').click();
//클릭 이벤트 후 disabled 자동으로 적용
/* $('.picker__button--today').attr('disabled', 'disabled'); */
var userWork = '${userWork}';
/* var userWork = '${userWork}';
if(userWork != ''){
$(".picker").remove();
$(".calendar").removeClass('picker__input');
}
} */
});
@ -415,7 +415,7 @@
<td>
<div id="calendar">
<div class="calendar_wrap">
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="">
<input type="text" class="calendar_hyphen" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="">
</div>
</div>
</td>

View File

@ -317,7 +317,7 @@
<div id="calendar">
<div class="calendar_wrap">
<c:set var="reqPnttm" value="${fn:substring(info.reqPnttm, 0, 10)}" />
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
<input type="text" class="calendar_hyphen" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
</div>
</div>
</td>

View File

@ -367,7 +367,7 @@
<div id="calendar">
<div class="calendar_wrap">
<c:set var="reqPnttm" value="${fn:substring(info.reqPnttm, 0, 10)}" />
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
<input type="text" class="calendar_hyphen" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="<c:out value="${reqPnttm }" />" />
</div>
</div>
</td>

View File

@ -52,11 +52,11 @@
$('.picker__button--today').removeAttr('disabled').click();
//클릭 이벤트 후 disabled 자동으로 적용
/* $('.picker__button--today').attr('disabled', 'disabled'); */
var userWork = '${userWork}';
/* var userWork = '${userWork}';
if(userWork != ''){
$(".picker").remove();
$(".calendar").removeClass('picker__input');
}
} */
});
@ -415,7 +415,7 @@
<td>
<div id="calendar">
<div class="calendar_wrap">
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="">
<input type="text" class="calendar_hyphen" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="">
</div>
</div>
</td>

View File

@ -32,6 +32,11 @@ $(document).ready(function () {
calendarSetting();
}
if($(".calendar_hyphen").length > 0){
// calendar
calendarCustomSetting(".calendar_hyphen", "yyyy-mm-dd", 'yyyymmdd');
}
if($(".birthYear").length > 0){
// 생년월일 select box
birthSelectBoxDraw();
@ -238,6 +243,100 @@ function calendarSetting(){
})
}
//캘린더 커스텀 버전(yyyy.mm.dd, yyyy-mm-dd 등)
function calendarCustomSetting(selector, formatStr, formatSubmitStr){
$(selector).pickadate({
format : formatStr, //인풋에 표기되는 값
formatSubmit : formatSubmitStr, //전송하는 값
labelMonthNext: '다음 달 보기',
labelMonthPrev: '이전 달 보기',
selectYears: 200,
selectMonths: true,
onOpen : function(){
// 윈도우 height 값 기준으로 달력 height 보다 위에있을 경우 팝업이 아래로 아래 있을 경우 팝업이 위로 열림
var thisCal = $(this.$holder);
var monthText = thisCal.find(".picker__month").text();
var yearText = thisCal.find(".picker__year").text();
if(thisCal.closest('.calendar_wrap').length > 0 && $(window).scrollTop()+($(window).outerHeight()/2)>thisCal.closest('.calendar_wrap').offset().top){
thisCal.attr('style','').css("top","0");
}else{
thisCal.attr('style','').css("bottom","40px");
}
if(thisCal.offset().left+thisCal.outerWidth()<$(window).outerWidth()){
thisCal.css({'left':0,'right':'initial'});
}else{
thisCal.css({'left':'initial','right':0});
}
thisCal.css("display","block");
// table caption 추가
if(thisCal.find("caption").length == 0 ){
thisCal.find(".picker__table").prepend("<caption>"+yearText+"년 "+monthText+" 달력</caption>");
}else{
thisCal.find("caption").text(yearText+"년 "+monthText+"달력");
}
},
onClose : function(){
if(this.$node[0].name.indexOf('searchStart') != -1 || this.$node[0].name.indexOf('searchEnd') != -1){
var stName = '';
var enName = '' ;
if(this.$node[0].name.indexOf('Start') != -1){
stName = this.$node[0].name;
enName = this.$node[0].name.replace('Start', 'End') ;
}else{
stName = this.$node[0].name.replace('End', 'Start');
enName = this.$node[0].name;
}
// ID를 업무로 사용할수있기 때문에 name으로 사용
// name은 다중선택이므로 첫번째꺼로만 검색한다.
// 검색에서는 다중으로 존재해서는 안된다.
var searchStartDt = $('.list_top input[name=' + stName+ ']:eq(0)').val();
var searchEndDt = $('.list_top input[name=' + enName+ ']:eq(0)').val();
if(isNotEmpty(searchStartDt) && isNotEmpty(searchEndDt)){
searchStartDt = isNotEmpty(searchStartDt) ? searchStartDt.replace(/[.]/gi, '') : '';
searchEndDt = isNotEmpty(searchEndDt) ? searchEndDt.replace(/[.]/gi, '') : '';
if(searchStartDt > searchEndDt){
var msg = '시작일이 종료일보다 클 수 없습니다.';
if(this.$node[0].name.indexOf('End') != -1){
msg = '종료일이 시작일보다 작을 수 없습니다.';
$('.list_top input[name=' + enName+ ']:eq(0)').val('');
}else{
$('.list_top input[name=' + stName+ ']:eq(0)').val('');
}
alert(msg);
}
}
}
$(this.$holder).css("display","none"); // 웹접근성 안보이는데 초점 안가게.
},
onRender: function() {
var thisCal = $(this.$holder);
var monthText = thisCal.find(".picker__month").text();
var yearText = thisCal.find(".picker__year").text();
// table caption 추가
if(thisCal.find("caption").length == 0 ){
thisCal.find(".picker__table").prepend("<caption>"+yearText+"년 "+monthText+" 달력</caption>");
}else{
thisCal.find("caption").text(yearText+"년 "+monthText+"달력");
}
// 달력 불러오고 포커싱 가게
// $(".picker__nav--prev,.picker__nav--next,.picker__day").attr("tabIndex","0");
}
})
}
//새창 팝업
function popOpen(url, name, wid, hei) {