발송일자,납기일자 입력 창이 다이얼로그 창으로 표시되도록 수정함.
parent
dfd6372703
commit
c92c08c87a
@ -1,177 +1,30 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="/resources/image/favicon.ico" />
|
||||
<!-- Fonts -->
|
||||
<link rel="stylesheet" href="/resources/font/publicsans/fontface.css" />
|
||||
<!-- Icons. Uncomment required icon fonts -->
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/boxicons.css" />
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/fontawesome.css" />
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/flag-icons.css" />
|
||||
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-icon.css" />
|
||||
<!-- Core CSS -->
|
||||
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-core.css" />
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/css/theme-default.css" />
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/css/docs.css" />
|
||||
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-core-extend.css" />
|
||||
<!-- Vendors CSS -->
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.css" />
|
||||
<link rel="stylesheet" href="/resources/css/styles.css" />
|
||||
|
||||
<link rel="stylesheet" href="/resources/css/fims/framework/common/common.css"/>
|
||||
|
||||
<link rel="stylesheet" href="/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.css" />
|
||||
|
||||
<title>일자선택</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="card m-4 p-3">
|
||||
<form id="frmInputDate" name="frmInputDate" method="post">
|
||||
<div class="container-search">
|
||||
<div class="row g-1">
|
||||
<!-- 발송 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="sndngYmd" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">발송일자</label>
|
||||
<input type="text" class="form-control form-date" id="sndngYmd" name="sndngYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 발송 종료 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="sndngEndYmd" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">납기일자</label>
|
||||
<input type="text" class="form-control form-date" id="sndngEndYmd" name="sndngEndYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 취급 구분 -->
|
||||
<div class="col-md-12" id="divPostSndng">
|
||||
<label class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">우편발송구분</label>
|
||||
<span class="form-search-linebox">
|
||||
<input type="radio" id="rdRegular" class="form-check-input" name="postSndngSeCd" alt="일반" value="0"><label for="rdRegular">일반</label>
|
||||
<input type="radio" id="rdRegistered" class="form-check-input" name="postSndngSeCd" alt="등기" value="1" checked="checked"><label for="rdRegistered">등기</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card m-4 p-3">
|
||||
<form id="frmInputDate" name="frmInputDate" method="post">
|
||||
<div class="container-search">
|
||||
<div class="row g-1">
|
||||
<!-- 발송 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="sndngYmd" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">발송일자</label>
|
||||
<input type="text" class="form-control form-date" id="sndngYmd" name="sndngYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<span class="container-page-btn">
|
||||
<span class="container-window-btn-right">
|
||||
<button type="button" class="btn btn-primary w-px-80" title="확인" onclick="fnOK()">확인</button>
|
||||
<!-- 발송 종료 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="sndngEndYmd" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">납기일자</label>
|
||||
<input type="text" class="form-control form-date" id="sndngEndYmd" name="sndngEndYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 취급 구분 -->
|
||||
<div class="col-md-12" id="divPostSndng">
|
||||
<label class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">우편발송구분</label>
|
||||
<span class="form-search-linebox">
|
||||
<input type="radio" id="rdRegular" class="form-check-input" name="postSndngSeCd" alt="일반" value="0"><label for="rdRegular">일반</label>
|
||||
<input type="radio" id="rdRegistered" class="form-check-input" name="postSndngSeCd" alt="등기" value="1" checked="checked"><label for="rdRegistered">등기</label>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Core JS -->
|
||||
<script src="/resources/3rd-party/sneat/js/helpers.js"></script>
|
||||
<script src="/resources/3rd-party/sneat/js/config.js"></script>
|
||||
<script src="/resources/3rd-party/sneat/libs/popper/popper.js"></script>
|
||||
<script src="/resources/3rd-party/sneat/js/bootstrap.js"></script>
|
||||
<script src="/resources/3rd-party/sneat/libs/jquery/jquery.js" ></script>
|
||||
<script src="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
|
||||
<script src="/resources/3rd-party/sneat/js/menu.js"></script>
|
||||
|
||||
|
||||
<script src="/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.js"></script>
|
||||
<script src="/resources/3rd-party/bootstrap-datepicker/bootstrap-datepicker-support.js"></script>
|
||||
<script src="/resources/js/fims/framework/cmm/cmmnDateUtil.js"></script>
|
||||
<script src="/resources/js/fims/framework/cmm/initAfterPageLoad.js"></script>
|
||||
|
||||
<script language="javascript">
|
||||
// parameter
|
||||
var openerPageName = location.search.split("&")[0].split("=")[1];
|
||||
var prefix = location.search.split("&")[1].split("=")[1];
|
||||
var callPurpose = location.search.split("&")[2].split("=")[1];
|
||||
var sndngYmd = location.search.split("&")[3].split("=")[1];
|
||||
var sndngEndYmd = location.search.split("&")[4].split("=")[1];
|
||||
|
||||
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
||||
$("#frmInputDate").find(".form-date").each(function() {
|
||||
$(this).on("input", function() {
|
||||
let value = this.value.replaceAll("-", "");
|
||||
|
||||
if (value.length > 7) {
|
||||
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
|
||||
} else if (value.length > 5) {
|
||||
this.value = value.substring(0, 4) + "-" + value.substring(4);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function inputDateComparison(sndngYmd, sndngEndYmd) {
|
||||
let startDate = inputDateSplit(sndngYmd); // 시작일
|
||||
let endDate = inputDateSplit(sndngEndYmd); // 종료일
|
||||
|
||||
if (typeof startDate == "undefined" || startDate == null || startDate == "") {
|
||||
alert("시작일이 입력되지 않았습니다.\n시작일을 입력해주세요.");
|
||||
$("#sndngYmd").focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
if (typeof endDate == "undefined" || endDate == null || endDate == "") {
|
||||
alert("종료일이 입력되지 않았습니다.\n종료일을 입력해주세요.");
|
||||
$("#sndngEndYmd").focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
// 입력일을 확인하는 이유는 현재 작성한 일자가 시작일인지 종료일인지 확인하기 위해서이다.
|
||||
if (startDate > endDate) {
|
||||
alert("시작일이 종료일보다 이 후 일수는 없습니다.\n다시 선택하여 주시기 바랍니다.");
|
||||
$("#sndngYmd").focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 날짜형식에 "-"이 사용된 경우에 한하여 날짜값에서 "-" 기호를 제거한다.
|
||||
function inputDateSplit(obj) {
|
||||
if (obj == "") {
|
||||
return obj;
|
||||
} else {
|
||||
let dateArray = obj.split("-");
|
||||
|
||||
return dateArray[0] + dateArray[1] + dateArray[2];
|
||||
}
|
||||
}
|
||||
|
||||
function fnOK() {
|
||||
// 날짜 확인
|
||||
if (inputDateComparison($("#sndngYmd").val(), $("#sndngEndYmd").val())) {
|
||||
let obj = {
|
||||
prefix : prefix // 호출 prefix
|
||||
, callPurpose : callPurpose // 호출 용도
|
||||
, sndngYmd : $("#sndngYmd").val()
|
||||
, dudtYmd : $("#sndngEndYmd").val()
|
||||
, postSndngSeCd : $("input[name='postSndngSeCd']:checked").val()
|
||||
};
|
||||
|
||||
window.opener.pageObject[openerPageName].callbackDate(obj);
|
||||
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// 달력 초기화
|
||||
initDatepicker("frmInputDate");
|
||||
|
||||
$("#sndngYmd").datepicker("setDate", sndngYmd);
|
||||
$("#sndngEndYmd").datepicker("setDate", sndngEndYmd);
|
||||
|
||||
if (prefix == "sndngLink") {
|
||||
$("#divPostSndng").show();
|
||||
} else {
|
||||
$("#divPostSndng").hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</form>
|
||||
</div>
|
Loading…
Reference in New Issue