1. 의견제출 심의 수정.

main
jjh 3 months ago
parent 9893bd9216
commit 0a3eb05c32

@ -4,318 +4,325 @@
<c:set var="prefixName" scope="request">의견제출 심의 상세 정보</c:set> <c:set var="prefixName" scope="request">의견제출 심의 상세 정보</c:set>
<!-- inner page html --> <!-- inner page html -->
<div class="content-pop"> <div class="content-pop" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container flex-grow-1 px-0"> <div class="container flex-grow-1 px-0">
<div class="card"> <div class="card">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit"> <form name="frmEdit">
<!-- hidden --> <!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" /> <input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" /> <input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" /> <input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="opnnId--${pageName}" name="opnnId" data-map="OPNN_ID" /> <input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 접수 번호 --> <!-- 접수 번호 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="rcptNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNo">접수번호</label>
<input type="text" class="form-control w-30" id="rcptNo--${pageName}" name="rcptNo" data-map="RCPT_NO" readonly /> <input is="id-input" type="text" class="form-control w-30" name="rcptNo" data-map="RCPT_NO" readonly />
</div> </div>
<!-- 접수 일자 --> <!-- 접수 일자 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="rcptYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수일자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptYmd">접수일자</label>
<input type="text" class="form-control w-25" id="rcptYmd--${pageName}" name="rcptYmd" data-map="RCPT_YMD" data-fmt-type="day" readonly /> <input is="id-input" type="text" class="form-control w-25" name="rcptYmd" data-map="RCPT_YMD" data-fmt-type="day" readonly />
</div> </div>
<!-- 진술자 이름 --> <!-- 진술자 이름 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="sttrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrNm">성명</label>
<input type="text" class="form-control w-30" id="sttrNm--${pageName}" name="sttrNm" data-map="STTR_NM" readonly /> <input is="id-input" type="text" class="form-control w-30" name="sttrNm" data-map="STTR_NM" readonly />
</div> </div>
<!-- 의견 제출 구분 코드 --> <!-- 의견 제출 구분 코드 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="opnnSbmsnSeNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSeNm">의견제출구분</label>
<input type="text" class="form-control w-50" id="opnnSbmsnSeNm--${pageName}" name="opnnSbmsnSeNm" data-map="OPNN_SBMSN_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-50" name="opnnSbmsnSeNm" data-map="OPNN_SBMSN_SE_NM" readonly />
</div> </div>
<!-- 의견 제출 요지 --> <!-- 의견 제출 요지 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="opnnSbmsnGist--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출요지</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnGist">의견제출요지</label>
<textarea class="form-control w-85" id="opnnSbmsnGist--${pageName}" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" rows="2" data-maxlengthb="300" readonly></textarea> <textarea is="id-textarea" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" rows="2" data-maxlengthb="300" readonly></textarea>
</div> </div>
<!-- 담당자 검토 의견 --> <!-- 담당자 검토 의견 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="picRvwOpnn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">검토의견</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="picRvwOpnn">검토의견</label>
<textarea class="form-control w-85" id="picRvwOpnn--${pageName}" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="3" data-maxlengthb="1000"></textarea> <textarea is="id-textarea" class="form-control w-85" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="3" data-maxlengthb="1000"></textarea>
</div> </div>
<!-- 문서 번호 --> <!-- 문서 번호 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="docNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">문서번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="docNo">문서번호</label>
<input type="text" class="form-control w-40" id="docNo--${pageName}" name="docNo" data-map="DOC_NO" /> <input is="id-input" type="text" class="form-control w-40" name="docNo" data-map="DOC_NO" />
</div> </div>
<!-- 통보 구분 코드 --> <!-- 통보 구분 코드 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="ntfctnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">통보구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ntfctnSeCd">통보구분</label>
<select class="form-select" id="ntfctnSeCd--${pageName}" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required> <select is="id-select" class="form-select" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required>
<option value="">선택하세요</option> <option value="">선택하세요</option>
<c:forEach items="${FIM030List}" var="item"> <c:forEach items="${FIM030List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 의견 제출 상태 코드 --> <!-- 의견 제출 상태 코드 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="opnnSbmsnSttsCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">심의결과</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSttsCd">심의결과</label>
<select class="form-select" id="opnnSbmsnSttsCd--${pageName}" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" onchange="pageObject['${pageName}'].fnChangeOpnnSbmsnSttsCd(this.value);" required> <select is="id-select" class="form-select" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" onchange="pageObject['${pageName}'].fnChangeOpnnSbmsnSttsCd(this.value);" required>
<option value="">선택하세요</option> <option value="">선택하세요</option>
<c:forEach items="${FIM031List}" var="item"> <c:forEach items="${FIM031List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 답변 일시 --> <!-- 답변 일시 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="ansYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">심의일시</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ansYmd">심의일시</label>
<input type="text" class="form-control form-date" id="ansYmd--${pageName}" name="ansYmd" data-map="ANS_YMD" <input is="id-input" type="text" class="form-control form-date" name="ansYmd" data-map="ANS_YMD"
data-fmt-type="day" maxlength="10" required /> data-fmt-type="day" maxlength="10" required />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white" name="btnAnsYmd"></button>
<input type="text" class="form-control form-time" id="ansTm--${pageName}" name="ansTm" data-map="ANS_TM" <input is="id-input" type="text" class="form-control form-time" name="ansTm" data-map="ANS_TM"
data-fmt-type="time" maxlength="8" placeholder="시:분:초" required /> data-fmt-type="time" maxlength="8" placeholder="시:분:초" required />
</div> </div>
<!-- 감경 사유 코드 --> <!-- 감경 사유 코드 -->
<div class="col-md-6" id="divRdctRsnCd--${pageName}"> <div class="col-md-6" name="divRdctRsnCd">
<label for="rdctRsnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경사유</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rdctRsnCd">감경사유</label>
<select class="form-select" id="rdctRsnCd--${pageName}" name="rdctRsnCd" data-map="RDCT_RSN_CD"> <select is="id-select" class="form-select" name="rdctRsnCd" data-map="RDCT_RSN_CD">
<c:forEach items="${FIM019List}" var="item"> <c:forEach items="${FIM019List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 감경 금액 --> <!-- 감경 금액 -->
<div class="col-md-6" id="divRdctAmt--${pageName}"> <div class="col-md-6" name="divRdctAmt">
<label for="rdctAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rdctAmt">감경금액</label>
<input type="text" class="form-control w-30 text-end" id="rdctAmt--${pageName}" name="rdctAmt" data-map="RDCT_AMT" readonly /> <input is="id-input" type="text" class="form-control w-30 text-end" name="rdctAmt" data-map="RDCT_AMT" readonly />
</div> </div>
<!-- 답변 내용 --> <!-- 답변 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="ansCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">심의내용</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="ansCn">심의내용</label>
<textarea class="form-control w-85" id="ansCn--${pageName}" name="ansCn" data-map="ANS_CN" rows="5" data-maxlengthb="4000"></textarea> <textarea is="id-textarea" class="form-control w-85" name="ansCn" data-map="ANS_CN" rows="5" data-maxlengthb="4000"></textarea>
</div> </div>
</div> </div>
</form> </form>
<!-- 입력 영역 --> <!-- 입력 영역 -->
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장"> <button type="button" class="btn btn-primary w-px-120" name="btnSave" title="저장">
저장 저장
</button> </button>
</span> </span>
</span> </span>
</div> </div>
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> --> </div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content --> <!-- Content -->
</div> </div>
<!-- inner page html <div class="content-pop"> --> <!-- inner page html <div class="content-pop"> -->
<script> <script>
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
**************************************************************************/ **************************************************************************/
$(document).ready(function() { $(document).ready(function() {
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields // FormFields
$P.formFields = new FimsFormFields("#frmEdit--${pageName}"); $P.formFields = new FimsFormFields($P.selector("frmEdit"));
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.ctrl = new DatasetControl({
prefix: "opnnDlbr" prefix: "opnnDlbr"
, prefixName: "의견제출 심의" , prefixName: "의견제출 심의"
, keymapper: info => info ? info.OPNN_ID : "" , keymapper: info => info ? info.OPNN_ID : ""
, dataGetter: obj => obj.${infoPrefix}Info , dataGetter: obj => obj.info
}); });
/************************************************************************** /**************************************************************************
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => { $P.ctrl.onCurrentChange = (item) => {
if (!item) return; if (!item) return;
// Dataset 셋팅 // Dataset 셋팅
$P.formFields.set($P.control, item); $P.formFields.set($P.ctrl, item);
// 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD); // 업무구분에 따른 URL 변경
// 의견제출 상태 코드 변경 $P.fnSetURL(item.data.TASK_SE_CD);
$P.fnChangeOpnnSbmsnSttsCd(item.data.OPNN_SBMSN_STTS_CD);
// 의견제출 상태 코드 변경
if (item.data.ANS_YMD == null || item.data.ANS_YMD == "") { $P.fnChangeOpnnSbmsnSttsCd(item.data.OPNN_SBMSN_STTS_CD);
$("#ansYmd--${pageName}").datepicker("setDate", new Date()); // 날짜
$("#ansTm--${pageName}").val(new Date().toTimeString().split(" ")[0]); // 시간 "09:51:35 GMT+0900 (한국 표준시)"의 형식에서 공백을 기준으로 잘라 시간 부분만 가져와줍니다. // 답변 일자가 없다면..
} if (item.data.ANS_YMD == null || item.data.ANS_YMD == "") {
} $P.$find("ansYmd").datepicker("setDate", TODAY()); // 날짜
$P.$find("ansTm").val(new Date().toTimeString().split(" ")[0]); // 시간 "09:51:35 GMT+0900 (한국 표준시)"의 형식에서 공백을 기준으로 잘라 시간 부분만 가져와줍니다.
// 저장 callback }
$P.control.onSave = (resp) => { }
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle); // 저장 callback
$P.ctrl.onSave = (resp) => {
// 메시지 출력 let dialogTitle = $("#" + $P.selfDlgId()).find("h5.modal-title").html();
dialog.alert({ let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
content: showMessage
, init: () => { AppSupport.setDialogZindex(); } // 메시지 출력
, onOK: () => { } dialog.alert({
}); content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
if (resp.saved) { , onOK: () => { }
dialog.close($P.control.prefix + "Dialog--${openerPageName}"); , onClose: () => {
} if (resp.saved) { dialog.close($P.selfDlgId()); }
} }
});
// 저장 }
$P.control.save = (info) => {
if (!info) return; // 저장
$P.ctrl.save = (info) => {
ajax.post({ if (!info) return;
url: $P.control.urls.update
, data: info ajax.post({
, success: resp => $P.control.onSave(resp) url: $P.ctrl.urls.update
}); , data: info
} , success: resp => $P.ctrl.onSave(resp)
});
/************************************************************************** }
* 사용자 함수(function)
**************************************************************************/ /**************************************************************************
// 업무구분에 따른 URL 설정 * 사용자 함수(function)
$P.fnSetURL = (taskSeCd) => { **************************************************************************/
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/update.do"); // 수정 // 업무구분에 따른 URL 설정
} $P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/update.do"); // 수정
// 의견제출 상태 코드 변경 }
$P.fnChangeOpnnSbmsnSttsCd = (obj) => {
// javascript를 이용한 visibility 변경 (이 방법을 사용하는 경우, 안에 있는 요소들이 보이지않지만 그 요소들이 할당 하고 있는 공간은 그대로 유지(공백처리)) // 의견제출 상태 코드 변경
// document.getElementById("divRdctRsnCd--${pageName}").style.visibility = "hidden"; $P.fnChangeOpnnSbmsnSttsCd = (obj) => {
// document.getElementById("divRdctRsnCd--${pageName}").style.visibility = "visible"; // javascript를 이용한 visibility 변경 (이 방법을 사용하는 경우, 안에 있는 요소들이 보이지않지만 그 요소들이 할당 하고 있는 공간은 그대로 유지(공백처리))
$("#divRdctRsnCd--${pageName}").hide(); // document.getElementById("divRdctRsnCd--${pageName}").style.visibility = "hidden";
$("#divRdctAmt--${pageName}").hide(); // document.getElementById("divRdctRsnCd--${pageName}").style.visibility = "visible";
$("#rdctRsnCd--${pageName}").attr("required", false); $P.$find("divRdctRsnCd").hide();
$("#rdctAmt--${pageName}").attr("required", false); $P.$find("divRdctAmt").hide();
$P.$find("rdctRsnCd").attr("required", false);
if (obj == "04") { // 의견제출 상태 코드(FIM031) 04: 과태료감경 $P.$find("rdctAmt").attr("required", false);
// 필수 선택 추가 필요
$("#divRdctRsnCd--${pageName}").show(); if (obj == "04") { // 의견제출 상태 코드(FIM031) 04: 과태료감경
$("#divRdctAmt--${pageName}").show(); // 필수 선택 추가 필요
$("#rdctRsnCd--${pageName}").attr("required", true); $P.$find("divRdctRsnCd").show();
$("#rdctAmt--${pageName}").attr("required", true); $P.$find("divRdctAmt").show();
} $P.$find("rdctRsnCd").attr("required", true);
} $P.$find("rdctAmt").attr("required", true);
}
/************************************************************************** }
* 버튼 clickEvent
**************************************************************************/ /**************************************************************************
// 저장 * 버튼 clickEvent
$P.fnSave = () => { **************************************************************************/
// validate 확인 // 저장
if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; $P.fnSave = () => {
// validate 확인
// 감경 사유 확인 // if (!AppSupport.customValidate($P.$find("frmEdit").find("input, select, textarea"))) return;
let opnnSbmsnSttsCd = $("#opnnSbmsnSttsCd--${pageName}").val();
let rdctRsnCd = $("#rdctRsnCd--${pageName} option:selected").val(); // 감경 사유 확인
let rdctRsnNm = $("#rdctRsnCd--${pageName} option:selected").text(); let opnnSbmsnSttsCd = $P.$find("opnnSbmsnSttsCd").val();
if (opnnSbmsnSttsCd == "04" && rdctRsnCd == "00") { let rdctRsnCd = $P.$find("rdctRsnCd").find("option:selected").val();
dialog.alert({ let rdctRsnNm = $P.$find("rdctRsnCd").find("option:selected").text();
content: "감경사유가 '" + rdctRsnNm + "' 입니다."
+ "<br>" + "[" + $P.control.prefixName + " 저장" + "]" + " 실행이 취소되었습니다." if (opnnSbmsnSttsCd == "04" && rdctRsnCd == "00") {
, init: () => { AppSupport.setDialogZindex(); } dialog.alert({
, onOK: () => { } content: "감경사유가 '" + rdctRsnNm + "' 입니다."
}); + "<br>" + "[" + $P.ctrl.prefixName + "]" + " 저장 실행이 취소되었습니다."
return; , init: () => { AppSupport.setDialogZindex(); }
} , onOK: () => { }
});
dialog.alert({ return;
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?" }
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { dialog.alert({
$P.control.save($P.formFields.get()); // formFields content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
} , init: () => { AppSupport.setDialogZindex(); }
}); , onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
} });
}
/**************************************************************************
* 초기 셋팅 /**************************************************************************
**************************************************************************/ * 초기 셋팅
// 이벤트 설정 **************************************************************************/
$P.setEvent = () => { // 이벤트 설정
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용 $P.setEvent = () => {
$("#frmEdit--${pageName}").find(".form-date").each(function() { // form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$(this).on("input",function() { $P.$find("frmEdit").find(".form-date").each(function() {
let value = this.value.replaceAll("-", ""); $(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); if (value.length > 7) {
} else if(value.length > 5) { this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
this.value = value.substring(0, 4) + "-" + value.substring(4); } else if(value.length > 5) {
} this.value = value.substring(0, 4) + "-" + value.substring(4);
}); }
}); });
// form-date 항목에서 키보드로 입력시 시간 포맷팅 적용 });
$("#frmEdit--${pageName}").find(".form-time").each(function() { // form-time 항목에서 키보드로 입력시 시간 포맷팅 적용
$(this).on("input",function() { $P.$find("frmEdit").find(".form-time").each(function() {
let value = this.value.replaceAll(":", ""); $(this).on("input", function() {
let value = this.value.replaceAll(":", "");
if (value.length > 5) {
this.value = value.substring(0, 2) + ":" + value.substring(2, 4) + ":" + value.substring(4); if (value.length > 5) {
} else if (value.length > 3) { this.value = value.substring(0, 2) + ":" + value.substring(2, 4) + ":" + value.substring(4);
this.value = value.substring(0, 2) + ":" + value.substring(2); } else if (value.length > 3) {
} this.value = value.substring(0, 2) + ":" + value.substring(2);
}
}); });
}); });
// 버튼 이벤트 // 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $P.$find("btnSave").on("click", () => { $P.fnSave() }); // 저장
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
// 달력 초기화 // 화면 초기화
AppSupport.initDatepicker("frmEdit--${pageName}"); $P.find("frmEdit").reset();
$("#ansYmd--${pageName}").datepicker("setDate", new Date());
$("#ansTm--${pageName}").val(new Date().toTimeString().split(" ")[0]); // 달력 초기화
AppSupport.initDatepicker($P.find("frmEdit"));
// view 로 호출됐을 경우.. $P.$find("ansYmd").datepicker("setDate", TODAY());
if ($P.callPurpose == "view") { $P.$find("ansTm").val(new Date().toTimeString().split(" ")[0]);
$("btnSave--${pageName}").attr("disabled", true);
} // view 로 호출됐을 경우..
} if ($P.callPurpose == "view") {
// input 요소들을 disabled
/************************************************************************** $P.$find("frmEdit").find("input,textarea,select").prop("disabled", true);
* 최초 실행 함수 // button 요소들을 disabled
**************************************************************************/ $P.$find("btnAnsYmd").prop("disabled", true); // 답변 일자 달력 버튼
// 1. 이벤트 설정 $P.$find("btnSave").prop("disabled", true); // 저장 버튼
$P.setEvent(); }
}
// 2. 초기 화면 설정
$P.initForm(); /**************************************************************************
* 최초 실행 함수
// 3. Dataset 설정 **************************************************************************/
$P.control.setData([${opnnSbmsnInfo}]); // 1. 이벤트 설정
}); $P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
$P.ctrl.setData([${info}]);
});
</script> </script>

Loading…
Cancel
Save