1. 사전통지 발송 대상 수정.

2. 기타 오류 수정.
main
JoJH 2 days ago
parent 160b2f8fed
commit 62db4b7590

@ -150,10 +150,10 @@
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateWrng" title="계고 수정">
계고 수정
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnCreateSlctnTrgtInfo" title="선택 계고장 발송 대상">
<button type="button" class="btn btn-primary w-px-120" name="btnCreateSlctnTrgt" title="계고장 발송대상 선택 등록">
선택 등록
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnCreateWholTrgtInfo" title="전체 계고장 발송 대상">
<button type="button" class="btn btn-primary w-px-120" name="btnCreateWholTrgt" title="계고장 발송대상 전체 등록">
전체 등록
</button>
</span>
@ -223,27 +223,27 @@
<td class="cmn text-center" onclick ondblclick>{CRDN_YMD_TM}</td>
<td class="cmn text-start" onclick ondblclick>{VHRNO}</td>
<td class="cmn text-center" onclick ondblclick>{RTPYR_SE_NM}</td>
<td class="cmn text-center privacy-cell" onclick="{onclick}" ondblclick="{ondblclick}">
<td class="cmn text-center privacy-cell" onclick ondblclick>
<span>{RTPYR_NO}</span>
<span>*************</span>
</td>
<td class="cmn text-start" onclick ondblclick">{RTPYR_NM}</td>
<td class="cmn text-start" onclick ondblclick">{VLTN_ARTCL}</td>
<td class="cmn text-start" onclick ondblclick">{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick">{CRDN_PLC}</td>
<td class="bpv text-start" onclick ondblclick">{DTL_CRDN_PLC}</td>
<td class="cmn text-end" onclick ondblclick">{FFNLG_CRDN_AMT}</td>
<td class="cmn text-start" onclick ondblclick">{CRDN_STTS_NM}</td>
<td class="pvs text-center" onclick ondblclick">{CRDN_SPAREA_NM}</td>
<td class="eca text-center" onclick ondblclick">{USE_FUEL_NM}</td>
<td class="dpv text-center" onclick ondblclick">{PRK_PSBLTY_RSLT_NM}</td>
<td class="cmn text-center" onclick ondblclick">{ZIP}</td>
<td class="cmn text-start" onclick ondblclick">{ADDR}</td>
<td class="cmn text-start" onclick ondblclick">{DTL_ADDR}</td>
<td class="cmn text-center" onclick ondblclick">{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick">{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick">{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick">{MDFR_NM}</td>
<td class="cmn text-start" onclick ondblclick>{RTPYR_NM}</td>
<td class="cmn text-start" onclick ondblclick>{VLTN_ARTCL}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_PLC}</td>
<td class="bpv text-start" onclick ondblclick>{DTL_CRDN_PLC}</td>
<td class="cmn text-end" onclick ondblclick>{FFNLG_CRDN_AMT}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STTS_NM}</td>
<td class="pvs text-center" onclick ondblclick>{CRDN_SPAREA_NM}</td>
<td class="eca text-center" onclick ondblclick>{USE_FUEL_NM}</td>
<td class="dpv text-center" onclick ondblclick>{PRK_PSBLTY_RSLT_NM}</td>
<td class="cmn text-center" onclick ondblclick>{ZIP}</td>
<td class="cmn text-start" onclick ondblclick>{ADDR}</td>
<td class="cmn text-start" onclick ondblclick>{DTL_ADDR}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick>{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick>{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
@ -318,7 +318,7 @@
let atLeastOne = GRID.checkbox.countChecked(element) > 0;
$P.$findn("btnCreateSlctnTrgtInfo").prop("disabled", !atLeastOne);
$P.$findn("btnCreateSlctnTrgt").prop("disabled", !atLeastOne);
Apply.toDataset.selection($P.ctrl.dataset, element, bool);
}
@ -562,14 +562,13 @@
}
// 선택 발송대상 등록 버튼 이벤트
$P.fnCreateSlctnTrgtInfo = (btnTitle) => {
$P.fnCreateSlctnTrgt = (btnTitle) => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) return;
// 파라미터 설정
let params = $P.ctrl.query; // 검색 조건
params.btnTitle = btnTitle; // 버튼 title
params.callPurpose = "create"; // 호출 용도 (등록)
params.crdnIds = selected.map(info => info.CRDN_ID).join(",") // 단속 IDs
@ -585,7 +584,7 @@
}
// 전체 발송대상 등록 버튼 이벤트
$P.fnCreateWholTrgtInfo = (btnTitle) => {
$P.fnCreateWholTrgt = (btnTitle) => {
if ($P.ctrl.dataset.empty) {
dialog.alert({
content: "검색된 자료가 없습니다."
@ -597,7 +596,6 @@
// 파라미터 설정
let params = $P.ctrl.query; // 검색 조건
params.btnTitle = btnTitle; // 버튼 title
params.callPurpose = "create"; // 호출 용도 (등록)
params.crdnIds = null; // 단속 IDs
@ -630,11 +628,11 @@
$P.$findn("btnUpdateWrng").on("click", function() {
$P.fnUpdateWrng($P.$findn("btnUpdateWrng").attr("title")); // 계고 수정
});
$P.$findn("btnCreateSlctnTrgtInfo").on("click", function() {
$P.fnCreateSlctnTrgtInfo($P.$findn("btnCreateSlctnTrgtInfo").attr("title")); // 선택 대상 등록
$P.$findn("btnCreateSlctnTrgt").on("click", function() {
$P.fnCreateSlctnTrgt($P.$findn("btnCreateSlctnTrgt").attr("title")); // 선택 대상 등록
});
$P.$findn("btnCreateWholTrgtInfo").on("click", function() {
$P.fnCreateWholTrgtInfo($P.$findn("btnCreateWholTrgtInfo").attr("title")); // 전체 대상 등록
$P.$findn("btnCreateWholTrgt").on("click", function() {
$P.fnCreateWholTrgt($P.$findn("btnCreateWholTrgt").attr("title")); // 전체 대상 등록
});
// DataTables width 변경 조정

@ -12,6 +12,7 @@
<form name="frmEdit">
<input type="hidden" name="sggCd" />
<input type="hidden" name="taskSeCd" />
<input type="hidden" name="vltnCd" />
<div class="row g-1">
<div class="col-md-12 text-end px-2">
@ -299,6 +300,7 @@
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$P.$findn("taskSeCd").val("${taskSeCd}"); // 업무 구분 코드
$P.$findn("vltnCd").val("${vltnCd}"); // 위반 코드
$P.$findn("sndngYmd").datepicker("setDate", TODAY()); // 발송 일자
$P.$findn("sndngEndYmd").datepicker("setDate", TODAY()); // 납기 일자

@ -171,20 +171,20 @@
<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="{data-index}" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{TASK_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_REG_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_SE_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VLTN_ARTCL}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_END_YMD}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{TNOCS}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{GRAMT}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DOC_NO}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{TTL_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_REG_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_SE_NM}</td>
<td class="cmn text-start" onclick ondblclick>{VLTN_ARTCL}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_END_YMD}</td>
<td class="cmn text-end" onclick ondblclick>{TNOCS}</td>
<td class="cmn text-end" onclick ondblclick>{GRAMT}</td>
<td class="cmn text-start" onclick ondblclick>{DOC_NO}</td>
<td class="cmn text-start" onclick ondblclick>{TTL_NM}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick>{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick>{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>

@ -75,29 +75,29 @@
</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" onclick ondblclick">{SNDNG_DTL_STTS_NM}</td>
<td class="cmn text-center" onclick ondblclick">{RG_NO}</td>
<td class="cmn text-center" onclick ondblclick">{SNDNG_YMD}</td>
<td class="cmn text-center" onclick ondblclick">{DUDT_YMD}</td>
<td class="cmn text-start" onclick ondblclick">{RCPN_NM}</td>
<td class="cmn text-center" onclick ondblclick">{RCPN_ZIP}</td>
<td class="cmn text-start" onclick ondblclick">{RCPN_ADDR}</td>
<td class="cmn text-start" onclick ondblclick">{RCPN_DTL_ADDR}</td>
<td class="cmn text-center" onclick ondblclick">{DLVR_YMD}</td>
<td class="cmn text-center" onclick ondblclick">{DLVR_TM}</td>
<td class="cmn text-start" onclick ondblclick">{UNDLVR_RSN_NM}</td>
<td class="cmn text-start" onclick ondblclick">{ACTL_RCPN_NM}</td>
<td class="cmn text-start" onclick ondblclick">{RCPN_REL_NM}</td>
<td class="cmn text-center" onclick ondblclick">{CRDN_DT}</td>
<td class="cmn text-start" onclick ondblclick">{VHRNO}</td>
<td class="cmn text-start" onclick ondblclick">{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick">{CRDN_PLC}</td>
<td class="cmn text-end" onclick ondblclick">{FFNLG_AMT}</td>
<td class="cmn text-center" onclick ondblclick">{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick">{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick">{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick">{MDFR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{ROW_NUM}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_DTL_STTS_NM}</td>
<td class="cmn text-center" onclick ondblclick>{RG_NO}</td>
<td class="cmn text-center" onclick ondblclick>{SNDNG_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{DUDT_YMD}</td>
<td class="cmn text-start" onclick ondblclick>{RCPN_NM}</td>
<td class="cmn text-center" onclick ondblclick>{RCPN_ZIP}</td>
<td class="cmn text-start" onclick ondblclick>{RCPN_ADDR}</td>
<td class="cmn text-start" onclick ondblclick>{RCPN_DTL_ADDR}</td>
<td class="cmn text-center" onclick ondblclick>{DLVR_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{DLVR_TM}</td>
<td class="cmn text-start" onclick ondblclick>{UNDLVR_RSN_NM}</td>
<td class="cmn text-start" onclick ondblclick>{ACTL_RCPN_NM}</td>
<td class="cmn text-start" onclick ondblclick>{RCPN_REL_NM}</td>
<td class="cmn text-center" onclick ondblclick>{CRDN_DT}</td>
<td class="cmn text-start" onclick ondblclick>{VHRNO}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_PLC}</td>
<td class="cmn text-end" onclick ondblclick>{FFNLG_AMT}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick>{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick>{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
@ -277,7 +277,7 @@
// 초기화 이벤트
$P.fnReset = (taskSeCd) => {
// 초기화
$P.findn("frmSearch").reset(); // 화면 초기화
$P.findn("frmEdit").reset(); // 화면 초기화
// 기본 데이터 설정
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드

@ -3,21 +3,21 @@
<c:set var="prefixName" scope="request">사전통지 발송 대상</c:set>
<!-- inner page html -->
<div class="content-wrapper">
<!-- 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" id="btnReset--${pageName}" title="초기화">
<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" id="btnSearch--${pageName}" title="검색">
<button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
<button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀
</button>
</span>
@ -25,16 +25,15 @@
<!-- 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch">
<form name="frmSearch">
<!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" />
<input type="hidden" name="sggCd" />
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12">
<span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-label form-search-title w-px-120 text-end fw-bold">업무구분</span>
<span class="form-search-linebox">
<c:forEach items="${taskListForSgg}" var="item">
<label>
@ -45,23 +44,21 @@
</c:forEach>
</span>
</div>
<!-- 단속 일자 -->
<div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCrdnYmdFrom--${pageName}">단속일자</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" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<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" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo"
data-fmt-type="day" title="종료 날짜 선택" />
<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-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schVltnCd--${pageName}">위반항목</label>
<select class="form-select w-px-160" id="schVltnCd--${pageName}" name="schVltnCd">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schVltnCd">위반항목</label>
<select is="id-select" class="form-select w-px-200" name="schVltnCd">
<option value="">전체</option>
<c:forEach items="${FIM004List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -73,65 +70,48 @@
</div>
<!-- 동적검색 -->
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<input type="hidden" name="by" />
<input type="text" class="form-control w-px-120 text-end fw-bold" name="byOutput" value="동적 검색" readonly />
<input type="hidden" name="mainOption" />
<input type="hidden" name="subOption" />
<input type="text" class="form-control w-px-400" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr">
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="[data-doctx='${pageName}'] [name='searchDetail']">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
</div> <!-- 동적검색 -->
</div>
</div> <!-- 메인 조건 -->
<!-- 상세 조건 -->
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div name="searchDetail" class="container-search container-search-detail collapse">
<div class="row g-1">
<!-- 차량번호 -->
<div class="col-4">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schVhrno--${pageName}">차량번호</label>
<input type="text" class="form-control w-px-160" id="schVhrno--${pageName}" name="schVhrno" autocomplete="off" />
</div>
<!-- 납부자번호 -->
<div class="col-4">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schRtpyrNm--${pageName}">납부자번호</label>
<input type="text" class="form-control w-px-160" id="schRtpyrNm--${pageName}" name="schRtpyrNm" autocomplete="off" />
</div>
<!-- 납부자명 -->
<div class="col-4">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schRtpyrNo--${pageName}">납부자명</label>
<input type="text" class="form-control w-px-160" id="schRtpyrNo--${pageName}" name="schRtpyrNo" autocomplete="off" />
</div>
<!-- 등록일자, 수정일자 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<div class="col-6">
<select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<input type="text" class="form-control form-date" name="schRegDateFrom"
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" id="schRegDateTo--${pageName}" name="schRegDateTo"
data-fmt-type="day" title="종료 날짜 선택">
<input type="text" class="form-control form-date" name="schRegDateTo"
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">
<select class="form-select w-px-120 text-center" id="schRgtrOpt--${pageName}" name="schRgtrOpt">
<div class="col-6">
<select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option>
<option value="mdfr">수정자</option>
</select>
<input type="hidden" id="schRgtrCd--${pageName}" name="schRgtrCd" />
<input type="text" class="form-control w-px-160" id="schRgtrNm--${pageName}" name="schRgtrNm" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnFindUser--${pageName}" title="사용자 검색">검색</button>
<input type="hidden" name="schRgtrCd" />
<input type="text" class="form-control w-px-160" name="schRgtrNm" />
<button type="button" class="btn btn-sm btn-outline-dark" name="btnFindUser" title="사용자 검색">검색</button>
</div>
</div>
</div> <!-- 상세 조건 -->
@ -140,20 +120,20 @@
<!-- 업무 버튼 및 건수 표시 -->
<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" id="paging--${pageName}PagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" id="paging--${pageName}">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" name="dataPaging">
</ul>
</div>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" id="btnCreateSlctnTrgtInfo--${pageName}" title="선택 발송대상 등록">
선택 대상 등록
<button type="button" class="btn btn-primary w-px-120" name="btnCreateSlctnTrgt" title="사전통지 발송대상 선택 등록">
선택 등록
</button>
<button type="button" class="btn btn-primary w-px-120" id="btnCreateWholTrgtInfo--${pageName}" title="선택 발송대상 등록">
전체 대상 등록
<button type="button" class="btn btn-primary w-px-120" name="btnCreateWholTrgt" title="사전통지 발송대상 전체 등록">
전체 등록
</button>
</span>
</span>
@ -162,20 +142,16 @@
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-450" 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 id="theadTr--${pageName}"
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Col--${pageName}">
<template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" id="gridAllCheckbox--${pageName}" onchange="pageObject['${pageName}'].control.select(this.checked);" /></th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
<th class="cmn" style="width: 160px;">업무구분</th>
<th class="cmn" style="width: 180px;" onclick="FimsSupport.searchFromGridTitle('CVLCPT_APLY_NO', this.innerText, 'match', 'part');">민원신청번호</th>
<th class="cmn" style="width: 180px;" onclick="FimsSupport.searchFromGridTitle('CVLCPT_RCPT_NO', this.innerText, 'match', 'part');">민원접수번호</th>
@ -206,51 +182,56 @@
<th class="cmn" style="width: 140px;">수정사용자</th>
<th class="cmn dummy-th"></th>
</template>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{CRDN_ID}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="{CRDN_ID}" onchange="pageObject['${pageName}'].control.select('{CRDN_ID}', this.checked);" /></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{TASK_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_APLY_NO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_NO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_PRCS_PIC_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_PRCS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_SE_NM}</td>
<td class="cmn text-center privacy-cell" onclick="{onclick}" ondblclick="{ondblclick}">
<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="{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>{CVLCPT_APLY_NO}</td>
<td class="cmn text-center" onclick ondblclick>{CVLCPT_RCPT_NO}</td>
<td class="cmn text-center" onclick ondblclick>{CVLCPT_RCPT_YMD}</td>
<td class="cmn text-center" onclick ondblclick>{CVLCPT_PRCS_PIC_NM}</td>
<td class="cmn text-center" onclick ondblclick>{CVLCPT_PRCS_NM}</td>
<td class="cmn text-center" onclick ondblclick>{CRDN_YMD_TM}</td>
<td class="cmn text-start" onclick ondblclick>{VHRNO}</td>
<td class="cmn text-center" onclick ondblclick>{RTPYR_SE_NM}</td>
<td class="cmn text-center privacy-cell" onclick ondblclick>
<span>{RTPYR_NO}</span>
<span>*************</span>
</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VLTN_ARTCL}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
<td class="bpv text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DTL_CRDN_PLC}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{FFNLG_AMT}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{ADVNTCE_AMT}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STTS_NM}</td>
<td class="pvs text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_SPAREA_NM}</td>
<td class="eca text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USE_FUEL_NM}</td>
<td class="dpv text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRK_PSBLTY_RSLT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ZIP}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ADDR}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DTL_ADDR}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td>
<td class="cmn text-start" onclick ondblclick>{RTPYR_NM}</td>
<td class="cmn text-start" onclick ondblclick>{VLTN_ARTCL}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_PLC}</td>
<td class="bpv text-start" onclick ondblclick>{DTL_CRDN_PLC}</td>
<td class="cmn text-end" onclick ondblclick>{FFNLG_AMT}</td>
<td class="cmn text-end" onclick ondblclick>{ADVNTCE_AMT}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STTS_NM}</td>
<td class="pvs text-center" onclick ondblclick>{CRDN_SPAREA_NM}</td>
<td class="eca text-center" onclick ondblclick>{USE_FUEL_NM}</td>
<td class="dpv text-center" onclick ondblclick>{PRK_PSBLTY_RSLT_NM}</td>
<td class="cmn text-center" onclick ondblclick>{ZIP}</td>
<td class="cmn text-start" onclick ondblclick>{ADDR}</td>
<td class="cmn text-start" onclick ondblclick>{DTL_ADDR}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick>{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick>{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<template name="tmpltNotFound">
<tr class="bpv">
<td valign="top" colspan="31" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dpv">
<td valign="top" colspan="31" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dvs">
<td valign="top" colspan="31" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca">
<td valign="top" colspan="31" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
@ -272,13 +253,15 @@
<div class="content-backdrop fade"></div>
</div>
<!-- / inner page html <div class="content-wrapper"> -->
<!-- / Inner page html -->
<script>
LoadScript("sndb01050Script", wctx.url("/webjars/js/fims/sndb/sndb01050.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
// 공통 코드
var FIM004 = new CommonCodes(${FIM004}, true); // 주정차위반 내역 코드
@ -286,6 +269,7 @@
var FIM006 = new CommonCodes(${FIM006}, true); // 장애인주차위반 내역 코드
var FIM061 = new CommonCodes(${FIM061}, true); // 전기차 충전구역 및 충전방해 위반 코드
var FIM064 = new CommonCodes(${FIM064}, true); // 화물자동차 밤샘주차 위반 코드
var FIM066 = new CommonCodes(${FIM066}, true); // 미세먼지 위반 코드
/**************************************************************************
* script 진입
@ -294,203 +278,114 @@
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields("#frmSearch--${pageName}");
// URL
$P.prefixUrl = "${prefixUrl}";
// datasetControl
$P.ctrl = newSndb01050Control("${pageName}", "[data-doctx=${pageName}]");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "advntceTrgt"
, prefixName: "사전통지 발송 대상"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.${infoPrefix}List
, appendData: true
, infoSize: "xl"
, formats: {
CVLCPT_RCPT_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_AMT: numberFormat
, ADVNTCE_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.query = { pageNum : 1, fetchSize : $P.control.defaultFetchSize };
$P.control.beforeCurrent = null;
/**************************************************************************
* DatasetControl 이벤트
* DataTables 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.control.onDatasetChange = (obj, option) => {
$P.renderList(obj.${infoPrefix}Total, option);
$("#paging--${pageName}").setPagingInfo({
list: $P.control.dataset
, prefix: "paging--${pageName}"
, start: obj.${infoPrefix}Start
, totalSize: obj.${infoPrefix}Total
, fetchSize: obj.${infoPrefix}Fetch
, func: "pageObject['${pageName}'].control.load({index})"
});
// dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
};
let atLeastOne = GRID.checkbox.countChecked(element) > 0;
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => {
if (!item) return;
$P.$findn("btnCreateSlctnTrgt").prop("disabled", !atLeastOne);
let key = item.data.CRDN_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
// 선택(체크) 변경 이벤트
$P.control.onSelectionChange = (selected) => {
let ${infoPrefix}List = $P.control.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
Apply.toDataset.selection($P.ctrl.dataset, element, bool);
}
$("#tbody--${pageName} input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});
// dataTable 클릭 이벤트
$P.dataTableClick = (dataIndex) => {
if (!dataIndex) return;
// 선택 대상 등록 버튼
$("#btnCreateSlctnTrgtInfo--${pageName}").prop("disabled", keys.length < 1);
$P.$findn("tbodyList").setCurrentRow(dataIndex);
// DataTables(그리드) 전체 선택(checkbox)
if (keys.length < 1) {
$("#DataTables_Table_0--${pageName} th input[type='checkbox']").prop("checked", false); // 체크 해제
} else if (keys.length == ${infoPrefix}List.length) {
$("#DataTables_Table_0--${pageName} th input[type='checkbox']").prop("checked", true); // 체크 설정
} else {
$("#DataTables_Table_0--${pageName} th input[type='checkbox']").prop("checked", false); // 체크 해제
Apply.toDataset.current($P.ctrl.dataset, dataIndex);
}
};
// 사전통지 발송 등록 dialog
$P.control.getInfo = (params) => {
if (!params) return;
// dataTable 더블 클릭 이벤트 - 개별총정보 dialog
$P.dataTableDblClick = (dataIndex) => {
if (!dataIndex) return;
let dialogTitle = "";
// 단속 ID
let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return;
if (params.callPurpose == "create") {
dialogTitle = $P.control.prefixName + " 등록";
} else if (params.callPurpose == "update") {
dialogTitle = $P.control.prefixName + " 수정";
} else {
dialogTitle = $P.control.prefixName + " 정보";
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")
}
ajax.get({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/060/info.do") + "?openerPageName=${pageName}"
url: wctx.url("/sprt/sprt02/010/main.do")
, data: params || {}
, success: resp => {
, success: (resp) => {
let dialogName = "totalInfoMainDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: $P.control.prefixed("Dialog--${pageName}")
, title: dialogTitle
id: dialogId
, title: "개별총정보"
, size: "xxl"
, content: resp
, size: $P.control.infoSize
, onClose: () => { $P.fnRefreshList(); }
});
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty;
let clsForTask = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val().toLowerCase(); // 소문자
// 업무별 그리드 td
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").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}'].control.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.querySelector("." + clsForTask + ",.cmn").outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
let noMore = (${infoPrefix}List.length >= totalSize);
let initScroll = ($P.control.query.pageNum < 2);
if(option != null && option.reloaded){
initScroll = false;
}
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$("#DataTables_Table_0--${pageName} th input[type='checkbox']").prop("checked", false);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.control.load($P.control.query.pageNum + 1);
}
// DataTables에 더블 클릭시 개별총정보 dialog
$P.getTotalInfo = (crdnId) => {
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
let params = {
callControlName: "pageObject['${pageName}'].control"
, sggCd: $P.control.dataset.getValue("SGG_CD")
, taskSeCd: $P.control.dataset.getValue("TASK_SE_CD")
, crdnId: crdnId
}
ajax.get({
url: wctx.url("/sprt/sprt02/010/main.do")
, data: params
, success: resp => {
dialog.open({
id: "totalInfoMainDialog"
, title: "개별총정보"
, content: resp
, size: "xxl"
});
}
});
$P.ctrl.load($P.ctrl.query.pageNum + 1);
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 검색 자료 재조회
$P.fnRefreshList = () => {
$P.control.query.crdnIds = null;
// 업무 구분별 설정
$P.fnSetTask = (taskSeCd) => {
// 업무에 따른 위반 내용
let vltnIdCode = [];
if (taskSeCd == "BPV") { // 전용차로위반
vltnIdCode = FIM005.list();
} else if (taskSeCd == "DPV") { // 장애인주차구역위반
vltnIdCode = FIM006.list();
} else if (taskSeCd == "DVS") { // 미세먼지법위반
vltnIdCode = FIM066.list();
} else if (taskSeCd == "ECA") { // 전기차주차위반
vltnIdCode = FIM061.list();
} else if (taskSeCd == "PES") { // 밤샘주차위반
vltnIdCode = FIM064.list();
} else if (taskSeCd == "PVS") { // 주정차위반
vltnIdCode = FIM004.list();
} else {
return;
}
$P.control.reload({all : true});
// 위반 항목
$P.$findn("schVltnCd").empty();
$P.$findn("schVltnCd").append("<option value=''>" + "전체" + "</option>");
$(vltnIdCode).each(function(index, item) {
$P.$findn("schVltnCd").append("<option value='" + vltnIdCode[index].code +"'>" + vltnIdCode[index].value + "</option>");
});
}
// 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => {
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
$P.$findn("schRgtrCd").val(userId); // 사용자 ID
$P.$findn("schRgtrNm").val(userNm); // 사용자 명
}
/**************************************************************************
@ -499,36 +394,64 @@
// 업무 구분 변경
$P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
if (!taskSeCd) {
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
}
// 초기 기본 설정
$P.initForm(taskSeCd);
// 초기화
$P.fnReset(taskSeCd);
// 업무 구분에 따른 URL 설정
$P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/050/list.do"); // 검색
$P.ctrl.urls.getInfo = wctx.url("/" + taskSeCd + $P.prefixUrl + "/060/info.do"); // 상세 정보
// 최고 관리자인지 권한을 확인하여 업무구분을 선택할 수 있도록 하자 -> 수정 필요
$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()); // 업무별 버튼
// 업무 구분별 설정
$P.setTask(taskSeCd);
$P.fnSetTask(taskSeCd);
// dataset 초기화
$P.control.dataset.clear();
// 업무 구분별 그리드 th
let colContent = $P.findn("tmpltCols").content;
let cols = $(colContent).find("." + taskSeCd.toLowerCase() + ",.cmn");
let colsOuterHTML = "";
cols.each(function() {
colsOuterHTML += this.outerHTML;
});
$P.findn("tableRspns").changeColumn(colsOuterHTML);
}
// 사용자검색 버튼 클릭 이벤트
$P.fnGetFindUser = () => {
let params = {
openerPageName: "${pageName}"
, callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
}
ajax.get({
url: wctx.url("/user/user02/010/main.do") + "?openerPageName=${pageName}"
url: wctx.url("/user/user02/010/main.do")
, data: params || {}
, success: resp => {
, success: (resp) => {
let dialogName = "userDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: "userDialog--${pageName}"
id: dialogId
, title: "사용자 검색"
, content: resp
, size: "lg"
, init: () => { AppSupport.setDialogZindex(); }
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
});
@ -536,80 +459,84 @@
// 검색 버튼 이벤트
$P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건
$P.control.query = $P.formFields.get();
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
// 업무 구분 코드(TASK_SE_CD) 에 따른 검색 조건 설정
let taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
if (taskSeCd == "BPV" || taskSeCd == "PVS") { // 전용차로위반 , 주정차위반 과태료는 사전부과 후 의견제출 접수도 사전통지 대상
$P.control.query.crdnSttsCdFrom = "21"; // 단속 처리 상태(FIM010) 시작 - 21: 납부자 등록
$P.control.query.crdnSttsCdTo = "31"; // 단속 처리 상태(FIM010) 종료 - 31: 의견제출 접수
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
if ("BPV,PVS".indexOf($P.ctrl.query.taskSeCd) != -1 ) {
$P.ctrl.query.crdnSttsCdFrom = "21"; // 단속 처리 상태(FIM010) 시작 - 21: 납부자 등록
$P.ctrl.query.crdnSttsCdTo = "31"; // 단속 처리 상태(FIM010) 종료 - 31: 의견제출 접수
} else {
$P.control.query.crdnSttsCdFrom = "21"; // 단속 처리 상태(FIM010) 시작 - 21: 납부자 등록
$P.control.query.crdnSttsCdTo = "23"; // 단속 처리 상태(FIM010) 종료 - 23: 사전부과
$P.ctrl.query.crdnSttsCdFrom = "21"; // 단속 처리 상태(FIM010) 시작 - 21: 납부자 등록
$P.ctrl.query.crdnSttsCdTo = "23"; // 단속 처리 상태(FIM010) 종료 - 23: 사전부과
}
$P.control.query.delYn = "N"; // 삭제 여부
$P.control.load(1);
$P.ctrl.load(1);
}
// 엑셀 버튼 이벤트
$P.fnExcel = () => {
if ($P.control.dataset.empty) {
if ($P.ctrl.dataset.empty) {
dialog.alert({
content: "검색된 자료가 없습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// DataTables(그리드)
let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")
$P.ctrl.query.cellDefs =
AppSupport.getCellDefs($P.$findn("theadTr").find("th").not(".dummy-th").not(":eq(0)")
, $($P.findn("tmpltRows").content).find("td").not(".dummy-td").not(":eq(0)")
, FimsSupport.getCellDefsForPrivacyCell);
$P.control.query.cellDefs = cellDefs;
$P.control.download();
$P.ctrl.download();
}
// 선택 발송대상 등록 버튼 이벤트
$P.fnCreateSlctnTrgtInfo = (title) => {
// 선택 자료
let selected = $P.control.dataset.getKeys("selected");
$P.fnCreateSlctnTrgt = (btnTitle) => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) return;
// 파라미터 설정
let params = $P.control.query; // 검색 조건
let params = $P.ctrl.query; // 검색 조건
params.btnTitle = btnTitle; // 버튼 title
params.callPurpose = "create"; // 호출 용도 (등록)
params.crdnIds = selected.join(","); // crdnIds
params.crdnIds = selected.map(info => info.CRDN_ID).join(",") // 단속 IDs
params.sndngSeCd = "02"; // 발송 구분 코드(FIM047) - 02 사전통지서
params.rsndYn = "N"; // 재발송 여부
params.delYn = "N"; // 삭제 여부
$P.control.getInfo(params);
$P.ctrl.getInfo(params);
}
// 전체 발송대상 등록 버튼 이벤트
$P.fnCreateWholTrgtInfo = (title) => {
if ($P.control.dataset.empty) {
$P.fnCreateWholTrgt = (btnTitle) => {
if ($P.ctrl.dataset.empty) {
dialog.alert({
content: "검색된 자료가 없습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 파라미터 설정
let params = $P.control.query; // 검색 조건
let params = $P.ctrl.query; // 검색 조건
params.btnTitle = btnTitle; // 버튼 title
params.callPurpose = "create"; // 호출 용도 (등록)
params.sndngSeCd = "02"; // 발송 구분 코드 - 02 사전통지서
params.crdnIds = null; // 단속 IDs
params.sndngSeCd = "02"; // 발송 구분 코드(FIM047) - 02 사전통지서
params.rsndYn = "N"; // 재발송 여부
params.delYn = "N"; // 삭제 여부
$P.control.getInfo(params);
$P.ctrl.getInfo(params);
}
/**************************************************************************
@ -618,112 +545,52 @@
// 이벤트 설정
$P.setEvent = () => {
// 기본 버튼 이벤트
$("#btnReset--${pageName}").on("click", () => $P.fnResetAndChangeBiz()); // 초기화
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); // 검색
$("#btnExcel--${pageName}").on("click", () => $P.fnExcel()); // 엑셀
$("#btnFindUser--${pageName}").on("click", () => $P.fnGetFindUser()); // 사용자 검색
$P.$findn("btnReset").on("click", () => $P.fnResetAndChangeBiz()); // 초기화
$P.$findn("btnSearch").on("click", () => $P.fnSearchList()); // 검색
$P.$findn("btnExcel").on("click", () => $P.fnExcel()); // 엑셀
$P.$findn("btnFindUser").on("click", () => $P.fnGetFindUser()); // 사용자 검색
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress(function() {
$P.fnSearchList();
});
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
$P.$findn("term").onEnterPress($P.fnSearchList);
// 업무 버튼 이벤트
$("#btnCreateSlctnTrgtInfo--${pageName}").on("click", function() {
$P.fnCreateSlctnTrgtInfo($(this).attr("title")); // 선택 대상 감경부과 등록
$P.$findn("btnCreateSlctnTrgt").on("click", function() {
$P.fnCreateSlctnTrgt($P.$findn("btnCreateSlctnTrgt").attr("title")); // 선택 대상 등록
});
$("#btnCreateWholTrgtInfo--${pageName}").on("click", function() {
$P.fnCreateWholTrgtInfo($(this).attr("title")); // 전체 대상 감경부과 등록
$P.$findn("btnCreateWholTrgt").on("click", function() {
$P.fnCreateWholTrgt($P.$findn("btnCreateWholTrgt").attr("title")); // 전체 대상 등록
});
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
}
// 초기 화면 설정
$P.initForm = (taskSeCd) => {
// 화면 초기화
$("#frmSearch--${pageName}")[0].reset();
// 초기화 이벤트
$P.fnReset = (taskSeCd) => {
// 초기화
$P.findn("frmSearch").reset(); // 화면 초기화
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// input, select 초기화
let searchForm = $("#frmSearch--${pageName}");
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); });
// 최고 관리자 경우 업무구분을 선택할 수 있도록 하자.
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
// 기본 데이터 설정
$("#sggCd--${pageName}").val("${sggCd}"); // 시군구 코드
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true); // 업무 구분 코드
AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schCrdnYmdFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7));
$("#schCrdnYmdTo--${pageName}").datepicker("setDate", new Date());
$("#byOutput--${pageName}").val("동적 검색"); // 동적 검색
$("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름
}
// 업무 구분별 설정
$P.setTask = (taskSeCd) => {
// 업무구분에 따른 URL 설정
$P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/050/list.do"); // 조회
$P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true); // 업무 구분 코드
$P.$findn("schCrdnYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 단속 일자 시작
$P.$findn("schCrdnYmdTo").datepicker("setDate", TODAY()); // 단속 일자 종료
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
$P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
// 업무별 조회조건
FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase());
// 업무에 따른 위반 내용
let vltnCode = [];
if (taskSeCd == "PVS") { // 주정차 위반
vltnCode = FIM004.list();
} else if (taskSeCd == "BPV") { // 전용차로 위반
vltnCode = FIM005.list();
} else if (taskSeCd == "DPV") { // 장애인 전용
vltnCode = FIM006.list();
} else if (taskSeCd == "ECA") { // 전기차 주차 위반
vltnCode = FIM061.list();
} else if (taskSeCd == "PES") { // 밤샘 주차 위반
vltnCode = FIM064.list();
} else {
return;
}
// 위반 항목
$("#schVltnCd--${pageName}").empty();
$("#schVltnCd--${pageName}").append("<option value=''>" + "전체" + "</option>");
$(vltnCode).each(function(index, item) {
$("#schVltnCd--${pageName}").append("<option value='" + vltnCode[index].code +"'>" + vltnCode[index].value + "</option>");
})
// 업무별 그리드 th
let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content;
let cols = $(colContent).find("." + taskSeCd.toLowerCase() + ",.cmn");
let colsOuterHTML = "";
cols.each(function() {
colsOuterHTML += this.outerHTML;
});
$("#table-responsive--${pageName}")[0].changeColumn(colsOuterHTML);
// dataset 초기화
$P.ctrl.dataset.clear();
}
/**************************************************************************

@ -237,10 +237,10 @@
<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="납부자 초기화" disabled>
납부자 초기화
</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="납부자 수정" disabled>
납부자 수정
</button>
</span>
@ -942,7 +942,13 @@
existVideo = true;
}
initPhotoMain("${pageName}", crdnPayerInfo.fileList, existVideo);
// 사진 버튼 visible
let showBtn = true;
if (pageObject["${pageNameMain}"].callPurpose == "view") {
showBtn = false;
}
initPhotoMain("${pageName}", crdnPayerInfo.fileList, existVideo, showBtn);
});
</script>

@ -127,7 +127,7 @@
<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 type="button" class="btn btn-primary w-px-120" name="btnUpdateOpnnSbmsnDlbrt" title="심의" disabled>
의견제출 심의
</button>
</span>

@ -88,7 +88,7 @@ function newSndb01010Control(pageName, doctx="[data-doctx='sndb01010']") {
// gridCheckbox
Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr);
// gridButton
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnCreateSlctnTrgtInfo']"), selectedArr); // 선택 대상 등록 버튼
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnCreateSlctnTrgt']"), selectedArr); // 선택 대상 등록 버튼
};
// 상세 정보 dialog

@ -40,7 +40,8 @@ function newSndb01020Control(pageName, doctx="[data-doctx='sndb01020']") {
let empty = dataList.empty;
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');");
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").innerHTML]

@ -36,7 +36,8 @@ function newSndb01040Control(pageName, doctx="[data-doctx='sndb01040']") {
let empty = dataList.empty;
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');");
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").innerHTML]

@ -0,0 +1,127 @@
function newSndb01050Control(pageName, doctx="[data-doctx='sndb01050']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "advntceTrgt"
, prefixName: "사전통지 발송 대상"
, dataGetter: obj => obj["List"]
, keys: ["CRDN_ID"]
, appendData: true
, infoSize: "xl"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, remove: "/remove.do"
}
, formats: {
CVLCPT_RCPT_YMD: dateFormat
, CRDN_YMD_TM: datetimeFormat
, FFNLG_AMT: numberFormat
, ADVNTCE_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
// paging
ctrl.pagingSupport = new FimsPagingSupport({
ctrl: ctrl // DatasetControl
, ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
});
/**************************************************************************
* 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
ctrl.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='btnCreateSlctnTrgt']"), 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.query.crdnIds = null; // 단속 IDs
ctrl.reload({all : true}); // 자료 재조회
}
});
}
});
}
return ctrl;
}
Loading…
Cancel
Save