1. 부과제외 수정.

2. 기타 수정.
main
jjh 3 months ago
parent 9e56edbde4
commit 42276a096b

@ -183,13 +183,13 @@
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="table-responsive">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<template name="titleCols">
<template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
<th class="cmn" style="width: 160px;">업무구분</th>
@ -225,10 +225,10 @@
</template>
<tbody name="tbodyList">
</tbody>
<template is="curly-brackets" name="dataRows">
<template is="curly-brackets" name="tmpltRows">
<tr data-key="LEVY_EXCL_ID">
<td class="cmn text-center" onclick ondblclick>{ROW_NUM}</td>
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="MPNG_ID" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td>
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="LEVY_EXCL_ID" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td>
<td class="cmn text-center" onclick ondblclick>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_SE_NM}</td>
@ -264,7 +264,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="dataNotFound">
<template name="tmpltNotFound">
<tr class="bpv">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -350,7 +350,7 @@
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.MPNG_ID;
let key = item.data.LEVY_EXCL_ID;
$P.$find("tbodyList").setCurrentRow(key);
};
@ -374,7 +374,7 @@
dialog.open({
id: dialogId
, title: $P.control.prefixName + " 정보"
, title: params.btnTitle
, size: $P.ctrl.infoSize
, content: resp
, init: () => {
@ -391,7 +391,7 @@
// 삭제 callback
$P.ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, $P.ctrl.prefixName);
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
@ -427,7 +427,7 @@
let clsForTask = $P.$find("taskSeCd").val().toLowerCase(); // 소문자
// 업무별 DataTables(그리드) tr, td
let foundContent = $P.find("dataRows").content;
let foundContent = $P.find("tmpltRows").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
@ -439,7 +439,7 @@
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dataTableDblClick('" + dataItem.getValue("LEVY_EXCL_ID") + "');");
let trs = empty ? [$P.find("dataNotFound").content.querySelector("." + clsForTask + ",.cmn").outerHTML] :
let trs = empty ? [$P.find("tmpltNotFound").content.querySelector("." + clsForTask + ",.cmn").outerHTML] :
dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= totalSize);
@ -449,7 +449,7 @@
initScroll = false;
}
$P.find("table-responsive").changeContent(trs.join(), initScroll, noMore);
$P.find("tableRspns").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$P.$find("gridAllCheckbox").prop("checked", false);
@ -460,7 +460,7 @@
// dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
GRID.checkbox.sync(element, bool);
let atLeastOne = GRID.checkbox.countChecked(element) > 0;
$P.$find("btnRemove").prop("disabled", !atLeastOne);
@ -538,6 +538,7 @@
sggCd: $P.$find("sggCd").val() // 시군구 코드
, taskSeCd: $P.$find("taskSeCd").val() // 업무 구분 코드
, levyExclIds: selected.join(",") // 부과 제외 IDs
, btnTitle: obj.btnTitle // 버튼 title
, delRsn: obj.reason // 삭제 사유
};
@ -591,14 +592,14 @@
renderForTask($P.find("gridbuttonArea"), taskSeCd.toLowerCase());
// 업무별 그리드 th
let colContent = $P.find("titleCols").content;
let colContent = $P.find("tmpltCols").content;
let cols = $(colContent).find("." + taskSeCd.toLowerCase() + ",.cmn");
let colsOuterHTML = "";
cols.each(function() {
colsOuterHTML += this.outerHTML;
});
$P.find("table-responsive").changeColumn(colsOuterHTML);
$P.find("tableRspns").changeColumn(colsOuterHTML);
}
// 사용자검색 버튼 클릭 이벤트
@ -654,13 +655,13 @@
// DataTables(그리드)
$P.ctrl.query.cellDefs =
getCellDefs($P.$find("theadTr").find("th").not(".dummy-th").not(":eq(0)")
, $($P.find("dataRows").content).find("td").not(".dummy-td").not(":eq(0)"));
, $($P.find("tmpltRows").content).find("td").not(".dummy-td").not(":eq(0)"));
$P.ctrl.download();
}
// 부과제외 수정 버튼 클릭 이벤트
$P.fnUpdate = () => {
$P.fnUpdate = (btnTitle) => {
// 부과제외 ID
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
@ -669,6 +670,7 @@
let params = {
callPurpose: "update" // 호출용도: 수정
, btnTitle: btnTitle // 버튼 title
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, levyExclId: $P.ctrl.getValue("LEVY_EXCL_ID") // 부과제외 ID
@ -679,7 +681,7 @@
}
// 부과제외 삭제 버튼 클릭 이벤트
$P.fnRemove = () => {
$P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료
if (selected.length < 1) {
@ -706,13 +708,16 @@
, content: template
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.callbackRsn({ reason: $("#reason").val() });
$P.callbackRsn({
btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유
});
}
});
});
}
});
}
}
});
}
/**************************************************************************
* 초기 설정
@ -728,28 +733,48 @@
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$P.$find("term").onEnterPress($P.fnSearchList);
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$P.$find("frmSearch").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);
}
});
});
// 업무 버튼 이벤트
$P.$find("btnUpdate").on("click", () => { $P.fnUpdate(); }); // 수정
$P.$find("btnRemove").on("click", () => { $P.fnRemove(); }); // 삭제
$P.$find("btnUpdate").on("click", function() {
$P.fnUpdate($P.$find("btnUpdate").attr("title")); // 수정
});
$P.$find("btnRemove").on("click", function() {
$P.fnRemove($P.$find("btnRemove").attr("title")); // 삭제
});
// DataTables width 변경 조정
fnMakeResizableTable($P.find("table-responsive"));
fnMakeResizableTable($P.find("tableRspns"));
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($P.find("table-responsive"), $P.scrollDataList);
fnMakeScrollableTable($P.find("tableRspns"), $P.scrollDataList);
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 설정
initDatepicker($P.find("frmSearch")); // 달력 초기화
initDetailSearchButton($P.find("frmSearch"));
// 2. 초기 설정 및 업무 구분 변경
$P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val());
$P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val()); // 초기 설정 및 업무 구분 변경
// 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
// 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
//# sourceURL=excl01010-main.jsp
</script>

@ -4,46 +4,46 @@
<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="levyExclId--${pageName}" name="levyExclId" data-map="LEVY_EXCL_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="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1">
<!-- 단속일시 -->
<div class="col-md-12">
<label for="crdnYmdTm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속일시</label>
<input type="text" class="form-control w-35" id="crdnYmdTm--${pageName}" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnYmdTm">단속일시</label>
<input is="id-input" type="text" class="form-control w-px-160" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" />
</div>
<!-- 차량번호 -->
<div class="col-md-12">
<label for="vhrno--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량번호</label>
<input type="text" class="form-control w-px-120" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" autocomplete="off" />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-px-120" name="vhrno" data-map="VHRNO" autocomplete="off" />
</div>
<!-- 부과 제외 구분 -->
<div class="col-md-12">
<label for="levyExclSeNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">부과제외구분</label>
<input type="text" class="form-control w-px-120" id="levyExclSeNm--${pageName}" autocomplete="off" />
<input type="hidden" id="levyExclSeCd--${pageName}" name="levyExclSeCd" data-map="LEVY_EXCL_SE_CD" />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclSeNm">부과제외구분</label>
<input is="id-input" type="text" class="form-control w-px-120" name="levyExclSeNm" autocomplete="off" />
<input type="hidden" name="levyExclSeCd" data-map="LEVY_EXCL_SE_CD" />
</div>
<!-- 부과 제외 일자 -->
<div class="col-md-12">
<label for="levyExclYmd--${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="levyExclYmd--${pageName}" name="levyExclYmd" data-map="LEVY_EXCL_YMD"
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclYmd">부과제외일자</label>
<input type="text" class="form-control form-date" name="levyExclYmd" data-map="LEVY_EXCL_YMD"
data-fmt-type="day" autocomplete="off" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-lg bx-calendar bg-white" id="btnLevyExclYmd--${pageName}"></button>
<button type="button" class="bx bx-lg bx-calendar bg-white" name="btnLevyExclYmd"></button>
</div>
<!-- 부과 제외 사유 -->
<div class="col-md-12">
<label for="levyExclRsnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">부과제외사유</label>
<select class="form-select" id="levyExclRsnCd--${pageName}" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclRsnCd">부과제외사유</label>
<select is="id-select" class="form-select" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM022List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -52,8 +52,8 @@
</div>
<!-- 기타 내용 -->
<div class="col-md-12">
<label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">기타 내용</label>
<textarea type="text" class="form-control w-70" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" autocomplete="off" rows="3" data-maxlengthb="1000"></textarea>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="etcCn">기타 내용</label>
<textarea is="id-textarea" type="text" class="form-control w-70" name="etcCn" data-map="ETC_CN" autocomplete="off" rows="3" data-maxlengthb="1000"></textarea>
</div>
</div>
</form>
@ -64,8 +64,8 @@
<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-80" name="btnSave" title="저장">
저장
</button>
</span>
</span>
@ -78,192 +78,193 @@
<!-- / inner page html <div class="content-pop"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
// 공통 코드
var FIM021 = new CommonCodes(${FIM021}, true);
var FIM022 = new CommonCodes(${FIM022}, true);
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "levyExcl"
, prefixName: "부과제외"
, keymapper: info => info ? info.LEVY_EXCL_ID : ""
, dataGetter: obj => obj.${infoPrefix}Info
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.control, item);
// 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD);
// 부과제외구분에 따른 부과제외사유 설정
$P.fnSetFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
// 호출용도가 등록 이라면..
if ($P.callPurpose == "create") {
$("#levyExclYmd--${pageName}").datepicker("setDate", new Date());
}
}
// 저장 callback
$P.control.onSave = (resp) => {
let dialogTitle = $($("#frmEdit--${pageName}").parents(".modal")[0]).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { setDialogZindex(); }
, onOK: () => { }
});
if (resp.saved) {
dialog.close($("#frmEdit--${pageName}").parents(".modal")[0].id);
if ("${savedCallbackFuncName}" != "") {
${savedCallbackFuncName}(resp.saved);
}
}
}
// 저장
$P.control.save = (info) => {
if (!info) return;
let create = ($P.callPurpose == "create");
// 민원 접수 관리에서 호출했다면..
if (create && "${saveCallbackFuncName}" != "") {
${saveCallbackFuncName}(info);
} else {
ajax.post({
url: !create ? $P.control.urls.update : $P.control.urls.create
, data: info || {}
, success: resp => $P.control.onSave(resp)
});
}
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/create.do"); // 등록
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/update.do"); // 수정
}
// 부과제외 구분에 따른 부과제외 사유 코드 설정
$P.fnSetFim021 = (seCode, rsnCode) => {
let cmnCode = FIM021[seCode];
$("#levyExclSeCd--${pageName}").val(cmnCode.code);
$("#levyExclSeNm--${pageName}").val(cmnCode.value);
let reasons = FIM022.list().filter(reason => "2" == seCode ? reason.code > "200" : reason.code < "200");
$("#levyExclRsnCd--${pageName}").html(reasons.map(reason => "<option value='" + reason.code + "'>" + reason.value + "</option>").join());
if (typeof rsnCode != "undefined" && rsnCode != "") {
$("#levyExclRsnCd--${pageName}").val(rsnCode);
}
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 저장 버튼 클릭 이벤트
$P.fnSave = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.save($P.formFields.get()); // formFields
}
});
}
/**************************************************************************
* 초기 설정
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmEdit--${pageName}").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);
}
});
});
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
// 달력 초기화
initDatepicker("frmEdit--${pageName}");
$("#levyExclYmd--${pageName}").datepicker("setDate", new Date());
// 화면 활성화 설정
$("#crdnYmdTm--${pageName}").prop("readonly", true); // 단속 일시
$("#vhrno--${pageName}").prop("readonly", true); // 차량번호
$("#levyExclSeNm--${pageName}").prop("readonly", true); // 부과 제외 구분
// View로 호출
if ($P.callPurpose == "view") {
// input 요소들을 disabled
$("#frmEdit--${pageName}").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled
$("#btnLevyExclYmd--${pageName}").prop("disabled", true); // 부과제외 일자 달력 버튼
$("#btnSave--${pageName}").prop("disabled", true); // 저장 버튼
}
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
$P.control.setData([${levyExclInfo}]);
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
// 공통 코드
var FIM021 = new CommonCodes(${FIM021}, true);
var FIM022 = new CommonCodes(${FIM022}, true);
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selector("frmEdit"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "levyExcl"
, prefixName: "부과제외"
, keymapper: info => info ? info.LEVY_EXCL_ID : ""
, dataGetter: obj => obj.info
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.ctrl, item);
// 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD);
// 부과제외구분에 따른 부과제외사유 설정
$P.fnSetFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
// 호출용도가 등록 이라면..
if ($P.callPurpose == "create") {
$P.$P.$find("levyExclYmd").datepicker("setDate", new Date());
}
}
// 저장 callback
$P.ctrl.onSave = (resp) => {
let dialogTitle = $("#" + $P.selfDlgId()).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if ("${savedCallbackFuncName}" != "") {
${savedCallbackFuncName}(resp.saved);
}
if (resp.saved) { dialog.close($P.selfDlgId()); }
}
});
}
// 저장
$P.ctrl.save = (info) => {
if (!info) return;
let create = ($P.callPurpose == "create");
// 민원 접수 관리에서 호출했다면..
if (create && "${saveCallbackFuncName}" != "") {
${saveCallbackFuncName}(info);
} else {
ajax.post({
url: !create ? $P.ctrl.urls.update : $P.ctrl.urls.create
, data: info || {}
, success: resp => $P.ctrl.onSave(resp)
});
}
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/create.do"); // 등록
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/update.do"); // 수정
}
// 부과제외 구분에 따른 부과제외 사유 코드 설정
$P.fnSetFim021 = (seCode, rsnCode) => {
let cmnCode = FIM021[seCode];
$P.$find("levyExclSeCd").val(cmnCode.code);
$P.$find("levyExclSeNm").val(cmnCode.value);
let reasons = FIM022.list().filter(reason => "2" == seCode ? reason.code > "200" : reason.code < "200");
$P.$find("levyExclRsnCd").html(reasons.map(reason => "<option value='" + reason.code + "'>" + reason.value + "</option>").join());
if (typeof rsnCode != "undefined" && rsnCode != "") {
$P.$find("levyExclRsnCd").val(rsnCode);
}
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 저장 버튼 클릭 이벤트
$P.fnSave = () => {
// validate 확인
if (!customValidate($P.$find("frmEdit").find("input,select,textarea"))) return;
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
});
}
/**************************************************************************
* 초기 설정
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$P.$find("frmEdit").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);
}
});
});
// 버튼 이벤트
$P.$find("btnSave").on("click", () => { $P.fnSave() }); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
// 화면 초기화
$P.find("frmEdit").reset();
// 달력 초기화
initDatepicker($P.find("frmEdit"));
$P.$find("levyExclYmd").datepicker("setDate", TODAY());
// 화면 활성화 설정
$P.$find("crdnYmdTm").prop("readonly", true); // 단속 일시
$P.$find("vhrno").prop("readonly", true); // 차량번호
$P.$find("levyExclSeNm").prop("readonly", true); // 부과 제외 구분
// View로 호출
if ($P.callPurpose == "view") {
// input 요소들을 disabled
$P.$find("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled
$P.$find("btnLevyExclYmd").prop("disabled", true); // 부과제외 일자 달력 버튼
$P.$find("btnSave").prop("disabled", true); // 저장 버튼
}
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
// 3. dataset 설정
$P.ctrl.setData([${info}]);
});
</script>

@ -113,7 +113,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFound">
<template name="tmpltNotFound">
<tr class="odd">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -257,7 +257,7 @@
let dataList = $P.ctrl.dataset;
let empty = dataList.empty;
let trs = empty ? [$P.find("notFound").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFound").innerHTML] :
dataList.inStrings($P.find("tmpltRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("MPNG_ID") + "');")

@ -109,7 +109,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFound">
<template name="tmpltNotFound">
<tr class="odd">
<td valign="top" colspan="11" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -277,7 +277,7 @@
let dataList = $P.ctrl.dataset;
let empty = dataList.empty;
let trs = empty ? [$P.find("notFound").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFound").innerHTML] :
dataList.inStrings($P.find("tmpltRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("ENT_ID") + "');")
@ -296,7 +296,7 @@
// checkbox 체크 해제
$P.$find("gridAllCheckbox").prop("checked", false);
//보안모드
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}

@ -199,6 +199,7 @@
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
});
}

@ -29,7 +29,7 @@
<button type="button" class="btn btn-primary w-px-120" name="btnPrintDlbrDecsn" title="심의의결서 출력">
심의의결서 출력
</button>
</span>
</span> <!-- <span class="container-window-btn-right"> -->
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">

@ -93,7 +93,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundSndngDtl">
<template name="tmpltNotFoundSndngDtl">
<tr class="odd">
<td valign="top" colspan="25" class="dataTables_empty text-center">발송 정보를 찾지 못했습니다.</td>
</tr>
@ -181,7 +181,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundSvbtc">
<template name="tmpltNotFoundSvbtc">
<tr class="odd">
<td valign="top" colspan="9" class="dataTables_empty text-center">공시송달 정보를 찾지 못했습니다.</td>
</tr>
@ -364,7 +364,7 @@
let sndngDtlList = $P.ctrlSndngDtl.dataset;
let empty = sndngDtlList.empty;
let trs = empty ? [$P.find("notFoundSndngDtl").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundSndngDtl").innerHTML] :
sndngDtlList.inStrings($P.find("tmpltSndngDtlRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlSndngDtl.setCurrent('" + dataItem.getValue("SNDNG_DTL_ID") + "');")
@ -378,7 +378,7 @@
let svbtcList = $P.ctrlSvbtc.dataset;
let empty = svbtcList.empty;
let trs = empty ? [$P.find("notFoundSvbtc").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundSvbtc").innerHTML] :
svbtcList.inStrings($P.find("tmpltSvbtcRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlSvbtc.setCurrent('" + dataItem.getValue("SNDNG_DTL_ID") + "');")

@ -3,9 +3,7 @@
<!-- Page Body -->
<div class="content-pop" data-doctx="${pageName}">
<!-- 화면 분할 -->
<div class="d-flex flex-row justify-content-evenly">
<!-- 감경 정보 -->
<div class="col-xl-6 mx-1">
<div class="card">
@ -178,7 +176,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundCrdnSttsHstry">
<template name="tmpltNotFoundCrdnSttsHstry">
<tr class="odd">
<td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td>
</tr>
@ -225,7 +223,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundPayerHstry">
<template name="tmpltNotFoundPayerHstry">
<tr class="odd">
<td valign="top" colspan="5" class="dataTables_empty text-center">주소변동 이력 정보를 찾지 못했습니다.</td>
</tr>
@ -504,7 +502,7 @@
let crdnSttsHstryList = $P.ctrlCrdnSttsHstry.dataset;
let empty = crdnSttsHstryList.empty;
let trs = empty ? [$P.find("notFoundCrdnSttsHstry").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundCrdnSttsHstry").innerHTML] :
crdnSttsHstryList.inStrings($P.find("tmpltCrdnSttsHstryRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlCrdnSttsHstry.setCurrent('" + dataItem.getValue("STTS_HSTRY_ID") + "');")
@ -518,7 +516,7 @@
let payerHstryList = $P.ctrlPayerHstry.dataset;
let empty = payerHstryList.empty;
let trs = empty ? [$P.find("notFoundPayerHstry").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundPayerHstry").innerHTML] :
payerHstryList.inStrings($P.find("tmpltPayerHstryRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlPayerHstry.setCurrent('" + dataItem.getValue("STTS_HSTRY_ID") + "');")

@ -94,7 +94,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundRcvmt">
<template name="tmpltNotFoundRcvmt">
<tr class="odd">
<td valign="top" colspan="27" class="dataTables_empty text-center">수납정보 이력 정보를 찾지 못했습니다.</td>
</tr>
@ -369,7 +369,7 @@
let rcvmtList = $P.ctrlRcvmt.dataset;
let empty = rcvmtList.empty;
let trs = empty ? [$P.find("notFoundRcvmt").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundRcvmt").innerHTML] :
rcvmtList.inStrings($P.find("tmpltRcvmtRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrl.setCurrent('" + dataItem.getValue("RCVMT_ID") + "');")

@ -4,7 +4,6 @@
<!-- Page Body -->
<div class="content-pop" data-doctx="${pageName}">
<div class="d-flex flex-row justify-content-evenly">
<!-- 민원 상담 정보 -->
<div class="col-xl-12 mx-1">
<div class="card">
@ -66,7 +65,7 @@
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="notFoundCvlcptDscsn">
<template name="tmpltNotFoundCvlcptDscsn">
<tr class="odd">
<td valign="top" colspan="10" class="dataTables_empty text-center">민원 상담 정보를 찾지 못했습니다.</td>
</tr>
@ -203,7 +202,7 @@
let cvlcptDscsnList = $P.ctrlCvlcptDscsn.dataset;
let empty = cvlcptDscsnList.empty;
let trs = empty ? [$P.find("notFoundCvlcptDscsn").innerHTML] :
let trs = empty ? [$P.find("tmpltNotFoundCvlcptDscsn").innerHTML] :
cvlcptDscsnList.inStrings($P.find("tmpltCvlcptDscsnRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlCvlcptDscsn.setCurrent('" + dataItem.getValue("CVLCPT_DSCSN_ID") + "');")

Loading…
Cancel
Save