1. 부과제외 수정.

2. 개별총정보 수정.
main
JoJH 1 week 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"%>
<%@ 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 -->
<div class="content-wrapper" data-doctx="${pageName}">
<!-- Content -->
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀
</button>
</span>
</div>
<!-- 상단 버튼 -->
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀
</button>
</span>
</div>
<!-- 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form name="frmSearch">
@ -32,7 +32,6 @@
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox">
@ -45,39 +44,36 @@
</c:forEach>
</span>
</div>
<!-- 부과 제외 일자 -->
<div class="col-6">
<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="schLevyExclYmdFrom"
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="schLevyExclYmdTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 부과 제외 구분 코드 -->
<div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schLevyExclSeCd">부과제외구분</label>
<select is="id-select" class="form-select w-px-120" name="schLevyExclSeCd">
<option value="">전체</option>
<c:forEach items="${FIM021List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
<div class="col-6">
<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="schLevyExclYmdFrom"
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="schLevyExclYmdTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</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>
<select is="id-select" class="form-select w-px-160" name="schLevyExclSeCd">
<option value="">전체</option>
<c:forEach items="${FIM021List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 부과 제외 사유 코드 -->
<div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schLevyExclRsnCd">부과제외사유</label>
</div>
<div class="col-6">
<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">
<option value="">전체</option>
<c:forEach items="${FIM022List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
<option value="">전체</option>
<c:forEach items="${FIM022List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
</div>
<!-- 동적검색 -->
<div class="col-6">
<input type="hidden" name="by" />
@ -99,35 +95,30 @@
<!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse">
<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">
<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" />
</div>
<!-- 납부자 번호 -->
<div class="col-4">
<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" />
</div>
<!-- 납부자 명 -->
<div class="col-4">
<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" />
</div>
<!-- 등록일자, 수정일자 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option>
@ -143,7 +134,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option>
@ -160,7 +150,7 @@
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
@ -181,14 +171,14 @@
<!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
@ -226,10 +216,10 @@
<tbody name="tbodyList">
</tbody>
<template is="curly-brackets" name="tmpltRows">
<tr data-key="LEVY_EXCL_ID">
<template is="curly-brackets" name="tmpltRows">
<tr data-index="{data-index}">
<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>{LEVY_EXCL_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{LEVY_EXCL_SE_NM}</td>
@ -272,6 +262,9 @@
<tr class="dpv">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dvs">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca">
<td valign="top" colspan="29" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -296,6 +289,8 @@
<!-- / inner page html <div class="content-wrapper"> -->
<script>
LoadScript("excl01010Script", wctx.url("/webjars/js/fims/excl/excl01010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -308,161 +303,23 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "levyExcl"
, prefixName: "부과제외"
, 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
}
// URL
$P.prefixUrl = "${prefixUrl}"
// datasetControl
$P.ctrl = newExcl01010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
$P.pagingSupport = new FimsPagingSupport({
ctrl: $P.ctrl // DatasetControl
, ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
});
// 검색 조건
$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에 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 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
GRID.checkbox.sync(element, bool);
let atLeastOne = GRID.checkbox.countChecked(element) > 0;
@ -472,26 +329,28 @@
}
// dataTable 클릭 이벤트
$P.dataTableClick = (dataKey) => {
if (!dataKey) return;
$P.dataTableClick = (dataIndex) => {
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
$P.dataTableDblClick = (dataKey, crdnId) => {
if (!dataKey) return;
$P.dataTableDblClick = (dataIndex) => {
if (!dataIndex) return;
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다.
// 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return;
let params = {
callControlName: "pageObject['${pageName}'].ctrl"
callPageName: "${pageName}"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD")
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: crdnId
, crdnId: $P.ctrl.getValue("CRDN_ID")
}
ajax.get({
@ -526,6 +385,13 @@
/**************************************************************************
* 사용자 함수(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
$P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
@ -534,13 +400,13 @@
// 삭제사유 callback
$P.callbackRsn = (obj) => {
let selected = $P.ctrl.dataset.getKeys("selected");
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
// 서버에 전송할 data(파라미터) 생성
let params = {
sggCd: $P.$findn("sggCd").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
, delRsn: obj.reason // 삭제 사유
};
@ -551,41 +417,6 @@
/**************************************************************************
* 버튼 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) => {
// 업무 구분 코드
@ -595,14 +426,19 @@
// 초기화
$P.fnReset(taskSeCd);
// dataset 초기화
$P.ctrl.dataset.clear();
// 업무 구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색
$P.fnSetURL(taskSeCd);
// 업무별 검색 조건
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase());
// 업무별 버튼
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
let colContent = $P.findn("tmpltCols").content;
@ -639,6 +475,7 @@
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
});
@ -646,10 +483,13 @@
// 검색 버튼 클릭 이벤트
$P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1);
}
@ -676,10 +516,8 @@
// 부과제외 수정 버튼 클릭 이벤트
$P.fnUpdate = (btnTitle) => {
// 부과제외 ID
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
// 부과제외 ID 가 없다면.. return
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
if (!levyExclId) return;
let params = {
@ -688,7 +526,7 @@
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, 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);
@ -696,7 +534,7 @@
// 부과제외 삭제 버튼 클릭 이벤트
$P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) {
dialog.alert({
@ -757,11 +595,37 @@
// 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("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 -->
<div class="content-pop" data-doctx="${pageName}">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<div class="card">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1">
<!-- 단속일시 -->
<div class="col-md-12">
<label 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 />
</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>
<input is="id-input" type="text" class="form-control w-px-120" name="vhrno" data-map="VHRNO" autocomplete="off" 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 required" for="levyExclSeNm">부과제외구분</label>
<input is="id-input" type="text" class="form-control w-px-120" name="levyExclSeNm" autocomplete="off" readonly />
<input type="hidden" name="levyExclSeCd" data-map="LEVY_EXCL_SE_CD" />
</div>
<!-- 부과 제외 일자 -->
<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="levyExclYmd">부과제외일자</label>
<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 />
<button type="button" class="bx bx-lg bx-calendar bg-white" name="btnLevyExclYmd"></button>
</div>
<!-- 부과 제외 사유 -->
<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="levyExclRsnCd">부과제외사유</label>
<select is="id-select" class="form-select" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM022List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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="etcCn">기타 내용</label>
<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>
</form>
<!-- 입력 영역 -->
<!-- 업무 버튼 및 건수 표시 -->
<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>
</span>
</span>
</div>
<!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
<!-- Content -->
<div class="container flex-grow-1 px-0">
<div class="card">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1">
<div class="col-md-12">
<label 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 />
</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>
<input is="id-input" type="text" class="form-control w-px-120" name="vhrno" data-map="VHRNO" 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 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 />
<input type="hidden" name="levyExclSeCd" data-map="LEVY_EXCL_SE_CD" />
</div>
<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="levyExclYmd">부과제외일자</label>
<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 />
<button type="button" class="bx bx-lg bx-calendar bg-white" name="btnLevyExclYmd"></button>
</div>
<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="levyExclRsnCd">부과제외사유</label>
<select is="id-select" class="form-select" name="levyExclRsnCd" data-map="LEVY_EXCL_RSN_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM022List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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="etcCn">기타 내용</label>
<textarea is="id-textarea" class="form-control w-70" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" autocomplete="off"></textarea>
</div>
</div>
</form>
<!-- 입력 영역 -->
</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>
</span>
</span>
</div>
<!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div>
<!-- / inner page html <div class="content-pop"> -->
<script>
LoadScript("excl01020Script", wctx.url("/webjars/js/fims/excl/excl01020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -94,90 +90,19 @@
// pageObject
let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "levyExcl"
, prefixName: "부과제외"
, keymapper: info => info ? info.LEVY_EXCL_ID : ""
, dataGetter: obj => obj.info
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.ctrl.onCurrentChange = (item) => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.ctrl, item);
// 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD);
// 부과제외구분에 따른 부과제외사유 설정
$P.fnSetFim021(item.data.LEVY_EXCL_SE_CD, item.data.LEVY_EXCL_RSN_CD);
// 호출용도가 등록 이라면..
if ($P.callPurpose == "create") {
$P.$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); }
});
}
}
// datasetControl
$P.ctrl = newExcl01020Control("${pageName}", "[data-doctx=${pageName}]");
//
$P.saveCallbackFuncName = "${saveCallbackFuncName}";
$P.savedCallbackFuncName = "${savedCallbackFuncName}";
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/create.do"); // 등록
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/update.do"); // 수정
}
// 부과제외 구분에 따른 부과제외 사유 코드 설정
$P.fnSetFim021 = (seCode, rsnCode) => {
let cmnCode = FIM021[seCode];
@ -188,7 +113,7 @@
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());
if (typeof rsnCode != "undefined" && rsnCode != "") {
if (!rsnCode) {
$P.$findn("levyExclRsnCd").val(rsnCode);
}
}
@ -201,10 +126,13 @@
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
, onOK: () => { $P.ctrl.save(params); } // formFields
});
}
@ -214,25 +142,28 @@
// 이벤트 설정
$P.setEvent = () => {
// 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
$P.fnReset = () => {
// 초기화
$P.findn("frmEdit").reset(); // 화면 초기화
// 달력 초기화
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") {
// input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled
$P.$findn("btnLevyExclYmd").prop("disabled", true); // 부과제외 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼
$P.$findn("btnLevyExclYmd").prop("disabled", true); // 부과제외 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼
}
}
@ -243,7 +174,7 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
$P.fnReset();
// 3. dataset 설정
$P.ctrl.setData([${info}]);

@ -32,7 +32,6 @@
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox">
@ -45,7 +44,6 @@
</c:forEach>
</span>
</div>
<!-- 의견제출 접수일자 -->
<div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">접수일자</label>
<span class="form-search-linebox">
@ -58,7 +56,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 의견제출 답변일자 -->
<div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">답변일자</label>
<span class="form-search-linebox">
@ -71,7 +68,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 의견 제출 상태 코드 -->
<div class="col-6">
<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">
@ -81,7 +77,6 @@
</c:forEach>
</select>
</div>
<!-- 의견 제출 구분 코드 -->
<div class="col-6">
<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">
@ -91,7 +86,6 @@
</c:forEach>
</select>
</div>
<!-- 통보 구분 코드 -->
<div class="col-6">
<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">
@ -122,7 +116,6 @@
<!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse">
<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">
@ -135,22 +128,18 @@
<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" />
</div>
<!-- 납부자 번호 -->
<div class="col-4">
<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" />
</div>
<!-- 납부자 명 -->
<div class="col-4">
<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" />
</div>
<!-- 등록일자, 수정일자 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option>
@ -166,7 +155,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option>
@ -185,10 +173,10 @@
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 -->
<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>
</div>
@ -215,14 +203,14 @@
<!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
@ -268,12 +256,12 @@
<th class="cmn dummy-th"></th>
</template>
<tbody name="tbodyList">
</tbody>
<template is="curly-brackets" name="tmpltRows">
<tr data-key="OPNN_ID">
<tbody name="tbodyList">
</tbody>
<template is="curly-brackets" name="tmpltRows">
<tr data-index="{data-index}">
<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>{RCPT_NO_MASK}</td>
<td class="cmn text-center" onclick ondblclick>{RCPT_YMD}</td>
@ -326,6 +314,9 @@
<tr class="dpv">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dvs">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca">
<td valign="top" colspan="39" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -350,6 +341,8 @@
<!-- / inner page html <div class="content-wrapper"> -->
<script>
LoadScript("excl02010Script", wctx.url("/webjars/js/fims/excl/excl02010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -362,161 +355,20 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
prefix: "opnn"
, prefixName: "의견제출"
, 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
}
// URL
$P.prefixUrl = "${prefixUrl}"
// datasetControl
$P.ctrl = newExcl02010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
$P.pagingSupport = new FimsPagingSupport({
ctrl: $P.ctrl // DatasetControl
, ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
});
// 검색 조건
$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에 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 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
@ -530,26 +382,28 @@
}
// dataTable 클릭 이벤트
$P.dataTableClick = (dataKey) => {
if (!dataKey) return;
$P.dataTableClick = (dataIndex) => {
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
$P.dataTableDblClick = (dataKey, crdnId) => {
if (!dataKey) return;
$P.dataTableDblClick = (dataIndex) => {
if (!dataIndex) return;
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다.
// 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return;
let params = {
callControlName: "pageObject['${pageName}'].ctrl"
callPageName: "${pageName}"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD")
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: crdnId
, crdnId: $P.ctrl.getValue("CRDN_ID")
}
ajax.get({
@ -584,27 +438,50 @@
/**************************************************************************
* 사용자 함수(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
$P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명
}
// 의견제출 심의위원 관리
$P.opnnSbmsnDlbrMbr = (params) => {
// 삭제사유 callback
$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;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/040/info.do")
, data: params
url: wctx.url("/" + params.taskSeCd + $P.prefixUrl + "/030/info.do")
, data: params || {}
, success: (resp) => {
let dialogName = $P.ctrl.prefixed("DlbrMbrDialog");
let dialogName = $P.ctrl.prefixed("DlbrDialog")
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: $P.ctrl.prefixName + " 심의 위원 관리"
, size: "md"
, title: $P.ctrl.prefixName + " 심의 정보"
, size: "lg"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
@ -612,61 +489,44 @@
AppSupport.setDialogZindex();
}
, onClose: () => { $P.ctrl.reload({all : true}); } // 자료 재조회
});
}
});
}
// 의견제출 심의
$P.opnnSbmsnDlbr = (params) => {
// 의견제출 심의위원 관리
$P.opnnSbmsnDlbrMbr = (params) => {
if (!params) return;
ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/030/info.do")
, data: params || {}
url: wctx.url("/" + params.taskSeCd + $P.prefixUrl + "/040/info.do")
, data: params
, success: (resp) => {
let dialogName = $P.ctrl.prefixed("DlbrDialog")
let dialogName = $P.ctrl.prefixed("DlbrMbrDialog");
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: $P.ctrl.prefixName + " 심의"
, title: $P.ctrl.prefixName + " 심의위원 정보"
, size: "md"
, content: resp
, size: "lg"
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
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) => {
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({
opnnIds: params.opnnIds
, taskSeCd: params.taskSeCd
@ -678,41 +538,6 @@
/**************************************************************************
* 버튼 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) => {
// 업무 구분 코드
@ -720,16 +545,21 @@
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
}
// 초기화
// 초기화
$P.fnReset(taskSeCd);
// dataset 초기화
$P.ctrl.dataset.clear();
// 업무 구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색
$P.fnSetURL(taskSeCd);
// 업무별 검색 조건
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase());
// 업무별 버튼
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
let colContent = $P.findn("tmpltCols").content;
@ -773,10 +603,13 @@
// 검색 버튼 클릭 이벤트
$P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1);
}
@ -818,8 +651,6 @@
$P.fnUpdate = (btnTitle) => {
// 의견제출 ID
let opnnId = $P.ctrl.getValue("OPNN_ID");
// 의견제출 ID 가 없다면.. return
if (!opnnId) return;
let params = {
@ -837,8 +668,6 @@
$P.fnUpdateDlbr = (btnTitle) => {
// 의견제출 ID
let opnnId = $P.ctrl.getValue("OPNN_ID");
// 의견제출 ID 가 없다면.. return
if (!opnnId) return;
let params = {
@ -854,7 +683,7 @@
// 의견제출 삭제 버튼 클릭 이벤트
$P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) {
dialog.alert({
@ -892,8 +721,8 @@
}
// 심의의결서 출력 버튼 클릭 이벤트
$P.fnPrintDlbrDecsn = (title) => {
let selected = $P.ctrl.dataset.getKeys("selected"); // 선택 자료
$P.fnPrintDlbrDecsn = (btnTitle) => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) {
dialog.alert({
@ -906,10 +735,10 @@
let params = {
callPurpose: "download"
, title: title
, title: btnTitle
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, opnnIds: selected.join(",") // 의견제출 IDs
, opnnIds: selected.map(info => info.OPNN_ID).join(",") // 의견제출 IDs
};
$P.makeHwpFileDlbrDecsn(params);
@ -929,12 +758,6 @@
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$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.fnDlbrMbr($(this).attr("title")); // 심의위원 관리
@ -951,6 +774,38 @@
$P.$findn("btnPrintDlbrDecsn").on("click", function() {
$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 -->
<div class="content-pop" data-doctx="${pageName}">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<div class="card">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<!-- Content -->
<div class="container flex-grow-1 px-0">
<div class="card">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="sggCd" data-map="SGG_CD" />
<input type="hidden" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="row g-1">
<!-- 단속일시 -->
<div class="col-md-4">
<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 />
</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>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</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="rtpyrNm">납부자</label>
<input is="id-input" type="text" class="form-control w-55" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</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="rcptNo">접수번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rcptNo" data-map="RCPT_NO" />
</div>
<!-- 접수 일자 -->
<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="rcptYmd">접수일자</label>
<input is="id-input" type="text" class="form-control form-date" name="rcptYmd" data-map="RCPT_YMD"
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-lg bx-calendar bg-white" id="btnRcptYmd--${pageName}"></button>
</div>
<!-- 접수 구분 -->
<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="rcptSeCd">접수구분</label>
<select is="id-select" class="form-select" name="rcptSeCd" data-map="RCPT_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM029List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 진술자 이름 -->
<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>
<input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" required />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchPayer" title="납부자 정보 적용">
납부자
</button>
</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="sttrBrdt">생년월일</label>
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YYMMDD" />
</div>
<!-- 소유주 관계 구분 코드 -->
<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="ownrRelCd">소유주관계</label>
<select is="id-select" class="form-select" name="ownrRelCd" data-map="OWNR_REL_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM032List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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>
<input is="id-input" type="text" class="form-control w-70" name="sttrAddr" data-map="STTR_ADDR" />
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchAddr" title="주소 검색">
검색
</button>
</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>
<input is="id-input" type="text" class="form-control w-85" name="sttrDaddr" data-map="STTR_DADDR" />
</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="sttrCttpc">연락처</label>
<input is="id-input" type="text" class="form-control w-45" name="sttrCttpc" data-map="STTR_CTTPC" />
</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="sttrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-40" name="sttrEml" data-map="STTR_EML" />
</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="opnnSbmsnCn">의견제출내용</label>
<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-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSeCd">의견제출구분</label>
<select is="id-select" class="form-select" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM033List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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="opnnSbmsnGist">의견제출요지</label>
<input is="id-input" type="text" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" />
</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" class="form-control w-85" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="2" data-maxlengthb="1000"></textarea>
</div>
</div>
</form>
<!-- 입력 영역 -->
<!-- 첨부 파일 -->
<div class="card">
<form name="frmFile" method="post" enctype="multipart/form-data" >
<input type="file" name="uploadFiles" multiple="multiple" onchange="pageObject['${pageName}'].fnAddFiles(this);" hidden />
</form>
<div class="row g-1">
<div class="col-md-12">
<button type="button" class="btn btn-blue w-px-120" name="btnAddFile" title="첨부파일 추가">파일추가</button>
</div>
</div>
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList">
<thead>
<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>
<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">
<input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="row g-1">
<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>
<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 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>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</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="rtpyrNm">납부자</label>
<input is="id-input" type="text" class="form-control w-55" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</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="rcptNo">접수번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rcptNo" data-map="RCPT_NO" />
</div>
<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="rcptYmd">접수일자</label>
<input is="id-input" type="text" class="form-control form-date" name="rcptYmd" data-map="RCPT_YMD"
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-lg bx-calendar bg-white" id="btnRcptYmd--${pageName}"></button>
</div>
<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="rcptSeCd">접수구분</label>
<select is="id-select" class="form-select" name="rcptSeCd" data-map="RCPT_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM029List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<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>
<input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" required />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchPayer" title="납부자 정보 적용">
납부자
</button>
</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="sttrBrdt">생년월일</label>
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YYMMDD" />
</div>
<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="ownrRelCd">소유주관계</label>
<select is="id-select" class="form-select" name="ownrRelCd" data-map="OWNR_REL_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM032List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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>
<input is="id-input" type="text" class="form-control w-70" name="sttrAddr" data-map="STTR_ADDR" />
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnSearchAddr" title="주소 검색">
검색
</button>
</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>
<input is="id-input" type="text" class="form-control w-85" name="sttrDaddr" data-map="STTR_DADDR" />
</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="sttrCttpc">연락처</label>
<input is="id-input" type="text" class="form-control w-45" name="sttrCttpc" data-map="STTR_CTTPC" />
</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="sttrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-40" name="sttrEml" data-map="STTR_EML" />
</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="opnnSbmsnCn">의견제출내용</label>
<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-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="opnnSbmsnSeCd">의견제출구분</label>
<select is="id-select" class="form-select" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM033List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</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="opnnSbmsnGist">의견제출요지</label>
<input is="id-input" type="text" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" />
</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" class="form-control w-85" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="2" data-maxlengthb="1000"></textarea>
</div>
</div>
</form>
<!-- 입력 영역 -->
<!-- 첨부 파일 -->
<div class="card">
<form name="frmFile" method="post" enctype="multipart/form-data" >
<input type="file" name="uploadFiles" multiple="multiple" onchange="pageObject['${pageName}'].fnAddFiles(this);" hidden />
</form>
<div class="row g-1">
<div class="col-md-12">
<button type="button" class="btn btn-blue w-px-120" name="btnAddFile" title="첨부파일 추가">파일추가</button>
</div>
</div>
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList">
<thead>
<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>
<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>
</span>
</span>
</div>
<!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</span>
</span>
</div>
<!-- 업무 버튼 및 건수 표시 -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div>
<!-- / inner page html <div class="content-pop"> -->
<script>
LoadScript("excl02020Script", wctx.url("/webjars/js/fims/excl/excl02020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -189,107 +174,23 @@
// pageObject
let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
// datasetControl
$P.ctrl = newExcl02020Control("${pageName}", "[data-doctx=${pageName}]");
// 파일 리스트
$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)
**************************************************************************/
// 업무구분에 따른 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
$P.callbackSearchAddr = (obj) => {
$P.$findn("sttrAddr").val(obj.ADDR); // 주소
$P.$findn("sttrZip").val(obj.ZIP); // 우편번호
$P.$findn("sttrDaddr").val(obj.DTL_ADDR); // 상세 주소
$P.$findn("sttrAddr").val(obj.ADDR); // 주소
$P.$findn("sttrZip").val(obj.ZIP); // 우편번호
$P.$findn("sttrDaddr").val(obj.DTL_ADDR); // 상세 주소
}
/**************************************************************************
@ -380,9 +281,9 @@
$P.fnAddFiles = (obj) => {
let tableFileList = $P.findn("fileList"); // table element 찾기
let fileNo = tableFileList.rows.length - 1; // table에 있는 파일 갯수 (첫번째 title은 제외하기 위해서 -1 처리)
let maxFileCnt = 3; // 의견제출에 등록 할 수 있는 첨부 파일 최대 개수
let attFileCnt = obj.files.length; // 선택한 파일의 개수
let fileArr = new Array(); // 파일 배열
let maxFileCnt = 3; // 의견제출에 등록 할 수 있는 첨부 파일 최대 개수
let attFileCnt = obj.files.length; // 선택한 파일의 개수
let fileArr = new Array(); // 파일 배열
fileArr = $P.fileListArr;
@ -424,7 +325,7 @@
dialog.alert({
content: "선택한 파일을 삭제하시겠습니까?"
, onOK: () => {
let tr = $(obj).parent().parent(); // 클릭한 버튼이 속한 tr 요소
let tr = $(obj).parent().parent(); // 클릭한 버튼이 속한 tr 요소
let td = tr.children();
let fileId = td.eq(1).text(); // 삭제할 파일번호
let fileName = td.eq(2).text(); // 삭제할 파일이름
@ -437,13 +338,13 @@
});
} else {
let filtered = $P.fileListArr.filter((value, index, arr) => {
return (value.name != fileName);
return (value.name != fileName);
});
$P.fileListArr = filtered;
}
$(obj).closest("tr").remove(); // table 에서 제거
$(obj).closest("tr").remove(); // table 에서 제거
}
});
}
@ -458,10 +359,13 @@
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, 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.fnSearchAddr($(this).attr("title")); // 주소 검색 버튼 이벤트
});
$P.$findn("btnAddFile").on("click", () => $P.$findn("uploadFiles").trigger("click")); // 파일 등록 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
$P.$findn("btnAddFile").on("click", function() {
$P.$findn("uploadFiles").trigger("click"); // 파일 등록 버튼 이벤트
});
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
// 달력 초기화
AppSupport.initDatepicker($P.findn("frmEdit"));
$P.$findn("rcptYmd").datepicker("setDate", TODAY());
// 기본 데이터 설정
$P.$findn("rcptYmd").datepicker("setDate", TODAY()); // 달력 초기화
// View로 호출되었을때 disabled 셋팅
if ($P.callPurpose == "view") {
// input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled
$P.$findn("btnRcptYmd").prop("disabled", true); // 접수 일자 달력 버튼
$P.$findn("btnSearchPayer").prop("disabled", true); // 납부자 버튼
@ -512,7 +418,9 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
AppSupport.initDatepicker($P.findn("frmEdit"));
$P.fnReset();
// 3. Dataset 설정
$P.ctrl.setData([${info}]);

@ -17,42 +17,34 @@
<input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="row g-1">
<!-- 접수 번호 -->
<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>
<input is="id-input" type="text" class="form-control w-30" name="rcptNo" data-map="RCPT_NO" readonly />
</div>
<!-- 접수 일자 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rcptYmd">접수일자</label>
<input is="id-input" type="text" class="form-control w-25" name="rcptYmd" data-map="RCPT_YMD" data-fmt-type="day" readonly />
</div>
<!-- 진술자 이름 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="sttrNm">성명</label>
<input is="id-input" type="text" class="form-control w-30" name="sttrNm" data-map="STTR_NM" readonly />
</div>
<!-- 의견 제출 구분 코드 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="opnnSbmsnSeNm">의견제출구분</label>
<input is="id-input" type="text" class="form-control w-50" name="opnnSbmsnSeNm" data-map="OPNN_SBMSN_SE_NM" readonly />
</div>
<!-- 의견 제출 요지 -->
<div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="opnnSbmsnGist">의견제출요지</label>
<textarea is="id-textarea" class="form-control w-85" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" rows="2" data-maxlengthb="300" readonly></textarea>
</div>
<!-- 담당자 검토 의견 -->
<div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end align-top" for="picRvwOpnn">검토의견</label>
<textarea is="id-textarea" class="form-control w-85" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="3" data-maxlengthb="1000"></textarea>
</div>
<!-- 문서 번호 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="docNo">문서번호</label>
<input is="id-input" type="text" class="form-control w-40" name="docNo" data-map="DOC_NO" />
</div>
<!-- 통보 구분 코드 -->
<div class="col-md-6">
<label 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>
@ -62,7 +54,6 @@
</c:forEach>
</select>
</div>
<!-- 의견 제출 상태 코드 -->
<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>
<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>
</select>
</div>
<!-- 답변 일시 -->
<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>
<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"
data-fmt-type="time" maxlength="8" placeholder="시:분:초" required />
</div>
<!-- 감경 사유 코드 -->
<div class="col-md-6" name="divRdctRsnCd">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rdctRsnCd">감경사유</label>
<select is="id-select" class="form-select" name="rdctRsnCd" data-map="RDCT_RSN_CD">
@ -90,12 +79,10 @@
</c:forEach>
</select>
</div>
<!-- 감경 금액 -->
<div class="col-md-6" name="divRdctAmt">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end required" for="rdctAmt">감경금액</label>
<input is="id-input" type="text" class="form-control w-30 text-end" name="rdctAmt" data-map="RDCT_AMT" data-fmt-type="number" 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="ansCn">심의내용</label>
<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"> -->
<script>
LoadScript("excl02030Script", wctx.url("/webjars/js/fims/excl/excl02030.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -135,82 +124,16 @@
// pageObject
let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
/**************************************************************************
* 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)
});
}
// datasetControl
$P.ctrl = newExcl02030Control("${pageName}", "[data-doctx=${pageName}]");
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.ctrl.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/update.do"); // 수정
}
// 의견제출 상태 코드 변경
$P.fnChangeOpnnSbmsnSttsCd = (obj) => {
// javascript를 이용한 visibility 변경 (이 방법을 사용하는 경우, 안에 있는 요소들이 보이지않지만 그 요소들이 할당 하고 있는 공간은 그대로 유지(공백처리))
@ -236,11 +159,10 @@
// 저장
$P.fnSave = () => {
// 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 rdctRsnCd = $P.$findn("rdctRsnCd").find("option:selected").val();
let rdctRsnNm = $P.$findn("rdctRsnCd").find("option:selected").text();
@ -254,10 +176,13 @@
return;
}
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
, onOK: () => { $P.ctrl.save(params); } // formFields
});
}
@ -266,53 +191,26 @@
**************************************************************************/
// 이벤트 설정
$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();
// 달력 초기화
AppSupport.initDatepicker($P.findn("frmEdit"));
$P.$findn("ansYmd").datepicker("setDate", TODAY());
$P.$findn("ansTm").val(new Date().toTimeString().split(" ")[0]);
// view 로 호출됐을 경우..
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if ($P.callPurpose == "view") {
// input 요소들을 disabled
$P.$findn("frmEdit").find("input,textarea,select").prop("disabled", true);
// button 요소들을 disabled
$P.$findn("btnAnsYmd").prop("disabled", true); // 답변 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼
$P.$findn("btnAnsYmd").prop("disabled", true); // 답변 일자 달력 버튼
$P.$findn("btnSave").prop("disabled", true); // 저장 버튼
}
}
@ -323,7 +221,9 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
AppSupport.initDatepicker($P.findn("frmEdit"));
$P.fnReset();
// 3. Dataset 설정
$P.ctrl.setData([${info}]);

@ -16,79 +16,65 @@
<input type="hidden" name="mngId" data-map="MNG_ID" />
<div class="row g-1">
<!-- 1 직급 -->
<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-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" />
</div>
<!-- 1 회원명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm1" data-map="DLBR_MBR_NM1" />
</div>
<!-- 2 직급 -->
<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-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" />
</div>
<!-- 2 회원명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm2" data-map="DLBR_MBR_NM2" />
</div>
<!-- 3 직급 -->
<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-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" />
</div>
<!-- 3 회원명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm3" data-map="DLBR_MBR_NM3" />
</div>
<!-- 4 직급 -->
<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-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" />
</div>
<!-- 4 회원명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm4" data-map="DLBR_MBR_NM4" />
</div>
<!-- 5 직급 -->
<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-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" />
</div>
<!-- 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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm5" data-map="DLBR_MBR_NM5" />
</div>
<!-- 6 직급 -->
<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-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" />
</div>
<!-- 6 회원명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="dlbrMbrNm6" data-map="DLBR_MBR_NM6" />
</div>
<!-- 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-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" />
</div>
<!-- 7 회원명 -->
<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>
<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"> -->
<script>
LoadScript("excl02040Script", wctx.url("/webjars/js/fims/excl/excl02040.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -128,70 +116,17 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$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); }
});
}
// URL
$P.prefixUrl = "${prefixUrl}"
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// datasetControl
$P.ctrl = newExcl02040Control("${pageName}", "[data-doctx=${pageName}]");
/**************************************************************************
* 사용자 함수(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
@ -201,10 +136,13 @@
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
// formFields
let params = new FimsFormFields($P.selectorn("frmEdit")).get();
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.ctrl.save($P.formFields.get()); } // formFields
, onOK: () => { $P.ctrl.save(params); } // formFields
});
}
@ -214,11 +152,11 @@
// 이벤트 설정
$P.setEvent = () => {
// 버튼 이벤트
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
$P.$findn("btnSave").on("click", () => { $P.fnSave() }); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
// 초기 화면 설정
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
}
@ -230,7 +168,7 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
$P.fnReset();
// 3. Dataset 설정
$P.ctrl.setData([${info}]);

@ -1,7 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ 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 -->
<div class="content-wrapper" data-doctx="${pageName}">
@ -32,7 +32,6 @@
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무구분 -->
<div class="col-12">
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox">
@ -45,7 +44,6 @@
</c:forEach>
</span>
</div>
<!-- 재등록일자 -->
<div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">재등록일자</label>
<span class="form-search-linebox">
@ -79,7 +77,6 @@
<!-- 상세 조건 -->
<div name="searchDetail" class="container-search container-search-detail collapse">
<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">
@ -92,22 +89,18 @@
<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" />
</div>
<!-- 납부자 번호 -->
<div class="col-4">
<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" />
</div>
<!-- 납부자 명 -->
<div class="col-4">
<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" />
</div>
<!-- 등록일자, 수정일자 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option>
@ -123,7 +116,6 @@
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option>
@ -140,8 +132,8 @@
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<!-- 건수, 페이지 표시 -->
<span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" name="dataPaging">
@ -235,6 +227,9 @@
<tr class="dpv">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dvs">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca">
<td valign="top" colspan="22" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -259,6 +254,8 @@
<!-- / inner page html <div class="content-wrapper"> -->
<script>
LoadScript("excl03010Script", wctx.url("/webjars/js/fims/excl/excl03010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -271,117 +268,44 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.ctrl = new DatasetControl({
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
}
// datasetControl
$P.ctrl = newExcl03010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
$P.pagingSupport = new FimsPagingSupport({
ctrl: $P.ctrl // DatasetControl
, ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
});
// 검색 조건
$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.RE_REG_ID;
$P.$findn("tbodyList").setCurrentRow(key);
}
// URL
$P.prefixUrl = "${prefixUrl}";
/**************************************************************************
* 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 클릭 이벤트
$P.dataTableClick = (dataKey) => {
if (!dataKey) return;
$P.dataTableClick = (dataIndex) => {
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
$P.dataTableDblClick = (dataKey, crdnId, callControlName) => {
if (!dataKey) return;
// 단속 ID가 없다면 개별총정보 팝업을 실행하지 않는다.
if (!crdnId) return;
let params = {};
if (callControlName == "noDatasetControl") {
params.callControlName = callControlName;
params.callPurpose = "view";
} else {
params.callControlName = "pageObject['${pageName}'].ctrl";
$P.dataTableDblClick = (dataIndex) => {
// 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!dataIndex) return;
if (!crdnId) return;
let params = {
callPageName: "${pageName}"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD")
, 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({
url: wctx.url("/sprt/sprt02/010/main.do")
@ -415,50 +339,20 @@
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.setUrl = (taskSeCd) => {
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/010/list.do"); // 검색
}
// 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => {
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명
}
/**************************************************************************
* 버튼 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) => {
// 업무 구분 코드
@ -469,13 +363,20 @@
// 초기화
$P.fnReset(taskSeCd);
// 업무구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색
// dataset 초기화
$P.ctrl.dataset.clear();
// 업무별 검색 조건
FimsSupport.renderForTask($P.findn("frmSearch"), taskSeCd.toLowerCase());
// 업무별 버튼
FimsSupport.renderForTask($P.findn("gridbuttonArea"), taskSeCd.toLowerCase());
// 업무 구분에 따른 URL 설정
$P.setUrl(taskSeCd);
// 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$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
let colContent = $P.findn("tmpltCols").content;
@ -519,10 +420,13 @@
// 검색 버튼 클릭 이벤트
$P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1);
}
@ -554,8 +458,16 @@
// 이전 단속 ID 가 없다면.. return
if (!bfrCrdnId) return;
// 개별총정보 dialog
$P.dataTableDblClick($P.ctrl.getValue("RE_REG_ID"), bfrCrdnId, "noDatasetControl");
let params = {
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) 키를 누르면 검색한다.
$P.$findn("term").onEnterPress($P.fnSearchList);
// 업무 버튼 이벤트
$P.$findn("btnBfrCrdnTotalInfo").on("click", function() {
$P.fnBfrCrdnTotalInfo($P.$findn("btnBfrCrdnTotalInfo").attr("title")); // 이전 단속 정보
});
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
}
// 업무 버튼 이벤트
$P.$findn("btnBfrCrdnTotalInfo").on("click", function() {
$P.fnBfrCrdnTotalInfo($P.$findn("btnBfrCrdnTotalInfo").attr("title")); // 이전 단속 정보
});
// 초기화 버튼 이벤트
$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("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;
}
debugger;
console.log($P.$findn("stdgCd").length);
if ($P.$findn("stdgCd").length != 10) {
dialog.alert({
content: "법정동 코드가 잘못되었습니다."

@ -10,31 +10,27 @@
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<div class="row g-1">
<!-- 차량번호 -->
<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>
<input is="id-input" type="text" class="form-control w-65 fw-bold" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 단속일시 -->
<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>
<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 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>
<input is="id-input" type="text" class="form-control w-65 fw-bold" name="gojiNo" data-map="GOJI_NO" readonly />
</div>
<!-- 단속상태 -->
<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>
<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" />
</div>
<!-- 자료 이동 버튼 -->
<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-PageDown" name="btnNext">▶</button>
</div>
@ -95,6 +91,8 @@
</div> <!-- <div class="card wrapper-list"> -->
<script>
LoadScript("sprt02010Script", wctx.url("/webjars/js/fims/sprt/sprt02010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -107,114 +105,30 @@
// pageObject
let $P = pageObject["${pageName}"];
// datasetControl
$P.ctrlMain = newSprt02010Control("${pageName}", "[data-doctx=${pageName}]");
// infoDialog 호출한 pageName
$P.callPageName = "${callPageName}";
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
// 자료 이동을 위한 자료의 Index. 0부터 시작.
$P.curDataIndex;
// 현재 탭의 위치
$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
**************************************************************************/
// 건수 표기
$P.fnChangeCountStatus = (dataItems) => {
// $P.curDataIndex 에 값이 없다면..
$P.fnChangeCountStatus = () => {
// 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
// $P.curDataIndex 에 값이 없다면..
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++) {
if (dataItems[iLoop].data.CRDN_ID == curCrdnId) {
@ -224,19 +138,18 @@
}
}
// 건수 표시
let viewNumber = $P.curDataIndex + 1;
// 표시
$P.$findn("countStatus").val(viewNumber + " of " + dataItems.length);
}
// 이전 자료 조회
$P.fnPrev = () => {
// 종료
if ("${callControlName}" == "noDatasetControl") return;
// 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = ${callControlName}.dataset._items;
let curCrdnId = $P.mainCtrl.getValue("CRDN_ID");
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.ctrlMain.getValue("CRDN_ID");
// 초기 값은 callControl dataset 의 총 건수 - 1
if ($P.curDataIndex == null) {
@ -264,16 +177,16 @@
, delYn: "N"
};
$P.fnRefreshList(params);
$P.fnRefreshInfo(params);
}
// 다음 자료 조회
$P.fnNext = () => {
// 종료
if ("${callControlName}" == "noDatasetControl") return;
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = ${callControlName}.dataset._items;
let curCrdnId = $P.mainCtrl.getValue("CRDN_ID");
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.ctrlMain.getValue("CRDN_ID");
// 초기 값은 0
if ($P.curDataIndex == null) {
@ -301,7 +214,7 @@
, delYn: "N"
};
$P.fnRefreshList(params);
$P.fnRefreshInfo(params);
}
/**************************************************************************
@ -309,18 +222,14 @@
**************************************************************************/
// 단속 정보
$P.fnCrdnPayerInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 0;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
callPurpose: "view"
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
@ -333,18 +242,14 @@
// 의견제출 정보
$P.fnOpnnSbmsnInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 1;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
@ -357,23 +262,19 @@
// 발송 반송 정보
$P.fnSndngInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 2;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
ajax.get({
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do")
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do")
, data: params || {}
, success: (resp) => { $("#sndngInfo").html(resp); }
});
@ -381,19 +282,15 @@
// 처리 정보
$P.fnPrcsInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 3;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, rtpyrId: $P.mainCtrl.getValue("RTPYR_ID")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, rtpyrId: $P.ctrlMain.getValue("RTPYR_ID")
, delYn: "N"
};
@ -406,18 +303,14 @@
// 부과체납 정보
$P.fnLevyInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 4;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
@ -430,18 +323,14 @@
// 수납 정보
$P.fnRcvmtInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 5;
let params = {
callPurpose: "view"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, delYn: "N"
};
@ -454,20 +343,16 @@
// 민원상담 정보
$P.fnCvlcptDscsnInfo = () => {
let crdnId = $P.mainCtrl.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
// 탭 Index
$P.activeTabIndex = 6;
let params = {
callPurpose: "view"
, inquiryCondition: "crdnId_vhrno"
, sggCd: $P.mainCtrl.getValue("SGG_CD")
, taskSeCd: $P.mainCtrl.getValue("TASK_SE_CD")
, crdnId: $P.mainCtrl.getValue("CRDN_ID")
, vhrno: $P.mainCtrl.getValue("VHRNO")
, sggCd: $P.ctrlMain.getValue("SGG_CD")
, taskSeCd: $P.ctrlMain.getValue("TASK_SE_CD")
, crdnId: $P.ctrlMain.getValue("CRDN_ID")
, vhrno: $P.ctrlMain.getValue("VHRNO")
, 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("btnNext").on("click", () => { $P.fnNext() }); // 다음
// 탭 버튼 이벤트
$P.$findn("btnCrdnPayer").on("click", () => { $P.fnCrdnPayerInfo() }); // 단속 정보
$P.$findn("btnOpnnSbmsn").on("click", () => { $P.fnOpnnSbmsnInfo() }); // 의견제출 정보
$P.$findn("btnSndng").on("click", () => { $P.fnSndngInfo() }); // 발송반송 정보
@ -496,8 +441,11 @@
$P.$findn("btnCvlcptDscsn").on("click", () => { $P.fnCvlcptDscsnInfo() }); // 민원상담 정보
}
// 기본 데이터 설정
$P.initData = () => {
// 초기 설정
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
// 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
$P.curDataIndex = null;
}
@ -508,11 +456,11 @@
// 1. 이벤트 설정
$P.setEvent();
// 2. 기본 데이터 설정
$P.initData();
// 2. 기 설정
$P.fnReset();
// 3. Dataset 설정
$P.mainCtrl.setData([${totalInfo}]);
$P.ctrlMain.setData([${totalInfo}]);
// 4. 단속, 납부자 정보 조회
$P.fnCrdnPayerInfo();

@ -6,7 +6,7 @@
<div class="d-flex flex-row justify-content-evenly">
<div class="w-px-1150">
<!-- 입력 영역 -->
<form name="frmEditCrdnPayer">
<form name="frmCrdnPayer">
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" name="rtpyrId" data-map="RTPYR_ID" />
@ -45,17 +45,14 @@
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 등록구분 -->
<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>
<input is="id-input" type="text" class="form-control w-45" name="crdnRegSeNm" data-map="CRDN_REG_SE_NM" readonly />
</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="crdnInptSeNm">입력구분</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnInptSeNm" data-map="CRDN_INPT_SE_NM" readonly />
</div>
<!-- 단속 시작 시각 ~ 단속 종료 시각 -->
<div class="col-md-4">
<span slot="edit">
<template class="pes pvs"> <!-- 밤샘주차 주정차 -->
@ -67,17 +64,14 @@
</template>
</span>
</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="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 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>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</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="vltnArtcl">위반항목</label>
<input is="id-input" type="text" class="form-control w-45" name="vltnArtcl" data-map="VLTN_ARTCL" readonly />
@ -91,17 +85,14 @@
</template>
</span>
</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="crdnStdgNm">법정동</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnStdgNm" data-map="CRDN_STDG_NM" readonly />
</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="crdnPlc">단속장소</label>
<input is="id-input" type="text" class="form-control w-60" name="crdnPlc" data-map="CRDN_PLC" readonly />
</div>
<!-- 단속일련번호 / 상세단속장소 -->
<div class="col-md-4">
<span slot="edit">
<template class="dpv eca pvs"> <!-- 장애인 전기차 주정차 -->
@ -118,88 +109,71 @@
</template>
</span>
</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="cvlcptAplcntNm">민원신청인</label>
<input is="id-input" type="text" class="form-control w-45" name="cvlcptAplcntNm" data-map="CVLCPT_APLCNT_NM" readonly />
</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="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 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>
<input is="id-input" type="text" class="form-control w-45" name="cvlcptPrcsPicNm" data-map="CVLCPT_PRCS_PIC_NM" readonly />
</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="vin">차대번호</label>
<input is="id-input" type="text" class="form-control w-45" name="vin" data-map="VIN" readonly />
</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="vhclNm">차량명</label>
<input is="id-input" type="text" class="form-control w-60" name="vhclNm" data-map="VHCL_NM" readonly />
</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="vhclColr">차량색상</label>
<input is="id-input" type="text" class="form-control w-45" name="vhclColr" data-map="VHCL_COLR" readonly />
</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="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="advntceDudtYmd" data-map="ADVNTCE_DUDT_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" data-fmt-type="day" 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 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>
</div>
<!-- 과태료 단속원금 -->
<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>
<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 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>
<input is="id-input" type="text" class="form-control w-20 text-sm-end" name="ffnlgRdcrt" data-map="FFNLG_RDCRT" readonly /> %
</div>
<!-- 과태료 금액 -->
<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>
<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 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>
<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 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>
<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 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>
<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 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>
<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 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>
<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 class="col-md-3">
<span slot="edit">
<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>
<!-- 버튼 우측 정렬 -->
<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 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>
</span>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 납부자 명 -->
<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>
<input is="id-input" type="text" class="form-control w-50" 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="rtpyrSeNm">납부자구분</label>
<input is="id-input" type="text" class="form-control w-30" name="rtpyrSeNm" data-map="RTPYR_SE_NM" readonly />
</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="rtpyrSeNm">납부자구분</label>
<input is="id-input" type="text" class="form-control w-25" name="rtpyrSeNm" data-map="RTPYR_SE_NM" readonly />
<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>
<!-- 납부자 번호 -->
<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>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrNo" data-map="RTPYR_NO" readonly />
</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="rtpyrTelno">전화번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrTelno" data-map="RTPYR_TELNO" readonly />
</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="rtpyrMblTelno">휴대전화번호</label>
<input is="id-input" type="text" class="form-control w-40" name="rtpyrMblTelno" data-map="RTPYR_MBL_TELNO" readonly />
</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="rtpyrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-60" name="rtpyrEml" data-map="RTPYR_EML" 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" 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-px-75" name="zip" data-map="ZIP" readonly />
</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="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 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>
<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 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>
<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"> -->
<script>
LoadScript("sprt02020Script", wctx.url("/webjars/js/fims/sprt/sprt02020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -349,145 +315,18 @@
// pageObject
let $P = pageObject["${pageName}"];
$P.$findn("photoMainWrapper").addClass("w-px-380 min-w-px-380");
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEditCrdnPayer"));
// datasetControl
$P.ctrlCrdn = newSprt02020Control("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
// 단속 사진
$P.existFileArr = [];
$P.localUploadArr = [];
$P.uploadSet = uploadSupport($P.selectorn("inputUploadSet"));
/**************************************************************************
* 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);
}
});
}
$P.$findn("photoMainWrapper").addClass("w-px-380 min-w-px-380");
/**************************************************************************
* 사용자 함수(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) => {
if (!params) return;
@ -547,14 +386,14 @@
// 서버에 전송할 data(파라미터) 생성
let params = {
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
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, delRsn: obj.reason // 삭제 사유
};
$P.ctrlCrdnPayer.remove(params);
$P.ctrlCrdn.remove(params);
}
// 단속 재등록
@ -598,7 +437,7 @@
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
, onClose: () => { $P.ctrlCrdn.refresh(); } // 자료 재조회
});
}
});
@ -619,7 +458,7 @@
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { $P.fnRefreshDataInfo(); } // 자료 재조회
if (resp.saved) { $P.ctrlCrdn.refresh(); } // 자료 재조회
}
});
}
@ -630,12 +469,12 @@
$P.updatePayer = (params) => {
if (!params) return;
if (params.rtpyrId == null || params.rtpyrId == "") {
dialogTitle = "납부자 등록";
params.callPurpose = "create";
} else {
dialogTitle = "납부자 수정";
if (params.rtpyrId) {
dialogTitle = "납부자 정보 수정";
params.callPurpose = "update";
} else {
dialogTitle = "납부자 정보 등록";
params.callPurpose = "create";
}
ajax.get({
@ -656,7 +495,7 @@
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
, onClose: () => { $P.ctrlCrdn.refresh(); } // 자료 재조회
});
}
});
@ -667,13 +506,13 @@
**************************************************************************/
// 민원원본 보기
$P.fnViewCvlcptOrgnl = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let cvlcptLinkId = $P.ctrlCrdnPayer.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
// 단속 ID 가 없다면.. return
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
// 민원 연계 ID가 없다면.. return
if (typeof cvlcptLinkId == "undefined" || cvlcptLinkId == null || cvlcptLinkId == "") {
let cvlcptLinkId = $P.ctrlCrdn.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
if (!cvlcptLinkId) {
dialog.alert({
content: "조회된 민원 대장 정보가 없습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
@ -686,9 +525,9 @@
let params = {
callPurpose: "view"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
$P.viewCvlcptOrgnl(params);
@ -696,12 +535,12 @@
// 민원답변 보기
$P.fnViewAnswerPreview = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let cvlcptLinkId = $P.ctrlCrdnPayer.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
// 민원 연계 ID가 없다면.. return
let cvlcptLinkId = $P.ctrlCrdn.getValue("CVLCPT_LINK_ID"); // 민원 연계 ID
if (!cvlcptLinkId) {
dialog.alert({
content: "조회된 민원 대장 정보가 없습니다."
@ -713,11 +552,11 @@
}
let params = {
callPurpose : "view"
callPurpose: "view"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
$P.viewAnswerPreview(params);
@ -725,39 +564,37 @@
// 단속정보 수정
$P.fnUpdateCrdn = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "update"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
$P.ctrlCrdnPayer.getInfo(params);
$P.ctrlCrdn.getInfo(params);
}
// 단속정보 삭제
$P.fnRemoveCrdn = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
// 단속 상태 코드
let crdnSttsCd = $P.ctrlCrdnPayer.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdnPayer.getValue("CRDN_STTS_NM");
let crdnSttsCd = $P.ctrlCrdn.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdn.getValue("CRDN_STTS_NM");
// 단속 상태 코드 확인
if (Number(crdnSttsCd) > 51) {
dialog.alert({
content: "[" + title + "]" + " 작업은 단속상태가 '부과 이전' 자료만 처리 가능합니다."
content: "[" + btnTitle + "]" + " 작업은 단속상태가 '부과 이전' 자료만 처리 가능합니다."
+ "<br>" + "단속상태 : " + crdnSttsNm
+ "<br><br>" + "[" + title + "]" + " 실행이 취소되었습니다."
+ "<br><br>" + "[" + btnTitle + "]" + " 실행이 취소되었습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
@ -766,7 +603,7 @@
// 삭제 메세지 확인
dialog.alert({
content: "선택하신 " + $P.ctrlCrdnPayer.prefixName + " 정보를 삭제하시겠습니까?"
content: "선택하신 " + $P.ctrlCrdn.prefixName + " 정보를 삭제하시겠습니까?"
, onOK: () => {
// 삭제 사유 입력
fetch(wctx.url("/webjars/html/inputRsnDialog.html"))
@ -792,14 +629,13 @@
// 단속 재등록
$P.fnCreateCrdnReReg = (btnTitle) => {
let bfrCrdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
let bfrCrdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!bfrCrdnId) return;
// 단속 상태 코드
let crdnSttsCd = $P.ctrlCrdnPayer.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdnPayer.getValue("CRDN_STTS_NM");
let crdnSttsCd = $P.ctrlCrdn.getValue("CRDN_STTS_CD");
let crdnSttsNm = $P.ctrlCrdn.getValue("CRDN_STTS_NM");
// 단속 상태 코드 확인
if (Number(crdnSttsCd) < 80 || Number(crdnSttsCd) > 88) {
@ -820,9 +656,9 @@
let params = {
callPurpose: "create"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, bfrCrdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, bfrCrdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
$P.createCrdnReReg(params);
@ -844,8 +680,8 @@
}
let params = {
taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분
, crdnIds: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분
, crdnIds: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
let inBrowser = false;
@ -861,7 +697,7 @@
fetch(url + "?" + parameter)
.then((response) => {
let header = response.headers.get('Content-Disposition');
let header = response.headers.get("Content-Disposition");
if (!header) {
response.json().then((responseJson) => {
dialog.alert({
@ -871,17 +707,17 @@
});
});
new Error("");
}
new Error("");
}
let parts = header.split(';');
filenameInHeader = decodeURIComponent(parts[1].split('=')[1]);
let parts = header.split(";");
filenameInHeader = decodeURIComponent(parts[1].split("=")[1]);
return response.blob();
})
.then((blob) => {
AppSupport.openPDF(blob, filenameInHeader);
})
return response.blob();
})
.then((blob) => {
AppSupport.openPDF(blob, filenameInHeader);
})
.catch(() => { });
} else {
let parameter = toQuery(params);
@ -891,17 +727,16 @@
// 단속 상태 변경
$P.fnUpdateCrdnSttsCd = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "update"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
};
$P.getInfoCrdnSttsCd(params);
@ -909,12 +744,12 @@
// 납부자 초기화
$P.fnDeleteCrdnPayer = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
let rtpyrId = $P.ctrlCrdnPayer.getValue("RTPYR_ID"); // 납부자 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
// 납부자 ID 가 없다면.. return
let rtpyrId = $P.ctrlCrdn.getValue("RTPYR_ID"); // 납부자 ID
if (!rtpyrId) {
dialog.alert({
content: "조회된 납부자 대장 정보가 없습니다."
@ -932,10 +767,10 @@
let params = {
callPurpose: "initialize"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdnPayer.getValue("RTPYR_ID") // 납부자 ID
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdn.getValue("RTPYR_ID") // 납부자 ID
, delYn: "N"
};
@ -946,19 +781,18 @@
// 납부자 수정
$P.fnUpdatePayer = (btnTitle) => {
let crdnId = $P.ctrlCrdnPayer.getValue("CRDN_ID"); // 단속 ID
// 단속 ID 가 없다면.. return
let crdnId = $P.ctrlCrdn.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "update"
, btnTitle: btnTitle
, sggCd: $P.ctrlCrdnPayer.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdnPayer.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdnPayer.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdnPayer.getValue("RTPYR_ID") // 납부자 ID
, vhrno: $P.ctrlCrdnPayer.getValue("VHRNO") // 차량번호
, sggCd: $P.ctrlCrdn.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrlCrdn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlCrdn.getValue("CRDN_ID") // 단속 ID
, rtpyrId: $P.ctrlCrdn.getValue("RTPYR_ID") // 납부자 ID
, vhrno: $P.ctrlCrdn.getValue("VHRNO") // 차량번호
, rtpyrInptSeCd: "01" // 납부자 입력 구분 코드
};
@ -978,45 +812,45 @@
$P.setEvent = () => {
// 업무 버튼 이벤트
$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.fnViewAnswerPreview($P.$findn("btnViewAnswerPreview").attr("title")); // 민원 답변 보기
$P.fnViewAnswerPreview($P.$findn("btnViewAnswerPreview").attr("title")); // 민원 답변 보기
});
$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.fnMakeFileNht($P.$findn("btnPrintNhtPdf02").attr("title"), "pdf", "02"); // 고지서 출력
$P.fnMakeFileNht($P.$findn("btnPrintNhtPdf02").attr("title"), "pdf", "02"); // 고지서 출력
});
$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.fnRemoveCrdn($P.$findn("btnRemoveCrdn").attr("title")); // 단속 정보 삭제
$P.fnRemoveCrdn($P.$findn("btnRemoveCrdn").attr("title")); // 단속 정보 삭제
});
$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.fnCreateCrdnReReg($P.$findn("btnCreateCrdnReReg").attr("title")); // 단속 재등록
$P.fnCreateCrdnReReg($P.$findn("btnCreateCrdnReReg").attr("title")); // 단속 재등록
});
$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.fnUpdatePayer($P.$findn("btnUpdatePayer").attr("title")); // 납부자 수정
$P.fnUpdatePayer($P.$findn("btnUpdatePayer").attr("title")); // 납부자 수정
});
}
// 초기 화면 설정
$P.initForm = () => {
$P.fnReset = () => {
// 초기화
$P.findn("frmEditCrdnPayer").reset(); // 화면 초기화
$P.ctrlCrdnPayer.dataset.clear(); // Dataset 초기화
$P.findn("frmCrdnPayer").reset(); // 화면 초기화
$P.ctrlCrdn.dataset.clear(); // Dataset 초기화
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") {
if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnPrintNhtPdf01").prop("disabled", true);
$P.$findn("btnPrintNhtPdf02").prop("disabled", true);
$P.$findn("btnUpdateCrdn").prop("disabled", true);
@ -1044,10 +878,10 @@
$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();
// 2. 초기 화면 설정
$P.initForm();
$P.fnReset();
// 3. Dataset 설정 = 단속, 납부자 정보 조회
$P.ctrlCrdnPayer.setData([${crdnPayerInfo}]);
$P.ctrlCrdn.setData([${crdnPayerInfo}]);
// 4. 사진영역 설정
settingPhotoMain("${pageName}", $P.findn("crdnId")
@ -1077,7 +911,7 @@
);
// 5. 사진영역 초기화
let crdnPayerInfo = $P.ctrlCrdnPayer.getCurrent();
let crdnPayerInfo = $P.ctrlCrdn.getCurrent();
let existVideo = false;
if (crdnPayerInfo.VIDEO_EXIST_YN == "Y") {

@ -3,191 +3,172 @@
<!-- Page Body -->
<div class="content-pop" data-doctx="${pageName}">
<!-- 입력 영역 -->
<form name="frmEditOpnn">
<!-- 입력 영역 -->
<form name="frmOpnn">
<!-- hidden -->
<input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="d-flex flex-row justify-content-evenly">
<!-- 의견제출 정보 -->
<div class="col-xl-9 mx-1">
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">의견제출 정보</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnCreateOpnnSbmsn" title="의견제출 등록">
의견제출 등록
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsn" title="의견제출 수정">
의견제출 수정
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnRemoveOpnnSbmsn" title="의견제출 삭제">
의견제출 삭제
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnPrintDlbrDecsn" title="심의의결서 출력">
심의의결서 출력
</button>
</span> <!-- <span class="container-window-btn-right"> -->
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 접수 번호 -->
<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>
<input is="id-input" type="text" class="form-control w-30" name="rcptNoMask" data-map="RCPT_NO_MASK" readonly />
</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>
<input is="id-input" type="text" class="form-control w-30" name="rcptYmd" data-map="RCPT_YMD" readonly />
</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="rcptSeNm">접수구분</label>
<input is="id-input" type="text" class="form-control w-30" name="rcptSeNm" data-map="RCPT_SE_NM" readonly />
</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="sttrNm">성명</label>
<input is="id-input" type="text" class="form-control w-40" name="sttrNm" data-map="STTR_NM" readonly />
</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="sttrBrdtMask">생년월일</label>
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdtMask" data-map="STTR_BRDT_MASK" readonly />
</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="ownrRelNm">소유주관계</label>
<input is="id-input" type="text" class="form-control w-40" name="ownrRelNm" data-map="OWNR_REL_NM" 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" for="sttrAddr">주소</label>
<input is="id-input" type="text" class="form-control w-80" name="sttrAddr" data-map="STTR_ADDR" readonly />
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" 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" for="sttrDaddr">상세주소</label>
<input is="id-input" type="text" class="form-control w-87" name="sttrDaddr" data-map="STTR_DADDR" readonly />
</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="sttrCttpc">연락처</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrCttpc" data-map="STTR_CTTPC" 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="sttrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrEml" data-map="STTR_EML" 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="opnnSbmsnCn">의견제출내용</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>
</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>
<!-- 등록 일시 / 등록자 -->
<input type="hidden" name="opnnId" data-map="OPNN_ID" />
<div class="d-flex flex-row justify-content-evenly">
<!-- 의견제출 정보 -->
<div class="col-xl-9 mx-1">
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">의견제출 정보</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnCreateOpnnSbmsn" title="의견제출 등록">
의견제출 등록
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsn" title="의견제출 수정">
의견제출 수정
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnRemoveOpnnSbmsn" title="의견제출 삭제">
의견제출 삭제
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnPrintDlbrDecsn" title="심의의결서 출력">
심의의결서 출력
</button>
</span> <!-- <span class="container-window-btn-right"> -->
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<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>
<input is="id-input" type="text" class="form-control w-35" name="rcptNoMask" data-map="RCPT_NO_MASK" readonly />
</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>
<input is="id-input" type="text" class="form-control w-30" name="rcptYmd" data-map="RCPT_YMD" data-fmt-type="day" readonly />
</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="rcptSeNm">접수구분</label>
<input is="id-input" type="text" class="form-control w-35" name="rcptSeNm" data-map="RCPT_SE_NM" readonly />
</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="sttrNm">성명</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrNm" data-map="STTR_NM" readonly />
</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="sttrBrdtMask">생년월일</label>
<input is="id-input" type="text" class="form-control w-30" name="sttrBrdtMask" data-map="STTR_BRDT_MASK" readonly />
</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="ownrRelNm">소유주관계</label>
<input is="id-input" type="text" class="form-control w-35" name="ownrRelNm" data-map="OWNR_REL_NM" 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" for="sttrAddr">주소</label>
<input is="id-input" type="text" class="form-control w-80" name="sttrAddr" data-map="STTR_ADDR" readonly />
<input is="id-input" type="text" class="form-control w-px-75" name="sttrZip" data-map="STTR_ZIP" 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" for="sttrDaddr">상세주소</label>
<input is="id-input" type="text" class="form-control w-87" name="sttrDaddr" data-map="STTR_DADDR" readonly />
</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="sttrCttpc">연락처</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrCttpc" data-map="STTR_CTTPC" 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="sttrEml">이메일</label>
<input is="id-input" type="text" class="form-control w-35" name="sttrEml" data-map="STTR_EML" 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="opnnSbmsnCn">의견제출내용</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>
</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-55" 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">
<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 />
</div>
<!-- 수정 일시 / 수정자 -->
<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>
<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 />
</div>
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList">
<thead>
<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>
<th class="text-center" style="width: 120px">다운로드</th>
</thead>
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList">
<thead>
<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>
<th class="text-center" style="width: 120px">다운로드</th>
</thead>
<tbody name="tbodyFileList">
</tbody>
</table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="row g-1"> -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-9 mx-1"> -->
<!-- 의견제출 정보 -->
<!-- 심의 정보 -->
<div class="col-xl-3 mx-0">
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="w-px-120 bg-label-danger pe-2 col-form-label text-sm-center">심의 정보</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsnDlbrt" title="의견제출 심의">
의견제출 심의
</button>
</span>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 문서 번호 -->
<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>
<input is="id-input" type="text" class="form-control w-45" name="docNo" data-map="DOC_NO" 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" for="ntfctnSeNm">통보구분</label>
<input is="id-input" type="text" class="form-control w-30" name="ntfctnSeNm" data-map="NTFCTN_SE_NM" 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" for="opnnSbmsnSttsNm">심의결과</label>
<input is="id-input" type="text" class="form-control w-30" name="opnnSbmsnSttsNm" data-map="OPNN_SBMSN_STTS_NM" readonly />
<input is="id-input" type="hidden" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" />
</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="ansYmdTm">심의일시</label>
<input is="id-input" type="text" class="form-control w-45" name="ansYmdTm" data-map="ANS_YMD_TM" 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" for="ansCn">심의내용</label>
</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>
</div>
</div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-3 mx-0"> -->
<!-- 심의 정보 -->
</div> <!-- <div class="d-flex flex-row justify-content-evenly"> -->
</form>
<!-- 입력 영역 -->
</table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="row g-1"> -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-9 mx-1"> -->
<!-- 의견제출 정보 -->
<!-- 심의 정보 -->
<div class="col-xl-3 mx-0">
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="w-px-120 bg-label-danger pe-2 col-form-label text-sm-center">심의 정보</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsnDlbrt" title="심의">
의견제출 심의
</button>
</span>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<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>
<input is="id-input" type="text" class="form-control w-45" name="docNo" data-map="DOC_NO" 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" for="ntfctnSeNm">통보구분</label>
<input is="id-input" type="text" class="form-control w-30" name="ntfctnSeNm" data-map="NTFCTN_SE_NM" 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" for="opnnSbmsnSttsNm">심의결과</label>
<input is="id-input" type="text" class="form-control w-30" name="opnnSbmsnSttsNm" data-map="OPNN_SBMSN_STTS_NM" readonly />
<input is="id-input" type="hidden" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" />
</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="ansYmdTm">심의일시</label>
<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">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ansCn">심의내용</label>
</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>
</div>
</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"> -->
<script>
LoadScript("sprt02030Script", wctx.url("/webjars/js/fims/sprt/sprt02030.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -200,145 +181,14 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEditOpnn"));
// datasetControl
$P.ctrlOpnn = newSprt02030Control("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
// 파일 리스트
$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)
**************************************************************************/
// 자료 재조회
$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
$P.getOpnnSbmsnDlbrtInfo = (params) => {
if (!params) return;
@ -352,7 +202,7 @@
dialog.open({
id: dialogId
, title: params.btnTitle
, title: $P.ctrlOpnn.prefixName + " 정보 " + params.btnTitle
, size: "lg"
, content: resp
, init: () => {
@ -361,7 +211,7 @@
AppSupport.setDialogZindex();
}
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
, onClose: () => { $P.ctrlOpnn.refresh(); } // 정보 새로고침
});
}
});
@ -401,17 +251,29 @@
**************************************************************************/
// 의견제출 등록 버튼 이벤트
$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;
let params = {
callPurpose: "create"
, btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID
, sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, delYn: "N"
};
@ -420,9 +282,8 @@
// 의견제출 수정 버튼 이벤트
$P.fnUpdateOpnnSbmsn = (btnTitle) => {
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
// 의견제출 ID 가 없다면.. return
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
if (!opnnId) {
dialog.alert({
content: "조회된 의견제출 대장 정보가 없습니다."
@ -440,6 +301,7 @@
, taskSeCd: $P.ctrlOpnn.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: $P.ctrlOpnn.getValue("CRDN_ID") // 단속 ID
, opnnId: $P.ctrlOpnn.getValue("OPNN_ID") // 의견제출 ID
, delYn: "N"
};
$P.ctrlOpnn.getInfo(params);
@ -447,9 +309,8 @@
// 의견제출 삭제 버튼 이벤트
$P.fnRemoveOpnnSbmsn = (btnTitle) => {
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
// 의견제출 ID 가 없다면.. return
let opnnId = $P.ctrlOpnn.getValue("OPNN_ID"); // 의견제출 ID
if (!opnnId) {
dialog.alert({
content: "조회된 의견제출 대장 정보가 없습니다."
@ -492,7 +353,7 @@
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => {
$P.callbackRsn({
btnTitle: btnTitle // 버튼 title
btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유
});
}
@ -577,7 +438,7 @@
// 기존 table에 자료가 존재하면 tableRow 삭제
for (let iLoop = 1; iLoop < fileLength; iLoop++) {
tableFileList.deleteRow(1); // table 행(Row) 삭제
tableFileList.deleteRow(1); // table 행(Row) 삭제
}
// 의견제출 ID 가 없다면 첨부파일을 조회하지 않는다..
@ -616,7 +477,7 @@
// 첨부파일 다운로드 버튼 이벤트
$P.fnFileDownload = (fileID) => {
if (pageObject['${mainPageName}'].callPurpose == "view") { return; }
if (pageObject["${pageNameMain}"].callPurpose == "view") return;
top.location.href = "/file/download.do?fileID=" + fileID;
}
@ -626,7 +487,7 @@
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// 업무 버튼 이벤트
// 업무 버튼 이벤트
$P.$findn("btnCreateOpnnSbmsn").on("click", function() {
$P.fnCreateOpnnSbmsn($P.$findn("btnCreateOpnnSbmsn").attr("title")); // 의견제출 등록
});
@ -645,13 +506,14 @@
}
// 초기 화면 설정
$P.initForm = () => {
// 초기화
$P.findn("frmEditOpnn").reset(); // 화면 초기화
$P.ctrlOpnn.dataset.clear(); // Dataset 초기화
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject['${mainPageName}'].callPurpose == "view") {
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmOpnn").reset();
// Dataset 초기화
$P.ctrlOpnn.dataset.clear(); // 의견제출
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnCreateOpnnSbmsn").prop("disabled", true);
$P.$findn("btnUpdateOpnnSbmsn").prop("disabled", true);
$P.$findn("btnRemoveOpnnSbmsn").prop("disabled", true);
@ -671,13 +533,11 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
$P.fnReset();
// 3. Dataset 설정
let opnnInfo = ${opnnInfo}; // 의견제출 정보
if (opnnInfo) {
$P.ctrlOpnn.setData([opnnInfo]);
}
if (opnnInfo) { $P.ctrlOpnn.setData([opnnInfo]); }
});
</script>

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

@ -30,35 +30,28 @@
<input type="hidden" name="rdctId" data-map="RDCT_ID" />
<div class="row g-1">
<!-- 감경 일자 -->
<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>
<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 class="col-md-6">
</div>
<!-- 감경 사유 명 -->
<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>
<input is="id-input" type="text" class="form-control w-50" name="rdctRsnNm" data-map="RDCT_RSN_NM" readonly />
</div>
<!-- 감경 금액 -->
<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>
<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 class="col-md-12">
<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>
</div>
<!-- 수정 일시 -->
<div class="col-md-6">
<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 class="col-md-6">
<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 />
@ -99,35 +92,28 @@
<input type="hidden" name="levyExclId" data-map="LEVY_EXCL_ID" />
<div class="row g-1">
<!-- 부과제외 일자 -->
<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>
<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 class="col-md-6">
</div>
<!-- 부과제외 구분 명 -->
<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>
<input is="id-input" type="text" class="form-control w-30" name="levyExclSeNm" data-map="LEVY_EXCL_SE_NM" readonly />
</div>
<!-- 부과제외 사유 명 -->
<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>
<input is="id-input" type="text" class="form-control w-60" name="levyExclRsnNm" data-map="LEVY_EXCL_RSN_NM" readonly />
</div>
<!-- 기타 내용 -->
<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>
<textarea type="text" class="form-control w-80" name="etcCn" data-map="ETC_CN" rows="3" data-maxlengthb="1000" readonly></textarea>
</div>
<!-- 수정 일시 -->
<div class="col-md-6">
<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 class="col-md-6">
<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 />
@ -148,44 +134,42 @@
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">처리 상태 이력</label>
</div>
<div class="row g-1">
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsCrdnSttsHstry">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTrCrdnSttsHstry">
<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: 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: 100px;" data-field="USE_YN_NM">사용여부</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody name="tbodyCrdnSttsHstryList">
</tbody>
<template is="curly-brackets" name="tmpltCrdnSttsHstryRows">
<tr data-key="STTS_HSTRY_ID">
<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}">{CRDN_STTS_NM}</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 dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFoundCrdnSttsHstry">
<tr class="odd">
<td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsCrdnSttsHstry">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTrCrdnSttsHstry" data-search-target="[data-doctx='${pageName}']">
<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: 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: 100px;" data-field="USE_YN_NM">사용여부</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody name="tbodyCrdnSttsHstryList">
</tbody>
<template is="curly-brackets" name="tmpltCrdnSttsHstryRows">
<tr data-key="{data-index}">
<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}">{CRDN_STTS_NM}</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 dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFoundCrdnSttsHstry">
<tr class="odd">
<td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div> <!-- DataTables(그리드) -->
</div> <!-- <div class="row g-1"> -->
</div>
</div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-6 mx-1"> -->
<!-- 처리 상태 이력 -->
@ -197,42 +181,40 @@
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">주소 변동 이력</label>
</div>
<div class="row g-1">
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsPayerHstry">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTrPayerHstry">
<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: 100px;" data-field="ZIP">우편번호</th>
<th class="cmn sorting" style="width: 480px;" data-field="WHOL_ADDR">전체주소</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody name="tbodyPayerHstryList">
</tbody>
<template is="curly-brackets" name="tmpltPayerHstryRows">
<tr data-key="HSTRY_SN">
<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}">{ZIP}</td>
<td class="cmn text-start" onclick="{onclick}">{WHOL_ADDR}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFoundPayerHstry">
<tr class="odd">
<td valign="top" colspan="5" class="dataTables_empty text-center">주소변동 이력 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-350" name="tableRspnsPayerHstry">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTrPayerHstry" data-search-target="[data-doctx='${pageName}']">
<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: 100px;" data-field="ZIP">우편번호</th>
<th class="cmn sorting" style="width: 480px;" data-field="WHOL_ADDR">전체주소</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody name="tbodyPayerHstryList">
</tbody>
<template is="curly-brackets" name="tmpltPayerHstryRows">
<tr data-key="{data-index}">
<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}">{ZIP}</td>
<td class="cmn text-start" onclick="{onclick}">{WHOL_ADDR}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFoundPayerHstry">
<tr class="odd">
<td valign="top" colspan="5" class="dataTables_empty text-center">주소변동 이력 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div> <!-- DataTables(그리드) -->
</div> <!-- <div class="row g-1"> -->
</div>
</div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="col-xl-6 mx-1"> -->
<!-- 주소 변동 이력 -->
@ -240,6 +222,8 @@
</div> <!-- <div class="content-pop"> -->
<script>
LoadScript("sprt02050Script", wctx.url("/webjars/js/fims/sprt/sprt02050.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -252,327 +236,17 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFieldsRdct = new FimsFormFields($P.selectorn("frmEditRdct"));
$P.formFieldsLevyExcl = new FimsFormFields($P.selectorn("frmEditLevyExcl"));
/**************************************************************************
* DatasetControl
**************************************************************************/
// 감경 정보 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());
}
// URL
$P.prefixUrl = "${prefixUrl}"
// datasetControl
$P.ctrlRdct = newSprt02050ControlRD("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
$P.ctrlLevyExcl = newSprt02050ControlLE("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
$P.ctrlCrdnSttsHstry = newSprt02050ControlCSH("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
$P.ctrlPayerAddrHstrys = newSprt02050ControlPAH("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
/**************************************************************************
* 사용자 함수(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
$P.callbackRsnRdct = (obj) => {
// 서버에 전송할 data(파라미터) 생성
@ -603,22 +277,78 @@
$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
**************************************************************************/
// 감경 등록 버튼 이벤트
$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
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "create"
, btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID
, sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, delYn: "N"
};
@ -627,9 +357,8 @@
// 감경 수정 버튼 이벤트
$P.fnUpdateRdct = (btnTitle) => {
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
// 감경 ID 가 없다면.. return
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
if (!rdctId) {
dialog.alert({
content: "조회된 감경 대장 정보가 없습니다."
@ -649,14 +378,13 @@
, delYn: "N"
};
$P.rdctControl.getInfo(params);
$P.ctrlRdct.getInfo(params);
}
// 감경 삭제 버튼 이벤트
$P.fnRemoveRdct = (btnTitle) => {
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
// 감경 ID 가 없다면.. return
let rdctId = $P.ctrlRdct.getValue("RDCT_ID"); // 감경 ID
if (!rdctId) {
dialog.alert({
content: "조회된 감경 대장 정보가 없습니다."
@ -682,7 +410,7 @@
, content: template
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => {
$P.callbackRsn({
$P.callbackRsnRdct({
btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유
});
@ -695,18 +423,30 @@
// 계고 등록 버튼 이벤트
$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
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "create"
, btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "2" // 부과 제외 구분 코드
, sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "2" // 부과 제외 구분 코드
, delYn: "N"
};
@ -715,18 +455,30 @@
// 부과제외 등록 버튼 이벤트
$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
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return;
let params = {
callPurpose: "create"
, btnTitle: btnTitle
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "1" // 부과 제외 구분 코드
, sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
, crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
, levyExclSeCd: "1" // 부과 제외 구분 코드
, delYn: "N"
};
@ -735,9 +487,8 @@
// 부과제외 수정 버튼 이벤트
$P.fnUpdateLevyExcl = (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) {
dialog.alert({
content: "조회된 부과제외 대장 정보가 없습니다."
@ -763,9 +514,8 @@
// 부과제외 삭제 버튼 이벤트
$P.fnRemoveLevyExcl = (btnTitle) => {
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과제외 ID
// 부과제외 ID 가 없다면.. return
let levyExclId = $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID"); // 부과제외 ID
if (!levyExclId) {
dialog.alert({
content: "조회된 부과제외 대장 정보가 없습니다."
@ -809,25 +559,25 @@
$P.setEvent = () => {
// 업무 버튼 이벤트
$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.fnUpdateRdct($P.$findn("btnUpdateRdct").attr("title")); // 감경 수정
$P.fnUpdateRdct($P.$findn("btnUpdateRdct").attr("title")); // 감경 수정
});
$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.fnCreateWrng($P.$findn("btnCreateWrng").attr("title")); // 계고 등록
$P.fnCreateWrng($P.$findn("btnCreateWrng").attr("title")); // 계고 등록
});
$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.fnUpdateLevyExcl($P.$findn("btnUpdateLevyExcl").attr("title")); // 부과제외 수정
$P.fnUpdateLevyExcl($P.$findn("btnUpdateLevyExcl").attr("title")); // 부과제외 수정
});
$P.$findn("btnRemoveLevyExcl").on("click", function() {
$P.fnRemoveLevyExcl($P.$findn("btnRemoveLevyExcl").attr("title")); // 부과제외 삭제
$P.fnRemoveLevyExcl($P.$findn("btnRemoveLevyExcl").attr("title")); // 부과제외 삭제
});
// 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
if (pageObject['${mainPageName}'].callPurpose == "view") {
if (pageObject["${pageNameMain}"].callPurpose == "view") {
$P.$findn("btnCreateRdct").prop("disabled", true);
$P.$findn("btnUpdateRdct").prop("disabled", true);
$P.$findn("btnRemoveRdct").prop("disabled", true);
@ -864,21 +623,17 @@
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
$P.fnReset();
// 3. Dataset 설정
let rdctInfo = ${rdctInfo}; // 감경 정보
if (rdctInfo) {
$P.ctrlRdct.setData([rdctInfo]);
}
if (rdctInfo) { $P.ctrlRdct.setData([rdctInfo]); }
let levyExclInfo = ${levyExclInfo}; // 부과제외 정보
if (levyExclInfo) {
$P.ctrlLevyExcl.setData([levyExclInfo]);
}
if (levyExclInfo) { $P.ctrlLevyExcl.setData([levyExclInfo]); }
$P.ctrlCrdnSttsHstry.setData(${crdnSttsHstrys}); // 단속상태 이력
$P.ctrlPayerHstry.setData(${payerAddrHstrys}); // 납부자주소 이력
$P.ctrlPayerAddrHstrys.setData(${payerAddrHstrys}); // 납부자주소 이력
});
</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