1. 의견제출 심의 수정.

main
jjh 3 months ago
parent 9893bd9216
commit 0a3eb05c32

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

Loading…
Cancel
Save