1. 부과제외 수정.

2. 개별총정보 수정.
main
JoJH 2 weeks ago
parent a678def771
commit d4beba011d

@ -1,28 +1,28 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<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-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list"> <div class="card wrapper-list">
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화"> <button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화">
초기화 초기화
</button> </button>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색"> <button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색 검색
</button> </button>
<button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀"> <button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀 엑셀
</button> </button>
</span> </span>
</div> </div>
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<!-- 검색 조건 영역 --> <!-- 검색 조건 영역 -->
<form name="frmSearch"> <form name="frmSearch">
@ -32,7 +32,6 @@
<!-- 메인 조건 --> <!-- 메인 조건 -->
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12"> <div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span> <span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -45,39 +44,36 @@
</c:forEach> </c:forEach>
</span> </span>
</div> </div>
<!-- 부과 제외 일자 --> <div class="col-6">
<div class="col-6"> <label class="form-label form-search-title w-px-120 text-end fw-bold">부과제외일자</label>
<label class="form-label form-search-title w-px-120 text-end fw-bold">부과제외일자</label> <span class="form-search-linebox">
<span class="form-search-linebox"> <input type="text" class="form-control form-date" name="schLevyExclYmdFrom"
<input type="text" class="form-control form-date" name="schLevyExclYmdFrom" data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" /> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> ~
~ <input type="text" class="form-control form-date" name="schLevyExclYmdTo"
<input type="text" class="form-control form-date" name="schLevyExclYmdTo" data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" /> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> </span>
</span> </div>
</div> <div class="col-6">
<!-- 부과 제외 구분 코드 --> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schEntRegNo">부과제외구분</label>
<div class="col-6"> <select is="id-select" class="form-select w-px-160" name="schLevyExclSeCd">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schLevyExclSeCd">부과제외구분</label> <option value="">전체</option>
<select is="id-select" class="form-select w-px-120" name="schLevyExclSeCd"> <c:forEach items="${FIM021List}" var="item">
<option value="">전체</option> <option value="${item.code}">${item.value}</option>
<c:forEach items="${FIM021List}" var="item"> </c:forEach>
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select> </select>
</div> </div>
<!-- 부과 제외 사유 코드 --> <div class="col-6">
<div class="col-6"> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schLevyExclRsnCd">부과제외사유</label>
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schLevyExclRsnCd">부과제외사유</label>
<select is="id-select" class="form-select w-px-200" name="schLevyExclRsnCd"> <select is="id-select" class="form-select w-px-200" name="schLevyExclRsnCd">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM022List}" var="item"> <c:forEach items="${FIM022List}" 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-6"> <div class="col-6">
<input type="hidden" name="by" /> <input type="hidden" name="by" />
@ -99,35 +95,30 @@
<!-- 상세 조건 --> <!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse"> <div name="searchDetail" class="container-search container-search-detail collapse">
<div class="row g-1"> <div class="row g-1">
<!-- 단속 일자 -->
<div class="col-4">
<label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" name="schCrdnYmdFrom"
data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" name="schCrdnYmdTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 차량번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">차량번호</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" name="schCrdnYmdFrom"
data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" name="schCrdnYmdTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">자동차등록번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" />
</div> </div>
<!-- 납부자 번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" />
</div> </div>
<!-- 납부자 명 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" />
</div> </div>
<!-- 등록일자, 수정일자 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt"> <select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
@ -143,7 +134,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 등록자명, 수정자명 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt"> <select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option> <option value="rgtr">등록자</option>
@ -160,7 +150,7 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 --> <!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span> <span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
@ -181,14 +171,14 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns"> <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"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']"> <tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr> </tr>
</thead> </thead>
<template name="tmpltCols"> <template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th> <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: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
@ -226,10 +216,10 @@
<tbody name="tbodyList"> <tbody name="tbodyList">
</tbody> </tbody>
<template is="curly-brackets" name="tmpltRows"> <template is="curly-brackets" name="tmpltRows">
<tr data-key="LEVY_EXCL_ID"> <tr data-index="{data-index}">
<td class="cmn text-center" onclick ondblclick>{ROW_NUM}</td> <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="LEVY_EXCL_ID" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td> <td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="{data-index}" 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>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_YMD}</td> <td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_SE_NM}</td> <td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_SE_NM}</td>
@ -272,6 +262,9 @@
<tr class="dpv"> <tr class="dpv">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
<tr class="dvs">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca"> <tr class="eca">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
@ -296,6 +289,8 @@
<!-- / inner page html <div class="content-wrapper"> --> <!-- / inner page html <div class="content-wrapper"> -->
<script> <script>
LoadScript("excl01010Script", wctx.url("/webjars/js/fims/excl/excl01010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -308,161 +303,23 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // URL
$P.formFields = new FimsFormFields($P.selectorn("frmSearch")); $P.prefixUrl = "${prefixUrl}"
// datasetControl
/************************************************************************** $P.ctrl = newExcl01010Control("${pageName}", "[data-doctx=${pageName}]");
* DatasetControl // paging
**************************************************************************/ $P.pagingSupport = new FimsPagingSupport({
$P.ctrl = new DatasetControl({ ctrl: $P.ctrl // DatasetControl
prefix: "levyExcl" , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, prefixName: "부과제외" , linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
, keymapper: info => info ? info.LEVY_EXCL_ID : ""
, dataGetter: obj => obj["List"]
, appendData: true
, infoSize: "md"
, urls: {
load: wctx.url("${infoPrefixUrl}" + "/010/list.do") // 검색
}
, formats: {
LEVY_EXCL_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, CVLCPT_RCPT_YMD: dateFormat
, FFNLG_CRDN_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
}); });
// 검색 조건
$P.ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.ctrl.onDatasetChange = (obj, option) => {
$P.renderList(obj["Total"], option);
// datasetPaging
Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("dataPaging"), $P.findn("dataPagingInfo"));
}
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.LEVY_EXCL_ID;
$P.$findn("tbodyList").setCurrentRow(key);
}
// 선택(체크) 변경 이벤트
$P.ctrl.onSelectionChange = (selected) => {
Apply.fromDataset.gridCheckbox($P.ctrl.dataset, $P.findn("tbodyList"), 1, selected);
Apply.fromDataset.gridButton($P.ctrl.dataset, $P.findn("btnRemove"), selected); // 삭제 버튼
}
// 상세정보 dialog
$P.ctrl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/020/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = $P.ctrl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: $P.ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.ctrl.reload({all : true}); } // 자료 재조회
});
}
});
}
// 삭제 callback
$P.ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { $P.ctrl.reload({ all: true }); } // 자료 재조회
}
});
}
// 삭제
$P.ctrl.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.ctrl.onRemove(params, resp);
}
});
}
/************************************************************************** /**************************************************************************
* DataTables 이벤트 * DataTables 이벤트
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let dataList = $P.ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 DataTables(그리드) tr, td
let foundContent = $P.findn("tmpltRows").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dataTableDblClick('" + dataItem.getValue("LEVY_EXCL_ID") + "', '" + dataItem.getValue("CRDN_ID") + "');");
let trs = empty ?
[$P.findn("tmpltNotFound").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= totalSize);
let initScroll = ($P.ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
$P.findn("tableRspns").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$P.$findn("gridAllCheckbox").prop("checked", false);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
// dataTable 체크박스 클릭 이벤트 // dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => { $P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool); GRID.checkbox.sync(element, bool);
let atLeastOne = GRID.checkbox.countChecked(element) > 0; let atLeastOne = GRID.checkbox.countChecked(element) > 0;
@ -472,26 +329,28 @@
} }
// dataTable 클릭 이벤트 // dataTable 클릭 이벤트
$P.dataTableClick = (dataKey) => { $P.dataTableClick = (dataIndex) => {
if (!dataKey) return; if (!dataIndex) return;
$P.$findn("tbodyList").setCurrentRow(dataKey); $P.$findn("tbodyList").setCurrentRow(dataIndex);
Apply.toDataset.current($P.ctrl.dataset, dataKey); Apply.toDataset.current($P.ctrl.dataset, dataIndex);
} }
// dataTable 더블 클릭 이벤트 - 개별총정보 dialog // dataTable 더블 클릭 이벤트 - 개별총정보 dialog
$P.dataTableDblClick = (dataKey, crdnId) => { $P.dataTableDblClick = (dataIndex) => {
if (!dataKey) return; if (!dataIndex) return;
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다. // 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callControlName: "pageObject['${pageName}'].ctrl" callPageName: "${pageName}"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD") , sggCd: $P.ctrl.getValue("SGG_CD")
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: crdnId , crdnId: $P.ctrl.getValue("CRDN_ID")
} }
ajax.get({ ajax.get({
@ -526,6 +385,13 @@
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/list.do"); // 검색
$P.ctrl.urls.remove = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/remove.do"); // 삭제
$P.ctrl.urls.getInfo = wctx.url("/" + taskSeCd + $P.prefixUrl + "/020/info.do"); // 상세 정보
}
// 사용자검색 callback // 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => { $P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID $P.$findn("schRgtrCd").val(userId); // 사용자 ID
@ -534,13 +400,13 @@
// 삭제사유 callback // 삭제사유 callback
$P.callbackRsn = (obj) => { $P.callbackRsn = (obj) => {
let selected = $P.ctrl.dataset.getKeys("selected"); let selected = $P.ctrl.getDataset("selected"); // 선택 자료
// 서버에 전송할 data(파라미터) 생성 // 서버에 전송할 data(파라미터) 생성
let params = { let params = {
sggCd: $P.$findn("sggCd").val() // 시군구 코드 sggCd: $P.$findn("sggCd").val() // 시군구 코드
, taskSeCd: $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val() // 업무 구분 코드 , taskSeCd: $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val() // 업무 구분 코드
, levyExclIds: selected.join(",") // 부과 제외 IDs , levyExclIds: selected.map(info => info.LEVY_EXCL_ID).join(",") // 부과 제외 IDs
, btnTitle: obj.btnTitle // 버튼 title , btnTitle: obj.btnTitle // 버튼 title
, delRsn: obj.reason // 삭제 사유 , delRsn: obj.reason // 삭제 사유
}; };
@ -551,41 +417,6 @@
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 초기화 버튼 이벤트
$P.fnReset = (taskSeCd) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
if (taskSeCd) { // 업무 구분 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
}
$P.$findn("schLevyExclYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schLevyExclYmdTo").datepicker("setDate", TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
// dataset 초기화
$P.ctrl.dataset.clear();
}
// 업무 구분 변경 이벤트 // 업무 구분 변경 이벤트
$P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드 // 업무 구분 코드
@ -595,14 +426,19 @@
// 초기화 // 초기화
$P.fnReset(taskSeCd); $P.fnReset(taskSeCd);
// dataset 초기화
$P.ctrl.dataset.clear();
// 업무 구분에 따른 URL 설정 // 업무 구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 $P.fnSetURL(taskSeCd);
// 업무별 검색 조건 // 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); $P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
// 업무별 버튼 $(this).prop("disabled", "true");
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); });
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); // 업무별 검색 조건
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); // 업무별 버튼
// 업무별 그리드 th // 업무별 그리드 th
let colContent = $P.findn("tmpltCols").content; let colContent = $P.findn("tmpltCols").content;
@ -639,6 +475,7 @@
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { }
}); });
} }
}); });
@ -646,10 +483,13 @@
// 검색 버튼 클릭 이벤트 // 검색 버튼 클릭 이벤트
$P.fnSearchList = () => { $P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건 // 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건 $P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수 $P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부 $P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1); $P.ctrl.load(1);
} }
@ -676,10 +516,8 @@
// 부과제외 수정 버튼 클릭 이벤트 // 부과제외 수정 버튼 클릭 이벤트
$P.fnUpdate = (btnTitle) => { $P.fnUpdate = (btnTitle) => {
// 부과제외 ID
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
// 부과제외 ID 가 없다면.. return // 부과제외 ID 가 없다면.. return
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
if (!levyExclId) return; if (!levyExclId) return;
let params = { let params = {
@ -688,7 +526,7 @@
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, levyExclId: $P.ctrl.getValue("LEVY_EXCL_ID") // 부과제외 ID , levyExclId: $P.ctrl.getValue("LEVY_EXCL_ID") // 부과제외 ID
, levyExclSeCd: $P.ctrl.getValue("LEVY_EXCL_SE_CD") // 부과제외 구분 코드 , levyExclSeCd: $P.ctrl.getValue("LEVY_EXCL_SE_CD") // 부과 제외 구분 코드
}; };
$P.ctrl.getInfo(params); $P.ctrl.getInfo(params);
@ -696,7 +534,7 @@
// 부과제외 삭제 버튼 클릭 이벤트 // 부과제외 삭제 버튼 클릭 이벤트
$P.fnRemove = (btnTitle) => { $P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료 let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) { if (selected.length < 1) {
dialog.alert({ dialog.alert({
@ -757,11 +595,37 @@
// DataTables width 변경 조정 // DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns")); Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList); Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
} }
// 초기화 이벤트
$P.fnReset = (taskSeCd) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// 달력 초기화
AppSupport.initDatepicker($P.findn("frmSearch"));
// 상세검색 버튼 화살표
AppSupport.initDetailSearchButton($P.findn("frmSearch"));
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true); // 업무 구분 코드
$P.$findn("schLevyExclYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schLevyExclYmdTo").datepicker("setDate", TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
}
/************************************************************************** /**************************************************************************
* 최초 실행 함수 * 최초 실행 함수
**************************************************************************/ **************************************************************************/

@ -5,79 +5,75 @@
<!-- inner page html --> <!-- inner page html -->
<div class="content-pop" data-doctx="${pageName}"> <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 name="frmEdit"> <form name="frmEdit">
<!-- hidden --> <!-- hidden -->
<input type="hidden" name="sggCd" data-map="SGG_CD" /> <input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" /> <input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" name="crdnId" data-map="CRDN_ID" /> <input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" /> <input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 단속일시 --> <div class="col-md-12">
<div class="col-md-12"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnYmdTm">단속일시</label>
<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" readonly />
<input is="id-input" type="text" class="form-control w-px-160" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" readonly /> </div>
</div> <div class="col-md-12">
<!-- 차량번호 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label>
<div class="col-md-12"> <input is="id-input" type="text" class="form-control w-px-120" name="vhrno" data-map="VHRNO" readonly />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label> </div>
<input is="id-input" type="text" class="form-control w-px-120" name="vhrno" data-map="VHRNO" autocomplete="off" readonly /> <div class="col-md-12">
</div> <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" data-map="LEVY_EXCL_SE_NM" readonly />
<div class="col-md-12"> <input type="hidden" 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> </div>
<input is="id-input" type="text" class="form-control w-px-120" name="levyExclSeNm" autocomplete="off" readonly /> <div class="col-md-12">
<input type="hidden" 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="levyExclYmd">부과제외일자</label>
</div> <input is="id-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 />
<div class="col-md-12"> <button type="button" class="bx bx-lg bx-calendar bg-white" name="btnLevyExclYmd"></button>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclYmd">부과제외일자</label> </div>
<input is="id-input" type="text" class="form-control form-date" name="levyExclYmd" data-map="LEVY_EXCL_YMD" <div class="col-md-12">
data-fmt-type="day" autocomplete="off" title="날짜 선택" maxlength="10" required /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclRsnCd">부과제외사유</label>
<button type="button" class="bx bx-lg bx-calendar bg-white" name="btnLevyExclYmd"></button> <select is="id-select" class="form-select" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required>
</div> <option value="">선택하세요</option>
<!-- 부과 제외 사유 --> <c:forEach items="${FIM022List}" var="item">
<div class="col-md-12"> <option value="${item.code}">${item.value}</option>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="levyExclRsnCd">부과제외사유</label> </c:forEach>
<select is="id-select" class="form-select" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required> </select>
<option value="">선택하세요</option> </div>
<c:forEach items="${FIM022List}" var="item"> <div class="col-md-12">
<option value="${item.code}">${item.value}</option> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타 내용</label>
</c:forEach> <textarea is="id-textarea" class="form-control w-70" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" autocomplete="off"></textarea>
</select> </div>
</div> </div>
<!-- 기타 내용 --> </form>
<div class="col-md-12"> <!-- 입력 영역 -->
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타 내용</label> </div> <!-- <div class="card"> -->
<textarea is="id-textarea" class="form-control w-70" name="etcCn" data-map="ETC_CN" autocomplete="off" rows="3" data-maxlengthb="1000"></textarea>
</div> <!-- 업무 버튼 및 건수 표시 -->
</div> <div>
</form> <span class="container-page-btn">
<!-- 입력 영역 --> <!-- 업무 버튼 -->
<span class="container-window-btn-right">
<!-- 업무 버튼 및 건수 표시 --> <button type="button" class="btn btn-primary w-px-120" name="btnSave" title="저장">
<div> 저장
<span class="container-page-btn"> </button>
<!-- 업무 버튼 --> </span>
<span class="container-window-btn-right"> </span>
<button type="button" class="btn btn-primary w-px-120" name="btnSave" title="저장"> </div>
저장 <!-- 업무 버튼 및 건수 표시 -->
</button> </div> <!-- <div class="container flex-grow-1 px-0"> -->
</span> <!-- Content -->
</span>
</div>
<!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div> </div>
<!-- / inner page html <div class="content-pop"> --> <!-- / inner page html <div class="content-pop"> -->
<script> <script>
LoadScript("excl01020Script", wctx.url("/webjars/js/fims/excl/excl01020.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -94,90 +90,19 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields // datasetControl
$P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.ctrl = newExcl01020Control("${pageName}", "[data-doctx=${pageName}]");
//
/************************************************************************** $P.saveCallbackFuncName = "${saveCallbackFuncName}";
* DatasetControl $P.savedCallbackFuncName = "${savedCallbackFuncName}";
**************************************************************************/
$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.$findn("levyExclYmd").datepicker("setDate", TODAY());
}
}
// 저장 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: () => { AppSupport.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) * 사용자 함수(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) => { $P.fnSetFim021 = (seCode, rsnCode) => {
let cmnCode = FIM021[seCode]; let cmnCode = FIM021[seCode];
@ -188,7 +113,7 @@
let reasons = FIM022.list().filter(reason => "2" == seCode ? reason.code > "200" : reason.code < "200"); let reasons = FIM022.list().filter(reason => "2" == seCode ? reason.code > "200" : reason.code < "200");
$P.$findn("levyExclRsnCd").html(reasons.map(reason => "<option value='" + reason.code + "'>" + reason.value + "</option>").join()); $P.$findn("levyExclRsnCd").html(reasons.map(reason => "<option value='" + reason.code + "'>" + reason.value + "</option>").join());
if (typeof rsnCode != "undefined" && rsnCode != "") { if (!rsnCode) {
$P.$findn("levyExclRsnCd").val(rsnCode); $P.$findn("levyExclRsnCd").val(rsnCode);
} }
} }
@ -201,10 +126,13 @@
// validate 확인 // validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return; if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({ dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?" content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields , onOK: () => { $P.ctrl.save(params); } // formFields
}); });
} }
@ -214,25 +142,28 @@
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
// 버튼 이벤트 // 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장 $P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 화면 초기화 // 초기화
$P.findn("frmEdit").reset(); $P.findn("frmEdit").reset(); // 화면 초기화
// 달력 초기화 // 달력 초기화
AppSupport.initDatepicker($P.findn("frmEdit")); AppSupport.initDatepicker($P.findn("frmEdit"));
$P.$findn("levyExclYmd").datepicker("setDate", TODAY());
// View로 호출되었을때 disabled 셋팅 // 기본 데이터 설정
$P.$findn("levyExclYmd").datepicker("setDate", TODAY()); // 달력 초기화
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if ($P.callPurpose == "view") { if ($P.callPurpose == "view") {
// input 요소들을 disabled // input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true); $P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled // button 요소들을 disabled
$P.$findn("btnLevyExclYmd").prop("disabled", true); // 부과제외 일자 달력 버튼 $P.$findn("btnLevyExclYmd").prop("disabled", true); // 부과제외 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼 $P.$findn("btnSave").prop("disabled", true); // 저장 버튼
} }
} }
@ -243,7 +174,7 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. dataset 설정 // 3. dataset 설정
$P.ctrl.setData([${info}]); $P.ctrl.setData([${info}]);

@ -32,7 +32,6 @@
<!-- 메인 조건 --> <!-- 메인 조건 -->
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12"> <div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span> <span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -45,7 +44,6 @@
</c:forEach> </c:forEach>
</span> </span>
</div> </div>
<!-- 의견제출 접수일자 -->
<div class="col-6"> <div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">접수일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">접수일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -58,7 +56,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 의견제출 답변일자 -->
<div class="col-6"> <div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">답변일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">답변일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -71,7 +68,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 의견 제출 상태 코드 -->
<div class="col-6"> <div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schOpnnSbmsnSttsCd">의견제출상태</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schOpnnSbmsnSttsCd">의견제출상태</label>
<select is="id-select" class="form-select w-px-160" name="schOpnnSbmsnSttsCd"> <select is="id-select" class="form-select w-px-160" name="schOpnnSbmsnSttsCd">
@ -81,7 +77,6 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 의견 제출 구분 코드 -->
<div class="col-6"> <div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schOpnnSbmsnSeCd">의견제출구분</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schOpnnSbmsnSeCd">의견제출구분</label>
<select is="id-select" class="form-select w-px-220" name="schOpnnSbmsnSeCd"> <select is="id-select" class="form-select w-px-220" name="schOpnnSbmsnSeCd">
@ -91,7 +86,6 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 통보 구분 코드 -->
<div class="col-6"> <div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schNtfctnSeCd">통보구분</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schNtfctnSeCd">통보구분</label>
<select is="id-select" class="form-select w-px-160" name="schNtfctnSeCd"> <select is="id-select" class="form-select w-px-160" name="schNtfctnSeCd">
@ -122,7 +116,6 @@
<!-- 상세 조건 --> <!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse"> <div name="searchDetail" class="container-search container-search-detail collapse">
<div class="row g-1"> <div class="row g-1">
<!-- 단속일자 -->
<div class="col-4"> <div class="col-4">
<label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -135,22 +128,18 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 차량번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">차량번호</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" />
</div> </div>
<!-- 납부자 번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" />
</div> </div>
<!-- 납부자 명 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" />
</div> </div>
<!-- 등록일자, 수정일자 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt"> <select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
@ -166,7 +155,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 등록자명, 수정자명 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt"> <select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option> <option value="rgtr">등록자</option>
@ -185,10 +173,10 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 --> <!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span> <span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" name="dataPaging"> <ul class="pagination pagination-primary" name="dataPaging">
</ul> </ul>
</div> </div>
@ -215,14 +203,14 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns"> <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"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']"> <tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr> </tr>
</thead> </thead>
<template name="tmpltCols"> <template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th> <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: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
@ -268,12 +256,12 @@
<th class="cmn dummy-th"></th> <th class="cmn dummy-th"></th>
</template> </template>
<tbody name="tbodyList"> <tbody name="tbodyList">
</tbody> </tbody>
<template is="curly-brackets" name="tmpltRows"> <template is="curly-brackets" name="tmpltRows">
<tr data-key="OPNN_ID"> <tr data-index="{data-index}">
<td class="cmn text-center" onclick ondblclick>{ROW_NUM}</td> <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="OPNN_ID" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td> <td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="{data-index}" 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>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{RCPT_NO_MASK}</td> <td class="cmn text-center" onclick ondblclick>{RCPT_NO_MASK}</td>
<td class="cmn text-center" onclick ondblclick>{RCPT_YMD}</td> <td class="cmn text-center" onclick ondblclick>{RCPT_YMD}</td>
@ -326,6 +314,9 @@
<tr class="dpv"> <tr class="dpv">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
<tr class="dvs">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca"> <tr class="eca">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
@ -350,6 +341,8 @@
<!-- / inner page html <div class="content-wrapper"> --> <!-- / inner page html <div class="content-wrapper"> -->
<script> <script>
LoadScript("excl02010Script", wctx.url("/webjars/js/fims/excl/excl02010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -362,161 +355,20 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // URL
$P.formFields = new FimsFormFields($P.selectorn("frmSearch")); $P.prefixUrl = "${prefixUrl}"
// datasetControl
/************************************************************************** $P.ctrl = newExcl02010Control("${pageName}", "[data-doctx=${pageName}]");
* DatasetControl // paging
**************************************************************************/ $P.pagingSupport = new FimsPagingSupport({
$P.ctrl = new DatasetControl({ ctrl: $P.ctrl // DatasetControl
prefix: "opnn" , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, prefixName: "의견제출" , linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
, keymapper: info => info ? info.OPNN_ID : ""
, dataGetter: obj => obj["List"]
, appendData: true
, infoSize: "xl"
, urls: {
load: wctx.url("${infoPrefixUrl}" + "/010/list.do") // 검색
}
, formats: {
RCPT_YMD: dateFormat
, ANS_YMD: dateFormat
, ANS_YMD_TM: datetimeFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_CRDN_AMT: numberFormat
, FFNLG_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
}); });
// 검색 조건
$P.ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.ctrl.onDatasetChange = (obj, option) => {
$P.renderList(obj["Total"], option);
// datasetPaging
Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("dataPaging"), $P.findn("dataPagingInfo"));
}
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.OPNN_ID;
$P.$findn("tbodyList").setCurrentRow(key);
}
// 선택(체크) 변경 이벤트
$P.ctrl.onSelectionChange = (selected) => {
Apply.fromDataset.gridCheckbox($P.ctrl.dataset, $P.findn("tbodyList"), 1, selected);
Apply.fromDataset.gridButton($P.ctrl.dataset, $P.findn("btnRemove"), selected); // 삭제 버튼
Apply.fromDataset.gridButton($P.ctrl.dataset, $P.findn("btnPrintDlbrDecsn"), selected); // 심의의결서 출력 버튼
}
// 상세정보 dialog
$P.ctrl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/020/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = $P.ctrl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: $P.ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.ctrl.reload({all : true}); } // 자료 재조회
});
}
});
}
// 삭제 callback
$P.ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { $P.ctrl.reload({ all: true }); } // 자료 재조회
}
});
}
// 삭제
$P.ctrl.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.ctrl.onRemove(params, resp);
}
});
}
/************************************************************************** /**************************************************************************
* DataTables 이벤트 * DataTables 이벤트
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let dataList = $P.ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 DataTables(그리드) tr, td
let foundContent = $P.findn("tmpltRows").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("OPNN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dataTableDblClick('" + dataItem.getValue("OPNN_ID") + "', '" + dataItem.getValue("CRDN_ID") + "');");
let trs = empty ?
[$P.findn("tmpltNotFound").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= totalSize);
let initScroll = ($P.ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
$P.findn("tableRspns").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$P.$findn("gridAllCheckbox").prop("checked", false);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
// dataTable 체크박스 클릭 이벤트 // dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => { $P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool); GRID.checkbox.sync(element, bool);
@ -530,26 +382,28 @@
} }
// dataTable 클릭 이벤트 // dataTable 클릭 이벤트
$P.dataTableClick = (dataKey) => { $P.dataTableClick = (dataIndex) => {
if (!dataKey) return; if (!dataIndex) return;
$P.$findn("tbodyList").setCurrentRow(dataKey); $P.$findn("tbodyList").setCurrentRow(dataIndex);
Apply.toDataset.current($P.ctrl.dataset, dataKey); Apply.toDataset.current($P.ctrl.dataset, dataIndex);
} }
// dataTable 더블 클릭 이벤트 - 개별총정보 dialog // dataTable 더블 클릭 이벤트 - 개별총정보 dialog
$P.dataTableDblClick = (dataKey, crdnId) => { $P.dataTableDblClick = (dataIndex) => {
if (!dataKey) return; if (!dataIndex) return;
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다. // 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callControlName: "pageObject['${pageName}'].ctrl" callPageName: "${pageName}"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD") , sggCd: $P.ctrl.getValue("SGG_CD")
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: crdnId , crdnId: $P.ctrl.getValue("CRDN_ID")
} }
ajax.get({ ajax.get({
@ -584,27 +438,50 @@
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/list.do"); // 검색
$P.ctrl.urls.remove = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/remove.do"); // 삭제
$P.ctrl.urls.getInfo = wctx.url("/" + taskSeCd + $P.prefixUrl + "/020/info.do"); // 상세 정보
}
// 사용자검색 callback // 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => { $P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID $P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명 $P.$findn("schRgtrNm").val(userNm); // 사용자 명
} }
// 의견제출 심의위원 관리 // 삭제사유 callback
$P.opnnSbmsnDlbrMbr = (params) => { $P.callbackRsn = (obj) => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
// 서버에 전송할 data(파라미터) 생성
let params = {
sggCd: $P.$findn("sggCd").val() // 시군구 코드
, taskSeCd: $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val() // 업무 구분 코드
, opnnIds: selected.map(info => info.OPNN_ID).join(",") // 의견제출 IDs
, btnTitle: obj.btnTitle // 버튼 title
, delRsn: obj.reason // 삭제 사유
};
$P.ctrl.remove(params);
}
// 의견제출 심의
$P.opnnSbmsnDlbr = (params) => {
if (!params) return; if (!params) return;
ajax.get({ ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/040/info.do") url: wctx.url("/" + params.taskSeCd + $P.prefixUrl + "/030/info.do")
, data: params , data: params || {}
, success: (resp) => { , success: (resp) => {
let dialogName = $P.ctrl.prefixed("DlbrMbrDialog"); let dialogName = $P.ctrl.prefixed("DlbrDialog")
let dialogId = dialogName + "-" + uuid(); let dialogId = dialogName + "-" + uuid();
dialog.open({ dialog.open({
id: dialogId id: dialogId
, title: $P.ctrl.prefixName + " 심의 위원 관리" , title: $P.ctrl.prefixName + " 심의 정보"
, size: "md" , size: "lg"
, content: resp , content: resp
, init: () => { , init: () => {
$("#" + dialogId).attr("name", dialogName); $("#" + dialogId).attr("name", dialogName);
@ -612,61 +489,44 @@
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { $P.ctrl.reload({all : true}); } // 자료 재조회
}); });
} }
}); });
} }
// 의견제출 심의 // 의견제출 심의위원 관리
$P.opnnSbmsnDlbr = (params) => { $P.opnnSbmsnDlbrMbr = (params) => {
if (!params) return; if (!params) return;
ajax.get({ ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/030/info.do") url: wctx.url("/" + params.taskSeCd + $P.prefixUrl + "/040/info.do")
, data: params || {} , data: params
, success: (resp) => { , success: (resp) => {
let dialogName = $P.ctrl.prefixed("DlbrDialog") let dialogName = $P.ctrl.prefixed("DlbrMbrDialog");
let dialogId = dialogName + "-" + uuid(); let dialogId = dialogName + "-" + uuid();
dialog.open({ dialog.open({
id: dialogId id: dialogId
, title: $P.ctrl.prefixName + " 심의" , title: $P.ctrl.prefixName + " 심의위원 정보"
, size: "md"
, content: resp , content: resp
, size: "lg"
, init: () => { , init: () => {
$("#" + dialogId).attr("name", dialogName); $("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}"); $("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { $P.ctrl.reload({all : true}); } // 자료 재조회
}); });
} }
}); });
} }
// 삭제사유 callback
$P.callbackRsn = (obj) => {
let selected = $P.ctrl.dataset.getKeys("selected");
// 서버에 전송할 data(파라미터) 생성
let params = {
sggCd: $P.$findn("sggCd").val() // 시군구 코드
, taskSeCd: $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val() // 업무 구분 코드
, opnnIds: selected.join(",") // 의견제출 IDs
, btnTitle: obj.btnTitle // 버튼 title
, delRsn: obj.reason // 삭제 사유
};
$P.ctrl.remove(params);
}
// 심의의결서 출력 // 심의의결서 출력
$P.makeHwpFileDlbrDecsn = (params) => { $P.makeHwpFileDlbrDecsn = (params) => {
if (!params) return; if (!params) return;
let url = wctx.url("/" + params.taskSeCd + "/excl/excl02/010/makeHwp.do") let url = wctx.url("/" + params.taskSeCd + $P.prefixUrl + "/010/makeHwp.do");
let parameter = toQuery({ let parameter = toQuery({
opnnIds: params.opnnIds opnnIds: params.opnnIds
, taskSeCd: params.taskSeCd , taskSeCd: params.taskSeCd
@ -678,41 +538,6 @@
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 초기화 버튼 이벤트
$P.fnReset = (taskSeCd) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
if (taskSeCd) { // 업무 구분 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
}
$P.$findn("schRcptYmdFrom").datepicker('setDate', DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schRcptYmdTo").datepicker('setDate', TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
// dataset 초기화
$P.ctrl.dataset.clear();
}
// 업무 구분 변경 // 업무 구분 변경
$P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드 // 업무 구분 코드
@ -720,16 +545,21 @@
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val(); taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
} }
// 초기화 // 초기화
$P.fnReset(taskSeCd); $P.fnReset(taskSeCd);
// dataset 초기화
$P.ctrl.dataset.clear();
// 업무 구분에 따른 URL 설정 // 업무 구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 $P.fnSetURL(taskSeCd);
// 업무별 검색 조건 // 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); $P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
// 업무별 버튼 $(this).prop("disabled", "true");
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); });
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); // 업무별 검색 조건
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); // 업무별 버튼
// 업무별 그리드 th // 업무별 그리드 th
let colContent = $P.findn("tmpltCols").content; let colContent = $P.findn("tmpltCols").content;
@ -773,10 +603,13 @@
// 검색 버튼 클릭 이벤트 // 검색 버튼 클릭 이벤트
$P.fnSearchList = () => { $P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건 // 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건 $P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수 $P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부 $P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1); $P.ctrl.load(1);
} }
@ -818,8 +651,6 @@
$P.fnUpdate = (btnTitle) => { $P.fnUpdate = (btnTitle) => {
// 의견제출 ID // 의견제출 ID
let opnnId = $P.ctrl.getValue("OPNN_ID"); let opnnId = $P.ctrl.getValue("OPNN_ID");
// 의견제출 ID 가 없다면.. return
if (!opnnId) return; if (!opnnId) return;
let params = { let params = {
@ -837,8 +668,6 @@
$P.fnUpdateDlbr = (btnTitle) => { $P.fnUpdateDlbr = (btnTitle) => {
// 의견제출 ID // 의견제출 ID
let opnnId = $P.ctrl.getValue("OPNN_ID"); let opnnId = $P.ctrl.getValue("OPNN_ID");
// 의견제출 ID 가 없다면.. return
if (!opnnId) return; if (!opnnId) return;
let params = { let params = {
@ -854,7 +683,7 @@
// 의견제출 삭제 버튼 클릭 이벤트 // 의견제출 삭제 버튼 클릭 이벤트
$P.fnRemove = (btnTitle) => { $P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료 let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) { if (selected.length < 1) {
dialog.alert({ dialog.alert({
@ -892,8 +721,8 @@
} }
// 심의의결서 출력 버튼 클릭 이벤트 // 심의의결서 출력 버튼 클릭 이벤트
$P.fnPrintDlbrDecsn = (title) => { $P.fnPrintDlbrDecsn = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료 let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) { if (selected.length < 1) {
dialog.alert({ dialog.alert({
@ -906,10 +735,10 @@
let params = { let params = {
callPurpose: "download" callPurpose: "download"
, title: title , title: btnTitle
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, opnnIds: selected.join(",") // 의견제출 IDs , opnnIds: selected.map(info => info.OPNN_ID).join(",") // 의견제출 IDs
}; };
$P.makeHwpFileDlbrDecsn(params); $P.makeHwpFileDlbrDecsn(params);
@ -929,12 +758,6 @@
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다. // 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$P.$findn("term").onEnterPress($P.fnSearchList); $P.$findn("term").onEnterPress($P.fnSearchList);
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
// 업무 버튼 이벤트 // 업무 버튼 이벤트
$P.$findn("btnDlbrMbr").on("click", function() { $P.$findn("btnDlbrMbr").on("click", function() {
$P.fnDlbrMbr($(this).attr("title")); // 심의위원 관리 $P.fnDlbrMbr($(this).attr("title")); // 심의위원 관리
@ -951,6 +774,38 @@
$P.$findn("btnPrintDlbrDecsn").on("click", function() { $P.$findn("btnPrintDlbrDecsn").on("click", function() {
$P.fnPrintDlbrDecsn($(this).attr("title")); // 심의의결서 출력 $P.fnPrintDlbrDecsn($(this).attr("title")); // 심의의결서 출력
}); });
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
}
// 초기화 버튼 이벤트
$P.fnReset = (taskSeCd) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// 달력 초기화
AppSupport.initDatepicker($P.findn("frmSearch"));
// 상세검색 버튼 화살표
AppSupport.initDetailSearchButton($P.findn("frmSearch"));
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
$P.$findn("schRcptYmdFrom").datepicker('setDate', DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schRcptYmdTo").datepicker('setDate', TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
} }
/************************************************************************** /**************************************************************************

@ -5,178 +5,163 @@
<!-- inner page html --> <!-- inner page html -->
<div class="content-pop" data-doctx="${pageName}"> <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 name="frmEdit"> <form name="frmEdit">
<!-- hidden --> <!-- hidden -->
<input type="hidden" name="sggCd" data-map="SGG_CD" /> <input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" /> <input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" name="crdnId" data-map="CRDN_ID" /> <input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" 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-4">
<div class="col-md-4"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnYmdTm">단속일시</label>
<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-50" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" readonly />
<input is="id-input" type="text" class="form-control w-50" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" readonly /> </div>
</div> <div class="col-md-4">
<!-- 차량번호 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label>
<div class="col-md-4"> <input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label> </div>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly /> <div class="col-md-4">
</div> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNm">납부자</label>
<!-- 납부자 명 --> <input is="id-input" type="text" class="form-control w-55" name="rtpyrNm" data-map="RTPYR_NM" readonly />
<div class="col-md-4"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNm">납부자</label> <div class="col-md-4">
<input is="id-input" type="text" class="form-control w-55" name="rtpyrNm" data-map="RTPYR_NM" readonly /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNo">접수번호</label>
</div> <input is="id-input" type="text" class="form-control w-40" name="rcptNo" data-map="RCPT_NO" />
<!-- 접수 번호 --> </div>
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNo">접수번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rcptYmd">접수일자</label>
<input is="id-input" type="text" class="form-control w-40" name="rcptNo" data-map="RCPT_NO" /> <input is="id-input" type="text" class="form-control form-date" name="rcptYmd" data-map="RCPT_YMD"
</div> data-fmt-type="day" title="날짜 선택" maxlength="10" required />
<!-- 접수 일자 --> <button type="button" class="bx bx-lg bx-calendar bg-white" id="btnRcptYmd--${pageName}"></button>
<div class="col-md-4"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rcptYmd">접수일자</label> <div class="col-md-4">
<input is="id-input" type="text" class="form-control form-date" name="rcptYmd" data-map="RCPT_YMD" <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rcptSeCd">접수구분</label>
data-fmt-type="day" title="날짜 선택" maxlength="10" required /> <select is="id-select" class="form-select" name="rcptSeCd" data-map="RCPT_SE_CD" required>
<button type="button" class="bx bx-lg bx-calendar bg-white" id="btnRcptYmd--${pageName}"></button> <option value="">선택하세요</option>
</div> <c:forEach items="${FIM029List}" var="item">
<!-- 접수 구분 --> <option value="${item.code}">${item.value}</option>
<div class="col-md-4"> </c:forEach>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rcptSeCd">접수구분</label> </select>
<select is="id-select" class="form-select" name="rcptSeCd" data-map="RCPT_SE_CD" required> </div>
<option value="">선택하세요</option> <div class="col-md-4">
<c:forEach items="${FIM029List}" var="item"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="sttrNm">성명</label>
<option value="${item.code}">${item.value}</option> <input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" required />
</c:forEach> <button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchPayer" title="납부자 정보 적용">
</select> 납부자
</div> </button>
<!-- 진술자 이름 --> </div>
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="sttrNm">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrBrdt">생년월일</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" required /> <input is="id-input" type="text" class="form-control w-30" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YYMMDD" />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchPayer" title="납부자 정보 적용"> </div>
납부자 <div class="col-md-4">
</button> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ownrRelCd">소유주관계</label>
</div> <select is="id-select" class="form-select" name="ownrRelCd" data-map="OWNR_REL_CD" required>
<!-- 진술자 생년월일 --> <option value="">선택하세요</option>
<div class="col-md-4"> <c:forEach items="${FIM032List}" var="item">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrBrdt">생년월일</label> <option value="${item.code}">${item.value}</option>
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YYMMDD" /> </c:forEach>
</div> </select>
<!-- 소유주 관계 구분 코드 --> </div>
<div class="col-md-4"> <div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ownrRelCd">소유주관계</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrAddr">주소</label>
<select is="id-select" class="form-select" name="ownrRelCd" data-map="OWNR_REL_CD" required> <input is="id-input" type="text" class="form-control w-70" name="sttrAddr" data-map="STTR_ADDR" />
<option value="">선택하세요</option> <input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" />
<c:forEach items="${FIM032List}" var="item"> <button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchAddr" title="주소 검색">
<option value="${item.code}">${item.value}</option> 검색
</c:forEach> </button>
</select> </div>
</div> <div class="col-md-12">
<!-- 진술자 주소 --><!-- 진술자 우편번호 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrDaddr">상세주소</label>
<div class="col-md-12"> <input is="id-input" type="text" class="form-control w-85" name="sttrDaddr" data-map="STTR_DADDR" />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrAddr">주소</label> </div>
<input is="id-input" type="text" class="form-control w-70" name="sttrAddr" data-map="STTR_ADDR" /> <div class="col-md-4">
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrCttpc">연락처</label>
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchAddr" title="주소 검색"> <input is="id-input" type="text" class="form-control w-45" name="sttrCttpc" data-map="STTR_CTTPC" />
검색 </div>
</button> <div class="col-md-8">
</div> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrEml">이메일</label>
<!-- 진술자 상세주소 --> <input is="id-input" type="text" class="form-control w-40" name="sttrEml" data-map="STTR_EML" />
<div class="col-md-12"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrDaddr">상세주소</label> <div class="col-md-12">
<input is="id-input" type="text" class="form-control w-85" name="sttrDaddr" data-map="STTR_DADDR" /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnCn">의견제출내용</label>
</div> <textarea is="id-textarea" type="text" class="form-control w-85" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="5" data-maxlengthb="4000"></textarea>
<!-- 진술자 연락처 --> </div>
<div class="col-md-4"> <div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrCttpc">연락처</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSeCd">의견제출구분</label>
<input is="id-input" type="text" class="form-control w-45" name="sttrCttpc" data-map="STTR_CTTPC" /> <select is="id-select" class="form-select" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required>
</div> <option value="">선택하세요</option>
<!-- 진술자 이메일 --> <c:forEach items="${FIM033List}" var="item">
<div class="col-md-8"> <option value="${item.code}">${item.value}</option>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrEml">이메일</label> </c:forEach>
<input is="id-input" type="text" class="form-control w-40" name="sttrEml" data-map="STTR_EML" /> </select>
</div> </div>
<!-- 의견 제출 내용 --> <div class="col-md-12">
<div class="col-md-12"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnGist">의견제출요지</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnCn">의견제출내용</label> <input is="id-input" type="text" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" />
<textarea is="id-textarea" type="text" class="form-control w-85" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="5" data-maxlengthb="4000"></textarea> </div>
</div> <div class="col-md-12">
<!-- 의견 제출 구분 코드 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="picRvwOpnn">검토의견</label>
<div class="col-md-12"> <textarea is="id-textarea" class="form-control w-85" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="2" data-maxlengthb="1000"></textarea>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSeCd">의견제출구분</label> </div>
<select is="id-select" class="form-select" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required> </div>
<option value="">선택하세요</option> </form>
<c:forEach items="${FIM033List}" var="item"> <!-- 입력 영역 -->
<option value="${item.code}">${item.value}</option>
</c:forEach> <!-- 첨부 파일 -->
</select> <div class="card">
</div> <form name="frmFile" method="post" enctype="multipart/form-data" >
<!-- 의견 제출 요지 --> <input type="file" name="uploadFiles" multiple="multiple" onchange="pageObject['${pageName}'].fnAddFiles(this);" hidden />
<div class="col-md-12"> </form>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnGist">의견제출요지</label> <div class="row g-1">
<input is="id-input" type="text" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" /> <div class="col-md-12">
</div> <button type="button" class="btn btn-blue w-px-120" name="btnAddFile" title="첨부파일 추가">파일추가</button>
<!-- 담당자 검토 의견 --> </div>
<div class="col-md-12"> </div>
<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="2" data-maxlengthb="1000"></textarea> <div class="table-responsive">
</div> <table class="table table-bordered table-hover table-striped" name="fileList">
</div> <thead>
</form> <th class="text-center" style="width: 24px">No.</th>
<!-- 입력 영역 --> <th class="text-center" style="width: 200px">파일번호</th>
<th class="text-center">파일이름</th>
<!-- 첨부 파일 --> <th class="text-center" style="width: 200px">파일크기</th>
<div class="card"> <th class="text-center" style="width: 120px">다운로드</th>
<form name="frmFile" method="post" enctype="multipart/form-data" > <th class="text-center" style="width: 120px">삭제</th>
<input type="file" name="uploadFiles" multiple="multiple" onchange="pageObject['${pageName}'].fnAddFiles(this);" hidden /> </thead>
</form> <tbody name="tbodyFileList">
<div class="row g-1"> </tbody>
<div class="col-md-12"> </table>
<button type="button" class="btn btn-blue w-px-120" name="btnAddFile" title="첨부파일 추가">파일추가</button> </div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> </div> <!-- <div class="card"> -->
</div> <!-- 첨부 파일 -->
<!-- 첨부 파일 테이블 -->
<div class="table-responsive"> <!-- 업무 버튼 및 건수 표시 -->
<table class="table table-bordered table-hover table-striped" name="fileList"> <div>
<thead> <span class="container-page-btn">
<th class="text-center" style="width: 24px">No.</th> <!-- 업무 버튼 -->
<th class="text-center" style="width: 200px">파일번호</th> <span class="container-window-btn-right">
<th class="text-center">파일이름</th>
<th class="text-center" style="width: 200px">파일크기</th>
<th class="text-center" style="width: 120px">다운로드</th>
<th class="text-center" style="width: 120px">삭제</th>
</thead>
<tbody name="tbodyFileList">
</tbody>
</table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="card"> -->
<!-- 첨부 파일 -->
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnSave" 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>
LoadScript("excl02020Script", wctx.url("/webjars/js/fims/excl/excl02020.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -189,107 +174,23 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields // datasetControl
$P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.ctrl = newExcl02020Control("${pageName}", "[data-doctx=${pageName}]");
// 파일 리스트 // 파일 리스트
$P.fileListArr = new Array(); $P.fileListArr = new Array();
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "opnn"
, prefixName: "의견제출"
, keymapper: info => info ? info.OPNN_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);
let key = item.data.OPNN_ID;
// 호출용도가 등록..
if ($P.callPurpose == "create") {
$P.$findn("rcptYmd").datepicker("setDate", TODAY());
} else {
// 첨부파일 조회
if (key != null) { $P.fnSearchFileList(key); }
}
}
// 저장 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: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) {
// 폼을 리셋해서 uploadFiles에 출력된 선택 파일을 초기화시킨다.
$P.findn("frmFile").reset();
dialog.close($P.selfDlgId());
}
}
});
}
// 저장
$P.ctrl.save = (info) => {
if (!info) return;
let create = ($P.callPurpose == "create");
let formData = new FormData();
// 첨부파일 배열에 있는 내용을 등록
for (let iLoop = 0; iLoop < $P.fileListArr.length; iLoop++) {
formData.append("uploadFiles" , $P.fileListArr[iLoop]);
}
for (let key in info) {
let value = info[key];
formData.append(key, value);
}
ajax.post({
url: !create ? $P.ctrl.urls.update : $P.ctrl.urls.create
, data: formData
, contentType: false
, processData: false
, success: (resp) => { $P.ctrl.onSave(resp); }
});
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(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"); // 수정
}
// 주소 검색 결과 callback // 주소 검색 결과 callback
$P.callbackSearchAddr = (obj) => { $P.callbackSearchAddr = (obj) => {
$P.$findn("sttrAddr").val(obj.ADDR); // 주소 $P.$findn("sttrAddr").val(obj.ADDR); // 주소
$P.$findn("sttrZip").val(obj.ZIP); // 우편번호 $P.$findn("sttrZip").val(obj.ZIP); // 우편번호
$P.$findn("sttrDaddr").val(obj.DTL_ADDR); // 상세 주소 $P.$findn("sttrDaddr").val(obj.DTL_ADDR); // 상세 주소
} }
/************************************************************************** /**************************************************************************
@ -380,9 +281,9 @@
$P.fnAddFiles = (obj) => { $P.fnAddFiles = (obj) => {
let tableFileList = $P.findn("fileList"); // table element 찾기 let tableFileList = $P.findn("fileList"); // table element 찾기
let fileNo = tableFileList.rows.length - 1; // table에 있는 파일 갯수 (첫번째 title은 제외하기 위해서 -1 처리) let fileNo = tableFileList.rows.length - 1; // table에 있는 파일 갯수 (첫번째 title은 제외하기 위해서 -1 처리)
let maxFileCnt = 3; // 의견제출에 등록 할 수 있는 첨부 파일 최대 개수 let maxFileCnt = 3; // 의견제출에 등록 할 수 있는 첨부 파일 최대 개수
let attFileCnt = obj.files.length; // 선택한 파일의 개수 let attFileCnt = obj.files.length; // 선택한 파일의 개수
let fileArr = new Array(); // 파일 배열 let fileArr = new Array(); // 파일 배열
fileArr = $P.fileListArr; fileArr = $P.fileListArr;
@ -424,7 +325,7 @@
dialog.alert({ dialog.alert({
content: "선택한 파일을 삭제하시겠습니까?" content: "선택한 파일을 삭제하시겠습니까?"
, onOK: () => { , onOK: () => {
let tr = $(obj).parent().parent(); // 클릭한 버튼이 속한 tr 요소 let tr = $(obj).parent().parent(); // 클릭한 버튼이 속한 tr 요소
let td = tr.children(); let td = tr.children();
let fileId = td.eq(1).text(); // 삭제할 파일번호 let fileId = td.eq(1).text(); // 삭제할 파일번호
let fileName = td.eq(2).text(); // 삭제할 파일이름 let fileName = td.eq(2).text(); // 삭제할 파일이름
@ -437,13 +338,13 @@
}); });
} else { } else {
let filtered = $P.fileListArr.filter((value, index, arr) => { let filtered = $P.fileListArr.filter((value, index, arr) => {
return (value.name != fileName); return (value.name != fileName);
}); });
$P.fileListArr = filtered; $P.fileListArr = filtered;
} }
$(obj).closest("tr").remove(); // table 에서 제거 $(obj).closest("tr").remove(); // table 에서 제거
} }
}); });
} }
@ -458,10 +359,13 @@
// validate 확인 // validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return; if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({ dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?" content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields , onOK: () => { $P.ctrl.save(params); } // formFields
}); });
} }
@ -477,23 +381,25 @@
$P.$findn("btnSearchAddr").on("click", function() { $P.$findn("btnSearchAddr").on("click", function() {
$P.fnSearchAddr($(this).attr("title")); // 주소 검색 버튼 이벤트 $P.fnSearchAddr($(this).attr("title")); // 주소 검색 버튼 이벤트
}); });
$P.$findn("btnAddFile").on("click", () => $P.$findn("uploadFiles").trigger("click")); // 파일 등록 버튼 이벤트 $P.$findn("btnAddFile").on("click", function() {
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장 $P.$findn("uploadFiles").trigger("click"); // 파일 등록 버튼 이벤트
});
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 화면 초기화 // 화면 초기화
$P.findn("frmEdit").reset(); $P.findn("frmEdit").reset();
// 달력 초기화 // 기본 데이터 설정
AppSupport.initDatepicker($P.findn("frmEdit")); $P.$findn("rcptYmd").datepicker("setDate", TODAY()); // 달력 초기화
$P.$findn("rcptYmd").datepicker("setDate", TODAY());
// View로 호출되었을때 disabled 셋팅 // View로 호출되었을때 disabled 셋팅
if ($P.callPurpose == "view") { if ($P.callPurpose == "view") {
// input 요소들을 disabled // input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true); $P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled // button 요소들을 disabled
$P.$findn("btnRcptYmd").prop("disabled", true); // 접수 일자 달력 버튼 $P.$findn("btnRcptYmd").prop("disabled", true); // 접수 일자 달력 버튼
$P.$findn("btnSearchPayer").prop("disabled", true); // 납부자 버튼 $P.$findn("btnSearchPayer").prop("disabled", true); // 납부자 버튼
@ -512,7 +418,9 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); AppSupport.initDatepicker($P.findn("frmEdit"));
$P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
$P.ctrl.setData([${info}]); $P.ctrl.setData([${info}]);

@ -17,42 +17,34 @@
<input type="hidden" 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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNo">접수번호</label> <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 /> <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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptYmd">접수일자</label> <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 /> <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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrNm">성명</label> <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 /> <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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSeNm">의견제출구분</label> <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 /> <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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnGist">의견제출요지</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 is="id-textarea" class="form-control w-85" 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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="picRvwOpnn">검토의견</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 is="id-textarea" class="form-control w-85" 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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="docNo">문서번호</label> <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" /> <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 is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ntfctnSeCd">통보구분</label> <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> <select is="id-select" class="form-select" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required>
@ -62,7 +54,6 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 의견 제출 상태 코드 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSttsCd">심의결과</label> <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> <select is="id-select" class="form-select" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" onchange="pageObject['${pageName}'].fnChangeOpnnSbmsnSttsCd(this.value);" required>
@ -72,7 +63,6 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 답변 일시 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="ansYmd">심의일시</label> <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" <input is="id-input" type="text" class="form-control form-date" name="ansYmd" data-map="ANS_YMD"
@ -81,7 +71,6 @@
<input is="id-input" type="text" class="form-control form-time" 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" name="divRdctRsnCd"> <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> <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"> <select is="id-select" class="form-select" name="rdctRsnCd" data-map="RDCT_RSN_CD">
@ -90,12 +79,10 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 감경 금액 -->
<div class="col-md-6" name="divRdctAmt"> <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> <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" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-30 text-end" name="rdctAmt" data-map="RDCT_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 답변 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="ansCn">심의내용</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 is="id-textarea" class="form-control w-85" 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>
@ -123,6 +110,8 @@
<!-- inner page html <div class="content-pop"> --> <!-- inner page html <div class="content-pop"> -->
<script> <script>
LoadScript("excl02030Script", wctx.url("/webjars/js/fims/excl/excl02030.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -135,82 +124,16 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields // datasetControl
$P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.ctrl = newExcl02030Control("${pageName}", "[data-doctx=${pageName}]");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "opnnDlbr"
, prefixName: "의견제출 심의"
, keymapper: info => info ? info.OPNN_ID : ""
, dataGetter: obj => obj.info
, formats: {
RDCT_AMT: numberFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$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 == "") {
$P.$findn("ansYmd").datepicker("setDate", TODAY()); // 날짜
$P.$findn("ansTm").val(new Date().toTimeString().split(" ")[0]); // 시간 "09:51:35 GMT+0900 (한국 표준시)"의 형식에서 공백을 기준으로 잘라 시간 부분만 가져와줍니다.
}
}
// 저장 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: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close($P.selfDlgId()); }
}
});
}
// 저장
$P.ctrl.save = (info) => {
if (!info) return;
ajax.post({
url: $P.ctrl.urls.update
, data: info
, success: resp => $P.ctrl.onSave(resp)
});
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/update.do"); // 수정
}
// 의견제출 상태 코드 변경 // 의견제출 상태 코드 변경
$P.fnChangeOpnnSbmsnSttsCd = (obj) => { $P.fnChangeOpnnSbmsnSttsCd = (obj) => {
// javascript를 이용한 visibility 변경 (이 방법을 사용하는 경우, 안에 있는 요소들이 보이지않지만 그 요소들이 할당 하고 있는 공간은 그대로 유지(공백처리)) // javascript를 이용한 visibility 변경 (이 방법을 사용하는 경우, 안에 있는 요소들이 보이지않지만 그 요소들이 할당 하고 있는 공간은 그대로 유지(공백처리))
@ -236,11 +159,10 @@
// 저장 // 저장
$P.fnSave = () => { $P.fnSave = () => {
// validate 확인 // validate 확인
// if (!AppSupport.customValidate($P.$findn("frmEdit").find("input, select, textarea"))) return; if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// 감경 사유 확인 // 감경 사유 확인
let opnnSbmsnSttsCd = $P.$findn("opnnSbmsnSttsCd").val(); let opnnSbmsnSttsCd = $P.$findn("opnnSbmsnSttsCd").val();
let rdctRsnCd = $P.$findn("rdctRsnCd").find("option:selected").val(); let rdctRsnCd = $P.$findn("rdctRsnCd").find("option:selected").val();
let rdctRsnNm = $P.$findn("rdctRsnCd").find("option:selected").text(); let rdctRsnNm = $P.$findn("rdctRsnCd").find("option:selected").text();
@ -254,10 +176,13 @@
return; return;
} }
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({ dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?" content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields , onOK: () => { $P.ctrl.save(params); } // formFields
}); });
} }
@ -266,53 +191,26 @@
**************************************************************************/ **************************************************************************/
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
/*
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$P.$findn("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);
}
});
});
// form-time 항목에서 키보드로 입력시 시간 포맷팅 적용
$P.$findn("frmEdit").find(".form-time").each(function() {
$(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);
} else if (value.length > 3) {
this.value = value.substring(0, 2) + ":" + value.substring(2);
}
});
});
*/
// 버튼 이벤트 // 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장 $P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 화면 초기화 // 화면 초기화
$P.findn("frmEdit").reset(); $P.findn("frmEdit").reset();
// 달력 초기화 // 달력 초기화
AppSupport.initDatepicker($P.findn("frmEdit"));
$P.$findn("ansYmd").datepicker("setDate", TODAY()); $P.$findn("ansYmd").datepicker("setDate", TODAY());
$P.$findn("ansTm").val(new Date().toTimeString().split(" ")[0]); $P.$findn("ansTm").val(new Date().toTimeString().split(" ")[0]);
// view 로 호출됐을 경우.. // 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if ($P.callPurpose == "view") { if ($P.callPurpose == "view") {
// input 요소들을 disabled // input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true); $P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled // button 요소들을 disabled
$P.$findn("btnAnsYmd").prop("disabled", true); // 답변 일자 달력 버튼 $P.$findn("btnAnsYmd").prop("disabled", true); // 답변 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼 $P.$findn("btnSave").prop("disabled", true); // 저장 버튼
} }
} }
@ -323,7 +221,9 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); AppSupport.initDatepicker($P.findn("frmEdit"));
$P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
$P.ctrl.setData([${info}]); $P.ctrl.setData([${info}]);

@ -16,79 +16,65 @@
<input type="hidden" name="mngId" data-map="MNG_ID" /> <input type="hidden" name="mngId" data-map="MNG_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 1 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원1</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원1</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd1">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd1">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd1" data-map="DLBR_MBR_JBGD1" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd1" data-map="DLBR_MBR_JBGD1" />
</div> </div>
<!-- 1 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm1">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm1">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm1" data-map="DLBR_MBR_NM1" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm1" data-map="DLBR_MBR_NM1" />
</div> </div>
<!-- 2 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원2</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원2</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd2">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd2">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd2" data-map="DLBR_MBR_JBGD2" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd2" data-map="DLBR_MBR_JBGD2" />
</div> </div>
<!-- 2 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm2">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm2">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm2" data-map="DLBR_MBR_NM2" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm2" data-map="DLBR_MBR_NM2" />
</div> </div>
<!-- 3 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원3</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원3</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd3">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd3">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd3" data-map="DLBR_MBR_JBGD3" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd3" data-map="DLBR_MBR_JBGD3" />
</div> </div>
<!-- 3 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm3">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm3">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm3" data-map="DLBR_MBR_NM3" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm3" data-map="DLBR_MBR_NM3" />
</div> </div>
<!-- 4 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원4</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원4</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd4">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd4">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd4" data-map="DLBR_MBR_JBGD4" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd4" data-map="DLBR_MBR_JBGD4" />
</div> </div>
<!-- 4 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm4">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm4">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm4" data-map="DLBR_MBR_NM4" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm4" data-map="DLBR_MBR_NM4" />
</div> </div>
<!-- 5 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원5</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원5</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd5">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd5">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd5" data-map="DLBR_MBR_JBGD5" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd5" data-map="DLBR_MBR_JBGD5" />
</div> </div>
<!-- 5 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm5">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm5">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm5" data-map="DLBR_MBR_NM5" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm5" data-map="DLBR_MBR_NM5" />
</div> </div>
<!-- 6 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원6</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원6</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd6">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd6">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd6" data-map="DLBR_MBR_JBGD6" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd6" data-map="DLBR_MBR_JBGD6" />
</div> </div>
<!-- 6 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm6">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm6">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm6" data-map="DLBR_MBR_NM6" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm6" data-map="DLBR_MBR_NM6" />
</div> </div>
<!-- 7 직급 -->
<div class="col-md-7"> <div class="col-md-7">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원7</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-70 text-sm-end">심의위원7</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd7">직급</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-40 text-sm-end" for="dlbrMbrJbgd7">직급</label>
<input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd7" data-map="DLBR_MBR_JBGD7" /> <input is="id-input" type="text" class="form-control w-50" name="dlbrMbrJbgd7" data-map="DLBR_MBR_JBGD7" />
</div> </div>
<!-- 7 회원명 -->
<div class="col-md-5"> <div class="col-md-5">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm7">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-60 text-sm-end" for="dlbrMbrNm7">성명</label>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm7" data-map="DLBR_MBR_NM7" /> <input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm7" data-map="DLBR_MBR_NM7" />
@ -116,6 +102,8 @@
<!-- / inner page html <div class="content-pop"> --> <!-- / inner page html <div class="content-pop"> -->
<script> <script>
LoadScript("excl02040Script", wctx.url("/webjars/js/fims/excl/excl02040.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -128,70 +116,17 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // URL
$P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
/************************************************************************** $P.callPurpose = "${callPurpose}";
* DatasetControl // datasetControl
**************************************************************************/ $P.ctrl = newExcl02040Control("${pageName}", "[data-doctx=${pageName}]");
$P.ctrl = new DatasetControl({
prefix: "opnnDlbrMbr"
, prefixName: "의견제출 심의 위원 관리"
, keymapper: info => info ? info.MNG_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);
}
// 저장 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: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close($P.selfDlgId()); }
}
});
}
// 저장
$P.ctrl.save = (info) => {
if (!info) return;
let create = (info.mngId == "");
ajax.post({
url: !create ? $P.ctrl.urls.update : $P.ctrl.urls.create
, data: info || {}
, success: (resp) => { $P.ctrl.onSave(resp); }
});
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정
}
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
@ -201,10 +136,13 @@
// validate 확인 // validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return; if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({ dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?" content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields , onOK: () => { $P.ctrl.save(params); } // formFields
}); });
} }
@ -214,11 +152,11 @@
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
// 버튼 이벤트 // 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장 $P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 화면 초기화 // 화면 초기화
$P.findn("frmEdit").reset(); $P.findn("frmEdit").reset();
} }
@ -230,7 +168,7 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
$P.ctrl.setData([${info}]); $P.ctrl.setData([${info}]);

@ -1,7 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<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-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
@ -32,7 +32,6 @@
<!-- 메인 조건 --> <!-- 메인 조건 -->
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<!-- 업무구분 -->
<div class="col-12"> <div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span> <span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -45,7 +44,6 @@
</c:forEach> </c:forEach>
</span> </span>
</div> </div>
<!-- 재등록일자 -->
<div class="col-6"> <div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">재등록일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">재등록일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -79,7 +77,6 @@
<!-- 상세 조건 --> <!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse"> <div name="searchDetail" class="container-search container-search-detail collapse">
<div class="row g-1"> <div class="row g-1">
<!-- 단속일자 -->
<div class="col-4"> <div class="col-4">
<label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
@ -92,22 +89,18 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 차량번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">차량번호</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" />
</div> </div>
<!-- 납부자 번호 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNo">납부자번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNo" autocomplete="off" />
</div> </div>
<!-- 납부자 명 -->
<div class="col-4"> <div class="col-4">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" /> <input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" />
</div> </div>
<!-- 등록일자, 수정일자 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt"> <select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
@ -123,7 +116,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 등록자명, 수정자명 -->
<div class="col-4"> <div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt"> <select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option> <option value="rgtr">등록자</option>
@ -140,8 +132,8 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 --> <!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span> <span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" name="dataPaging"> <ul class="pagination pagination-primary" name="dataPaging">
@ -235,6 +227,9 @@
<tr class="dpv"> <tr class="dpv">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
<tr class="dvs">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca"> <tr class="eca">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
@ -259,6 +254,8 @@
<!-- / inner page html <div class="content-wrapper"> --> <!-- / inner page html <div class="content-wrapper"> -->
<script> <script>
LoadScript("excl03010Script", wctx.url("/webjars/js/fims/excl/excl03010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -271,117 +268,44 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // datasetControl
$P.formFields = new FimsFormFields($P.selectorn("frmSearch")); $P.ctrl = newExcl03010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
/************************************************************************** $P.pagingSupport = new FimsPagingSupport({
* DatasetControl ctrl: $P.ctrl // DatasetControl
**************************************************************************/ , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
$P.ctrl = new DatasetControl({ , linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
prefix: "crdnReReg"
, prefixName: "단속 재등록"
, keymapper: info => info ? info.RE_REG_ID : ""
, dataGetter: obj => obj["List"]
, appendData: true
, infoSize: "md"
, urls: {
load: wctx.url("${infoPrefixUrl}" + "/010/list.do") // 검색
}
, formats: {
RE_REG_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_CRDN_AMT: numberFormat
, REG_DT: datetimeFormat
}
}); });
// 검색 조건 // URL
$P.ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 $P.prefixUrl = "${prefixUrl}";
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.ctrl.onDatasetChange = (obj, option) => {
$P.renderList(obj["Total"], option);
// datasetPaging
Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("dataPaging"), $P.findn("dataPagingInfo"));
}
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.RE_REG_ID;
$P.$findn("tbodyList").setCurrentRow(key);
}
/************************************************************************** /**************************************************************************
* DataTables 이벤트 * DataTables 이벤트
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let dataList = $P.ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 DataTables(그리드) tr, td
let foundContent = $P.findn("tmpltRows").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].dataTableClick('" + dataItem.getValue("RE_REG_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dataTableDblClick('" + dataItem.getValue("RE_REG_ID") + "', '" + dataItem.getValue("CRDN_ID") + "');");
let trs = empty ?
[$P.findn("tmpltNotFound").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= totalSize);
let initScroll = ($P.ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
$P.findn("tableRspns").changeContent(trs.join(), initScroll, noMore);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
// dataTable 클릭 이벤트 // dataTable 클릭 이벤트
$P.dataTableClick = (dataKey) => { $P.dataTableClick = (dataIndex) => {
if (!dataKey) return; if (dataIndex == "") return;
$P.$findn("tbodyList").setCurrentRow(dataKey); $P.$findn("tbodyList").setCurrentRow(dataIndex);
Apply.toDataset.current($P.ctrl.dataset, dataKey); Apply.toDataset.current($P.ctrl.dataset, dataIndex);
} }
// dataTable 더블 클릭 이벤트 - 개별총정보 dialog // dataTable 더블 클릭 이벤트 - 개별총정보 dialog
$P.dataTableDblClick = (dataKey, crdnId, callControlName) => { $P.dataTableDblClick = (dataIndex) => {
if (!dataKey) return; // 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다.
if (!crdnId) return; if (!dataIndex) return;
if (!crdnId) return;
let params = {};
if (callControlName == "noDatasetControl") { let params = {
params.callControlName = callControlName; callPageName: "${pageName}"
params.callPurpose = "view"; , callPurpose: "update"
} else { , sggCd: $P.ctrl.getValue("SGG_CD")
params.callControlName = "pageObject['${pageName}'].ctrl"; , taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: $P.ctrl.getValue("CRDN_ID")
} }
params.sggCd = $P.ctrl.getValue("SGG_CD");
params.taskSeCd = $P.ctrl.getValue("TASK_SE_CD");
params.crdnId = crdnId;
ajax.get({ ajax.get({
url: wctx.url("/sprt/sprt02/010/main.do") url: wctx.url("/sprt/sprt02/010/main.do")
@ -415,50 +339,20 @@
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정
$P.setUrl = (taskSeCd) => {
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/list.do"); // 검색
}
// 사용자검색 callback // 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => { $P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID $P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명 $P.$findn("schRgtrNm").val(userNm); // 사용자 명
} }
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 초기화 버튼 이벤트
$P.fnReset = (taskSeCd) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
if (taskSeCd) { // 업무 구분 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
}
$P.$findn("schReRegYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schReRegYmdTo").datepicker("setDate", TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
// dataset 초기화
$P.ctrl.dataset.clear();
}
// 업무 구분 변경 // 업무 구분 변경
$P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드 // 업무 구분 코드
@ -469,13 +363,20 @@
// 초기화 // 초기화
$P.fnReset(taskSeCd); $P.fnReset(taskSeCd);
// 업무구분에 따른 URL 설정 // dataset 초기화
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 $P.ctrl.dataset.clear();
// 업무별 검색 조건 // 업무 구분에 따른 URL 설정
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); $P.setUrl(taskSeCd);
// 업무별 버튼
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); // 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase()); // 업무별 검색 조건
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase()); // 업무별 버튼
// 업무별 그리드 th // 업무별 그리드 th
let colContent = $P.findn("tmpltCols").content; let colContent = $P.findn("tmpltCols").content;
@ -519,10 +420,13 @@
// 검색 버튼 클릭 이벤트 // 검색 버튼 클릭 이벤트
$P.fnSearchList = () => { $P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건 // 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건 $P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수 $P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부 $P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1); $P.ctrl.load(1);
} }
@ -554,8 +458,16 @@
// 이전 단속 ID 가 없다면.. return // 이전 단속 ID 가 없다면.. return
if (!bfrCrdnId) return; if (!bfrCrdnId) return;
// 개별총정보 dialog let params = {
$P.dataTableDblClick($P.ctrl.getValue("RE_REG_ID"), bfrCrdnId, "noDatasetControl"); btnTitle: btnTitle // 버튼 title
, callPageName: "noPageName"
, callPurpose: "view" // 호출용도: 보기
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrl.getValue("BFR_CRDN_ID") // 이전 단속 ID
}
$P.ctrl.getInfo(params);
} }
/************************************************************************** /**************************************************************************
@ -572,16 +484,45 @@
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다. // 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$P.$findn("term").onEnterPress($P.fnSearchList); $P.$findn("term").onEnterPress($P.fnSearchList);
// 업무 버튼 이벤트
$P.$findn("btnBfrCrdnTotalInfo").on("click", function() {
$P.fnBfrCrdnTotalInfo($P.$findn("btnBfrCrdnTotalInfo").attr("title")); // 이전 단속 정보
});
// DataTables width 변경 조정 // DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns")); Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList); Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
}
// 업무 버튼 이벤트 // 초기화 버튼 이벤트
$P.$findn("btnBfrCrdnTotalInfo").on("click", function() { $P.fnReset = (taskSeCd) => {
$P.fnBfrCrdnTotalInfo($P.$findn("btnBfrCrdnTotalInfo").attr("title")); // 이전 단속 정보 // 화면 초기화
}); $P.findn("frmSearch").reset();
// 달력 초기화
AppSupport.initDatepicker($P.findn("frmSearch"));
// 상세검색 버튼 화살표
AppSupport.initDetailSearchButton($P.findn("frmSearch"));
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
$P.$findn("schReRegYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$P.$findn("schReRegYmdTo").datepicker("setDate", TODAY()); // 부과 제외 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
// dataset 초기화
$P.ctrl.dataset.clear();
} }
/************************************************************************** /**************************************************************************

@ -333,6 +333,9 @@
}); });
return; return;
} }
debugger;
console.log($P.$findn("stdgCd").length);
if ($P.$findn("stdgCd").length != 10) { if ($P.$findn("stdgCd").length != 10) {
dialog.alert({ dialog.alert({
content: "법정동 코드가 잘못되었습니다." content: "법정동 코드가 잘못되었습니다."

@ -10,31 +10,27 @@
<input type="hidden" name="crdnId" data-map="CRDN_ID" /> <input type="hidden" name="crdnId" data-map="CRDN_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 차량번호 -->
<div class="col-md-2"> <div class="col-md-2">
<label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="vhrno">차량번호</label> <label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="vhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-65 fw-bold" name="vhrno" data-map="VHRNO" readonly /> <input is="id-input" type="text" class="form-control w-65 fw-bold" name="vhrno" data-map="VHRNO" readonly />
</div> </div>
<!-- 단속일시 -->
<div class="col-md-2"> <div class="col-md-2">
<label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="crdnYmdTm">단속일시</label> <label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="crdnYmdTm">단속일시</label>
<input is="id-input" type="text" class="form-control w-65 fw-bold" name="crdnYmdTm" data-map="CRDN_YMD_TM" readonly /> <input is="id-input" type="text" class="form-control w-65 fw-bold" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" readonly />
</div> </div>
<!-- 고지번호 -->
<div class="col-md-2"> <div class="col-md-2">
<label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="gojiNo">고지번호</label> <label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="gojiNo">고지번호</label>
<input is="id-input" type="text" class="form-control w-65 fw-bold" name="gojiNo" data-map="GOJI_NO" readonly /> <input is="id-input" type="text" class="form-control w-65 fw-bold" name="gojiNo" data-map="GOJI_NO" readonly />
</div> </div>
<!-- 단속상태 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="crdnSttsNm">단속상태</label> <label is="name-label" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end" for="crdnSttsNm">단속상태</label>
<input is="id-input" type="text" class="form-control w-30 fw-bold text-primary" name="crdnSttsNm" data-map="CRDN_STTS_NM" readonly /> <input is="id-input" type="text" class="form-control w-30 fw-bold text-primary" name="crdnSttsNm" data-map="CRDN_STTS_NM" readonly />
<input is="id-input" type="text" class="form-control w-35 fw-bold" name="crdnSttsChgDt" data-map="CRDN_STTS_CHG_DT" readonly /> <input is="id-input" type="text" class="form-control w-35 fw-bold" name="crdnSttsChgDt" data-map="CRDN_STTS_CHG_DT" data-fmt-type="dt" readonly />
<input type="hidden" name="crdnSttsCd" data-map="CRDN_STTS_CD" /> <input type="hidden" name="crdnSttsCd" data-map="CRDN_STTS_CD" />
</div> </div>
<!-- 자료 이동 버튼 --> <!-- 자료 이동 버튼 -->
<div class="col-md-2 text-end"> <div class="col-md-2 text-end">
<input type="text" class="form-control w-px-120 text-center fw-bold" name="countStatus" readonly /> <input is="id-input" type="text" class="form-control w-px-120 text-center fw-bold" name="countStatus" readonly />
<button type="button" class="w-px-50 btn-PageUp" name="btnPrev">◀</button> <button type="button" class="w-px-50 btn-PageUp" name="btnPrev">◀</button>
<button type="button" class="w-px-50 btn-PageDown" name="btnNext">▶</button> <button type="button" class="w-px-50 btn-PageDown" name="btnNext">▶</button>
</div> </div>
@ -95,6 +91,8 @@
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
<script> <script>
LoadScript("sprt02010Script", wctx.url("/webjars/js/fims/sprt/sprt02010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -107,114 +105,30 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// datasetControl
$P.ctrlMain = newSprt02010Control("${pageName}", "[data-doctx=${pageName}]");
// infoDialog 호출한 pageName
$P.callPageName = "${callPageName}";
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
// 자료 이동을 위한 자료의 Index. 0부터 시작. // 자료 이동을 위한 자료의 Index. 0부터 시작.
$P.curDataIndex; $P.curDataIndex;
// 현재 탭의 위치 // 현재 탭의 위치
$P.activeTabIndex = 0; $P.activeTabIndex = 0;
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.mainCtrl = new DatasetControl({
prefix: "totalInfoMain"
, prefixName: "개별총정보"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.totalInfo
, formats: {
CRDN_YMD_TM: datetimeFormat
, CRDN_STTS_CHG_DT: datetimeFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.mainCtrl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 Dataset 셋팅
$P.formFields.set($P.mainCtrl, item);
// 호출한 controlName이 "noDatasetControl" 아니라면 건수를 표시한다.
if ("${callControlName}" != "noDatasetControl") {
$P.fnChangeCountStatus(${callControlName}.dataset._items); // 건수 표기
}
$P.fnUseDataEdit(item); // 자료 수정
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 자료 재조회
$P.fnRefreshList = (params) => {
if (!params) return;
ajax.get({
url: wctx.url(params.taskSeCd + "/sprt/sprt02/010/main.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: resp => {
if (resp.totalInfo) {
// 최상단 단속 Data 셋팅
$P.mainCtrl.setData([resp.totalInfo]);
if ($P.activeTabIndex == 0) {
$P.fnCrdnPayerInfo(); // 단속 납부자 Data 셋팅
} else if ($P.activeTabIndex == 1) {
$P.fnOpnnSbmsnInfo(); // 의견제출 정보
} else if ($P.activeTabIndex == 2) {
$P.fnSndngInfo(); // 발송 반송 정보
} else if ($P.activeTabIndex == 3) {
$P.fnPrcsInfo(); // 처리 상세 정보
} else if ($P.activeTabIndex == 4) {
$P.fnLevyInfo(); // 부과체납 정보
} else if ($P.activeTabIndex == 5) {
$P.fnRcvmtInfo(); // 수납 정보
} else if ($P.activeTabIndex == 6) {
$P.fnCvlcptDscsnInfo(); // 민원상담 정보
}
}
}
});
}
// 자료 수정 가능 여부
$P.fnUseDataEdit = (item) => {
// 삭제 자료일 경우 빨간색으로 변경
let elem = document.getElementById("crdnSttsNm--${pageName}");
if (item.data.CRDN_STTS_CD == "99") {
elem.classList.remove("text-primary");
elem.classList.add("text-danger");
} else {
elem.classList.remove("text-danger");
elem.classList.add("text-primary");
}
}
//
$P.fnClose = (isDataReLoad) => {
dialog.close($P.selfDlgId());
if (isDataReLoad && "${callControlName}" != "noDatasetControl") {
${callControlName}._load();
}
}
/************************************************************************** /**************************************************************************
* 네이게이션 Event * 네이게이션 Event
**************************************************************************/ **************************************************************************/
// 건수 표기 // 건수 표기
$P.fnChangeCountStatus = (dataItems) => { $P.fnChangeCountStatus = () => {
// $P.curDataIndex 에 값이 없다면.. // 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
// $P.curDataIndex 에 값이 없다면..
if ($P.curDataIndex == null) { if ($P.curDataIndex == null) {
let curCrdnId = $P.mainCtrl.getValue("CRDN_ID"); let curCrdnId = $P.ctrlMain.getValue("CRDN_ID");
for (iLoop = 0; iLoop < dataItems.length; iLoop++) { for (iLoop = 0; iLoop < dataItems.length; iLoop++) {
if (dataItems[iLoop].data.CRDN_ID == curCrdnId) { if (dataItems[iLoop].data.CRDN_ID == curCrdnId) {
@ -224,19 +138,18 @@
} }
} }
// 건수 표시
let viewNumber = $P.curDataIndex + 1; let viewNumber = $P.curDataIndex + 1;
// 표시
$P.$findn("countStatus").val(viewNumber + " of " + dataItems.length); $P.$findn("countStatus").val(viewNumber + " of " + dataItems.length);
} }
// 이전 자료 조회 // 이전 자료 조회
$P.fnPrev = () => { $P.fnPrev = () => {
// 종료 // 종료
if ("${callControlName}" == "noDatasetControl") return; if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = ${callControlName}.dataset._items; let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.mainCtrl.getValue("CRDN_ID"); let curCrdnId = $P.ctrlMain.getValue("CRDN_ID");
// 초기 값은 callControl dataset 의 총 건수 - 1 // 초기 값은 callControl dataset 의 총 건수 - 1
if ($P.curDataIndex == null) { if ($P.curDataIndex == null) {
@ -264,16 +177,16 @@
, delYn: "N" , delYn: "N"
}; };
$P.fnRefreshList(params); $P.fnRefreshInfo(params);
} }
// 다음 자료 조회 // 다음 자료 조회
$P.fnNext = () => { $P.fnNext = () => {
// 종료 // 종료
if ("${callControlName}" == "noDatasetControl") return; if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = ${callControlName}.dataset._items; let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.mainCtrl.getValue("CRDN_ID"); let curCrdnId = $P.ctrlMain.getValue("CRDN_ID");
// 초기 값은 0 // 초기 값은 0
if ($P.curDataIndex == null) { if ($P.curDataIndex == null) {
@ -301,7 +214,7 @@
, delYn: "N" , delYn: "N"
}; };
$P.fnRefreshList(params); $P.fnRefreshInfo(params);
} }
/************************************************************************** /**************************************************************************
@ -309,18 +222,14 @@
**************************************************************************/ **************************************************************************/
// 단속 정보 // 단속 정보
$P.fnCrdnPayerInfo = () => { $P.fnCrdnPayerInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 0; $P.activeTabIndex = 0;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N" , delYn: "N"
}; };
@ -333,18 +242,14 @@
// 의견제출 정보 // 의견제출 정보
$P.fnOpnnSbmsnInfo = () => { $P.fnOpnnSbmsnInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 1; $P.activeTabIndex = 1;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N" , delYn: "N"
}; };
@ -357,23 +262,19 @@
// 발송 반송 정보 // 발송 반송 정보
$P.fnSndngInfo = () => { $P.fnSndngInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 2; $P.activeTabIndex = 2;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N" , delYn: "N"
}; };
ajax.get({ ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do") url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do")
, data: params || {} , data: params || {}
, success: (resp) => { $("#sndngInfo").html(resp); } , success: (resp) => { $("#sndngInfo").html(resp); }
}); });
@ -381,19 +282,15 @@
// 처리 정보 // 처리 정보
$P.fnPrcsInfo = () => { $P.fnPrcsInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 3; $P.activeTabIndex = 3;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, rtpyrId: $P.mainCtrl.getValue("RTPYR_ID") , rtpyrId: $P.ctrlMain.getValue("RTPYR_ID")
, delYn: "N" , delYn: "N"
}; };
@ -406,18 +303,14 @@
// 부과체납 정보 // 부과체납 정보
$P.fnLevyInfo = () => { $P.fnLevyInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 4; $P.activeTabIndex = 4;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N" , delYn: "N"
}; };
@ -430,18 +323,14 @@
// 수납 정보 // 수납 정보
$P.fnRcvmtInfo = () => { $P.fnRcvmtInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 5; $P.activeTabIndex = 5;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N" , delYn: "N"
}; };
@ -454,20 +343,16 @@
// 민원상담 정보 // 민원상담 정보
$P.fnCvlcptDscsnInfo = () => { $P.fnCvlcptDscsnInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index // 탭 Index
$P.activeTabIndex = 6; $P.activeTabIndex = 6;
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, inquiryCondition: "crdnId_vhrno" , inquiryCondition: "crdnId_vhrno"
, sggCd: $P.mainCtrl.getValue("SGG_CD") , sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD") , taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID") , crdnId: $P.ctrlMain.getValue("CRDN_ID")
, vhrno: $P.mainCtrl.getValue("VHRNO") , vhrno: $P.ctrlMain.getValue("VHRNO")
, delYn: "N" , delYn: "N"
}; };
@ -478,6 +363,65 @@
}); });
} }
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 자료 재조회
$P.fnRefreshInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url(params.taskSeCd + "/sprt/sprt02/010/main.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: resp => {
if (resp.totalInfo) {
// 최상단 단속 Data 셋팅
$P.ctrlMain.setData([resp.totalInfo]);
if ($P.activeTabIndex == 0) {
$P.fnCrdnPayerInfo(); // 단속 납부자 Data 셋팅
} else if ($P.activeTabIndex == 1) {
$P.fnOpnnSbmsnInfo(); // 의견제출 정보
} else if ($P.activeTabIndex == 2) {
$P.fnSndngInfo(); // 발송 반송 정보
} else if ($P.activeTabIndex == 3) {
$P.fnPrcsInfo(); // 처리 상세 정보
} else if ($P.activeTabIndex == 4) {
$P.fnLevyInfo(); // 부과체납 정보
} else if ($P.activeTabIndex == 5) {
$P.fnRcvmtInfo(); // 수납 정보
} else if ($P.activeTabIndex == 6) {
$P.fnCvlcptDscsnInfo(); // 민원상담 정보
}
}
}
});
}
// 자료 수정 가능 여부
$P.fnUseDataEdit = (item) => {
// 삭제 자료일 경우 빨간색으로 변경
let elem = document.getElementById("crdnSttsNm--${pageName}");
if (item.data.CRDN_STTS_CD == "99") {
elem.classList.remove("text-primary");
elem.classList.add("text-danger");
} else {
elem.classList.remove("text-danger");
elem.classList.add("text-primary");
}
}
//
$P.fnClose = (isDataReLoad) => {
dialog.close($P.selfDlgId());
if (isDataReLoad && $P.callPageName != "noPageName") {
pageObject[$P.callPageName].ctrl.load(1);
}
}
/************************************************************************** /**************************************************************************
* 초기 셋팅 * 초기 셋팅
**************************************************************************/ **************************************************************************/
@ -487,6 +431,7 @@
$P.$findn("btnPrev").on("click", () => { $P.fnPrev() }); // 이전 $P.$findn("btnPrev").on("click", () => { $P.fnPrev() }); // 이전
$P.$findn("btnNext").on("click", () => { $P.fnNext() }); // 다음 $P.$findn("btnNext").on("click", () => { $P.fnNext() }); // 다음
// 탭 버튼 이벤트
$P.$findn("btnCrdnPayer").on("click", () => { $P.fnCrdnPayerInfo() }); // 단속 정보 $P.$findn("btnCrdnPayer").on("click", () => { $P.fnCrdnPayerInfo() }); // 단속 정보
$P.$findn("btnOpnnSbmsn").on("click", () => { $P.fnOpnnSbmsnInfo() }); // 의견제출 정보 $P.$findn("btnOpnnSbmsn").on("click", () => { $P.fnOpnnSbmsnInfo() }); // 의견제출 정보
$P.$findn("btnSndng").on("click", () => { $P.fnSndngInfo() }); // 발송반송 정보 $P.$findn("btnSndng").on("click", () => { $P.fnSndngInfo() }); // 발송반송 정보
@ -496,8 +441,11 @@
$P.$findn("btnCvlcptDscsn").on("click", () => { $P.fnCvlcptDscsnInfo() }); // 민원상담 정보 $P.$findn("btnCvlcptDscsn").on("click", () => { $P.fnCvlcptDscsnInfo() }); // 민원상담 정보
} }
// 기본 데이터 설정 // 초기 설정
$P.initData = () => { $P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
// 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다. // 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
$P.curDataIndex = null; $P.curDataIndex = null;
} }
@ -508,11 +456,11 @@
// 1. 이벤트 설정 // 1. 이벤트 설정
$P.setEvent(); $P.setEvent();
// 2. 기본 데이터 설정 // 2. 기 설정
$P.initData(); $P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
$P.mainCtrl.setData([${totalInfo}]); $P.ctrlMain.setData([${totalInfo}]);
// 4. 단속, 납부자 정보 조회 // 4. 단속, 납부자 정보 조회
$P.fnCrdnPayerInfo(); $P.fnCrdnPayerInfo();

@ -6,7 +6,7 @@
<div class="d-flex flex-row justify-content-evenly"> <div class="d-flex flex-row justify-content-evenly">
<div class="w-px-1150"> <div class="w-px-1150">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form name="frmEditCrdnPayer"> <form name="frmCrdnPayer">
<input type="hidden" name="crdnId" data-map="CRDN_ID" /> <input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="rtpyrId" data-map="RTPYR_ID" /> <input type="hidden" name="rtpyrId" data-map="RTPYR_ID" />
@ -45,17 +45,14 @@
</div> <!-- <div class="container-page-btn"> --> </div> <!-- <div class="container-page-btn"> -->
<div class="row g-1"> <div class="row g-1">
<!-- 등록구분 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnRegSeNm">등록구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnRegSeNm">등록구분</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnRegSeNm" data-map="CRDN_REG_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="crdnRegSeNm" data-map="CRDN_REG_SE_NM" readonly />
</div> </div>
<!-- 입력구분 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnInptSeNm">입력구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnInptSeNm">입력구분</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnInptSeNm" data-map="CRDN_INPT_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="crdnInptSeNm" data-map="CRDN_INPT_SE_NM" readonly />
</div> </div>
<!-- 단속 시작 시각 ~ 단속 종료 시각 -->
<div class="col-md-4"> <div class="col-md-4">
<span slot="edit"> <span slot="edit">
<template class="pes pvs"> <!-- 밤샘주차 주정차 --> <template class="pes pvs"> <!-- 밤샘주차 주정차 -->
@ -67,17 +64,14 @@
</template> </template>
</span> </span>
</div> </div>
<!-- 단속 일시 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnYmdTm">단속일시</label> <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-45" name="crdnYmdTm" data-map="CRDN_YMD_TM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="crdnYmdTm" data-map="CRDN_YMD_TM" data-fmt-type="dt" readonly />
</div> </div>
<!-- 차량번호 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label> <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-45" name="vhrno" data-map="VHRNO" readonly /> <input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</div> </div>
<!-- 위반 항목 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vltnArtcl">위반항목</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vltnArtcl">위반항목</label>
<input is="id-input" type="text" class="form-control w-45" name="vltnArtcl" data-map="VLTN_ARTCL" readonly /> <input is="id-input" type="text" class="form-control w-45" name="vltnArtcl" data-map="VLTN_ARTCL" readonly />
@ -91,17 +85,14 @@
</template> </template>
</span> </span>
</div> </div>
<!-- 법정동 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnStdgNm">법정동</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnStdgNm">법정동</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnStdgNm" data-map="CRDN_STDG_NM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="crdnStdgNm" data-map="CRDN_STDG_NM" readonly />
</div> </div>
<!-- 단속 장소 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnPlc">단속장소</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnPlc">단속장소</label>
<input is="id-input" type="text" class="form-control w-60" name="crdnPlc" data-map="CRDN_PLC" readonly /> <input is="id-input" type="text" class="form-control w-60" name="crdnPlc" data-map="CRDN_PLC" readonly />
</div> </div>
<!-- 단속일련번호 / 상세단속장소 -->
<div class="col-md-4"> <div class="col-md-4">
<span slot="edit"> <span slot="edit">
<template class="dpv eca pvs"> <!-- 장애인 전기차 주정차 --> <template class="dpv eca pvs"> <!-- 장애인 전기차 주정차 -->
@ -118,88 +109,71 @@
</template> </template>
</span> </span>
</div> </div>
<!-- 민원 신청인 명 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptAplcntNm">민원신청인</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptAplcntNm">민원신청인</label>
<input is="id-input" type="text" class="form-control w-45" name="cvlcptAplcntNm" data-map="CVLCPT_APLCNT_NM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="cvlcptAplcntNm" data-map="CVLCPT_APLCNT_NM" readonly />
</div> </div>
<!-- 민원 접수 일자 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptRcptYmd">민원접수일</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptRcptYmd">민원접수일</label>
<input is="id-input" type="text" class="form-control w-30" name="cvlcptRcptYmd" data-map="CVLCPT_RCPT_YMD" readonly /> <input is="id-input" type="text" class="form-control w-45" name="cvlcptRcptYmd" data-map="CVLCPT_RCPT_YMD" data-fmt-type="day" readonly />
</div> </div>
<!-- 담당자 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptPrcsPicNm">담당자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="cvlcptPrcsPicNm">담당자</label>
<input is="id-input" type="text" class="form-control w-45" name="cvlcptPrcsPicNm" data-map="CVLCPT_PRCS_PIC_NM" readonly /> <input is="id-input" type="text" class="form-control w-45" name="cvlcptPrcsPicNm" data-map="CVLCPT_PRCS_PIC_NM" readonly />
</div> </div>
<!-- 차대번호 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vin">차대번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vin">차대번호</label>
<input is="id-input" type="text" class="form-control w-45" name="vin" data-map="VIN" readonly /> <input is="id-input" type="text" class="form-control w-45" name="vin" data-map="VIN" readonly />
</div> </div>
<!-- 차량 명 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhclNm">차량명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhclNm">차량명</label>
<input is="id-input" type="text" class="form-control w-60" name="vhclNm" data-map="VHCL_NM" readonly /> <input is="id-input" type="text" class="form-control w-60" name="vhclNm" data-map="VHCL_NM" readonly />
</div> </div>
<!-- 차량 색상 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhclColr">차량색상</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhclColr">차량색상</label>
<input is="id-input" type="text" class="form-control w-45" name="vhclColr" data-map="VHCL_COLR" readonly /> <input is="id-input" type="text" class="form-control w-45" name="vhclColr" data-map="VHCL_COLR" readonly />
</div> </div>
<!-- 사전통지 일자 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="advntceBgngYmd">사전통지일자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="advntceBgngYmd">사전통지일자</label>
<input is="id-input" type="text" class="form-control w-30" name="advntceBgngYmd" data-map="ADVNTCE_BGNG_YMD" readonly /> ~ <input is="id-input" type="text" class="form-control w-30" name="advntceBgngYmd" data-map="ADVNTCE_BGNG_YMD" data-fmt-type="day" readonly /> ~
<input is="id-input" type="text" class="form-control w-30" name="advntceDudtYmd" data-map="ADVNTCE_DUDT_YMD" readonly /> <input is="id-input" type="text" class="form-control w-30" name="advntceDudtYmd" data-map="ADVNTCE_DUDT_YMD" data-fmt-type="day" readonly />
</div> </div>
<!-- 기타 내용 -->
<div class="col-md-8"> <div class="col-md-8">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label>
<textarea is="id-textarea" type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" cols="100%" rows="3" readonly></textarea> <textarea is="id-textarea" type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" cols="100%" rows="3" readonly></textarea>
</div> </div>
<!-- 과태료 단속원금 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgCrdnAmt">과태료단속원금</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgCrdnAmt">과태료단속원금</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="ffnlgCrdnAmt" data-map="FFNLG_CRDN_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="ffnlgCrdnAmt" data-map="FFNLG_CRDN_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 과태료 감경 율 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgRdcrt">과태료감경율</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgRdcrt">과태료감경율</label>
<input is="id-input" type="text" class="form-control w-20 text-sm-end" name="ffnlgRdcrt" data-map="FFNLG_RDCRT" readonly /> % <input is="id-input" type="text" class="form-control w-20 text-sm-end" name="ffnlgRdcrt" data-map="FFNLG_RDCRT" readonly /> %
</div> </div>
<!-- 과태료 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgAmt">과태료금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ffnlgAmt">과태료금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="ffnlgAmt" data-map="FFNLG_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="ffnlgAmt" data-map="FFNLG_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 사전통지 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="advntceAmt">사전감경금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="advntceAmt">사전감경금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="advntceAmt" data-map="ADVNTCE_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="advntceAmt" data-map="ADVNTCE_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 부과 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyAmt">부과금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyAmt">부과금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="levyAmt" data-map="LEVY_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="levyAmt" data-map="LEVY_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 감액 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="reducAmt">감액금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="reducAmt">감액금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="reducAmt" data-map="REDUC_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="reducAmt" data-map="REDUC_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 수납 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcvmtAmt">수납금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcvmtAmt">수납금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end" name="rcvmtAmt" data-map="RCVMT_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end" name="rcvmtAmt" data-map="RCVMT_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 미납 금액 -->
<div class="col-md-3"> <div class="col-md-3">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sumAmt">미납금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sumAmt">미납금액</label>
<input is="id-input" type="text" class="form-control w-40 text-sm-end fw-bold text-red" name="sumAmt" data-map="SUM_AMT" data-fmt-type="number" readonly /> <input is="id-input" type="text" class="form-control w-40 text-sm-end fw-bold text-red" name="sumAmt" data-map="SUM_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 업무별 화면 표시 -->
<div class="col-md-3"> <div class="col-md-3">
<span slot="edit"> <span slot="edit">
<template class="bpv pvs"> <!-- 전용차로 주정차 --> <template class="bpv pvs"> <!-- 전용차로 주정차 -->
@ -263,63 +237,53 @@
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">납부자 정보</label> <label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">납부자 정보</label>
<!-- 버튼 우측 정렬 --> <!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnDeleteCrdnPayer" title="납부자 초기화"> <button type="button" class="btn btn-primary w-px-120" name="btnDeleteCrdnPayer" title="초기화">
납부자 초기화 납부자 초기화
</button> </button>
<button type="button" class="btn btn-primary w-px-120" name="btnUpdatePayer" title="납부자 수정"> <button type="button" class="btn btn-primary w-px-120" name="btnUpdatePayer" title="수정">
납부자 수정 납부자 수정
</button> </button>
</span> </span>
</div> <!-- <div class="container-page-btn"> --> </div> <!-- <div class="container-page-btn"> -->
<div class="row g-1"> <div class="row g-1">
<!-- 납부자 명 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNm">납부자성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrSeNm">납부자구분</label>
<input is="id-input" type="text" class="form-control w-50" name="rtpyrNm" data-map="RTPYR_NM" readonly /> <input is="id-input" type="text" class="form-control w-30" name="rtpyrSeNm" data-map="RTPYR_SE_NM" readonly />
</div> </div>
<!-- 납부자 구분 코드 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrSeNm">납부자구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNm">납부자성명</label>
<input is="id-input" type="text" class="form-control w-25" name="rtpyrSeNm" data-map="RTPYR_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-55" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</div> </div>
<!-- 납부자 번호 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNo">납부자번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNo">납부자번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrNo" data-map="RTPYR_NO" readonly /> <input is="id-input" type="text" class="form-control w-40" name="rtpyrNo" data-map="RTPYR_NO" readonly />
</div> </div>
<!-- 납부자 전화번호 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrTelno">전화번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrTelno">전화번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrTelno" data-map="RTPYR_TELNO" readonly /> <input is="id-input" type="text" class="form-control w-40" name="rtpyrTelno" data-map="RTPYR_TELNO" readonly />
</div> </div>
<!-- 납부자 휴대 전화번호 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrMblTelno">휴대전화번호</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrMblTelno">휴대전화번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrMblTelno" data-map="RTPYR_MBL_TELNO" readonly /> <input is="id-input" type="text" class="form-control w-40" name="rtpyrMblTelno" data-map="RTPYR_MBL_TELNO" readonly />
</div> </div>
<!-- 납부자 이메일 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrEml">이메일</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-60" name="rtpyrEml" data-map="RTPYR_EML" readonly /> <input is="id-input" type="text" class="form-control w-60" name="rtpyrEml" data-map="RTPYR_EML" readonly />
</div> </div>
<!-- 납부자 전체주소 -->
<div class="col-md-12"> <div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="wholAddr">주소</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="wholAddr">주소</label>
<input is="id-input" type="text" class="form-control w-80" name="wholAddr" data-map="WHOL_ADDR" readonly /> <input is="id-input" type="text" class="form-control w-80" name="wholAddr" data-map="WHOL_ADDR" readonly />
<input is="id-input" type="text" class="form-control w-px-75" name="zip" data-map="ZIP" readonly /> <input is="id-input" type="text" class="form-control w-px-75" name="zip" data-map="ZIP" readonly />
</div> </div>
<!-- 납부자 입력 구분 코드 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrInptSeNm">입력구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrInptSeNm">입력구분</label>
<input is="id-input" type="text" class="form-control w-50" name="rtpyrInptSeNm" data-map="RTPYR_INPT_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-55" name="rtpyrInptSeNm" data-map="RTPYR_INPT_SE_NM" readonly />
</div> </div>
<!-- 수정 일시 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="pMdfcnDt">수정일시</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="pMdfcnDt">수정일시</label>
<input is="id-input" type="text" class="form-control w-50" name="pMdfcnDt" data-map="P_MDFCN_DT" readonly /> <input is="id-input" type="text" class="form-control w-45" name="pMdfcnDt" data-map="P_MDFCN_DT" data-fmt-type="dt" readonly />
</div> </div>
<!-- 수정자 -->
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="pMdfrNm">수정자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="pMdfrNm">수정자</label>
<input is="id-input" type="text" class="form-control w-40" name="pMdfrNm" data-map="P_MDFR_NM" readonly /> <input is="id-input" type="text" class="form-control w-40" name="pMdfrNm" data-map="P_MDFR_NM" readonly />
@ -337,6 +301,8 @@
</div> <!-- <div class="content-pop"> --> </div> <!-- <div class="content-pop"> -->
<script> <script>
LoadScript("sprt02020Script", wctx.url("/webjars/js/fims/sprt/sprt02020.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -349,145 +315,18 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
$P.$findn("photoMainWrapper").addClass("w-px-380 min-w-px-380"); // datasetControl
$P.ctrlCrdn = newSprt02020Control("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEditCrdnPayer"));
// 단속 사진 // 단속 사진
$P.existFileArr = []; $P.existFileArr = [];
$P.localUploadArr = []; $P.localUploadArr = [];
$P.uploadSet = uploadSupport($P.selectorn("inputUploadSet")); $P.uploadSet = uploadSupport($P.selectorn("inputUploadSet"));
/************************************************************************** $P.$findn("photoMainWrapper").addClass("w-px-380 min-w-px-380");
* DatasetControl
**************************************************************************/
$P.ctrlCrdnPayer = new DatasetControl({
prefix: "crdn"
, prefixName: "단속"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.crdnPayerInfo
, formats: {
CRDN_YMD_TM: datetimeFormat
, CVLCPT_RCPT_YMD: dateFormat // 민원 접수 일자
, ADVNTCE_BGNG_YMD: dateFormat // 사전통지 시작 일자
, ADVNTCE_DUDT_YMD: dateFormat // 사전통지 납기 일자
, FFNLG_CRDN_AMT: numberFormat // 과태료 단속 금액
, FFNLG_AMT: numberFormat // 과태료 금액
, ADVNTCE_AMT: numberFormat // 사전통지 금액
, LEVY_AMT: numberFormat // 부과 금액
, REDUC_AMT: numberFormat // 감액 금액
, RCVMT_AMT: numberFormat // 수납 금액
, SUM_AMT: numberFormat // 합계 금액
, CRDN_BGNG_TM: timeFormat // 단속 시작 시각
, CRDN_END_TM: timeFormat // 단속 종료 시각
, P_MDFCN_DT: datetimeFormat // 납부자 수정 일시
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrlCrdnPayer.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.ctrlCrdnPayer, item);
let key = item.data.CRDN_ID;
}
// 단속 정보 Dialog
$P.ctrlCrdnPayer.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/crdn/crdn06/020/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = $P.ctrlCrdnPayer.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: "lg"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
});
}
});
}
// 삭제 callback
$P.ctrlCrdnPayer.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { pageObject["${mainPageName}"].fnClose(true); }
}
});
}
// 삭제
$P.ctrlCrdnPayer.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/crdn/crdn06/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.ctrlCrdnPayer.onRemove(params, resp);
}
});
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 자료 재조회
$P.fnRefreshDataInfo = () => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
let params = {
callPurpose: "refresh"
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD")
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD")
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url(params.taskSeCd + "/sprt/sprt02/020/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
$P.findn("frmEditCrdnPayer").reset(); // 화면 초기화
$P.ctrlCrdnPayer.dataset.clear(); // Dataset 초기화
// sprt02010-main 단속 정보
pageObject["${mainPageName}"].mainCtrl.setData([resp.totalInfo]);
// 단속, 납부자 정보
if (resp.crdnPayerInfo) { $P.ctrlCrdnPayer.setData([resp.crdnPayerInfo]); }
}
});
}
// 민원 원본 보기 // 민원 원본 보기
$P.viewCvlcptOrgnl = (params) => { $P.viewCvlcptOrgnl = (params) => {
if (!params) return; if (!params) return;
@ -547,14 +386,14 @@
// 서버에 전송할 data(파라미터) 생성 // 서버에 전송할 data(파라미터) 생성
let params = { let params = {
callPurpose: "remove" callPurpose: "remove"
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, btnTitle: obj.btnTitle // 버튼 title , btnTitle: obj.btnTitle // 버튼 title
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, delRsn: obj.reason // 삭제 사유 , delRsn: obj.reason // 삭제 사유
}; };
$P.ctrlCrdnPayer.remove(params); $P.ctrlCrdn.remove(params);
} }
// 단속 재등록 // 단속 재등록
@ -598,7 +437,7 @@
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회 , onClose: () => { $P.ctrlCrdn.refresh(); } // 자료 재조회
}); });
} }
}); });
@ -619,7 +458,7 @@
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
, onClose: () => { , onClose: () => {
if (resp.saved) { $P.fnRefreshDataInfo(); } // 자료 재조회 if (resp.saved) { $P.ctrlCrdn.refresh(); } // 자료 재조회
} }
}); });
} }
@ -630,12 +469,12 @@
$P.updatePayer = (params) => { $P.updatePayer = (params) => {
if (!params) return; if (!params) return;
if (params.rtpyrId == null || params.rtpyrId == "") { if (params.rtpyrId) {
dialogTitle = "납부자 등록"; dialogTitle = "납부자 정보 수정";
params.callPurpose = "create";
} else {
dialogTitle = "납부자 수정";
params.callPurpose = "update"; params.callPurpose = "update";
} else {
dialogTitle = "납부자 정보 등록";
params.callPurpose = "create";
} }
ajax.get({ ajax.get({
@ -656,7 +495,7 @@
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회 , onClose: () => { $P.ctrlCrdn.refresh(); } // 자료 재조회
}); });
} }
}); });
@ -667,13 +506,13 @@
**************************************************************************/ **************************************************************************/
// 민원원본 보기 // 민원원본 보기
$P.fnViewCvlcptOrgnl = (btnTitle) => { $P.fnViewCvlcptOrgnl = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let cvlcptLinkId = $P.ctrlCrdnPayer.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return; let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
// 민원 연계 ID가 없다면.. return // 민원 연계 ID가 없다면.. return
if (typeof cvlcptLinkId == "undefined" || cvlcptLinkId == null || cvlcptLinkId == "") { let cvlcptLinkId = $P.ctrlCrdn.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
if (!cvlcptLinkId) {
dialog.alert({ dialog.alert({
content: "조회된 민원 대장 정보가 없습니다." content: "조회된 민원 대장 정보가 없습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다." + "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
@ -686,9 +525,9 @@
let params = { let params = {
callPurpose: "view" callPurpose: "view"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
$P.viewCvlcptOrgnl(params); $P.viewCvlcptOrgnl(params);
@ -696,12 +535,12 @@
// 민원답변 보기 // 민원답변 보기
$P.fnViewAnswerPreview = (btnTitle) => { $P.fnViewAnswerPreview = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let cvlcptLinkId = $P.ctrlCrdnPayer.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
// 민원 연계 ID가 없다면.. return // 민원 연계 ID가 없다면.. return
let cvlcptLinkId = $P.ctrlCrdn.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
if (!cvlcptLinkId) { if (!cvlcptLinkId) {
dialog.alert({ dialog.alert({
content: "조회된 민원 대장 정보가 없습니다." content: "조회된 민원 대장 정보가 없습니다."
@ -713,11 +552,11 @@
} }
let params = { let params = {
callPurpose : "view" callPurpose: "view"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
$P.viewAnswerPreview(params); $P.viewAnswerPreview(params);
@ -725,39 +564,37 @@
// 단속정보 수정 // 단속정보 수정
$P.fnUpdateCrdn = (btnTitle) => { $P.fnUpdateCrdn = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "update" callPurpose: "update"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
$P.ctrlCrdnPayer.getInfo(params); $P.ctrlCrdn.getInfo(params);
} }
// 단속정보 삭제 // 단속정보 삭제
$P.fnRemoveCrdn = (btnTitle) => { $P.fnRemoveCrdn = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
// 단속 상태 코드 // 단속 상태 코드
let crdnSttsCd = $P.ctrlCrdnPayer.getValue("CRDN_STTS_CD"); let crdnSttsCd = $P.ctrlCrdn.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdnPayer.getValue("CRDN_STTS_NM"); let crdnSttsNm = $P.ctrlCrdn.getValue("CRDN_STTS_NM");
// 단속 상태 코드 확인 // 단속 상태 코드 확인
if (Number(crdnSttsCd) > 51) { if (Number(crdnSttsCd) > 51) {
dialog.alert({ dialog.alert({
content: "[" + title + "]" + " 작업은 단속상태가 '부과 이전' 자료만 처리 가능합니다." content: "[" + btnTitle + "]" + " 작업은 단속상태가 '부과 이전' 자료만 처리 가능합니다."
+ "<br>" + "단속상태 : " + crdnSttsNm + "<br>" + "단속상태 : " + crdnSttsNm
+ "<br><br>" + "[" + title + "]" + " 실행이 취소되었습니다." + "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
}); });
@ -766,7 +603,7 @@
// 삭제 메세지 확인 // 삭제 메세지 확인
dialog.alert({ dialog.alert({
content: "선택하신 " + $P.ctrlCrdnPayer.prefixName + " 정보를 삭제하시겠습니까?" content: "선택하신 " + $P.ctrlCrdn.prefixName + " 정보를 삭제하시겠습니까?"
, onOK: () => { , onOK: () => {
// 삭제 사유 입력 // 삭제 사유 입력
fetch(wctx.url("/webjars/html/inputRsnDialog.html")) fetch(wctx.url("/webjars/html/inputRsnDialog.html"))
@ -792,14 +629,13 @@
// 단속 재등록 // 단속 재등록
$P.fnCreateCrdnReReg = (btnTitle) => { $P.fnCreateCrdnReReg = (btnTitle) => {
let bfrCrdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let bfrCrdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!bfrCrdnId) return; if (!bfrCrdnId) return;
// 단속 상태 코드 // 단속 상태 코드
let crdnSttsCd = $P.ctrlCrdnPayer.getValue("CRDN_STTS_CD"); let crdnSttsCd = $P.ctrlCrdn.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdnPayer.getValue("CRDN_STTS_NM"); let crdnSttsNm = $P.ctrlCrdn.getValue("CRDN_STTS_NM");
// 단속 상태 코드 확인 // 단속 상태 코드 확인
if (Number(crdnSttsCd) < 80 || Number(crdnSttsCd) > 88) { if (Number(crdnSttsCd) < 80 || Number(crdnSttsCd) > 88) {
@ -820,9 +656,9 @@
let params = { let params = {
callPurpose: "create" callPurpose: "create"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, bfrCrdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , bfrCrdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
$P.createCrdnReReg(params); $P.createCrdnReReg(params);
@ -844,8 +680,8 @@
} }
let params = { let params = {
taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분
, crdnIds: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnIds: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
let inBrowser = false; let inBrowser = false;
@ -861,7 +697,7 @@
fetch(url + "?" + parameter) fetch(url + "?" + parameter)
.then((response) => { .then((response) => {
let header = response.headers.get('Content-Disposition'); let header = response.headers.get("Content-Disposition");
if (!header) { if (!header) {
response.json().then((responseJson) => { response.json().then((responseJson) => {
dialog.alert({ dialog.alert({
@ -871,17 +707,17 @@
}); });
}); });
new Error(""); new Error("");
} }
let parts = header.split(';'); let parts = header.split(";");
filenameInHeader = decodeURIComponent(parts[1].split('=')[1]); filenameInHeader = decodeURIComponent(parts[1].split("=")[1]);
return response.blob(); return response.blob();
}) })
.then((blob) => { .then((blob) => {
AppSupport.openPDF(blob, filenameInHeader); AppSupport.openPDF(blob, filenameInHeader);
}) })
.catch(() => { }); .catch(() => { });
} else { } else {
let parameter = toQuery(params); let parameter = toQuery(params);
@ -891,17 +727,16 @@
// 단속 상태 변경 // 단속 상태 변경
$P.fnUpdateCrdnSttsCd = (btnTitle) => { $P.fnUpdateCrdnSttsCd = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "update" callPurpose: "update"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
}; };
$P.getInfoCrdnSttsCd(params); $P.getInfoCrdnSttsCd(params);
@ -909,12 +744,12 @@
// 납부자 초기화 // 납부자 초기화
$P.fnDeleteCrdnPayer = (btnTitle) => { $P.fnDeleteCrdnPayer = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let rtpyrId = $P.ctrlCrdnPayer.getValue("RTPYR_ID"); // 납부자 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
// 납부자 ID 가 없다면.. return // 납부자 ID 가 없다면.. return
let rtpyrId = $P.ctrlCrdn.getValue("RTPYR_ID"); // 납부자 ID
if (!rtpyrId) { if (!rtpyrId) {
dialog.alert({ dialog.alert({
content: "조회된 납부자 대장 정보가 없습니다." content: "조회된 납부자 대장 정보가 없습니다."
@ -932,10 +767,10 @@
let params = { let params = {
callPurpose: "initialize" callPurpose: "initialize"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdnPayer.getValue("RTPYR_ID") // 납부자 ID , rtpyrId: $P.ctrlCrdn.getValue("RTPYR_ID") // 납부자 ID
, delYn: "N" , delYn: "N"
}; };
@ -946,19 +781,18 @@
// 납부자 수정 // 납부자 수정
$P.fnUpdatePayer = (btnTitle) => { $P.fnUpdatePayer = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "update" callPurpose: "update"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드 , sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdnPayer.getValue("RTPYR_ID") // 납부자 ID , rtpyrId: $P.ctrlCrdn.getValue("RTPYR_ID") // 납부자 ID
, vhrno: $P.ctrlCrdnPayer.getValue("VHRNO") // 차량번호 , vhrno: $P.ctrlCrdn.getValue("VHRNO") // 차량번호
, rtpyrInptSeCd: "01" // 납부자 입력 구분 코드 , rtpyrInptSeCd: "01" // 납부자 입력 구분 코드
}; };
@ -978,45 +812,45 @@
$P.setEvent = () => { $P.setEvent = () => {
// 업무 버튼 이벤트 // 업무 버튼 이벤트
$P.$findn("btnViewCvlcptOrgnl").on("click", () => { $P.$findn("btnViewCvlcptOrgnl").on("click", () => {
$P.fnViewCvlcptOrgnl($P.$findn("btnViewCvlcptOrgnl").attr("title")); // 민원 원본 보기 $P.fnViewCvlcptOrgnl($P.$findn("btnViewCvlcptOrgnl").attr("title")); // 민원 원본 보기
}); });
$P.$findn("btnViewAnswerPreview").on("click", () => { $P.$findn("btnViewAnswerPreview").on("click", () => {
$P.fnViewAnswerPreview($P.$findn("btnViewAnswerPreview").attr("title")); // 민원 답변 보기 $P.fnViewAnswerPreview($P.$findn("btnViewAnswerPreview").attr("title")); // 민원 답변 보기
}); });
$P.$findn("btnPrintNhtPdf01").on("click", () => { $P.$findn("btnPrintNhtPdf01").on("click", () => {
$P.fnMakeFileNht($P.$findn("btnPrintNhtPdf01").attr("title"), "pdf", "01"); // 고지서 출력 $P.fnMakeFileNht($P.$findn("btnPrintNhtPdf01").attr("title"), "pdf", "01"); // 고지서 출력
}); });
$P.$findn("btnPrintNhtPdf02").on("click", () => { $P.$findn("btnPrintNhtPdf02").on("click", () => {
$P.fnMakeFileNht($P.$findn("btnPrintNhtPdf02").attr("title"), "pdf", "02"); // 고지서 출력 $P.fnMakeFileNht($P.$findn("btnPrintNhtPdf02").attr("title"), "pdf", "02"); // 고지서 출력
}); });
$P.$findn("btnUpdateCrdn").on("click", () => { $P.$findn("btnUpdateCrdn").on("click", () => {
$P.fnUpdateCrdn($P.$findn("btnUpdateCrdn").attr("title")); // 단속 정보 수정 $P.fnUpdateCrdn($P.$findn("btnUpdateCrdn").attr("title")); // 단속 정보 수정
}); });
$P.$findn("btnRemoveCrdn").on("click", () => { $P.$findn("btnRemoveCrdn").on("click", () => {
$P.fnRemoveCrdn($P.$findn("btnRemoveCrdn").attr("title")); // 단속 정보 삭제 $P.fnRemoveCrdn($P.$findn("btnRemoveCrdn").attr("title")); // 단속 정보 삭제
}); });
$P.$findn("btnUpdateCrdnSttsCd").on("click", () => { $P.$findn("btnUpdateCrdnSttsCd").on("click", () => {
$P.fnUpdateCrdnSttsCd($P.$findn("btnUpdateCrdnSttsCd").attr("title")); // 단속 상태 변경 $P.fnUpdateCrdnSttsCd($P.$findn("btnUpdateCrdnSttsCd").attr("title")); // 단속 상태 변경
}); });
$P.$findn("btnCreateCrdnReReg").on("click", () => { $P.$findn("btnCreateCrdnReReg").on("click", () => {
$P.fnCreateCrdnReReg($P.$findn("btnCreateCrdnReReg").attr("title")); // 단속 재등록 $P.fnCreateCrdnReReg($P.$findn("btnCreateCrdnReReg").attr("title")); // 단속 재등록
}); });
$P.$findn("btnDeleteCrdnPayer").on("click", () => { $P.$findn("btnDeleteCrdnPayer").on("click", () => {
$P.fnDeleteCrdnPayer($P.$findn("btnDeleteCrdnPayer").attr("title")); // 납부자 초기화 $P.fnDeleteCrdnPayer($P.$findn("btnDeleteCrdnPayer").attr("title")); // 납부자 초기화
}); });
$P.$findn("btnUpdatePayer").on("click", () => { $P.$findn("btnUpdatePayer").on("click", () => {
$P.fnUpdatePayer($P.$findn("btnUpdatePayer").attr("title")); // 납부자 수정 $P.fnUpdatePayer($P.$findn("btnUpdatePayer").attr("title")); // 납부자 수정
}); });
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 초기화 // 초기화
$P.findn("frmEditCrdnPayer").reset(); // 화면 초기화 $P.findn("frmCrdnPayer").reset(); // 화면 초기화
$P.ctrlCrdnPayer.dataset.clear(); // Dataset 초기화 $P.ctrlCrdn.dataset.clear(); // Dataset 초기화
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true // 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") { if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnPrintNhtPdf01").prop("disabled", true); $P.$findn("btnPrintNhtPdf01").prop("disabled", true);
$P.$findn("btnPrintNhtPdf02").prop("disabled", true); $P.$findn("btnPrintNhtPdf02").prop("disabled", true);
$P.$findn("btnUpdateCrdn").prop("disabled", true); $P.$findn("btnUpdateCrdn").prop("disabled", true);
@ -1044,10 +878,10 @@
$P.$findn("btnDeleteExistPhoto").prop("disabled", false); $P.$findn("btnDeleteExistPhoto").prop("disabled", false);
} }
let taskSeCd = pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD"); let taskSeCd = pageObject["${pageNameMain}"].ctrlMain.getValue("TASK_SE_CD");
// 업무 구분에 따른 화면 설정 // 업무 구분에 따른 화면 설정
FimsSupport.renderForTask($P.findn("frmEditCrdnPayer"), taskSeCd.toLowerCase()); FimsSupport.renderForTask($P.findn("frmCrdnPayer"), taskSeCd.toLowerCase());
} }
/************************************************************************** /**************************************************************************
@ -1057,10 +891,10 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. Dataset 설정 = 단속, 납부자 정보 조회 // 3. Dataset 설정 = 단속, 납부자 정보 조회
$P.ctrlCrdnPayer.setData([${crdnPayerInfo}]); $P.ctrlCrdn.setData([${crdnPayerInfo}]);
// 4. 사진영역 설정 // 4. 사진영역 설정
settingPhotoMain("${pageName}", $P.findn("crdnId") settingPhotoMain("${pageName}", $P.findn("crdnId")
@ -1077,7 +911,7 @@
); );
// 5. 사진영역 초기화 // 5. 사진영역 초기화
let crdnPayerInfo = $P.ctrlCrdnPayer.getCurrent(); let crdnPayerInfo = $P.ctrlCrdn.getCurrent();
let existVideo = false; let existVideo = false;
if (crdnPayerInfo.VIDEO_EXIST_YN == "Y") { if (crdnPayerInfo.VIDEO_EXIST_YN == "Y") {

@ -3,191 +3,172 @@
<!-- Page Body --> <!-- Page Body -->
<div class="content-pop" data-doctx="${pageName}"> <div class="content-pop" data-doctx="${pageName}">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form name="frmEditOpnn"> <form name="frmOpnn">
<!-- hidden --> <!-- hidden -->
<input type="hidden" name="opnnId" data-map="OPNN_ID" /> <input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="d-flex flex-row justify-content-evenly"> <div class="d-flex flex-row justify-content-evenly">
<!-- 의견제출 정보 --> <!-- 의견제출 정보 -->
<div class="col-xl-9 mx-1"> <div class="col-xl-9 mx-1">
<div class="card"> <div class="card">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">의견제출 정보</label> <label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">의견제출 정보</label>
<!-- 버튼 우측 정렬 --> <!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnCreateOpnnSbmsn" title="의견제출 등록"> <button type="button" class="btn btn-primary w-px-120" name="btnCreateOpnnSbmsn" title="의견제출 등록">
의견제출 등록 의견제출 등록
</button> </button>
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsn" title="의견제출 수정"> <button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsn" title="의견제출 수정">
의견제출 수정 의견제출 수정
</button> </button>
<button type="button" class="btn btn-primary w-px-120" name="btnRemoveOpnnSbmsn" title="의견제출 삭제"> <button type="button" class="btn btn-primary w-px-120" name="btnRemoveOpnnSbmsn" title="의견제출 삭제">
의견제출 삭제 의견제출 삭제
</button> </button>
<button type="button" class="btn btn-primary w-px-120" name="btnPrintDlbrDecsn" title="심의의결서 출력"> <button type="button" class="btn btn-primary w-px-120" name="btnPrintDlbrDecsn" title="심의의결서 출력">
심의의결서 출력 심의의결서 출력
</button> </button>
</span> <!-- <span class="container-window-btn-right"> --> </span> <!-- <span class="container-window-btn-right"> -->
</div> <!-- <div class="container-page-btn"> --> </div> <!-- <div class="container-page-btn"> -->
<div class="row g-1"> <div class="row g-1">
<!-- 접수 번호 --> <div class="col-md-4">
<div class="col-md-4"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNoMask">접수번호</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptNoMask">접수번호</label> <input is="id-input" type="text" class="form-control w-35" name="rcptNoMask" data-map="RCPT_NO_MASK" readonly />
<input is="id-input" type="text" class="form-control w-30" name="rcptNoMask" data-map="RCPT_NO_MASK" readonly /> </div>
</div> <div class="col-md-4">
<!-- 접수 일자 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptYmd">접수일자</label>
<div class="col-md-4"> <input is="id-input" type="text" class="form-control w-30" 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> </div>
<input is="id-input" type="text" class="form-control w-30" name="rcptYmd" data-map="RCPT_YMD" readonly /> <div class="col-md-4">
</div> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptSeNm">접수구분</label>
<!-- 접수 구분 --> <input is="id-input" type="text" class="form-control w-35" name="rcptSeNm" data-map="RCPT_SE_NM" readonly />
<div class="col-md-4"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptSeNm">접수구분</label> <div class="col-md-4">
<input is="id-input" type="text" class="form-control w-30" name="rcptSeNm" data-map="RCPT_SE_NM" readonly /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrNm">성명</label>
</div> <input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" readonly />
<!-- 진술자 이름 --> </div>
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrNm">성명</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrBrdtMask">생년월일</label>
<input is="id-input" type="text" class="form-control w-40" name="sttrNm" data-map="STTR_NM" readonly /> <input is="id-input" type="text" class="form-control w-30" name="sttrBrdtMask" data-map="STTR_BRDT_MASK" readonly />
</div> </div>
<!-- 진술자 생년월일 --> <div class="col-md-4">
<div class="col-md-4"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ownrRelNm">소유주관계</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrBrdtMask">생년월일</label> <input is="id-input" type="text" class="form-control w-35" name="ownrRelNm" data-map="OWNR_REL_NM" readonly />
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdtMask" data-map="STTR_BRDT_MASK" readonly /> </div>
</div> <div class="col-md-12">
<!-- 소유주 관계 구분 명 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrAddr">주소</label>
<div class="col-md-4"> <input is="id-input" type="text" class="form-control w-80" name="sttrAddr" data-map="STTR_ADDR" readonly />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ownrRelNm">소유주관계</label> <input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" readonly />
<input is="id-input" type="text" class="form-control w-40" name="ownrRelNm" data-map="OWNR_REL_NM" readonly /> </div>
</div> <div class="col-md-12">
<!-- 진술자 주소 --><!-- 진술자 우편번호 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrDaddr">상세주소</label>
<div class="col-md-12"> <input is="id-input" type="text" class="form-control w-87" name="sttrDaddr" data-map="STTR_DADDR" readonly />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrAddr">주소</label> </div>
<input is="id-input" type="text" class="form-control w-80" name="sttrAddr" data-map="STTR_ADDR" readonly /> <div class="col-md-4">
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" readonly /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrCttpc">연락처</label>
</div> <input is="id-input" type="text" class="form-control w-35" name="sttrCttpc" data-map="STTR_CTTPC" readonly />
<!-- 진술자 상세주소 --> </div>
<div class="col-md-12"> <div class="col-md-8">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrDaddr">상세주소</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-87" name="sttrDaddr" data-map="STTR_DADDR" readonly /> <input is="id-input" type="text" class="form-control w-35" name="sttrEml" data-map="STTR_EML" readonly />
</div> </div>
<!-- 진술자 연락처 --> <div class="col-md-12">
<div class="col-md-4"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnCn">의견제출내용</label>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrCttpc">연락처</label> <textarea is="id-textarea" type="text" class="form-control w-87" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="4" data-maxlengthb="4000" readonly></textarea>
<input is="id-input" type="text" class="form-control w-35" name="sttrCttpc" data-map="STTR_CTTPC" readonly /> </div>
</div> <div class="col-md-4">
<!-- 진술자 이메일 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSeNm">의견제출구분</label>
<div class="col-md-8"> <input is="id-input" type="text" class="form-control w-55" 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="sttrEml">이메일</label> </div>
<input is="id-input" type="text" class="form-control w-35" name="sttrEml" data-map="STTR_EML" readonly /> <div class="col-md-8">
</div> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnGist">의견제출요지</label>
<!-- 의견 제출 내용 --> <input is="id-input" type="text" class="form-control w-80" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" readonly />
<div class="col-md-12"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnCn">의견제출내용</label> <div class="col-md-12">
<textarea is="id-textarea" type="text" class="form-control w-87" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="4" data-maxlengthb="4000" readonly></textarea> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="picRvwOpnn">검토의견</label>
</div> <textarea is="id-textarea" type="text" class="form-control w-87" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="2" data-maxlengthb="1000" readonly></textarea>
<!-- 의견 제출 구분 명 --> </div>
<div class="col-md-4">
<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-8">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnGist">의견제출요지</label>
<input is="id-input" type="text" class="form-control w-80" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" readonly />
</div>
<!-- 담당자 검토 의견 -->
<div class="col-md-12">
<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" type="text" class="form-control w-87" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="2" data-maxlengthb="1000" readonly></textarea>
</div>
<!-- 등록 일시 / 등록자 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="regDt">등록일시</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="regDt">등록일시</label>
<input is="id-input" type="text" class="form-control w-30" name="regDt" data-map="REG_DT" readonly /> <input is="id-input" type="text" class="form-control w-30" name="regDt" data-map="REG_DT" data-fmt-type="dt" readonly />
<input is="id-input" type="text" class="form-control w-25" name="rgtrNm" data-map="RGTR_NM" readonly /> <input is="id-input" type="text" class="form-control w-25" name="rgtrNm" data-map="RGTR_NM" readonly />
</div> </div>
<!-- 수정 일시 / 수정자 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label>
<input is="id-input" type="text" class="form-control w-30" name="mdfcnDt" data-map="MDFCN_DT" readonly /> <input is="id-input" type="text" class="form-control w-30" name="mdfcnDt" data-map="MDFCN_DT" data-fmt-type="dt" readonly />
<input is="id-input" type="text" class="form-control w-25" name="mdfrNm" data-map="MDFR_NM" readonly /> <input is="id-input" type="text" class="form-control w-25" name="mdfrNm" data-map="MDFR_NM" readonly />
</div> </div>
<!-- 첨부 파일 테이블 --> <!-- 첨부 파일 테이블 -->
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList"> <table class="table table-bordered table-hover table-striped" name="fileList">
<thead> <thead>
<th class="text-center" style="width: 24px">No.</th> <th class="text-center" style="width: 24px">No.</th>
<th class="text-center" style="width: 200px">파일번호</th> <th class="text-center" style="width: 200px">파일번호</th>
<th class="text-center">파일이름</th> <th class="text-center">파일이름</th>
<th class="text-center" style="width: 200px">파일크기</th> <th class="text-center" style="width: 200px">파일크기</th>
<th class="text-center" style="width: 120px">다운로드</th> <th class="text-center" style="width: 120px">다운로드</th>
</thead> </thead>
<tbody name="tbodyFileList"> <tbody name="tbodyFileList">
</tbody> </tbody>
</table> </table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> --> </div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="row g-1"> --> </div> <!-- <div class="row g-1"> -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-9 mx-1"> --> </div> <!-- <div class="col-xl-9 mx-1"> -->
<!-- 의견제출 정보 --> <!-- 의견제출 정보 -->
<!-- 심의 정보 --> <!-- 심의 정보 -->
<div class="col-xl-3 mx-0"> <div class="col-xl-3 mx-0">
<div class="card"> <div class="card">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<label class="w-px-120 bg-label-danger pe-2 col-form-label text-sm-center">심의 정보</label> <label class="w-px-120 bg-label-danger pe-2 col-form-label text-sm-center">심의 정보</label>
<!-- 버튼 우측 정렬 --> <!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsnDlbrt" title="의견제출 심의"> <button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsnDlbrt" title="심의">
의견제출 심의 의견제출 심의
</button> </button>
</span> </span>
</div> <!-- <div class="container-page-btn"> --> </div> <!-- <div class="container-page-btn"> -->
<div class="row g-1"> <div class="row g-1">
<!-- 문서 번호 --> <div class="col-md-12">
<div class="col-md-12"> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="docNo">문서번호</label>
<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-45" name="docNo" data-map="DOC_NO" readonly />
<input is="id-input" type="text" class="form-control w-45" name="docNo" data-map="DOC_NO" readonly /> </div>
</div> <div class="col-md-12">
<!-- 통보 구분 --> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ntfctnSeNm">통보구분</label>
<div class="col-md-12"> <input is="id-input" type="text" class="form-control w-30" name="ntfctnSeNm" data-map="NTFCTN_SE_NM" readonly />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ntfctnSeNm">통보구분</label> </div>
<input is="id-input" type="text" class="form-control w-30" name="ntfctnSeNm" data-map="NTFCTN_SE_NM" readonly /> <div class="col-md-12">
</div> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSttsNm">심의결과</label>
<!-- 의견 제출 상태 코드 --> <input is="id-input" type="text" class="form-control w-30" name="opnnSbmsnSttsNm" data-map="OPNN_SBMSN_STTS_NM" readonly />
<div class="col-md-12"> <input is="id-input" type="hidden" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" />
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSttsNm">심의결과</label> </div>
<input is="id-input" type="text" class="form-control w-30" name="opnnSbmsnSttsNm" data-map="OPNN_SBMSN_STTS_NM" readonly /> <div class="col-md-12">
<input is="id-input" type="hidden" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" /> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ansYmdTm">심의일시</label>
</div> <input is="id-input" type="text" class="form-control w-45" name="ansYmdTm" data-map="ANS_YMD_TM" data-fmt-type="dt" readonly />
<!-- 답변 일시 --> </div>
<div class="col-md-12"> <div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ansYmdTm">심의일시</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ansCn">심의내용</label>
<input is="id-input" type="text" class="form-control w-45" name="ansYmdTm" data-map="ANS_YMD_TM" readonly /> </div>
</div> <div class="col-md-12">
<!-- 심의 내용 --> <textarea is="id-textarea" type="text" class="form-control w-100" name="ansCn" data-map="ANS_CN" rows="14" data-maxlengthb="4000"></textarea>
<div class="col-md-12"> </div>
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ansCn">심의내용</label> </div>
</div> </div> <!-- <div class="card"> -->
<div class="col-md-12"> </div> <!-- <div class="col-xl-3 mx-0"> -->
<textarea is="id-textarea" type="text" class="form-control w-100" name="ansCn" data-map="ANS_CN" rows="14" data-maxlengthb="4000"></textarea> <!-- 심의 정보 -->
</div> </div> <!-- <div class="d-flex flex-row justify-content-evenly"> -->
</div> </form>
</div> <!-- <div class="card"> --> <!-- 입력 영역 -->
</div> <!-- <div class="col-xl-3 mx-0"> -->
<!-- 심의 정보 -->
</div> <!-- <div class="d-flex flex-row justify-content-evenly"> -->
</form>
<!-- 입력 영역 -->
</div> <!-- <div class="content-pop"> --> </div> <!-- <div class="content-pop"> -->
<script> <script>
LoadScript("sprt02030Script", wctx.url("/webjars/js/fims/sprt/sprt02030.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -200,145 +181,14 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // datasetControl
$P.formFields = new FimsFormFields($P.selectorn("frmEditOpnn")); $P.ctrlOpnn = newSprt02030Control("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
// 파일 리스트 // 파일 리스트
$P.fileListArr = new Array(); $P.fileListArr = new Array();
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrlOpnn = new DatasetControl({
prefix: "opnn"
, prefixName: "의견제출"
, keymapper: info => info ? info.OPNN_ID : ""
, dataGetter: obj => obj.opnnInfo
, formats: {
RCPT_YMD: dateFormat
, ANS_YMD_TM: datetimeFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrlOpnn.onCurrentChange = (item) => {
if (!item) return;
$P.formFields.set($P.ctrlOpnn, item);
let key = item.data.OPNN_ID;
// 첨부파일 조회
if (key != null) { $P.fnSearchFileList(key); }
}
// 의견제출 정보 dialog
$P.ctrlOpnn.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/excl/excl02/020/info.do")
, data: params || {}
, success: (resp) => {
if ((typeof resp) != "string") {
if (resp.rtnMsg != "") {
dialog.alert(resp.rtnMsg);
}
return;
} else {
let dialogName = $P.ctrlOpnn.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: "lg"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
});
}
}
});
}
// 삭제 callback
$P.ctrlOpnn.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) {
$P.fnSearchFileList(); // 첨부파일 조회
$P.fnRefreshDataInfo(); // 자료 재조회
}
}
});
}
// 삭제
$P.ctrlOpnn.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/excl/excl02/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.ctrlOpnn.onRemove(params, resp);
}
});
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 자료 재조회
$P.fnRefreshDataInfo = () => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (!crdnId) return;
let params = {
callPurpose: "refresh"
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD")
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD")
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/030/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
$P.findn("frmEditOpnn").reset(); // 화면 초기화
$P.ctrlOpnn.dataset.clear(); // Dataset 초기화
// sprt02010-main 단속 정보
pageObject["${mainPageName}"].mainCtrl.setData([resp.totalInfo]);
// Dataset 셋팅
if (resp.opnnInfo) {
$P.ctrlOpnn.setData([resp.opnnInfo]); // 의견제출 정보
}
}
});
}
// 심의 dialog // 심의 dialog
$P.getOpnnSbmsnDlbrtInfo = (params) => { $P.getOpnnSbmsnDlbrtInfo = (params) => {
if (!params) return; if (!params) return;
@ -352,7 +202,7 @@
dialog.open({ dialog.open({
id: dialogId id: dialogId
, title: params.btnTitle , title: $P.ctrlOpnn.prefixName + " 정보 " + params.btnTitle
, size: "lg" , size: "lg"
, content: resp , content: resp
, init: () => { , init: () => {
@ -361,7 +211,7 @@
AppSupport.setDialogZindex(); AppSupport.setDialogZindex();
} }
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회 , onClose: () => { $P.ctrlOpnn.refresh(); } // 정보 새로고침
}); });
} }
}); });
@ -401,17 +251,29 @@
**************************************************************************/ **************************************************************************/
// 의견제출 등록 버튼 이벤트 // 의견제출 등록 버튼 이벤트
$P.fnCreateOpnnSbmsn = (btnTitle) => { $P.fnCreateOpnnSbmsn = (btnTitle) => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID // 의견제출 ID가 있다면.. return
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
if (opnnId) {
dialog.alert({
content: "이미 등록된 의견제출 대장 정보가 있습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "create" callPurpose: "create"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드 , sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID , crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, delYn: "N" , delYn: "N"
}; };
@ -420,9 +282,8 @@
// 의견제출 수정 버튼 이벤트 // 의견제출 수정 버튼 이벤트
$P.fnUpdateOpnnSbmsn = (btnTitle) => { $P.fnUpdateOpnnSbmsn = (btnTitle) => {
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
// 의견제출 ID 가 없다면.. return // 의견제출 ID 가 없다면.. return
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
if (!opnnId) { if (!opnnId) {
dialog.alert({ dialog.alert({
content: "조회된 의견제출 대장 정보가 없습니다." content: "조회된 의견제출 대장 정보가 없습니다."
@ -440,6 +301,7 @@
, taskSeCd: $P.ctrlOpnn.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: $P.ctrlOpnn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlOpnn.getValue("CRDN_ID") // 단속 ID , crdnId: $P.ctrlOpnn.getValue("CRDN_ID") // 단속 ID
, opnnId: $P.ctrlOpnn.getValue("OPNN_ID") // 의견제출 ID , opnnId: $P.ctrlOpnn.getValue("OPNN_ID") // 의견제출 ID
, delYn: "N"
}; };
$P.ctrlOpnn.getInfo(params); $P.ctrlOpnn.getInfo(params);
@ -447,9 +309,8 @@
// 의견제출 삭제 버튼 이벤트 // 의견제출 삭제 버튼 이벤트
$P.fnRemoveOpnnSbmsn = (btnTitle) => { $P.fnRemoveOpnnSbmsn = (btnTitle) => {
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
// 의견제출 ID 가 없다면.. return // 의견제출 ID 가 없다면.. return
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
if (!opnnId) { if (!opnnId) {
dialog.alert({ dialog.alert({
content: "조회된 의견제출 대장 정보가 없습니다." content: "조회된 의견제출 대장 정보가 없습니다."
@ -492,7 +353,7 @@
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.callbackRsn({ $P.callbackRsn({
btnTitle: btnTitle // 버튼 title btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유 , reason: $("#reason").val() // 삭제 사유
}); });
} }
@ -577,7 +438,7 @@
// 기존 table에 자료가 존재하면 tableRow 삭제 // 기존 table에 자료가 존재하면 tableRow 삭제
for (let iLoop = 1; iLoop < fileLength; iLoop++) { for (let iLoop = 1; iLoop < fileLength; iLoop++) {
tableFileList.deleteRow(1); // table 행(Row) 삭제 tableFileList.deleteRow(1); // table 행(Row) 삭제
} }
// 의견제출 ID 가 없다면 첨부파일을 조회하지 않는다.. // 의견제출 ID 가 없다면 첨부파일을 조회하지 않는다..
@ -616,7 +477,7 @@
// 첨부파일 다운로드 버튼 이벤트 // 첨부파일 다운로드 버튼 이벤트
$P.fnFileDownload = (fileID) => { $P.fnFileDownload = (fileID) => {
if (pageObject['${mainPageName}'].callPurpose == "view") { return; } if (pageObject["${pageNameMain}"].callPurpose == "view") return;
top.location.href = "/file/download.do?fileID=" + fileID; top.location.href = "/file/download.do?fileID=" + fileID;
} }
@ -626,7 +487,7 @@
**************************************************************************/ **************************************************************************/
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
// 업무 버튼 이벤트 // 업무 버튼 이벤트
$P.$findn("btnCreateOpnnSbmsn").on("click", function() { $P.$findn("btnCreateOpnnSbmsn").on("click", function() {
$P.fnCreateOpnnSbmsn($P.$findn("btnCreateOpnnSbmsn").attr("title")); // 의견제출 등록 $P.fnCreateOpnnSbmsn($P.$findn("btnCreateOpnnSbmsn").attr("title")); // 의견제출 등록
}); });
@ -645,13 +506,14 @@
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 초기화 // 화면 초기화
$P.findn("frmEditOpnn").reset(); // 화면 초기화 $P.findn("frmOpnn").reset();
$P.ctrlOpnn.dataset.clear(); // Dataset 초기화 // Dataset 초기화
$P.ctrlOpnn.dataset.clear(); // 의견제출
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") { // 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnCreateOpnnSbmsn").prop("disabled", true); $P.$findn("btnCreateOpnnSbmsn").prop("disabled", true);
$P.$findn("btnUpdateOpnnSbmsn").prop("disabled", true); $P.$findn("btnUpdateOpnnSbmsn").prop("disabled", true);
$P.$findn("btnRemoveOpnnSbmsn").prop("disabled", true); $P.$findn("btnRemoveOpnnSbmsn").prop("disabled", true);
@ -671,13 +533,11 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
let opnnInfo = ${opnnInfo}; // 의견제출 정보 let opnnInfo = ${opnnInfo}; // 의견제출 정보
if (opnnInfo) { if (opnnInfo) { $P.ctrlOpnn.setData([opnnInfo]); }
$P.ctrlOpnn.setData([opnnInfo]);
}
}); });
</script> </script>

@ -588,12 +588,12 @@
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
// 초기화 // 초기화
$P.findn("frmEditSndngDtl").reset(); // 화면 초기화 $P.findn("frmEditSndngDtl").reset(); // 화면 초기화
$P.ctrlSndngDtl.dataset.clear(); // 발송 상세 Dataset 초기화 $P.ctrlSndngDtl.dataset.clear(); // 발송 상세 Dataset 초기화
$P.ctrlSvbtc.dataset.clear(); // 공시송달 Dataset 초기화 $P.ctrlSvbtc.dataset.clear(); // 공시송달 Dataset 초기화
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true // 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") { if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnCreateSndbk").prop("disabled", true); $P.$findn("btnCreateSndbk").prop("disabled", true);
$P.$findn("btnUpdateSndbk").prop("disabled", true); $P.$findn("btnUpdateSndbk").prop("disabled", true);
$P.$findn("btnRemoveSndbk").prop("disabled", true); $P.$findn("btnRemoveSndbk").prop("disabled", true);
@ -613,9 +613,6 @@
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.initForm();
// 정렬
// tableSorter($P.ctrlSndngDtl, "th[data-field]");
// 3. Dataset 설정 // 3. Dataset 설정
$P.ctrlSndngDtl.setData(${sndngDtls}); // 발송 이력 $P.ctrlSndngDtl.setData(${sndngDtls}); // 발송 이력
$P.ctrlSvbtc.setData(${svbtcDtls}); // 공시송달 이력 $P.ctrlSvbtc.setData(${svbtcDtls}); // 공시송달 이력

@ -30,35 +30,28 @@
<input type="hidden" name="rdctId" data-map="RDCT_ID" /> <input type="hidden" name="rdctId" data-map="RDCT_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 감경 일자 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctYmd">감경일자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctYmd">감경일자</label>
<input is="id-input" type="text" class="form-control w-30" name="rdctYmd" data-map="RDCT_YMD" readonly /> <input is="id-input" type="text" class="form-control w-30" name="rdctYmd" data-map="RDCT_YMD" data-fmt-type="day" readonly />
</div> </div>
<!-- -->
<div class="col-md-6"> <div class="col-md-6">
</div> </div>
<!-- 감경 사유 명 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctRsnNm">감경사유</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctRsnNm">감경사유</label>
<input is="id-input" type="text" class="form-control w-50" name="rdctRsnNm" data-map="RDCT_RSN_NM" readonly /> <input is="id-input" type="text" class="form-control w-50" name="rdctRsnNm" data-map="RDCT_RSN_NM" readonly />
</div> </div>
<!-- 감경 금액 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctAmt">감경금액</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rdctAmt">감경금액</label>
<input is="id-input" type="text" class="form-control w-30 text-end" 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" data-fmt-type="number" readonly />
</div> </div>
<!-- 기타 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label>
<textarea type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" readonly></textarea> <textarea type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" readonly></textarea>
</div> </div>
<!-- 수정 일시 -->
<div class="col-md-6"> <div class="col-md-6">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label>
<input type="text" class="form-control w-45" name="mdfcnDt" data-map="MDFCN_DT" readonly /> <input type="text" class="form-control w-45" name="mdfcnDt" data-map="MDFCN_DT" data-fmt-type="dt" readonly />
</div> </div>
<!-- 수정자 -->
<div class="col-md-6"> <div class="col-md-6">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfrNm">수정자</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfrNm">수정자</label>
<input type="text" class="form-control w-40" name="mdfrNm" data-map="MDFR_NM" readonly /> <input type="text" class="form-control w-40" name="mdfrNm" data-map="MDFR_NM" readonly />
@ -99,35 +92,28 @@
<input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" /> <input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1"> <div class="row g-1">
<!-- 부과제외 일자 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclYmd">부과제외 일자</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclYmd">부과제외 일자</label>
<input is="id-input" type="text" class="form-control w-30" name="levyExclYmd" data-map="LEVY_EXCL_YMD" readonly /> <input is="id-input" type="text" class="form-control w-30" name="levyExclYmd" data-map="LEVY_EXCL_YMD" data-fmt-type="day" readonly />
</div> </div>
<!-- -->
<div class="col-md-6"> <div class="col-md-6">
</div> </div>
<!-- 부과제외 구분 명 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclSeNm">부과제외구분</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclSeNm">부과제외구분</label>
<input is="id-input" type="text" class="form-control w-30" name="levyExclSeNm" data-map="LEVY_EXCL_SE_NM" readonly /> <input is="id-input" type="text" class="form-control w-30" name="levyExclSeNm" data-map="LEVY_EXCL_SE_NM" readonly />
</div> </div>
<!-- 부과제외 사유 명 -->
<div class="col-md-6"> <div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclRsnNm">부과제외사유</label> <label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="levyExclRsnNm">부과제외사유</label>
<input is="id-input" type="text" class="form-control w-60" name="levyExclRsnNm" data-map="LEVY_EXCL_RSN_NM" readonly /> <input is="id-input" type="text" class="form-control w-60" name="levyExclRsnNm" data-map="LEVY_EXCL_RSN_NM" readonly />
</div> </div>
<!-- 기타 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="etcCn">기타내용</label>
<textarea type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" readonly></textarea> <textarea type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" readonly></textarea>
</div> </div>
<!-- 수정 일시 -->
<div class="col-md-6"> <div class="col-md-6">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label>
<input type="text" class="form-control w-45" name="mdfcnDt" data-map="MDFCN_DT" readonly /> <input type="text" class="form-control w-45" name="mdfcnDt" data-map="MDFCN_DT" data-fmt-type="dt" readonly />
</div> </div>
<!-- 수정자 -->
<div class="col-md-6"> <div class="col-md-6">
<label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfrNm">수정자</label> <label class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfrNm">수정자</label>
<input type="text" class="form-control w-40" name="mdfrNm" data-map="MDFR_NM" readonly /> <input type="text" class="form-control w-40" name="mdfrNm" data-map="MDFR_NM" readonly />
@ -148,44 +134,42 @@
<div class="container-page-btn"> <div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">처리 상태 이력</label> <label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">처리 상태 이력</label>
</div> </div>
<div class="row g-1"> <!-- DataTables(그리드) -->
<!-- DataTables(그리드) --> <div class="card-datatable text-nowrap">
<div class="card-datatable text-nowrap"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsCrdnSttsHstry">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsCrdnSttsHstry"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info"> <thead class="sticky-thead">
<thead class="sticky-thead"> <tr name="theadTrCrdnSttsHstry" data-search-target="[data-doctx='${pageName}']">
<tr name="theadTrCrdnSttsHstry"> <th class="cmn sorting" style="width: 180px;" data-field="REG_DT">등록일시</th>
<th class="cmn sorting" style="width: 180px;" data-field="REG_DT">등록일시</th> <th class="cmn sorting" style="width: 120px;" data-field="RGTR_NM">등록사용자</th>
<th class="cmn sorting" style="width: 120px;" data-field="RGTR_NM">등록사용자</th> <th class="cmn sorting" style="width: 160px;" data-field="CRDN_STTS_NM">단속상태</th>
<th class="cmn sorting" style="width: 160px;" data-field="CRDN_STTS_NM">단속상태</th> <th class="cmn sorting" style="width: 280px;" data-field="ETC_CN">기타내용</th>
<th class="cmn sorting" style="width: 280px;" data-field="ETC_CN">기타내용</th> <th class="cmn sorting" style="width: 100px;" data-field="USE_YN_NM">사용여부</th>
<th class="cmn sorting" style="width: 100px;" data-field="USE_YN_NM">사용여부</th> <th class="cmn dummy-th"></th>
<th class="cmn dummy-th"></th> </tr>
</tr> </thead>
</thead> <tbody name="tbodyCrdnSttsHstryList">
<tbody name="tbodyCrdnSttsHstryList"> </tbody>
</tbody> <template is="curly-brackets" name="tmpltCrdnSttsHstryRows">
<template is="curly-brackets" name="tmpltCrdnSttsHstryRows"> <tr data-key="{data-index}">
<tr data-key="STTS_HSTRY_ID"> <td class="cmn text-center" onclick="{onclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}">{REG_DT}</td> <td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td> <td class="cmn text-center" onclick="{onclick}">{CRDN_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{CRDN_STTS_NM}</td> <td class="cmn text-start" onclick="{onclick}">{ETC_CN}</td>
<td class="cmn text-start" onclick="{onclick}">{ETC_CN}</td> <td class="cmn text-center" onclick="{onclick}">{USE_YN_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{USE_YN_NM}</td> <td class="cmn dummy-td"></td>
<td class="cmn dummy-td"></td> </tr>
</tr> </template>
</template> <template name="tmpltNotFoundCrdnSttsHstry">
<template name="tmpltNotFoundCrdnSttsHstry"> <tr class="odd">
<tr class="odd"> <td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td> </tr>
</tr> </template>
</template> </table>
</table>
</div>
</div> </div>
</div> <!-- DataTables(그리드) --> </div>
</div> <!-- <div class="row g-1"> --> </div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-6 mx-1"> --> </div> <!-- <div class="col-xl-6 mx-1"> -->
<!-- 처리 상태 이력 --> <!-- 처리 상태 이력 -->
@ -197,42 +181,40 @@
<div class="container-page-btn"> <div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">주소 변동 이력</label> <label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">주소 변동 이력</label>
</div> </div>
<div class="row g-1"> <!-- DataTables(그리드) -->
<!-- DataTables(그리드) --> <div class="card-datatable text-nowrap">
<div class="card-datatable text-nowrap"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsPayerHstry">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsPayerHstry"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info"> <thead class="sticky-thead">
<thead class="sticky-thead"> <tr name="theadTrPayerHstry" data-search-target="[data-doctx='${pageName}']">
<tr name="theadTrPayerHstry"> <th class="cmn sorting" style="width: 180px;" data-field="REG_DT">등록일시</th>
<th class="cmn sorting" style="width: 180px;" data-field="REG_DT">등록일시</th> <th class="cmn sorting" style="width: 140px;" data-field="RGTR_NM">등록사용자</th>
<th class="cmn sorting" style="width: 140px;" data-field="RGTR_NM">등록사용자</th> <th class="cmn sorting" style="width: 100px;" data-field="ZIP">우편번호</th>
<th class="cmn sorting" style="width: 100px;" data-field="ZIP">우편번호</th> <th class="cmn sorting" style="width: 480px;" data-field="WHOL_ADDR">전체주소</th>
<th class="cmn sorting" style="width: 480px;" data-field="WHOL_ADDR">전체주소</th> <th class="cmn dummy-th"></th>
<th class="cmn dummy-th"></th> </tr>
</tr> </thead>
</thead> <tbody name="tbodyPayerHstryList">
<tbody name="tbodyPayerHstryList"> </tbody>
</tbody> <template is="curly-brackets" name="tmpltPayerHstryRows">
<template is="curly-brackets" name="tmpltPayerHstryRows"> <tr data-key="{data-index}">
<tr data-key="HSTRY_SN"> <td class="cmn text-center" onclick="{onclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}">{REG_DT}</td> <td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td> <td class="cmn text-center" onclick="{onclick}">{ZIP}</td>
<td class="cmn text-center" onclick="{onclick}">{ZIP}</td> <td class="cmn text-start" onclick="{onclick}">{WHOL_ADDR}</td>
<td class="cmn text-start" onclick="{onclick}">{WHOL_ADDR}</td> <td class="cmn dummy-td"></td>
<td class="cmn dummy-td"></td> </tr>
</tr> </template>
</template> <template name="tmpltNotFoundPayerHstry">
<template name="tmpltNotFoundPayerHstry"> <tr class="odd">
<tr class="odd"> <td valign="top" colspan="5" class="dataTables_empty text-center">주소변동 이력 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="5" class="dataTables_empty text-center">주소변동 이력 정보를 찾지 못했습니다.</td> </tr>
</tr> </template>
</template> </table>
</table>
</div>
</div> </div>
</div> <!-- DataTables(그리드) --> </div>
</div> <!-- <div class="row g-1"> --> </div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-6 mx-1"> --> </div> <!-- <div class="col-xl-6 mx-1"> -->
<!-- 주소 변동 이력 --> <!-- 주소 변동 이력 -->
@ -240,6 +222,8 @@
</div> <!-- <div class="content-pop"> --> </div> <!-- <div class="content-pop"> -->
<script> <script>
LoadScript("sprt02050Script", wctx.url("/webjars/js/fims/sprt/sprt02050.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -252,327 +236,17 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // URL
$P.formFieldsRdct = new FimsFormFields($P.selectorn("frmEditRdct")); $P.prefixUrl = "${prefixUrl}"
$P.formFieldsLevyExcl = new FimsFormFields($P.selectorn("frmEditLevyExcl")); // datasetControl
$P.ctrlRdct = newSprt02050ControlRD("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
/************************************************************************** $P.ctrlLevyExcl = newSprt02050ControlLE("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
* DatasetControl $P.ctrlCrdnSttsHstry = newSprt02050ControlCSH("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
**************************************************************************/ $P.ctrlPayerAddrHstrys = newSprt02050ControlPAH("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
// 감경 정보 DatasetControl
$P.ctrlRdct = new DatasetControl({
prefix: "rdct"
, prefixName: "감경"
, keymapper: info => info ? info.RDCT_ID : ""
, dataGetter: obj => obj.rdctInfo
, formats: {
RDCT_YMD: dateFormat
, RDCT_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 부과제외 정보 DatasetControl
$P.ctrlLevyExcl = new DatasetControl({
prefix: "levyExcl"
, prefixName: "부과제외"
, keymapper: info => info ? info.LEVY_EXCL_ID : ""
, dataGetter: obj => obj.levyExclInfo
, formats: {
LEVY_EXCL_YMD: dateFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 단속 상태 이력 DatasetControl
$P.ctrlCrdnSttsHstry = new DatasetControl({
prefix: "crdnSttsHstry"
, prefixName: "단속상태 이력"
, keymapper: info => info ? info.STTS_HSTRY_ID : ""
, dataGetter: obj => obj.crdnSttsHstrys
, appendData: true
, formats: {
REG_DT: datetimeFormat
}
});
// 납부자 변경 이력 DatasetControl
$P.ctrlPayerHstry = new DatasetControl({
prefix: "payerHstry"
, prefixName: "납부자변경 이력"
, keymapper: info => info ? info.HSTRY_SN : ""
, dataGetter: obj => obj.payerHstrys
, appendData: true
, formats: {
REG_DT: datetimeFormat
}
});
/**************************************************************************
* 감경 DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrlRdct.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$P.formFieldsRdct.set($P.ctrlRdct, item);
let key = item.data.RDCT_ID;
}
// 감경 정보 dialog
$P.ctrlRdct.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/levy/levy02/020/info.do")
, data: params || {}
, success: (resp) => {
if ((typeof resp) != "string") {
if (resp.rtnMsg != "") {
dialog.alert(resp.rtnMsg);
}
return;
} else {
let dialogName = $P.ctrlRdct.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: "lg"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
});
}
}
});
}
// 감경 삭제 callback
$P.ctrlRdct.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { $P.fnRefreshDataInfo(); } // 자료 재조회
}
});
}
// 감경 삭제
$P.ctrlRdct.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/levy/levy02/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.rdctControl.onRemove(params, resp);
}
});
}
/**************************************************************************
* 부과 제외 DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrlLevyExcl.onCurrentChange = (item) => {
if (!item) return;
$P.formFieldsLevyExcl.set($P.ctrlLevyExcl, item);
let key = item.data.LEVY_EXCL_ID;
}
// 부과제외 정보 dialog
$P.ctrlLevyExcl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/excl/excl01/020/info.do")
, data: params || {}
, success: (resp) => {
if ((typeof resp) != "string") {
if (resp.rtnMsg != "") {
dialog.alert(resp.rtnMsg);
}
return;
} else {
let dialogName = $P.ctrlLevyExcl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: "md"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
});
}
}
});
}
// 부과제외 삭제 callback
$P.ctrlLevyExcl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { $P.fnRefreshDataInfo(); } // 자료 재조회
}
});
}
// 부과제외 삭제
$P.ctrlLevyExcl.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/excl/excl01/010/remove.do")
, data: params || {}
, success: (resp) => {
$P.ctrlLevyExcl.onRemove(params, resp);
}
});
}
/**************************************************************************
* 단속 처리 상태 이력 DatasetControl 이벤트
**************************************************************************/
// Dataset 변경
$P.ctrlCrdnSttsHstry.onDatasetChange = (obj, option) => {
$P.renderCrdnSttsHstryList();
}
// 현재 선택 자료 변경 이벤트
$P.ctrlCrdnSttsHstry.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.STTS_HSTRY_ID;
$P.$findn("tbodyCrdnSttsHstryList").setCurrentRow(key);
}
/**************************************************************************
* 납부자 변경 이력 DatasetControl 이벤트
**************************************************************************/
// Dataset 변경
$P.ctrlPayerHstry.onDatasetChange = (obj, option) => {
$P.renderPayerHstryList();
}
// 현재 선택 자료 변경 이벤트
$P.ctrlPayerHstry.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.HSTRY_SN;
$P.$findn("tbodyPayerHstryList").setCurrentRow(key);
}
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// 단속 상태 이력 DataTables에 click 이벤트
$P.renderCrdnSttsHstryList = (totalSize, option) => {
let crdnSttsHstryList = $P.ctrlCrdnSttsHstry.dataset;
let empty = crdnSttsHstryList.empty;
let trs = empty ? [$P.findn("tmpltNotFoundCrdnSttsHstry").innerHTML] :
crdnSttsHstryList.inStrings($P.findn("tmpltCrdnSttsHstryRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlCrdnSttsHstry.setCurrent('" + dataItem.getValue("STTS_HSTRY_ID") + "');")
);
$P.$findn("tbodyCrdnSttsHstryList").html(trs.join());
}
// 납부자 이력 DataTables에 click 이벤트
$P.renderPayerHstryList = (totalSize, option) => {
let payerHstryList = $P.ctrlPayerHstry.dataset;
let empty = payerHstryList.empty;
let trs = empty ? [$P.findn("tmpltNotFoundPayerHstry").innerHTML] :
payerHstryList.inStrings($P.findn("tmpltPayerHstryRows").innerHTML
, (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlPayerHstry.setCurrent('" + dataItem.getValue("STTS_HSTRY_ID") + "');")
);
$P.$findn("tbodyPayerHstryList").html(trs.join());
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 자료 재조회
$P.fnRefreshDataInfo = () => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
let params = {
callPurpose: "refresh"
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD")
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD")
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/050/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
$P.findn("frmEditRdct").reset(); // 감경 화면 초기화
$P.findn("frmEditLevyExcl").reset(); // 부과제외 화면 초기화
$P.ctrlRdct.dataset.clear(); // 감경 Dataset 초기화
$P.ctrlLevyExcl.dataset.clear(); // 부과제외 Dataset 초기화
$P.ctrlCrdnSttsHstry.dataset.clear(); // 단속상태 이력 Dataset 초기화
$P.ctrlPayerHstry.dataset.clear(); // 납부자 이력 Dataset 초기화
// sprt02010-main 단속 정보
pageObject["${mainPageName}"].mainCtrl.setData([resp.totalInfo]);
// Dataset 셋팅
if (resp.rdctInfo) {
$P.ctrlRdct.setData([resp.rdctInfo]); // 감경 정보
}
if (resp.levyExclInfo) {
$P.ctrlLevyExcl.setData([resp.levyExclInfo]); // 부과제외 정보
}
$P.ctrlCrdnSttsHstry.setData(resp.crdnSttsHstrys); // 단속상태 이력
$P.ctrlPayerHstry.setData(resp.payerHstrys); // 납부자 이력
}
});
}
// 감경 사유 callback // 감경 사유 callback
$P.callbackRsnRdct = (obj) => { $P.callbackRsnRdct = (obj) => {
// 서버에 전송할 data(파라미터) 생성 // 서버에 전송할 data(파라미터) 생성
@ -603,22 +277,78 @@
$P.ctrlLevyExcl.remove(params); $P.ctrlLevyExcl.remove(params);
} }
// 정보 새로고침
$P.fnRefresh = () => {
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain;
// 단속 ID 가 없다면.. return
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "refresh"
, sggCd: ctrlMain.getValue("SGG_CD")
, taskSeCd: ctrlMain.getValue("TASK_SE_CD")
, crdnId: ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/050/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
$P.ctrlRdct.find("[name='frmEditRdct']").reset(); // 감경 화면 초기화
$P.ctrlLevyExcl.find("[name='frmEditLevyExcl']").reset(); // 부과제외 화면 초기화
$P.ctrlRdct.dataset.clear(); // 감경 Dataset 초기화
$P.ctrlLevyExcl.dataset.clear(); // 부과제외 Dataset 초기화
$P.ctrlCrdnSttsHstry.dataset.clear(); // 단속상태 이력 Dataset 초기화
$P.ctrlPayerAddrHstrys.dataset.clear(); // 납부자주소 이력 Dataset 초기화
// sprt02010-main 단속 정보
ctrlMain.setData([resp.totalInfo]);
// 감경 정보
if (resp.rdctInfo) { $P.ctrlRdct.setData([resp.rdctInfo]); }
// 부과제외 정보
if (resp.levyExclInfo) { $P.ctrlLevyExcl.setData([resp.levyExclInfo]); }
// 단속상태 이력
$P.ctrlCrdnSttsHstry.setData(resp.crdnSttsHstrys);
// 납부자 주소 이력
$P.ctrlPayerAddrHstrys.setData(resp.payerAddrHstrys);
}
});
}
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 감경 등록 버튼 이벤트 // 감경 등록 버튼 이벤트
$P.fnCreateRdct = (btnTitle) => { $P.fnCreateRdct = (btnTitle) => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID // 감경 ID가 있다면.. return
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
if (rdctId) {
dialog.alert({
content: "이미 등록된 감경 대장 정보가 있습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "create" callPurpose: "create"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드 , sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID , crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, delYn: "N" , delYn: "N"
}; };
@ -627,9 +357,8 @@
// 감경 수정 버튼 이벤트 // 감경 수정 버튼 이벤트
$P.fnUpdateRdct = (btnTitle) => { $P.fnUpdateRdct = (btnTitle) => {
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
// 감경 ID 가 없다면.. return // 감경 ID 가 없다면.. return
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
if (!rdctId) { if (!rdctId) {
dialog.alert({ dialog.alert({
content: "조회된 감경 대장 정보가 없습니다." content: "조회된 감경 대장 정보가 없습니다."
@ -649,14 +378,13 @@
, delYn: "N" , delYn: "N"
}; };
$P.rdctControl.getInfo(params); $P.ctrlRdct.getInfo(params);
} }
// 감경 삭제 버튼 이벤트 // 감경 삭제 버튼 이벤트
$P.fnRemoveRdct = (btnTitle) => { $P.fnRemoveRdct = (btnTitle) => {
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
// 감경 ID 가 없다면.. return // 감경 ID 가 없다면.. return
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
if (!rdctId) { if (!rdctId) {
dialog.alert({ dialog.alert({
content: "조회된 감경 대장 정보가 없습니다." content: "조회된 감경 대장 정보가 없습니다."
@ -682,7 +410,7 @@
, content: template , content: template
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.callbackRsn({ $P.callbackRsnRdct({
btnTitle: btnTitle // 버튼 title btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유 , reason: $("#reason").val() // 삭제 사유
}); });
@ -695,18 +423,30 @@
// 계고 등록 버튼 이벤트 // 계고 등록 버튼 이벤트
$P.fnCreateWrng = (btnTitle) => { $P.fnCreateWrng = (btnTitle) => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID // 부과 제외 ID가 있다면.. return
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과 제외 ID
if (levyExclId) {
dialog.alert({
content: "이미 등록된 부과제외 대장 정보가 있습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "create" callPurpose: "create"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드 , sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID , crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "2" // 부과 제외 구분 코드 , levyExclSeCd: "2" // 부과 제외 구분 코드
, delYn: "N" , delYn: "N"
}; };
@ -715,18 +455,30 @@
// 부과제외 등록 버튼 이벤트 // 부과제외 등록 버튼 이벤트
$P.fnCreateLevyExcl = (btnTitle) => { $P.fnCreateLevyExcl = (btnTitle) => {
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID // 부과 제외 ID가 있다면.. return
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과 제외 ID
if (levyExclId) {
dialog.alert({
content: "이미 등록된 부과제외 대장 정보가 있습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let params = { let params = {
callPurpose: "create" callPurpose: "create"
, btnTitle: btnTitle , btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드 , sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드 , taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID , crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "1" // 부과 제외 구분 코드 , levyExclSeCd: "1" // 부과 제외 구분 코드
, delYn: "N" , delYn: "N"
}; };
@ -735,9 +487,8 @@
// 부과제외 수정 버튼 이벤트 // 부과제외 수정 버튼 이벤트
$P.fnUpdateLevyExcl = (btnTitle) => { $P.fnUpdateLevyExcl = (btnTitle) => {
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과제외 ID // 부과제외 ID 가 없다면.. return
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과 제외 ID
// 부과제외 ID 가 없다면.. return
if (!levyExclId) { if (!levyExclId) {
dialog.alert({ dialog.alert({
content: "조회된 부과제외 대장 정보가 없습니다." content: "조회된 부과제외 대장 정보가 없습니다."
@ -763,9 +514,8 @@
// 부과제외 삭제 버튼 이벤트 // 부과제외 삭제 버튼 이벤트
$P.fnRemoveLevyExcl = (btnTitle) => { $P.fnRemoveLevyExcl = (btnTitle) => {
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과제외 ID
// 부과제외 ID 가 없다면.. return // 부과제외 ID 가 없다면.. return
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과제외 ID
if (!levyExclId) { if (!levyExclId) {
dialog.alert({ dialog.alert({
content: "조회된 부과제외 대장 정보가 없습니다." content: "조회된 부과제외 대장 정보가 없습니다."
@ -809,25 +559,25 @@
$P.setEvent = () => { $P.setEvent = () => {
// 업무 버튼 이벤트 // 업무 버튼 이벤트
$P.$findn("btnCreateRdct").on("click", function() { $P.$findn("btnCreateRdct").on("click", function() {
$P.fnCreateRdct($P.$findn("btnCreateRdct").attr("title")); // 감경 등록 $P.fnCreateRdct($P.$findn("btnCreateRdct").attr("title")); // 감경 등록
}); });
$P.$findn("btnUpdateRdct").on("click", function() { $P.$findn("btnUpdateRdct").on("click", function() {
$P.fnUpdateRdct($P.$findn("btnUpdateRdct").attr("title")); // 감경 수정 $P.fnUpdateRdct($P.$findn("btnUpdateRdct").attr("title")); // 감경 수정
}); });
$P.$findn("btnRemoveRdct").on("click", function() { $P.$findn("btnRemoveRdct").on("click", function() {
$P.fnRemoveRdct($P.$findn("btnRemoveRdct").attr("title")); // 감경 등록 $P.fnRemoveRdct($P.$findn("btnRemoveRdct").attr("title")); // 감경 등록
}); });
$P.$findn("btnCreateWrng").on("click", function() { $P.$findn("btnCreateWrng").on("click", function() {
$P.fnCreateWrng($P.$findn("btnCreateWrng").attr("title")); // 계고 등록 $P.fnCreateWrng($P.$findn("btnCreateWrng").attr("title")); // 계고 등록
}); });
$P.$findn("btnCreateLevyExcl").on("click", function() { $P.$findn("btnCreateLevyExcl").on("click", function() {
$P.fnCreateLevyExcl($P.$findn("btnCreateLevyExcl").attr("title")); // 비부과 등록 $P.fnCreateLevyExcl($P.$findn("btnCreateLevyExcl").attr("title")); // 비부과 등록
}); });
$P.$findn("btnUpdateLevyExcl").on("click", function() { $P.$findn("btnUpdateLevyExcl").on("click", function() {
$P.fnUpdateLevyExcl($P.$findn("btnUpdateLevyExcl").attr("title")); // 부과제외 수정 $P.fnUpdateLevyExcl($P.$findn("btnUpdateLevyExcl").attr("title")); // 부과제외 수정
}); });
$P.$findn("btnRemoveLevyExcl").on("click", function() { $P.$findn("btnRemoveLevyExcl").on("click", function() {
$P.fnRemoveLevyExcl($P.$findn("btnRemoveLevyExcl").attr("title")); // 부과제외 삭제 $P.fnRemoveLevyExcl($P.$findn("btnRemoveLevyExcl").attr("title")); // 부과제외 삭제
}); });
// DataTables width 변경 조정 // DataTables width 변경 조정
@ -836,9 +586,18 @@
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.fnReset = () => {
// 화면 초기화
$P.findn("frmEditRdct").reset();
$P.findn("frmEditLevyExcl").reset();
// Dataset 초기화
$P.ctrlRdct.dataset.clear(); // 감경
$P.ctrlLevyExcl.dataset.clear(); // 부과제외
$P.ctrlCrdnSttsHstry.dataset.clear(); // 단속상태 이력
$P.ctrlPayerAddrHstrys.dataset.clear(); // 단속 납부자주소 이력
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true // 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") { if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnCreateRdct").prop("disabled", true); $P.$findn("btnCreateRdct").prop("disabled", true);
$P.$findn("btnUpdateRdct").prop("disabled", true); $P.$findn("btnUpdateRdct").prop("disabled", true);
$P.$findn("btnRemoveRdct").prop("disabled", true); $P.$findn("btnRemoveRdct").prop("disabled", true);
@ -864,21 +623,17 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. Dataset 설정 // 3. Dataset 설정
let rdctInfo = ${rdctInfo}; // 감경 정보 let rdctInfo = ${rdctInfo}; // 감경 정보
if (rdctInfo) { if (rdctInfo) { $P.ctrlRdct.setData([rdctInfo]); }
$P.ctrlRdct.setData([rdctInfo]);
}
let levyExclInfo = ${levyExclInfo}; // 부과제외 정보 let levyExclInfo = ${levyExclInfo}; // 부과제외 정보
if (levyExclInfo) { if (levyExclInfo) { $P.ctrlLevyExcl.setData([levyExclInfo]); }
$P.ctrlLevyExcl.setData([levyExclInfo]);
}
$P.ctrlCrdnSttsHstry.setData(${crdnSttsHstrys}); // 단속상태 이력 $P.ctrlCrdnSttsHstry.setData(${crdnSttsHstrys}); // 단속상태 이력
$P.ctrlPayerHstry.setData(${payerAddrHstrys}); // 납부자주소 이력 $P.ctrlPayerAddrHstrys.setData(${payerAddrHstrys}); // 납부자주소 이력
}); });
</script> </script>

@ -0,0 +1,145 @@
function newExcl01010Control(pageName, doctx="[data-doctx='excl01010']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "levyExcl"
, prefixName: "부과제외"
, dataGetter: obj => obj["List"]
, keys: ["LEVY_EXCL_ID"]
, appendData: true
, infoSize: "md"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do"
}
, formats: {
LEVY_EXCL_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, CVLCPT_RCPT_YMD: dateFormat
, FFNLG_CRDN_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $(ctrl.find("[name='frmSearch']")).find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 dataTables(그리드) tr, td
let foundContent = ctrl.find("[name='tmpltRows']").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수
let initScroll = (ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
// dataTables(그리드)에 자료 표시 td
ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].pagingSupport.setPagingInfo(obj);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
};
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']"));
};
// 선택(체크) 변경 이벤트
ctrl.onSelectionChange = (selectedArr) => {
// gridCheckbox
Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr);
// gridButton
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr); // 삭제 버튼
};
// 상세 정보 dialog
ctrl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: ctrl.urls.getInfo
, data: params || {}
, success: (resp) => {
let dialogName = ctrl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { ctrl.reload({all : true}); } // 자료 재조회
});
}
});
}
// 삭제 callback
ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { ctrl.reload({ all: true }); } // 자료 재조회
}
});
}
// 삭제
ctrl.remove = (params) => {
if (!params) return;
ajax.post({
url: ctrl.urls.remove
, data: params || {}
, success: (resp) => { ctrl.onRemove(params, resp); }
});
}
return ctrl;
}

@ -0,0 +1,81 @@
function newExcl01020Control(pageName, doctx="[data-doctx='excl01020']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "levyExcl"
, prefixName: "부과제외"
, dataGetter: obj => obj["info"]
, keys: ["LEVY_EXCL_ID"]
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 부과제외구분에 따른 부과제외사유 설정
pageObject[pageName].fnSetFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 업무구분에 따른 URL 변경
ctrl.urls.create = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/create.do"); // 등록
ctrl.urls.update = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/update.do"); // 수정
// 부과제외 일자
if (item.data.LEVY_EXCL_YMD == null) {
$(ctrl.find("[name='levyExclYmd']")).datepicker("setDate", TODAY());
}
};
// 저장 callback
ctrl.onSave = (params, resp) => {
let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id;
let dialogTitle = $("#" + modalId).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (pageObject[pageName].savedCallbackFuncName != "") {
pageObject[pageName].savedCallbackFuncName(resp.saved);
}
if (resp.saved) { dialog.close(modalId); }
}
});
}
// 저장
ctrl.save = (params) => {
if (!params) return;
let create = (params.levyExclId == "");
// 민원 접수 관리에서 호출했다면..
if (create && pageObject[pageName].saveCallbackFuncName != "") {
pageObject[pageName].saveCallbackFuncName(info);
} else {
ajax.post({
url: !create ? ctrl.urls.update : ctrl.urls.create
, data: params || {}
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
}
return ctrl;
}

@ -0,0 +1,146 @@
function newExcl02010Control(pageName, doctx="[data-doctx='excl02010']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "opnn"
, prefixName: "의견제출"
, dataGetter: obj => obj["List"]
, keys: ["OPNN_ID"]
, appendData: true
, infoSize: "xl"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, remove: "/remove.do"
}
, formats: {
RCPT_YMD: dateFormat
, ANS_YMD: dateFormat
, ANS_YMD_TM: datetimeFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_CRDN_AMT: numberFormat
, FFNLG_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $(ctrl.find("[name='frmSearch']")).find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 dataTables(그리드) tr, td
let foundContent = ctrl.find("[name='tmpltRows']").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수
let initScroll = (ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
// dataTables(그리드)에 자료 표시 td
ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].pagingSupport.setPagingInfo(obj);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
};
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']"));
};
// 선택(체크) 변경 이벤트
ctrl.onSelectionChange = (selectedArr) => {
// gridCheckbox
Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr);
// gridButton
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr); // 삭제 버튼
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnPrintDlbrDecsn']"), selectedArr); // 심의의결서 출력 버튼
};
// 상세 정보 dialog
ctrl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: ctrl.urls.getInfo
, data: params || {}
, success: (resp) => {
let dialogName = ctrl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { ctrl.reload({all : true}); } // 자료 재조회
});
}
});
}
// 삭제 callback
ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { ctrl.reload({ all: true }); } // 자료 재조회
}
});
}
// 삭제
ctrl.remove = (params) => {
if (!params) return;
ajax.post({
url: ctrl.urls.remove
, data: params || {}
, success: (resp) => { ctrl.onRemove(params, resp); }
});
}
return ctrl;
}

@ -0,0 +1,84 @@
function newExcl02020Control(pageName, doctx="[data-doctx='excl02020']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "opnn"
, prefixName: "의견제출"
, dataGetter: obj => obj["info"]
, keys: ["OPNN_ID"]
, urls: {
create: "/create.do"
, update: "/update.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 업무구분에 따른 URL 변경
ctrl.urls.create = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/create.do"); // 등록
ctrl.urls.update = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/update.do"); // 수정
// 접수 일자
if (!item.data.RCPT_YMD) {
$(ctrl.find("[name='rcptYmd']")).datepicker("setDate", TODAY());
}
// 첨부파일 조회
let key = item.data.OPNN_ID;
if (key != null) {
pageObject[pageName].fnSearchFileList(key);
}
};
// 저장 callback
ctrl.onSave = (params, resp) => {
let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id;
let dialogTitle = $("#" + modalId).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close(modalId); }
}
});
}
// 저장
ctrl.save = (params) => {
if (!params) return;
let create = (params.opnnId == "");
let formData = new FormData();
// 첨부파일 배열에 있는 내용을 등록
for (let iLoop = 0; iLoop < pageObject[pageName].fileListArr.length; iLoop++) {
formData.append("uploadFiles" , pageObject[pageName].fileListArr[iLoop]);
}
for (let key in params) {
let value = params[key];
formData.append(key, value);
}
ajax.post({
url: !create ? ctrl.urls.update : ctrl.urls.create
, data: formData
, contentType: false
, processData: false
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
return ctrl;
}

@ -0,0 +1,71 @@
function newExcl02030Control(pageName, doctx="[data-doctx='excl02030']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "opnnDlbr"
, prefixName: "의견제출 심의"
, dataGetter: obj => obj["info"]
, keys: ["OPNN_ID"]
, urls: {
create: "/create.do"
, update: "/update.do"
}
, formats: {
RDCT_AMT: numberFormat
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 업무구분에 따른 URL 변경
ctrl.urls.create = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/030/create.do"); // 등록
ctrl.urls.update = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/030/update.do"); // 수정
// 의견제출 상태 코드 변경
pageObject[pageName].fnChangeOpnnSbmsnSttsCd(item.data.OPNN_SBMSN_STTS_CD);
// 답변 일자가 없다면..
if (item.data.ANS_YMD == null) {
$(ctrl.find("[name='ansYmd']")).datepicker("setDate", TODAY());
$(ctrl.find("[name='ansTm']")).val(new Date().toTimeString().split(" ")[0]); // 시간 "09:51:35 GMT+0900 (한국 표준시)"의 형식에서 공백을 기준으로 잘라 시간 부분만 가져와줍니다.
}
};
// 저장 callback
ctrl.onSave = (params, resp) => {
let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id;
let dialogTitle = $("#" + modalId).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close(modalId); }
}
});
}
// 저장
ctrl.save = (params) => {
if (!params) return;
ajax.post({
url: ctrl.urls.update
, data: params || {}
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
return ctrl;
}

@ -0,0 +1,61 @@
function newExcl02040Control(pageName, doctx="[data-doctx='excl02040']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "opnnDlbrMbr"
, prefixName: "의견제출 심의위원"
, dataGetter: obj => obj["info"]
, keys: ["MNG_ID"]
, urls: {
create: "/create.do"
, update: "/update.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 업무구분에 따른 URL 변경
ctrl.urls.create = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/040/create.do"); // 등록
ctrl.urls.update = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/040/update.do"); // 수정
};
// 저장 callback
ctrl.onSave = (params, resp) => {
let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id;
let dialogTitle = $("#" + modalId).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close(modalId); }
}
});
}
// 저장
ctrl.save = (params) => {
if (!params) return;
let create = (params.mngId == "");
ajax.post({
url: !create ? ctrl.urls.update : ctrl.urls.create
, data: params || {}
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
return ctrl;
}

@ -0,0 +1,103 @@
function newExcl03010Control(pageName, doctx="[data-doctx='excl03010']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "crdnReReg"
, prefixName: "단속 재등록"
, dataGetter: obj => obj["List"]
, keys: ["RE_REG_ID"]
, appendData: true
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
, formats: {
RE_REG_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_CRDN_AMT: numberFormat
, REG_DT: datetimeFormat
}
});
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrl.dataset;
let empty = dataList.empty;
let clsForTask = $(ctrl.find("[name='frmSearch']")).find("[name='taskSeCd']:checked").val().toLowerCase();
// 업무별 dataTables(그리드) tr, td
let foundContent = ctrl.find("[name='tmpltRows']").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("." + clsForTask + ",.cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수
let initScroll = (ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
// dataTables(그리드)에 자료 표시 td
ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].pagingSupport.setPagingInfo(obj);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
};
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']"));
};
// 상세 정보 dialog
ctrl.getInfo = (params) => {
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다.
if (!params) return;
ajax.get({
url: wctx.url("/sprt/sprt02/010/main.do")
, data: params || {}
, success: (resp) => {
let dialogName = "totalInfoMainDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: "개별총정보"
, size: "xxl"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
});
}
return ctrl;
}

@ -0,0 +1,26 @@
function newSprt02010Control(pageName, doctx="[data-doctx='sprt02010']") {
let ctrlMain = new DatasetControl({
doctx: doctx
, prefix: "totalInfoMain"
, prefixName: "개별총정보"
, dataGetter: obj => obj["totalInfo"]
, keys: ["CRDN_ID"]
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrlMain.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrlMain.selector("[name='frmEdit']"));
formFields.set(ctrlMain, item);
// 건수를 표시한다.
pageObject[pageName].fnChangeCountStatus();
};
return ctrlMain;
}

@ -0,0 +1,116 @@
function newSprt02020Control(pageName, doctx="[data-doctx='sprt02020']", mainPageName="sprt02010") {
let ctrlCrdn = new DatasetControl({
doctx: doctx
, prefix: "crdn"
, prefixName: "단속"
, dataGetter: obj => obj["crdnPayerInfo"]
, keys: ["CRDN_ID"]
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrlCrdn.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrlCrdn.selector("[name='frmCrdnPayer']"));
formFields.set(ctrlCrdn, item);
};
// 상세 정보 dialog
ctrlCrdn.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/crdn/crdn06/020/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = ctrlCrdn.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: "lg"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { ctrlCrdn.refresh(); } // 정보 새로고침
});
}
});
}
// 삭제 callback
ctrlCrdn.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { pageObject[mainPageName].fnClose(true); }
}
});
}
// 삭제
ctrlCrdn.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/crdn/crdn06/010/remove.do")
, data: params || {}
, success: (resp) => {
ctrlCrdn.onRemove(params, resp);
}
});
}
// 정보 새로고침
ctrlCrdn.refresh = () => {
let ctrlMain = pageObject[mainPageName].ctrlMain;
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (!crdnId) return;
let params = {
callPurpose: "refresh"
, sggCd: ctrlMain.getValue("SGG_CD")
, taskSeCd: ctrlMain.getValue("TASK_SE_CD")
, crdnId: ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url(params.taskSeCd + "/sprt/sprt02/020/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
ctrlCrdn.find("[name='frmCrdnPayer']").reset(); // 화면 초기화
ctrlCrdn.dataset.clear(); // Dataset 초기화
// sprt02010-main 단속 정보
ctrlMain.setData([resp.totalInfo]);
// 단속, 납부자 정보
if (resp.crdnPayerInfo) { ctrlCrdn.setData([resp.crdnPayerInfo]); }
}
});
}
return ctrlCrdn;
}

@ -0,0 +1,123 @@
function newSprt02030Control(pageName, doctx="[data-doctx='sprt02030']", mainPageName="sprt02010") {
let ctrlOpnn = new DatasetControl({
doctx: doctx
, prefix: "opnn"
, prefixName: "의견제출"
, dataGetter: obj => obj["opnnInfo"]
, keys: ["OPNN_ID"]
, infoSize: "lg"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrlOpnn.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrlOpnn.selector("[name='frmOpnn']"));
formFields.set(ctrlOpnn, item);
// 첨부파일 조회
let key = item.data.OPNN_ID;
if (key != null) {
pageObject[pageName].fnSearchFileList(key);
}
};
// 상세 정보 dialog
ctrlOpnn.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/excl/excl02/020/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = ctrlOpnn.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { ctrlOpnn.refresh(); } // 정보 새로고침
});
}
});
}
// 삭제 callback
ctrlOpnn.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { ctrlOpnn.refresh(); } // 정보 새로고침
}
});
}
// 삭제
ctrlOpnn.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/excl/excl02/010/remove.do")
, data: params || {}
, success: (resp) => {
ctrlOpnn.onRemove(params, resp);
}
});
}
// 정보 새로고침
ctrlOpnn.refresh = () => {
let ctrlMain = pageObject[mainPageName].ctrlMain;
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (!crdnId) return;
let params = {
callPurpose: "refresh"
, sggCd: ctrlMain.getValue("SGG_CD")
, taskSeCd: ctrlMain.getValue("TASK_SE_CD")
, crdnId: ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/030/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
ctrlOpnn.find("[name='frmOpnn']").reset(); // 화면 초기화
ctrlOpnn.dataset.clear(); // Dataset 초기화
// sprt02010-main 단속 정보
ctrlMain.setData([resp.totalInfo]);
// 의견제출 정보
if (resp.opnnInfo) { ctrlOpnn.setData([resp.opnnInfo]); }
}
});
}
return ctrlOpnn;
}

@ -0,0 +1,182 @@
function newSprt02040ControlSndngDtl(pageName, doctx="[data-doctx='sprt02040']") {
let ctrlSndngDtl = new DatasetControl({
doctx: doctx
, prefix: "sndngDtl"
, prefixName: "발송반송"
, dataGetter: obj => obj["sndngDtls"]
, keys: ["SNDNG_DTL_ID"]
, appendData: true
, infoSize: "md"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do"
}
, formats: {
SNDNG_YMD: dateFormat
, DUDT_YMD: dateFormat
, SUM_AMT: numberFormat
, DLVR_YMD: dateFormat
, DLVR_TM: timeFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrlSndngDtl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrlSndngDtl.dataset;
let empty = dataList.empty;
// 업무별 dataTables(그리드) tr, td
let foundContent = ctrlSndngDtl.find("[name='tmpltRows']").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find(".cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrlSndngDtl.find("[name='tmpltNotFound']").content.querySelector(".cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수
let initScroll = (ctrlSndngDtl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
// dataTables(그리드)에 자료 표시 td
ctrlSndngDtl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
};
// 현재 선택 자료 변경 이벤트
ctrlSndngDtl.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrlSndngDtl.dataset, item, ctrlSndngDtl.find("[name='tbodySndngDtlList']"));
if (!item) return;
// 가상계좌번호
let vrActno = Array.from({length: 20}, (x, i) => {
let no = i + 1
, bank = "BANK_NM" + (no > 1 ? no : "")
, account = "VR_ACTNO" + (no > 1 ? no : "");
return [bank, account]
})
.map(entry => {
let bank = item.data[entry[0]]
, account = item.data[entry[1]];
return bank ? bank + " " + account : null;
})
.filter(txt => txt != null)
.join("\n");
$(ctrlSndngDtl.find("[name='vrActno']")).val(vrActno); // 가상 계좌번호
};
// 상세 정보 dialog
ctrlSndngDtl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sndb/sndb01/230/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = "sndbkDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { ctrlSndngDtl.refresh(); } // 정보 새로고침
});
}
});
}
// 삭제 callback
ctrlSndngDtl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { ctrlSndngDtl.refresh(); } // 정보 새로고침
}
});
}
// 삭제
ctrlSndngDtl.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/sndb/sndb01/220/remove.do")
, data: params || {}
, success: (resp) => {
ctrl.onRemove(params, resp);
}
});
}
// 정보 새로고침
ctrlSndngDtl.refresh = () => {
let ctrlMain = pageObject[mainPageName].ctrlMain;
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
if (!crdnId) return;
let params = {
callPurpose: "refresh"
, sggCd: ctrlMain.getValue("SGG_CD")
, taskSeCd: ctrlMain.getValue("TASK_SE_CD")
, crdnId: ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: params || {}
, success: (resp) => {
// 초기화
ctrlSndngDtl.find("[name='frmEditSndngDtl']").reset(); // 화면 초기화
ctrlSndngDtl.dataset.clear(); // Dataset 초기화
// sprt02010-main 단속 정보
ctrlMain.setData([resp.totalInfo]);
// 발송 이력 정보
ctrlSndngDtl.setData(resp.sndngDtls);
}
});
}
return ctrlSndngDtl;
}

@ -0,0 +1,273 @@
function newSprt02050ControlRD(pageName, doctx="[data-doctx='sprt02050']", mainPageName="sprt02010") {
let ctrlRdct = new DatasetControl({
doctx: doctx
, prefix: "rdct"
, prefixName: "감경"
, dataGetter: obj => obj["rdctInfo"]
, infoSize: "lg"
, urls: {
getInfo: "/info.do"
, remove: "/remove.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrlRdct.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrlRdct.selector("[name='frmEditRdct']"));
formFields.set(ctrlRdct, item);
};
// 상세 정보 dialog
ctrlRdct.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/levy/levy02/020/info.do")
, data: params || {}
, success: (resp) => {
if ((typeof resp) != "string") {
if (resp.rtnMsg != "") {
dialog.alert(resp.rtnMsg);
}
return;
} else {
let dialogName = ctrlRdct.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrlRdct.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { pageObject[pageName].fnRefresh(); } // 정보 새로고침
});
}
}
});
}
// 삭제 callback
ctrlRdct.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { pageObject[pageName].fnRefresh(); } // 정보 새로고침
}
});
}
// 삭제
ctrlRdct.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/levy/levy02/010/remove.do")
, data: params || {}
, success: (resp) => {
ctrlRdct.onRemove(params, resp);
}
});
}
return ctrlRdct;
}
function newSprt02050ControlLE(pageName, doctx="[data-doctx='sprt02050']", mainPageName="sprt02010") {
let ctrlLevyExcl = new DatasetControl({
doctx: doctx
, prefix: "levyExcl"
, prefixName: "부과제외"
, dataGetter: obj => obj["levyExclInfo"]
, infoSize: "md"
, urls: {
getInfo: "/info.do"
, remove: "/remove.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrlLevyExcl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrlLevyExcl.selector("[name='frmEditLevyExcl']"));
formFields.set(ctrlLevyExcl, item);
};
// 상세 정보 dialog
ctrlLevyExcl.getInfo = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/excl/excl01/020/info.do")
, data: params || {}
, success: (resp) => {
if ((typeof resp) != "string") {
if (resp.rtnMsg != "") {
dialog.alert(resp.rtnMsg);
}
return;
} else {
let dialogName = ctrlLevyExcl.prefixed("Dialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: params.btnTitle
, size: ctrlLevyExcl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { pageObject[pageName].fnRefresh(); } // 정보 새로고침
});
}
}
});
}
// 삭제 callback
ctrlLevyExcl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { pageObject[pageName].fnRefresh(); } // 정보 새로고침
}
});
}
// 삭제
ctrlLevyExcl.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "/excl/excl01/010/remove.do")
, data: params || {}
, success: (resp) => {
ctrlLevyExcl.onRemove(params, resp);
}
});
}
return ctrlLevyExcl;
}
function newSprt02050ControlCSH(pageName, doctx="[data-doctx='sprt02050']", mainPageName="sprt02010") {
let ctrlCrdnSttsHstry = new DatasetControl({
doctx: doctx
, prefix: "crdnSttsHstry"
, prefixName: "단속상태 이력"
, dataGetter: obj => obj["crdnSttsHstrys"]
, keys: ["STTS_HSTRY_ID"]
, appendData: true
, infoSize: "md"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
, formats: {
REG_DT: datetimeFormat
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrlCrdnSttsHstry.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrlCrdnSttsHstry.dataset;
let empty = dataList.empty;
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].ctrlCrdnSttsHstry.setCurrent('{data-index}');")
let trs = empty ?
[ctrlCrdnSttsHstry.find("[name='tmpltNotFoundCrdnSttsHstry']").innerHTML]
: dataList.inStrings(ctrlCrdnSttsHstry.find("[name='tmpltCrdnSttsHstryRows']").innerHTML, replacer);
// dataTables(그리드)에 자료 표시 td
$(ctrlCrdnSttsHstry.find("[name='tbodyCrdnSttsHstryList']")).html(trs.join());
};
// 현재 선택 자료 변경 이벤트
ctrlCrdnSttsHstry.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrlCrdnSttsHstry.dataset, item, ctrlCrdnSttsHstry.find("[name='tbodyCrdnSttsHstryList']"));
};
return ctrlCrdnSttsHstry;
}
function newSprt02050ControlPAH(pageName, doctx="[data-doctx='sprt02050']", mainPageName="sprt02010") {
let ctrlPayerAddrHstrys = new DatasetControl({
doctx: doctx
, prefix: "payerAddrHstry"
, prefixName: "납부자주소 이력"
, dataGetter: obj => obj["payerAddrHstrys"]
, keys: ["ADDR_HSTRY_ID"]
, appendData: true
, infoSize: "md"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
, formats: {
REG_DT: datetimeFormat
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrlPayerAddrHstrys.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrlPayerAddrHstrys.dataset;
let empty = dataList.empty;
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].ctrlPayerAddrHstrys.setCurrent('{data-index}');")
let trs = empty ?
[ctrlPayerAddrHstrys.find("[name='tmpltNotFoundPayerHstry']").innerHTML]
: dataList.inStrings(ctrlPayerAddrHstrys.find("[name='tmpltPayerHstryRows']").innerHTML, replacer);
// dataTables(그리드)에 자료 표시 td
$(ctrlPayerAddrHstrys.find("[name='tbodyPayerHstryList']")).html(trs.join());
};
// 현재 선택 자료 변경 이벤트
ctrlPayerAddrHstrys.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrlPayerAddrHstrys.dataset, item, ctrlPayerAddrHstrys.find("[name='tbodyPayerHstryList']"));
};
return ctrlPayerAddrHstrys;
}
Loading…
Cancel
Save