1. 계고장 발송 현황 수정.

2. 계고장 삭제 수정.
main
JoJH 2 days ago
parent e1f4e11c12
commit 160b2f8fed

@ -181,7 +181,7 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>

@ -3,7 +3,7 @@
<c:set var="prefixName" scope="request">부과제외</c:set> <c:set var="prefixName" scope="request">부과제외</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="content-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
@ -279,11 +279,11 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<!-- / inner page html <div class="content-wrapper"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("excl01010Script", wctx.url("/webjars/js/fims/excl/excl01010.js?ver=${ver}")); LoadScript("excl01010Script", wctx.url("/webjars/js/fims/excl/excl01010.js?ver=${ver}"));
@ -498,7 +498,7 @@
$P.ctrl.download(); $P.ctrl.download();
} }
// 부과 제외 수정 버튼 클릭 이벤트 // 수정 버튼 클릭 이벤트
$P.fnUpdate = (btnTitle) => { $P.fnUpdate = (btnTitle) => {
// 부과 제외 ID 가 없다면.. return // 부과 제외 ID 가 없다면.. return
let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID"); let levyExclId = $P.ctrl.getValue("LEVY_EXCL_ID");
@ -516,7 +516,7 @@
$P.ctrl.getInfo(params); $P.ctrl.getInfo(params);
} }
// 부과 제외 삭제 버튼 클릭 이벤트 // 삭제 버튼 클릭 이벤트
$P.fnRemove = (btnTitle) => { $P.fnRemove = (btnTitle) => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료 let selected = $P.ctrl.getDataset("selected"); // 선택 자료

@ -3,7 +3,7 @@
<c:set var="prefixName" scope="request">의견제출 관리</c:set> <c:set var="prefixName" scope="request">의견제출 관리</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="content-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
@ -333,11 +333,11 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<!-- / inner page html <div class="content-wrapper"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("excl02010Script", wctx.url("/webjars/js/fims/excl/excl02010.js?ver=${ver}")); LoadScript("excl02010Script", wctx.url("/webjars/js/fims/excl/excl02010.js?ver=${ver}"));

@ -3,7 +3,7 @@
<c:set var="prefixName" scope="request">단속 재등록</c:set> <c:set var="prefixName" scope="request">단속 재등록</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="content-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
@ -244,11 +244,11 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<!-- / inner page html <div class="content-wrapper"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("excl03010Script", wctx.url("/webjars/js/fims/excl/excl03010.js?ver=${ver}")); LoadScript("excl03010Script", wctx.url("/webjars/js/fims/excl/excl03010.js?ver=${ver}"));

@ -3,7 +3,7 @@
<c:set var="prefixName" scope="request">계고장 발송 대상</c:set> <c:set var="prefixName" scope="request">계고장 발송 대상</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="content-wrapper" data-doctx="${pageName}"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
@ -150,18 +150,17 @@
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateWrng" title="계고 수정"> <button type="button" class="btn btn-primary w-px-120" name="btnUpdateWrng" title="계고 수정">
계고 수정 계고 수정
</button> </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="btnCreateSlctnTrgtInfo" title="선택 계고장 발송 대상">
선택 대상 등록 선택 등록
</button> </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="btnCreateWholTrgtInfo" title="전체 계고장 발송 대상">
전체 대상 등록 전체 등록
</button> </button>
</span> </span>
</span> </span>
</div> </div>
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
@ -275,11 +274,11 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<!-- / inner page html <div class="content-wrapper"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("sndb01010Script", wctx.url("/webjars/js/fims/sndb/sndb01010.js?ver=${ver}")); LoadScript("sndb01010Script", wctx.url("/webjars/js/fims/sndb/sndb01010.js?ver=${ver}"));

@ -3,21 +3,21 @@
<c:set var="prefixName" scope="request">계고장 발송 현황</c:set> <c:set var="prefixName" scope="request">계고장 발송 현황</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="content-wrapper"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list"> <div class="card wrapper-list">
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" id="btnReset--${pageName}" title="초기화"> <button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화">
초기화 초기화
</button> </button>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색"> <button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색 검색
</button> </button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀"> <button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀 엑셀
</button> </button>
</span> </span>
@ -25,16 +25,15 @@
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<!-- 검색 조건 영역 --> <!-- 검색 조건 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch"> <form name="frmSearch">
<!-- hidden --> <!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" /> <input type="hidden" name="sggCd" />
<!-- 메인 조건 --> <!-- 메인 조건 -->
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<!-- 업무 구분 -->
<div class="col-12"> <div class="col-12">
<span class="form-label 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"> <span class="form-search-linebox">
<c:forEach items="${taskListForSgg}" var="item"> <c:forEach items="${taskListForSgg}" var="item">
<label> <label>
@ -45,23 +44,22 @@
</c:forEach> </c:forEach>
</span> </span>
</div> </div>
<!-- 발송 일자 -->
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schSndngYmdFrom--${pageName}">발송일자</label> <label class="form-label form-search-title w-px-120 text-end fw-bold">발송일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schSndngYmdFrom--${pageName}" name="schSndngYmdFrom" <input type="text" class="form-control form-date" name="schSndngYmdFrom"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
~ ~
<input type="text" class="form-control form-date" id="schSndngYmdTo--${pageName}" name="schSndngYmdTo" <input type="text" class="form-control form-date" name="schSndngYmdTo"
data-fmt-type="day" title="종료 날짜 선택" /> data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 발송 등록 구분 코드 -->
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schSndngRegSeCd--${pageName}">등록구분</label> <label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schSndngRegSeCd">등록구분</label>
<select class="form-select w-px-80" id="schSndngRegSeCd--${pageName}" name="schSndngRegSeCd"> <select is="id-select" class="form-select w-px-200" name="schSndngRegSeCd">
<option value="">전체</option>
<c:forEach items="${FIM067List}" var="item"> <c:forEach items="${FIM067List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
@ -72,50 +70,48 @@
</div> </div>
<!-- 동적검색 --> <!-- 동적검색 -->
<div class="col-6"> <div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" /> <input type="hidden" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly /> <input type="text" class="form-control w-px-120 text-end fw-bold" name="byOutput" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" /> <input type="hidden" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" /> <input type="hidden" name="subOption" />
<input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" /> <input type="text" class="form-control w-px-400" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 --> <!-- 상세 검색조건 버튼 -->
<span class="flr"> <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> <i class="bx bx-chevron-down"></i>
상세검색 상세검색
</button> </button>
</span> </span>
</div> </div> <!-- 동적검색 -->
</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="row g-1">
<!-- 등록일자, 수정일자 -->
<div class="col-6"> <div class="col-6">
<select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt"> <select class="form-select w-px-120 text-center" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option> <option value="mdfcnDt">수정일자</option>
</select> </select>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom" <input type="text" class="form-control form-date" name="schRegDateFrom"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
~ ~
<input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo" <input type="text" class="form-control form-date" name="schRegDateTo"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" autocomplete="off" title="종료 날짜 선택">
<button type="button" class="bx bx-lg bx-calendar bg-white"></button> <button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<!-- 등록자명, 수정자명 -->
<div class="col-6"> <div class="col-6">
<select class="form-select w-px-120 text-center" id="schRgtrOpt--${pageName}" name="schRgtrOpt"> <select class="form-select w-px-120 text-center" name="schRgtrOpt">
<option value="rgtr">등록자</option> <option value="rgtr">등록자</option>
<option value="mdfr">수정자</option> <option value="mdfr">수정자</option>
</select> </select>
<input type="hidden" id="schRgtrCd--${pageName}" name="schRgtrCd" /> <input type="hidden" name="schRgtrCd" />
<input type="text" class="form-control w-px-160" id="schRgtrNm--${pageName}" name="schRgtrNm" /> <input type="text" class="form-control w-px-160" name="schRgtrNm" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnFindUser--${pageName}" title="사용자 검색">검색</button> <button type="button" class="btn btn-sm btn-outline-dark" name="btnFindUser" title="사용자 검색">검색</button>
</div> </div>
</div> </div>
</div> <!-- 상세 조건 --> </div> <!-- 상세 조건 -->
@ -124,16 +120,16 @@
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 --> <!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span class="dataTables_info" id="paging--${pageName}PagingInfo" 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" id="paging--${pageName}"> <ul class="pagination pagination-primary" name="dataPaging">
</ul> </ul>
</div> </div>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" id="btnRemove--${pageName}" title="계고장 발송 삭제"> <button type="button" class="btn btn-primary w-px-120" name="btnRemove" title="계고장 발송 삭제">
발송 삭제 발송 삭제
</button> </button>
</span> </span>
@ -143,21 +139,17 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}"> <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" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr id="theadTr--${pageName}" <tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}"> <template name="tmpltCols">
</tbody>
<template id="${infoPrefix}Col--${pageName}">
<th class="cmn" style="width: 72px;">No.</th> <th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" 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;" onclick="FimsSupport.searchFromGridTitle('TASK_SE_CD', this.innerText, 'codeValue', 'FIM054');">업무구분</th> <th class="cmn" style="width: 160px;">업무구분</th>
<th class="cmn" style="width: 120px;" onclick="FimsSupport.searchFromGridTitle('SNDNG_REG_SE_CD', this.innerText, 'codeValue', 'FIM067');">등록구분</th> <th class="cmn" style="width: 120px;" onclick="FimsSupport.searchFromGridTitle('SNDNG_REG_SE_CD', this.innerText, 'codeValue', 'FIM067');">등록구분</th>
<th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('SNDNG_SE_CD', this.innerText, 'codeValue', 'FIM067');">발송구분</th> <th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('SNDNG_SE_CD', this.innerText, 'codeValue', 'FIM067');">발송구분</th>
<th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('VLTN_ARTCL', this.innerText, 'match', 'part');">위반항목</th> <th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('VLTN_ARTCL', this.innerText, 'match', 'part');">위반항목</th>
@ -173,10 +165,12 @@
<th class="cmn" style="width: 140px;">수정사용자</th> <th class="cmn" style="width: 140px;">수정사용자</th>
<th class="cmn dummy-th"></th> <th class="cmn dummy-th"></th>
</template> </template>
<template id="${infoPrefix}Row--${pageName}"> <tbody name="tbodyList">
<tr data-key="{SNDNG_ID}"> </tbody>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td> <template is="curly-brackets" name="tmpltRows">
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="{SNDNG_ID}" onchange="pageObject['${pageName}'].control.select('{SNDNG_ID}', this.checked);" /></td> <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}">{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_REG_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_SE_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_SE_NM}</td>
@ -194,8 +188,23 @@
<td class="cmn dummy-td"></td> <td class="cmn dummy-td"></td>
</tr> </tr>
</template> </template>
<template id="${infoPrefix}NotFound--${pageName}"> <template name="tmpltNotFound">
<tr class="odd"> <tr class="bpv">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dpv">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="dvs">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="eca">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="pvs">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
<tr class="pes">
<td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="17" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
@ -206,17 +215,19 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> --> </div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> --> </div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<!-- / inner page html <div class="content-wrapper"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("sndb01030Script", wctx.url("/webjars/js/fims/sndb/sndb01030.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
@ -225,203 +236,78 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // URL
$P.formFields = new FimsFormFields("#frmSearch--${pageName}"); $P.prefixUrl = "${prefixUrl}";
// datasetControl
$P.ctrl = newSndb01030Control("${pageName}", "[data-doctx=${pageName}]");
/************************************************************************** /**************************************************************************
* DatasetControl * DataTables 이벤트
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ // dataTable 체크박스 클릭 이벤트
prefix: "wrngSndng" $P.dataTableCheckbox = (element, bool) => {
, prefixName: "계고장 발송 현황" GRID.checkbox.sync(element, bool);
, keymapper: info => info ? info.SNDNG_ID : ""
, dataGetter: obj => obj.${infoPrefix}List
, appendData: true
, infoSize: "xxl"
, formats: {
SNDNG_YMD: dateFormat
, SNDNG_END_YMD: dateFormat
, TNOCS: numberFormat
, GRAMT: 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;
/************************************************************************** let atLeastOne = GRID.checkbox.countChecked(element) > 0;
* DatasetControl 이벤트
**************************************************************************/
// 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})"
});
$P.$findn("btnRemove").prop("disabled", !atLeastOne);
}; Apply.toDataset.selection($P.ctrl.dataset, element, bool);
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.SNDNG_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
// 선택(체크) 변경 이벤트
$P.control.onSelectionChange = (selected) => {
let ${infoPrefix}List = $P.control.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#tbody--${pageName} input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});
// 삭제 버튼
$("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
// 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); // 체크 해제
} }
};
// 상세정보 dialog
$P.control.getInfo = (sndngId) => {
if (typeof sndngId == "undefined" || sndngId == null || sndngId == "") return;
let params = { // dataTable 클릭 이벤트
title: $P.control.prefixName + " 상세 정보" // 타이틀 $P.dataTableClick = (dataIndex) => {
, callPurpose: "view" // 호출 용도 if (!dataIndex) return;
, fetchSize: $P.control.defaultFetchSize // 한번에 조회되는 자료 건수
, pageNum: 1 // 페이지 번호
, sggCd: $("#sggCd--${pageName}").val() // 시군구 코드
, taskSeCd: $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val() // 업무 구분 코드
, sndngId: sndngId // 발송 ID
}
ajax.get({ $P.$findn("tbodyList").setCurrentRow(dataIndex);
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/040/info.do") + "?openerPageName=${pageName}"
, data: params || {}
, success: resp => {
dialog.open({
id: $P.control.prefixed("DtlDialog--${pageName}")
, title: params.title
, content: resp
, size: $P.control.infoSize
});
}
});
}
// 삭제 callback Apply.toDataset.current($P.ctrl.dataset, dataIndex);
$P.control.onRemove = (resp) => {
let btnTitle = $("#btnRemove--${pageName}").attr("title");
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, btnTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
if (resp.saved) { $P.fnRefreshList(); } // 자료 재조회
}
// 삭제
$P.control.remove = (params) => {
if (!params) return;
ajax.post({
url: wctx.url("/" + params.taskSeCd + "${infoPrefixUrl}" + "/030/remove.do")
, data: params
, success: resp => $P.control.onRemove(resp)
});
}
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("SNDNG_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].control.getInfo('" + dataItem.getValue("SNDNG_ID") + "');")
);
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); // dataTable 더블 클릭 이벤트
$P.dataTableDblClick = (dataIndex) => {
// checkbox 체크 해제 if (!dataIndex) return;
$("#DataTables_Table_0--${pageName} th input[type='checkbox']").prop("checked", false);
//보안모드 // 발송 ID 가 없다면.. 입력
fn_securityModeToggle($("#securityMode--top").is(":checked")); let sndngId = $P.ctrl.getValue("SNDNG_ID");
} if (!sndngId) return;
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트 let params = {
$P.scrollDataList = () => { btnTitle: $P.ctrl.prefixName + " 상세 정보"
, callPurpose: "update"
, sggCd: $P.ctrl.getValue("SGG_CD") // 시군구 코드
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD") // 업무 구분 코드
, sndngId: $P.ctrl.getValue("SNDNG_ID") // 발송 ID
, pageNum: 1 // 페이지 번호
, fetchSize: DEFAULT_FETCH_SIZE // 1번에 조회되는 건수
};
$P.control.load($P.control.query.pageNum + 1); $P.ctrl.getInfo(params);
} }
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 검색 자료 재조회
$P.fnRefreshList = () => {
$P.control.reload({all : true});
}
// 사용자검색 callback // 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => { $P.callbackFindUser = (userId, userNm) => {
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID $P.$findn("schRgtrCd").val(userId); // 사용자 ID
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명 $P.$findn("schRgtrNm").val(userNm); // 사용자 명
} }
// 삭제사유 callback // 삭제사유 callback
$P.callbackRsn = (obj) => { $P.callbackRsn = (obj) => {
// 서버에 전송할 data(파라미터) 생성 let selected = $P.ctrl.getDataset("selected"); // 선택 자료
let params = {};
let selected = $P.control.dataset.getKeys("selected");
params[$P.control.prefixed("Ids")] = selected.join(","); // IDs // 서버에 전송할 data(파라미터) 생성
params.sggCd = $("#sggCd--${pageName}").val(); // 시군구 코드 let params = {
params.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); // 업무 구분 코드 sggCd: $P.$findn("sggCd").val() // 시군구 코드
params.delRsn = obj.reason; // 삭제 사유 , taskSeCd: $P.$findn("frmSearch").find("[name='taskSeCd']:checked").val() // 업무 구분 코드
, sndngIds: selected.map(info => info.SNDNG_ID).join(",") // 발송 IDs
, btnTitle: obj.btnTitle // 버튼 title
, delRsn: obj.reason // 삭제 사유
};
$P.control.remove(params); $P.ctrl.remove(params);
} }
/************************************************************************** /**************************************************************************
@ -430,56 +316,85 @@
// 업무 구분 변경 // 업무 구분 변경
$P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드 // 업무 구분 코드
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") { if (!taskSeCd) {
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val(); taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
} }
// 초기 기본 설정 // 초기화
$P.initForm(taskSeCd); $P.fnReset(taskSeCd);
// 업무 구분별 설정
$P.setTask(taskSeCd);
// dataset 초기화 // 업무구분에 따른 URL 설정
$P.control.dataset.clear(); $P.ctrl.urls.load = wctx.url("/" + taskSeCd + $P.prefixUrl + "/030/list.do"); // 조회
$P.ctrl.urls.remove = wctx.url("/" + taskSeCd + $P.prefixUrl + "/030/remove.do"); // 삭제
$P.ctrl.urls.getInfo = wctx.url("/" + taskSeCd + $P.prefixUrl + "/040/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()); // 업무별 버튼
// 업무별 그리드 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 = () => { $P.fnGetFindUser = () => {
let params = { let params = {
openerPageName: "${pageName}" callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
, callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
} }
ajax.get({ ajax.get({
url: wctx.url("/user/user02/010/main.do") + "?openerPageName=${pageName}" url: wctx.url("/user/user02/010/main.do")
, data: params || {} , data: params || {}
, success: resp => { , success: (resp) => {
let dialogName = "userDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({ dialog.open({
id: "userDialog--${pageName}" id: dialogId
, title: "사용자 검색" , title: "사용자 검색"
, content: resp
, size: "lg" , size: "lg"
, init: () => { AppSupport.setDialogZindex(); } , content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { }
}); });
} }
}); });
} }
// 검색 버튼 이벤트 // 검색 버튼 클릭 이벤트
$P.fnSearchList = () => { $P.fnSearchList = () => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색조건 // 검색조건
$P.control.query = $P.formFields.get(); $P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 $P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.control.query.sndngSeCdFrom = "11"; // 발송 구분 코드 - 11 계고장 $P.ctrl.query.sndngSeCdFrom = "11"; // 발송 구분 코드 - 11 계고장
$P.control.query.sndngSeCdTo = "12"; // 발송 구분 코드 - 12 계고장 구형표지 $P.ctrl.query.sndngSeCdTo = "12"; // 발송 구분 코드 - 12 계고장 구형표지
$P.control.query.delYn = "N"; // 삭제 여부 $P.ctrl.query.delYn = "N"; // 삭제 여부
$P.control.load(1); $P.ctrl.load(1);
} }
// 엑셀 버튼 이벤트 // 엑셀 버튼 클릭 이벤트
$P.fnExcel = () => { $P.fnExcel = () => {
if ($P.control.dataset.empty) { if ($P.ctrl.dataset.empty) {
dialog.alert({ dialog.alert({
content: "검색된 자료가 없습니다." content: "검색된 자료가 없습니다."
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
@ -489,23 +404,21 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") $P.ctrl.query.cellDefs =
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)") 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); , FimsSupport.getCellDefsForPrivacyCell);
$P.control.query.cellDefs = cellDefs; $P.ctrl.download();
$P.control.download();
} }
// 삭제 버튼 이벤트 // 삭제 버튼 클릭 이벤트
$P.fnRemove = (title) => { $P.fnRemove = (btnTitle) => {
// 선택 자료 let selected = $P.ctrl.getDataset("selected"); // 선택 자료
let selected = $P.control.dataset.getKeys("selected");
if (selected.length < 1) { if (selected.length < 1) {
dialog.alert({ dialog.alert({
content: "선택하신 " + $P.control.prefixName + " 정보가 없습니다." content: "선택하신 " + $P.ctrl.prefixName + " 정보가 없습니다."
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
}); });
@ -514,7 +427,7 @@
// 삭제 메세지 확인 // 삭제 메세지 확인
dialog.alert({ dialog.alert({
content: "선택하신 " + selected.length + "건의 " + $P.control.prefixName + " 정보를 삭제하시겠습니까?" content: "선택하신 " + selected.length + "건의 " + $P.ctrl.prefixName + " 정보를 삭제하시겠습니까?"
, onOK: () => { , onOK: () => {
// 삭제 사유 입력 // 삭제 사유 입력
fetch(wctx.url("/webjars/html/inputRsnDialog.html")) fetch(wctx.url("/webjars/html/inputRsnDialog.html"))
@ -522,12 +435,15 @@
.then(function(template) { .then(function(template) {
dialog.open({ dialog.open({
id: "inputDelRsnDialog" id: "inputDelRsnDialog"
, title: title , title: "삭제 사유"
, size: "lg" , size: "lg"
, content: template , content: template
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.callbackRsn({ reason: $("#reason").val() }); $P.callbackRsn({
btnTitle: btnTitle // 버튼 title
, reason: $("#reason").val() // 삭제 사유
});
} }
}); });
}); });
@ -541,86 +457,50 @@
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
// 기본 버튼 이벤트 // 기본 버튼 이벤트
$("#btnReset--${pageName}").on("click", () => $P.fnResetAndChangeBiz()); // 초기화 $P.$findn("btnReset").on("click", () => $P.fnResetAndChangeBiz()); // 초기화
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); // 검색 $P.$findn("btnSearch").on("click", () => $P.fnSearchList()); // 검색
$("#btnExcel--${pageName}").on("click", () => $P.fnExcel()); // 엑셀 $P.$findn("btnExcel").on("click", () => $P.fnExcel()); // 엑셀
$("#btnFindUser--${pageName}").on("click", () => $P.fnGetFindUser()); // 사용자 검색 $P.$findn("btnFindUser").on("click", () => $P.fnGetFindUser()); // 사용자 검색
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다. // 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress(function() { $P.$findn("term").onEnterPress($P.fnSearchList);
$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);
}
});
});
// 버튼 이벤트 // 버튼 이벤트
$("#btnRemove--${pageName}").on("click", function() { $P.$findn("btnRemove").on("click", function() {
$P.fnRemove($(this).attr("title")); // 계고장 발송 삭제 $P.fnRemove($P.$findn("btnRemove").attr("title")); // 삭제
}); });
// DataTables width 변경 조정 // DataTables width 변경 조정
Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList); Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
} }
// 초기 화면 설정 // 초기화 이벤트
$P.initForm = (taskSeCd) => { $P.fnReset = (taskSeCd) => {
// 화면 초기화 // 초기화
$("#frmSearch--${pageName}")[0].reset(); $P.findn("frmSearch").reset(); // 화면 초기화
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// input, select 초기화 // 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='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false); searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val(""); searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val(""); searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); }); 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}"); // 시군구 코드 $P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true); // 업무 구분 코드 $P.$findn("frmSearch").find("input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true); // 업무 구분 코드
AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화 $P.$findn("schSndngYmdFrom").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schSndngYmdFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); $P.$findn("schSndngYmdTo").datepicker("setDate", TODAY()); // 부과 제외 일자 종료
$("#schSndngYmdTo--${pageName}").datepicker("setDate", new Date()); $P.$findn("byOutput").val("동적 검색"); // 동적 검색
$("#byOutput--${pageName}").val("동적 검색"); // 동적 검색 $P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름
$("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름
}
// 업무 구분별 설정
$P.setTask = (taskSeCd) => {
// 업무구분에 따른 URL 설정
$P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/list.do"); // 조회
// 업무별 조회 조건
FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase());
// 업무별 그리드 th
let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content;
let cols = $(colContent).find("." + taskSeCd.toLowerCase() + ",.cmn");
let colsOuterHTML = "";
cols.each(function() { // dataset 초기화
colsOuterHTML += this.outerHTML; $P.ctrl.dataset.clear();
});
$("#table-responsive--${pageName}")[0].changeColumn(colsOuterHTML);
} }
/************************************************************************** /**************************************************************************

@ -3,36 +3,35 @@
<c:set var="prefixName" scope="request">계고장 발송 현황 상세 정보</c:set> <c:set var="prefixName" scope="request">계고장 발송 현황 상세 정보</c:set>
<!-- inner page html --> <!-- Inner page html -->
<div class="wrapper-pop"> <div class="content-wrapper" data-doctx="${pageName}">
<!-- Content --> <!-- Content -->
<div class="container flex-grow-1 px-0"> <div class="container flex-grow-1 px-0">
<!-- Page Body --> <!-- Page Body -->
<div class="card"> <div class="card wrapper-pop">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit"> <form name="frmEdit">
<input type="hidden" id="sggCd--${pageName}" name="sggCd" /> <input type="hidden" name="sggCd" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" /> <input type="hidden" name="taskSeCd" />
<input type="hidden" id="sndngId--${pageName}" name=sndngId /> <input type="hidden" name="sndngId" />
</form> </form>
<!-- 입력 영역 --> <!-- 입력 영역 -->
<!-- 업무 버튼 및 건수 표시 --> <!-- 업무 버튼 및 건수 표시 -->
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 --> <!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span class="dataTables_info" id="paging--${pageName}PagingInfo" 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" id="paging--${pageName}"> <ul class="pagination pagination-primary" name="dataPaging">
</ul> </ul>
</div> </div>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<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> </button>
<button type="button" class="btn btn-primary w-px-120" id="btnPrintWrng--${pageName}" title="계고장 출력"> <button type="button" class="btn btn-primary w-px-120" name="btnPrintWrng" title="계고장 출력">
계고장 출력 계고장 출력
</button> </button>
</span> </span>
@ -41,12 +40,11 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}"> <div class="table-responsive ox-scroll oy-scroll h-px-300" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr id="theadTr--${pageName}" <tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">No.</th> <th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 120px;">발송상태</th> <th class="cmn" style="width: 120px;">발송상태</th>
<th class="cmn" style="width: 160px;">등기번호</th> <th class="cmn" style="width: 160px;">등기번호</th>
@ -73,37 +71,37 @@
<th class="cmn dummy-th"></th> <th class="cmn dummy-th"></th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}"> <tbody name="tbodyList">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template is="curly-brackets" name="tmpltRows">
<tr data-key="{SNDNG_DTL_ID}"> <tr data-index="{data-index}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td> <td class="cmn text-center" onclick ondblclick">{ROW_NUM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_DTL_STTS_NM}</td> <td class="cmn text-center" onclick ondblclick">{SNDNG_DTL_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RG_NO}</td> <td class="cmn text-center" onclick ondblclick">{RG_NO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_YMD}</td> <td class="cmn text-center" onclick ondblclick">{SNDNG_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DUDT_YMD}</td> <td class="cmn text-center" onclick ondblclick">{DUDT_YMD}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RCPN_NM}</td> <td class="cmn text-start" onclick ondblclick">{RCPN_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RCPN_ZIP}</td> <td class="cmn text-center" onclick ondblclick">{RCPN_ZIP}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RCPN_ADDR}</td> <td class="cmn text-start" onclick ondblclick">{RCPN_ADDR}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RCPN_DTL_ADDR}</td> <td class="cmn text-start" onclick ondblclick">{RCPN_DTL_ADDR}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DLVR_YMD}</td> <td class="cmn text-center" onclick ondblclick">{DLVR_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DLVR_TM}</td> <td class="cmn text-center" onclick ondblclick">{DLVR_TM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{UNDLVR_RSN_NM}</td> <td class="cmn text-start" onclick ondblclick">{UNDLVR_RSN_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ACTL_RCPN_NM}</td> <td class="cmn text-start" onclick ondblclick">{ACTL_RCPN_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RCPN_REL_NM}</td> <td class="cmn text-start" onclick ondblclick">{RCPN_REL_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_DT}</td> <td class="cmn text-center" onclick ondblclick">{CRDN_DT}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td> <td class="cmn text-start" onclick ondblclick">{VHRNO}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STDG_NM}</td> <td class="cmn text-start" onclick ondblclick">{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td> <td class="cmn text-start" onclick ondblclick">{CRDN_PLC}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{FFNLG_AMT}</td> <td class="cmn text-end" onclick ondblclick">{FFNLG_AMT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td> <td class="cmn text-center" onclick ondblclick">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td> <td class="cmn text-center" onclick ondblclick">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td> <td class="cmn text-center" onclick ondblclick">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td> <td class="cmn text-center" onclick ondblclick">{MDFR_NM}</td>
<td class="cmn dummy-td"></td> <td class="cmn dummy-td"></td>
</tr> </tr>
</template> </template>
<template id="${infoPrefix}NotFound--${pageName}"> <template name="tmpltNotFound">
<tr class="odd"> <tr class="odd">
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
@ -114,17 +112,18 @@
</div> <!-- DataTables(그리드) --> </div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
<!-- Page Body --> <!-- Page Body -->
</div> <!-- <div class="container flex-grow-1 px-0"> --> </div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content --> <!-- / Content -->
</div> </div>
<!-- / inner page html <div class="wrapper-pop"> --> <!-- / Inner page html -->
<script> <script>
LoadScript("sndb01040Script", wctx.url("/webjars/js/fims/sndb/sndb01040.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
@ -133,123 +132,70 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// URL
$P.prefixUrl = "${prefixUrl}";
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정) // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}"; $P.callPurpose = "${callPurpose}";
// FormFields // datasetControl
$P.formFields = new FimsFormFields("#frmEdit--${pageName}"); $P.ctrl = newSndb01040Control("${pageName}", "[data-doctx=${pageName}]");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "wrngSndngDtl"
, prefixName: "계고장 발송 상세"
, keymapper: info => info ? info.SNDNG_DTL_ID : ""
, dataGetter: obj => obj.${infoPrefix}List
, appendData: true
, formats: {
SNDNG_YMD: dateFormat
, DUDT_YMD: dateFormat
, FFNLG_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 이벤트
**************************************************************************/
// 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})"
});
};
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.SNDNG_DTL_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
/************************************************************************** /**************************************************************************
* DataTables 이벤트 * DataTables 이벤트
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트 // dataTable 클릭 이벤트
$P.renderList = (totalSize, option) => { $P.dataTableClick = (dataIndex) => {
let ${infoPrefix}List = $P.control.dataset; if (!dataIndex) return;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("SNDNG_DTL_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
);
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); $P.$findn("tbodyList").setCurrentRow(dataIndex);
Apply.toDataset.current($P.ctrl.dataset, dataIndex);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
} }
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트 // dataTable 더블 클릭 이벤트 - 개별총정보 dialog
$P.scrollDataList = () => { $P.dataTableDblClick = (dataIndex) => {
if (!dataIndex) return;
$P.control.load($P.control.query.pageNum + 1); // 단속 ID
} let crdnId = $P.ctrl.getValue("CRDN_ID");
if (!crdnId) return;
// DataTables에 더블 클릭시 개별총정보 dialog
$P.getTotalInfo = (crdnId) => {
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
let params = { let params = {
callControlName: "pageObject['${pageName}'].control" callPageName: "${pageName}"
, sggCd: $P.control.dataset.getValue("SGG_CD") , callPurpose: "view"
, taskSeCd: $P.control.dataset.getValue("TASK_SE_CD") , sggCd: $P.ctrl.getValue("SGG_CD")
, crdnId: crdnId , taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: $P.ctrl.getValue("CRDN_ID")
} }
ajax.get({ ajax.get({
url: wctx.url("/sprt/sprt02/010/main.do") url: wctx.url("/sprt/sprt02/010/main.do")
, data: params , data: params || {}
, success: resp => { , success: (resp) => {
let dialogName = "totalInfoMainDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({ dialog.open({
id: "totalInfoMainDialog" id: dialogId
, title: "개별총정보" , title: "개별총정보"
, content: resp
, size: "xxl" , size: "xxl"
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
AppSupport.setDialogZindex();
}
, onClose: () => { }
}); });
} }
}); });
} }
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.ctrl.load($P.ctrl.query.pageNum + 1);
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
@ -267,9 +213,9 @@
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 엑셀 버튼 이벤트 // 엑셀 버튼 클릭 이벤트
$P.fnExcel = () => { $P.fnExcel = () => {
if ($P.control.dataset.empty) { if ($P.ctrl.dataset.empty) {
dialog.alert({ dialog.alert({
content: "검색된 자료가 없습니다." content: "검색된 자료가 없습니다."
, init: () => { AppSupport.setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
@ -278,30 +224,27 @@
return; return;
} }
// 검색조건
$P.control.query = $P.formFields.get(); // 검색 조건
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부
// DataTables(그리드) // DataTables(그리드)
let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") $P.ctrl.query.cellDefs =
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)") 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); , FimsSupport.getCellDefsForPrivacyCell);
$P.control.query.cellDefs = cellDefs; $P.ctrl.download();
$P.control.download();
} }
// 계고장출력 버튼 이벤트 // 계고장출력 버튼 이벤트
$P.fnPrint = () => { $P.fnPrint = () => {
// validate 확인 // validate 확인
if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return;
dialog.alert({ dialog.alert({
content: $P.control.prefixName + " 정보를 출력하시겠습니까?" content: "현재 " + $P.ctrl.prefixName + " 정보를 출력하시겠습니까?"
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.print($P.formFields.get()); let params = new FimsFormFields($P.selectorn("frmEdit")).get(); // formFields
$P.print(params);
} }
}); });
} }
@ -312,48 +255,37 @@
// 이벤트 설정 // 이벤트 설정
$P.setEvent = () => { $P.setEvent = () => {
// 기본 버튼 이벤트 // 기본 버튼 이벤트
$("#btnExcel--${pageName}").on("click", () => $P.fnExcel()); // 엑셀 $P.$findn("btnExcel").on("click", () => $P.fnExcel()); // 엑셀
// 업무 버튼 이벤트 // 버튼 이벤트
$("#btnPrintWrng--${pageName}").on("click", function() { $P.$findn("btnPrintWrng").on("click", function() {
$P.fnPrint($(this).attr("title")); // 계고장 출력 $P.fnPrint($P.$findn("btnPrintWrng").attr("title")); // 출력
}); });
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// DataTables 스크롤을 위해서 다이얼로그 화면이 생성된 후 Dataset을 설정한다. // DataTables 스크롤을 위해서 다이얼로그 화면이 생성된 후 Dataset을 설정한다.
$("#${infoPrefix}Dialog--${openerPageName}").on("shown.bs.modal", function (e) { let modalId = $(document.querySelector("[data-doctx='${pageName}']")).parents(".modal")[0].id;
$P.control.setData({ $("#" + modalId).on("shown.bs.modal", function (e) {
${infoPrefix}List: ${wrngSndngDtlList} $P.ctrl.setData( {List: ${List}, Paging :${Paging}} );
, ${infoPrefix}Start: ${wrngSndngDtlStart}
, ${infoPrefix}Fetch: ${wrngSndngDtlFetch}
, ${infoPrefix}Total: ${wrngSndngDtlTotal}
});
}); });
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
} }
// 초기 화면 설정 // 초기화 이벤트
$P.initForm = () => { $P.fnReset = (taskSeCd) => {
// 화면 초기화 // 초기화
$("#frmEdit--${pageName}")[0].reset(); $P.findn("frmSearch").reset(); // 화면 초기화
// 기본 데이터 설정 // 기본 데이터 설정
$("#sggCd--${pageName}").val("${sggCd}"); // 시군구 코드 $P.$findn("sggCd").val("${sggCd}"); // 시군구 코드
$("#taskSeCd--${pageName}").val("${taskSeCd}"); // 업무 구분 코드 $P.$findn("taskSeCd").val("${taskSeCd}"); // 업무 구분 코드
$("#sndngId--${pageName}").val("${sndngId}"); // 발송 ID $P.$findn("sndngId").val("${sndngId}"); // 발송 ID
// 업무 구분별 설정
$P.setTask("${taskSeCd}");
}
// 업무 구분별 설정
$P.setTask = (taskSeCd) => {
// 업무 구분에 따른 URL 설정 // 업무 구분에 따른 URL 설정
$P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/list.do"); // 조회 $P.ctrl.urls.create = wctx.url("/" + "${taskSeCd}" + $P.prefixUrl + "/040/list.do"); // 조회
} }
/************************************************************************** /**************************************************************************
@ -363,7 +295,7 @@
$P.setEvent(); $P.setEvent();
// 2. 초기 화면 설정 // 2. 초기 화면 설정
$P.initForm(); $P.fnReset();
// 3. 보안모드 // 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));

@ -133,6 +133,12 @@
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">처리 상태 이력</label> <label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">처리 상태 이력</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<label>
<input type="checkbox" name="unusedInq" class="form-check-input" onchange="pageObject['${pageName}'].fnRefresh(this.checked);"/>미사용조회
</label>
</span>
</div> </div>
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
@ -143,9 +149,11 @@
<tr name="theadTrCrdnSttsHstry" data-search-target="[data-doctx='${pageName}']"> <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: 180px;" data-field="REG_DT">등록일시</th>
<th class="cmn sorting" style="width: 120px;" data-field="RGTR_NM">등록사용자</th> <th class="cmn sorting" style="width: 120px;" data-field="RGTR_NM">등록사용자</th>
<th class="cmn sorting" style="width: 100px;" data-field="USE_YN_NM">사용여부</th>
<th class="cmn sorting" style="width: 160px;" data-field="CRDN_STTS_NM">단속상태</th> <th class="cmn sorting" style="width: 160px;" data-field="CRDN_STTS_NM">단속상태</th>
<th class="cmn sorting" style="width: 280px;" data-field="ETC_CN">기타내용</th> <th class="cmn sorting" style="width: 280px;" data-field="ETC_CN">기타내용</th>
<th class="cmn sorting" style="width: 100px;" data-field="USE_YN_NM">사용여부</th> <th class="cmn sorting" style="width: 180px;" data-field="MDFCN_DT">수정일시</th>
<th class="cmn sorting" style="width: 120px;" data-field="MDFR_NM">수정사용자</th>
<th class="cmn dummy-th"></th> <th class="cmn dummy-th"></th>
</tr> </tr>
</thead> </thead>
@ -155,15 +163,17 @@
<tr data-key="{data-index}"> <tr data-key="{data-index}">
<td class="cmn text-center" onclick="{onclick}">{REG_DT}</td> <td class="cmn text-center" onclick="{onclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td> <td class="cmn text-center" onclick="{onclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{USE_YN_NM}</td>
<td class="cmn text-center" onclick="{onclick}">{CRDN_STTS_NM}</td> <td class="cmn text-center" onclick="{onclick}">{CRDN_STTS_NM}</td>
<td class="cmn text-start" onclick="{onclick}">{ETC_CN}</td> <td class="cmn text-start" onclick="{onclick}">{ETC_CN}</td>
<td class="cmn text-center" onclick="{onclick}">{USE_YN_NM}</td> <td class="cmn text-center" onclick="{onclick}">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}">{MDFR_NM}</td>
<td class="cmn dummy-td"></td> <td class="cmn dummy-td"></td>
</tr> </tr>
</template> </template>
<template name="tmpltNotFoundCrdnSttsHstry"> <template name="tmpltNotFoundCrdnSttsHstry">
<tr class="odd"> <tr class="odd">
<td valign="top" colspan="6" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td> <td valign="top" colspan="8" class="dataTables_empty text-center">처리상태 이력 정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
</table> </table>
@ -278,18 +288,24 @@
} }
// 정보 새로고침 // 정보 새로고침
$P.fnRefresh = () => { $P.fnRefresh = (crdnSttsHstryUseYn) => {
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; let ctrlMain = pageObject["${pageNameMain}"].ctrlMain;
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
if (!crdnId) return; if (!crdnId) return;
let unusedInq = "N";
if (crdnSttsHstryUseYn == true) {
unusedInq = "Y";
}
let params = { let params = {
callPurpose: "refresh" callPurpose: "refresh"
, sggCd: ctrlMain.getValue("SGG_CD") , sggCd: ctrlMain.getValue("SGG_CD")
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") , taskSeCd: ctrlMain.getValue("TASK_SE_CD")
, crdnId: ctrlMain.getValue("CRDN_ID") , crdnId: ctrlMain.getValue("CRDN_ID")
, unusedInq: unusedInq
, delYn: "N" , delYn: "N"
}; };

@ -10,8 +10,6 @@ function newExcl01010Control(pageName, doctx="[data-doctx='excl01010']") {
, urls: { , urls: {
load: "/list.do" load: "/list.do"
, getInfo: "/info.do" , getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do" , remove: "/remove.do"
} }
, formats: { , formats: {

@ -6,11 +6,8 @@ function newExcl01020Control(pageName, doctx="[data-doctx='excl01020']") {
, dataGetter: obj => obj["Info"] , dataGetter: obj => obj["Info"]
, keys: ["LEVY_EXCL_ID"] , keys: ["LEVY_EXCL_ID"]
, urls: { , urls: {
load: "/list.do" create: "/create.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do" , update: "/update.do"
, remove: "/remove.do"
} }
}); });

@ -0,0 +1,149 @@
function newSndb01030Control(pageName, doctx="[data-doctx='sndb01030']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "wrngSndng"
, prefixName: "계고장 발송 현황"
, dataGetter: obj => obj["List"]
, keys: ["SNDNG_ID"]
, appendData: true
, infoSize: "xxl"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, remove: "/remove.do"
}
, formats: {
SNDNG_YMD: dateFormat
, SNDNG_END_YMD: dateFormat
, TNOCS: numberFormat
, GRAMT: 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='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,96 @@
function newSndb01040Control(pageName, doctx="[data-doctx='sndb01040']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "wrngSndng"
, prefixName: "계고장 발송 현황"
, dataGetter: obj => obj["List"]
, keys: ["SNDNG_DTL_ID"]
, appendData: true
, urls: {
load: "/list.do"
}
, formats: {
SNDNG_YMD: dateFormat
, DUDT_YMD: dateFormat
, FFNLG_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
**************************************************************************/
ctrl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrl.dataset;
let empty = dataList.empty;
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").innerHTML]
: dataList.inStrings(ctrl.find("[name='tmpltRows']").innerHTML, 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
ctrl.pagingSupport.setPagingInfo(obj);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
};
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']"));
};
// 저장 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.create
, data: params || {}
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
return ctrl;
}

@ -191,6 +191,7 @@ function newSprt02050ControlCSH(pageName, doctx="[data-doctx='sprt02050']", main
} }
, formats: { , formats: {
REG_DT: datetimeFormat REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
} }
}); });

Loading…
Cancel
Save