|
|
|
@ -17,20 +17,22 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<form id="frmSearch--${pageName}" name="frmSearch">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<input type="hidden" id="sggCd--${pageName}" name="sggCd" />
|
|
|
|
|
|
|
|
|
|
<div class="container-search">
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label class="form-label fw-bold form-search-title">업무구분</label>
|
|
|
|
|
<span class="form-search-linebox">
|
|
|
|
|
<c:forEach items="${TaskListForSgg}" var="item">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end">업무구분</label>
|
|
|
|
|
<span class="form-search-linebox">
|
|
|
|
|
<c:forEach items="${taskListForSgg}" var="item">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="taskSeCd" type="radio" value="${item.code}"
|
|
|
|
|
class="form-check-input" alt="업무구분"
|
|
|
|
|
onchange="pageObject['${pageName}'].fnResetAndChangeBiz(this.value);">
|
|
|
|
|
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분"
|
|
|
|
|
value="${item.code}" onchange="pageObject['${pageName}'].fnResetAndChangeBiz(this.value);">
|
|
|
|
|
${item.value}
|
|
|
|
|
</label>
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 감경 일자 -->
|
|
|
|
|
<div class="col-6">
|
|
|
|
@ -63,283 +65,679 @@
|
|
|
|
|
<label class="form-label fw-bold form-search-title">차량번호</label>
|
|
|
|
|
<input type="text" class="form-control w-px-150" id="schVhrno--${pageName}" name="schVhrno" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<input type="hidden" id="by--${pageName}" name="by" />
|
|
|
|
|
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
|
|
|
|
|
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
|
|
|
|
|
<input type="hidden" id="subOption--${pageName}" name="subOption" />
|
|
|
|
|
<input type="text" id="term--${pageName}" name="term" class="form-control w-px-300" />
|
|
|
|
|
<!-- 상세 검색조건 버튼 -->
|
|
|
|
|
<span class="flr">
|
|
|
|
|
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
|
|
|
|
|
<i class="bx bx-chevron-down"></i>
|
|
|
|
|
상세검색
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 상세 조건 -->
|
|
|
|
|
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<!-- 등록일자, 수정일자 -->
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<select class="form-select text-center" id="schRegDateOpt--${pageName}" 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="시작 날짜 선택" />
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
~
|
|
|
|
|
<input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
|
|
|
|
|
data-fmt-type="day" title="종료 날짜 선택">
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 등록자명, 수정자명 -->
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<select class="form-select text-center" id="schRgtrOpt--${pageName}" 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" id="schRgtrNm--${pageName}" name="schRgtrNm" />
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-dark" id="btnFindUser--${pageName}" title="사용자 검색">
|
|
|
|
|
검색
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div> <!-- / 상세 조건 -->
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<!-- 업무 버튼 및 건수 표시 -->
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<div class="d-flex flex-row justify-content-between">
|
|
|
|
|
<label id="rductPaging--${pageName}PagingInfo" class="dataTables_info"
|
|
|
|
|
role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="rductPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
<label id="paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="paging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
|
|
|
|
|
<!-- 업무 버튼 -->
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnUpdate--${pageName}" title="부과제외 수정">
|
|
|
|
|
수정
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnRemove--${pageName}" title="부과제외 삭제">
|
|
|
|
|
삭제
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
|
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
|
<div id="table-responsive--${pageName}" class="table-responsive"
|
|
|
|
|
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
|
|
|
|
|
<table id="DataTables_Table_0--${pageName}"
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr id="rductTheadTr--${pageName}"
|
|
|
|
|
data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
|
|
|
|
|
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;">No.</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('RDUCT_YMD',this.innerText,'ymd','');" style="min-width: 80px;">감액일자</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('RDUCT_RSN_CD',this.innerText,'codeValue','FIM019');" style="min-width: 80px;">감액사유</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('CRDN_YMD','접수(위반)일자','ymd','');" style="min-width: 80px;">접수(위반)일시</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');" style="min-width: 80px;">차량번호</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('FFNLG_CRDN_AMT',this.innerText,'match','perfect');">과태료단속원금</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('RDUCT_AMT',this.innerText,'match','perfect');">감경금액</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('FFNLG_AMT',this.innerText,'match','perfect');">과태료금액</th>
|
|
|
|
|
<th class="text-orange" style="min-width: 80px;">미납금액</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('ETC_CN',this.innerText,'match','part');" style="min-width: 80px;">감경특기사항</th>
|
|
|
|
|
<th onclick="searchFromGridTitle('CRDN_STTS_CD',this.innerText,'codeValue','FIM010');" style="min-width: 80px;">처리상태</th>
|
|
|
|
|
<!-- / 업무 버튼 및 건수 표시 -->
|
|
|
|
|
|
|
|
|
|
<!-- DataTables(그리드) -->
|
|
|
|
|
<!-- 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" id="table-responsive--${pageName}" style="overflow-x:scroll; height:460px; overflow-y:scroll;" >
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" 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>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--${pageName}">
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
|
|
<template id="${infoPrefix}Col--${pageName}">
|
|
|
|
|
<th class="cmn" style="width: 72px;">No.</th>
|
|
|
|
|
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" onchange="pageObject['${pageName}'].control.select(this.checked);" /></th>
|
|
|
|
|
<th class="cmn" style="width: 160px;">업무구분</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('RDUCT_YMD', this.innerText, 'ymd', '');">감경일자</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;" onclick="searchFromGridTitle('RDUCT_RSN_CD', this.innerText, 'codeValue', 'FIM019');">감경사유</th>
|
|
|
|
|
<th class="cmn" style="width: 280px;" onclick="searchFromGridTitle('ETC_CN', this.innerText, 'match', 'part');">감경특기사항</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;" onclick="searchFromGridTitle('CRDN_YMD', this.innerText, 'ymd', '');">단속일시</th>
|
|
|
|
|
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('VHRNO', this.innerText, 'match', 'part');">차량번호</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('RTPYR_SE_CD', this.innerText, 'codeValue', 'FIM011');">납부자구분</th>
|
|
|
|
|
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('RTPYR_NO', this.innerText, 'ymd', '');">납부자번호</th>
|
|
|
|
|
<th class="cmn" style="width: 200px;" onclick="searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'part');">납부자명</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('CRDN_STDG_NM', this.innerText, 'match', 'part');">단속법정동</th>
|
|
|
|
|
<th class="cmn" style="width: 280px;" onclick="searchFromGridTitle('CRDN_PLC', this.innerText, 'match', 'part');">단속장소</th>
|
|
|
|
|
<th class="bpv" style="width: 280px;" onclick="searchFromGridTitle('DTL_CRDN_PLC', this.innerText, 'match', 'part');">상세단속장소</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('FFNLG_CRDN_AMT', this.innerText, 'match', 'perfect');">단속금액</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('RDUCT_AMT', this.innerText, 'match', 'perfect');">감경금액</th>
|
|
|
|
|
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('FFNLG_AMT', this.innerText, 'match', 'perfect');">과태료금액</th>
|
|
|
|
|
<th class="cmn text-orange" style="width: 120px;">미납금액</th>
|
|
|
|
|
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('CRDN_STTS_CD' ,this.innerText, 'codeValue', 'FIM010');">처리상태</th>
|
|
|
|
|
<th class="pvs" style="width: 140px;" onclick="searchFromGridTitle('CRDN_SPAREA_CD', this.innerText, 'codeValue', 'FIM007');">단속특별구역</th>
|
|
|
|
|
<th class="eca" style="width: 140px;" onclick="searchFromGridTitle('USE_FUEL_CD', this.innerText, 'codeValue', 'LVS005');">사용연료</th>
|
|
|
|
|
<th class="dpv" style="width: 140px;" onclick="searchFromGridTitle('PARKNG_PSBLTY_RSLT_CD', this.innerText, 'codeValue', 'FIM034');">주차가능여부</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;">등록일시</th>
|
|
|
|
|
<th class="cmn" style="width: 140px;">등록사용자</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;">수정일시</th>
|
|
|
|
|
<th class="cmn" style="width: 140px;">수정사용자</th>
|
|
|
|
|
<th class="cmn dummy-th"></th>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
|
<tr data-key="{RDUCT_ID}">
|
|
|
|
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
|
|
|
|
<td class="cmn text-center"><input type="checkbox" class="form-check-input" value="{RDUCT_ID}" onchange="pageObject['${pageName}'].control.select('{RDUCT_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}">{RDUCT_YMD}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RDUCT_RSN_NM}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ETC_CN}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_SE_NM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NO}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
|
|
|
|
|
<td class="cmn text-center" 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_CRDN_AMT}</td>
|
|
|
|
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RDUCT_AMT}</td>
|
|
|
|
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{FFNLG_AMT}</td>
|
|
|
|
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{SUM_AMT}</td>
|
|
|
|
|
<td class="cmn text-center" 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}">{PARKNG_PSBLTY_RSLT_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 dummy-td"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="${infoPrefix}NotFound--${pageName}">
|
|
|
|
|
<tr class="bpv">
|
|
|
|
|
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dpv">
|
|
|
|
|
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="rductTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="rductRow--${pageName}">
|
|
|
|
|
<tr data-key="{CRDN_ID}">
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{RDUCT_YMD}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{RDUCT_RSN_NM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD_TM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{FFNLG_CRDN_AMT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{RDUCT_AMT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{FFNLG_AMT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{SUM_AMT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{ETC_CN}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STTS_CD}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="rductNotFound--${pageName}">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="11" class="dataTables_empty text-center">과태료 감경 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<tr class="eca">
|
|
|
|
|
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="pvs">
|
|
|
|
|
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="tpv">
|
|
|
|
|
<td valign="top" colspan="24" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- DataTables(그리드) -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Content -->
|
|
|
|
|
|
|
|
|
|
<div class="content-backdrop fade"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- / inner page html <div class="content-wrapper"> -->
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
var FIM010 = new CommonCodes(${FIM010});
|
|
|
|
|
var FIM019 = new CommonCodes(${FIM019});
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* script 진입
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
// URL
|
|
|
|
|
$P.PrefixUrl = "/levy/levy02";
|
|
|
|
|
// FormFields
|
|
|
|
|
$P.formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control = new DatasetControl({
|
|
|
|
|
prefix : "rduct"
|
|
|
|
|
, prefixName : "감경"
|
|
|
|
|
, infoSize : "lg"
|
|
|
|
|
, keymapper : info => info ? info.RDUCT_ID : ""
|
|
|
|
|
, dataGetter : obj => obj.${infoPrefix}List
|
|
|
|
|
, appendData : true
|
|
|
|
|
, formats: {
|
|
|
|
|
RDUCT_YMD : dateFormat,
|
|
|
|
|
CRDN_YMD_TM : datetimeFormat,
|
|
|
|
|
FFNLG_CRDN_AMT : numberFormat,
|
|
|
|
|
RDUCT_AMT : numberFormat,
|
|
|
|
|
FFNLG_AMT : numberFormat,
|
|
|
|
|
SUM_AMT : numberFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.control.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.control.untilPageNum = 0;
|
|
|
|
|
$P.control.beforeCurrent = null;
|
|
|
|
|
$P.control.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control.onDatasetChange = (obj) => {
|
|
|
|
|
$P.renderList(obj.${infoPrefix}Total);
|
|
|
|
|
|
|
|
|
|
$("#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.tableRenderComplete = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.control.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
let key = item.data.RDUCT_ID;
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 선택(체크) 변경 이벤트
|
|
|
|
|
$P.control.onSelectionChange = (selected) => {
|
|
|
|
|
let ${infoPrefix}List = $P.control.dataset;
|
|
|
|
|
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
$("#tbody--${pageName} input[type='checkbox']").each(function() {
|
|
|
|
|
let checkbox = $(this);
|
|
|
|
|
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
checkbox.prop("checked", keys.includes(checkbox.val()));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.rductControl = new DatasetControl({
|
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
|
formats: {
|
|
|
|
|
RDUCT_RSN_CD : FIM019,
|
|
|
|
|
RDUCT_YMD : dateFormat,
|
|
|
|
|
CRDN_YMD_TM : datetimeFormat,
|
|
|
|
|
FFNLG_CRDN_AMT : numberFormat,
|
|
|
|
|
RDUCT_AMT : numberFormat,
|
|
|
|
|
FFNLG_AMT : numberFormat,
|
|
|
|
|
CRDN_STTS_CD : FIM010,
|
|
|
|
|
SUM_AMT : numberFormat
|
|
|
|
|
$("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 과태료 감경 정보 dialog
|
|
|
|
|
$P.control.getInfo = (params) => {
|
|
|
|
|
if (!params) return;
|
|
|
|
|
|
|
|
|
|
let dialogTitle = "";
|
|
|
|
|
|
|
|
|
|
if (params.callPurpose == "create") {
|
|
|
|
|
dialogTitle = $P.control.prefixName + " 등록";
|
|
|
|
|
} else if (params.callPurpose == "update") {
|
|
|
|
|
dialogTitle = $P.control.prefixName + " 수정";
|
|
|
|
|
} else {
|
|
|
|
|
dialogTitle = $P.control.prefixName + " 정보";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : $P.control.urls.getInfo
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : $P.control.prefixed("Dialog")
|
|
|
|
|
, title : dialogTitle
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : $P.control.infoSize
|
|
|
|
|
, onClose : () => { $P.refreshList(); }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.rductControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.rductControl.untilPageNum = 0;
|
|
|
|
|
$P.rductControl.beforeCurrent = null;
|
|
|
|
|
$P.rductControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.rductControl.onDatasetChange = (obj) => {
|
|
|
|
|
// 삭제 callback
|
|
|
|
|
$P.control.onRemove = (resp) => {
|
|
|
|
|
let btnTitle = $("#btnRemove--${pageName}").attr("title");
|
|
|
|
|
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, btnTitle);
|
|
|
|
|
|
|
|
|
|
// 메시지 출력
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : showMessage
|
|
|
|
|
, onOK : () => { }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.renderRductList(obj["Total"]);
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
$P.refreshList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#rductPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.rductControl.dataset,
|
|
|
|
|
prefix: "rductPaging--${pageName}",
|
|
|
|
|
start: obj["Start"],
|
|
|
|
|
totalSize: obj["Total"],
|
|
|
|
|
fetchSize: obj["Fetch"],
|
|
|
|
|
func: "pageObject['${pageName}'].rductControl.load({index})"
|
|
|
|
|
});
|
|
|
|
|
// 삭제
|
|
|
|
|
$P.control.remove = (params) => {
|
|
|
|
|
if (!params) return;
|
|
|
|
|
|
|
|
|
|
$P.rductControl.tableRenderComplete = true;
|
|
|
|
|
};
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : $P.control.urls.remove
|
|
|
|
|
, data : params
|
|
|
|
|
, success : resp => $P.control.onRemove(resp)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.rductControl.onCurrentChange = (item) => {
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DataTables 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
|
$P.renderList = (totalSize) => {
|
|
|
|
|
let ${infoPrefix}List = $P.control.dataset;
|
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
|
let clsForTask = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val().toLowerCase(); // 소문자
|
|
|
|
|
|
|
|
|
|
// 업무별 DataTables(그리드) tr, 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("RDUCT_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 = (totalSize == ${infoPrefix}List.length);
|
|
|
|
|
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
if ($P.control.untilPageNum != 0) {
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize;
|
|
|
|
|
$P.control.query.pageNum = $P.control.untilPageNum;
|
|
|
|
|
$P.control.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!$P.rductControl.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
// checkbox 체크 해제
|
|
|
|
|
$("th input[type='checkbox']").prop("checked", false);
|
|
|
|
|
|
|
|
|
|
// 보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.rductControl.tableRenderComplete = false;
|
|
|
|
|
if(!item){
|
|
|
|
|
$P.clickRductList("", true);
|
|
|
|
|
} else {
|
|
|
|
|
$P.clickRductList($P.rductControl.getCurrent()["CRDN_ID"], true);
|
|
|
|
|
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
|
|
|
|
|
$P.scrollDataList = () => {
|
|
|
|
|
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false
|
|
|
|
|
|
|
|
|
|
$P.control.load($P.control.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pageObject.function
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.fnReset = () => {
|
|
|
|
|
$('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
|
|
|
|
|
$('#schRductYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$P.rductControl.setData([]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = taskSeCd => {
|
|
|
|
|
$P.fnReset();
|
|
|
|
|
$P.rductControl.urls.load = wctx.url("/"+taskSeCd+"/levy/levy02/010/list.do");
|
|
|
|
|
$P.rductControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.refreshRductList = () => {
|
|
|
|
|
$P.rductControl.untilPageNum = $P.rductControl.query.pageNum;
|
|
|
|
|
$P.rductControl.query.fetchSize = $P.rductControl.defaultFetchSize * $P.rductControl.query.pageNum;
|
|
|
|
|
$P.rductControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.searchRductList = () => {
|
|
|
|
|
$P.rductControl.query = $P.getParams();
|
|
|
|
|
$P.rductControl.query.delYn = "N"; // 삭제 여부
|
|
|
|
|
$P.rductControl.query.crdnDelYn = "N"; // 단속 대장 삭제 여부
|
|
|
|
|
$P.rductControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollRductList = () => {
|
|
|
|
|
$P.rductControl.load($P.rductControl.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickRductList = (dataKey, auto) => {
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
return;
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pageObject.function
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// callback 사용자 검색
|
|
|
|
|
$P.callbackFindUser = (userId, userNm) => {
|
|
|
|
|
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID
|
|
|
|
|
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 사용자 검색
|
|
|
|
|
$P.getFindUser = () => {
|
|
|
|
|
let params = {
|
|
|
|
|
openerPageName : "${pageName}"
|
|
|
|
|
, callbackFuncName : "pageObject['${pageName}']['callbackFindUser']"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/user/user02/010/main.do")
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "userDialog"
|
|
|
|
|
, title : "사용자 검색"
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : "lg"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 개별총정보 dialog
|
|
|
|
|
$P.getTotalInfo = (crdnId) => {
|
|
|
|
|
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
callControlName : "pageObject['${pageName}'].control"
|
|
|
|
|
, sggCd : $("#sggCd--${pageName}").val()
|
|
|
|
|
, taskSeCd : $("input[name=taskSeCd]:checked").val()
|
|
|
|
|
, crdnId : crdnId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/010/main.do")
|
|
|
|
|
, data : params
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "totalInfoMainDialog"
|
|
|
|
|
, title : "개별총정보"
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : "xxl"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#rductTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
// 검색 자료 재조회
|
|
|
|
|
$P.refreshList = () => {
|
|
|
|
|
$P.control.untilPageNum = $P.control.query.pageNum;
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize * $P.control.query.pageNum;
|
|
|
|
|
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.rductControl.setCurrent(dataKey);
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.dblclickRductList = (dataKey) => {
|
|
|
|
|
let params = {
|
|
|
|
|
callControlName : "pageObject['${pageName}'].rductControl"
|
|
|
|
|
, crdnId : dataKey
|
|
|
|
|
// 삭제 callback
|
|
|
|
|
$P.callbackRemove = (obj) => {
|
|
|
|
|
let selected = $P.control.dataset.getKeys("selected");
|
|
|
|
|
|
|
|
|
|
if (selected.length < 1) return;
|
|
|
|
|
|
|
|
|
|
// 서버에 전송할 data(파라미터) 생성
|
|
|
|
|
let params = {};
|
|
|
|
|
params[$P.control.prefixed("IDs")] = selected.join(","); // IDs
|
|
|
|
|
params.delRsn = obj.reason; // 삭제 사유
|
|
|
|
|
|
|
|
|
|
$P.control.remove(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : $P.rductControl.urls.getInfo,
|
|
|
|
|
data : params,
|
|
|
|
|
success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "totalInfoMainDialog",
|
|
|
|
|
title : "개별총정보",
|
|
|
|
|
size : "xxl",
|
|
|
|
|
content : resp,
|
|
|
|
|
init : () => {}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 업무 구분 변경 이벤트
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
|
// 업무 구분 코드
|
|
|
|
|
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
|
|
|
|
|
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 기본 설정
|
|
|
|
|
$P.initForm();
|
|
|
|
|
// 기본 데이터 설정
|
|
|
|
|
$P.initData(taskSeCd);
|
|
|
|
|
// 업무 구분별 설정
|
|
|
|
|
$P.setTask(taskSeCd);
|
|
|
|
|
|
|
|
|
|
// dataset 초기화
|
|
|
|
|
$P.control.dataset.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 검색 버튼 이벤트
|
|
|
|
|
$P.fnSearchList = () => {
|
|
|
|
|
// 검색조건
|
|
|
|
|
$P.control.query = $P.formFields.get();
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
|
|
|
|
|
$P.control.query.delYN = "N"; // 삭제 여부
|
|
|
|
|
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 엑셀 버튼 이벤트
|
|
|
|
|
$P.fnExcel = () => {
|
|
|
|
|
if ($P.control.dataset.empty) {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "검색된 자료가 없습니다."
|
|
|
|
|
, onOK : () => { }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderRductList = (total) => {
|
|
|
|
|
var rductList = $P.rductControl.dataset;
|
|
|
|
|
var empty = rductList.empty;
|
|
|
|
|
var notFound = [document.getElementById("rductNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("rductRow--${pageName}").innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickRductList('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickRductList('" + dataItem.getValue("CRDN_ID") + "');");
|
|
|
|
|
// DataTables(그리드)
|
|
|
|
|
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
|
|
|
|
|
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
|
$P.control.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : rductList.inStrings(found,replacer);
|
|
|
|
|
var noMore = (total == rductList.length);
|
|
|
|
|
var initScroll = ($P.rductControl.query.pageNum < 2) && ($P.rductControl.untilPageNum == 0);
|
|
|
|
|
$P.control.download();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
// 사용자 조회 버튼 이벤트
|
|
|
|
|
$P.fnFindUser = () => {
|
|
|
|
|
$P.getFindUser();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
// 수정 버튼 이벤트
|
|
|
|
|
$P.fnUpdate = () => {
|
|
|
|
|
// 감경 ID
|
|
|
|
|
let rductId = $P.control.dataset.getValue("RDUCT_ID");
|
|
|
|
|
// 감경 ID 가 없다면.. return
|
|
|
|
|
if (typeof rductId == "undefined" || rductId == null || rductId == "") return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
callPurpose : "update"
|
|
|
|
|
, sggCd : $P.control.dataset.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd : $P.control.dataset.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, rductId : rductId // 감경 ID
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.control.getInfo(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 삭제 버튼 이벤트
|
|
|
|
|
$P.fnRemove = () => {
|
|
|
|
|
// 선택 자료
|
|
|
|
|
let selected = $P.control.dataset.getKeys("selected");
|
|
|
|
|
|
|
|
|
|
if (selected.length < 1) return;
|
|
|
|
|
|
|
|
|
|
// 삭제 메세지 확인
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "선택하신 " + selected.length + "건의 " + $P.control.prefixName + " 정보를 삭제하시겠습니까?"
|
|
|
|
|
, onOK : () => {
|
|
|
|
|
// 삭제 사유 입력
|
|
|
|
|
let popupWidth = 640;
|
|
|
|
|
let popupHeight = 240;
|
|
|
|
|
let popupX = (window.screen.width / 2) - (popupWidth / 2);
|
|
|
|
|
let popupY = (window.screen.height / 2) - (popupHeight / 2);
|
|
|
|
|
|
|
|
|
|
window.open(
|
|
|
|
|
encodeURI(wctx.url("/resources/html/inputRsnDialog.html"
|
|
|
|
|
+ "?openerPageName=${pageName}"
|
|
|
|
|
+ "&prefix=" + $P.control.prefix
|
|
|
|
|
+ "&usePurpose=" + "remove"
|
|
|
|
|
+ "&ttlNm=" + "삭제"
|
|
|
|
|
))
|
|
|
|
|
, "inputDelRsnDialog"
|
|
|
|
|
, 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기화
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 이벤트 설정
|
|
|
|
|
$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.fnFindUser()); // 사용자 검색
|
|
|
|
|
|
|
|
|
|
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
|
|
|
|
|
$("#term--${pageName}").keypress(function(e) {
|
|
|
|
|
if (e.keyCode == 13) {
|
|
|
|
|
$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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 업무 버튼 이벤트
|
|
|
|
|
$("#btnUpdate--${pageName}").on("click", () => $P.fnUpdate()); // 부과제외 수정
|
|
|
|
|
$("#btnRemove--${pageName}").on("click", () => $P.fnRemove()); // 부과제외 삭제
|
|
|
|
|
|
|
|
|
|
// DataTables width 변경 조정 업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고
|
|
|
|
|
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
|
|
|
|
|
if($P.rductControl.untilPageNum != 0){
|
|
|
|
|
$P.rductControl.query.fetchSize = $P.rductControl.defaultFetchSize;
|
|
|
|
|
$P.rductControl.query.pageNum = $P.rductControl.untilPageNum;
|
|
|
|
|
$P.rductControl.untilPageNum = 0;
|
|
|
|
|
// DataTables 스크롤 이벤트 생성
|
|
|
|
|
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
data.fetchSize = $P.rductControl.defaultFetchSize;
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {
|
|
|
|
|
// 화면 초기화
|
|
|
|
|
$("#frmSearch--${pageName}")[0].reset();
|
|
|
|
|
|
|
|
|
|
// input, select 초기화
|
|
|
|
|
let searchForm = $("#frmSearch--${pageName}");
|
|
|
|
|
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");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//달력 초기화
|
|
|
|
|
initDatepicker("frmSearch--${pageName}");
|
|
|
|
|
$("#schRductYmdFrom--${pageName}").datepicker("setDate", new Date());
|
|
|
|
|
$("#schRductYmdTo--${pageName}").datepicker("setDate", new Date());
|
|
|
|
|
|
|
|
|
|
// 동적 검색
|
|
|
|
|
$("#byOutput--${pageName}").val("동적 검색");
|
|
|
|
|
|
|
|
|
|
// 사용자 이름
|
|
|
|
|
$("#schRgtrNm--${pageName}").prop("readonly", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
// 기본 데이터 설정
|
|
|
|
|
$P.initData = (taskSeCd) => {
|
|
|
|
|
// 시군구 코드
|
|
|
|
|
$("#sggCd--${pageName}").val("${sggCd}");
|
|
|
|
|
// 업무 구분 코드
|
|
|
|
|
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchRductList());
|
|
|
|
|
// 일자
|
|
|
|
|
$("#schRductYmdFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date);
|
|
|
|
|
$("#schRductYmdTo--${pageName}").datepicker("setDate", new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollRductList);
|
|
|
|
|
// 업무 구분별 설정
|
|
|
|
|
$P.setTask = (taskSeCd) => {
|
|
|
|
|
let clsForTask = taskSeCd.toLowerCase();
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기화
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
//달력 초기화
|
|
|
|
|
initDatepicker("frmSearch--${pageName}");
|
|
|
|
|
// 업무별 조회조건
|
|
|
|
|
renderForTask("frmSearch--${pageName}", clsForTask);
|
|
|
|
|
|
|
|
|
|
// 업무별 그리드 th
|
|
|
|
|
$("#DataTables_Table_0--${pageName}").find("th").resizable( "destroy" );
|
|
|
|
|
|
|
|
|
|
let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content;
|
|
|
|
|
let cols = $(colContent).find("." + clsForTask + ",.cmn");
|
|
|
|
|
let colsOuterHTML = "";
|
|
|
|
|
|
|
|
|
|
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
|
|
|
|
|
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
|
|
|
|
|
$P.fnResetAndChangeBiz(defaultBizValue);
|
|
|
|
|
cols.each(function() {
|
|
|
|
|
colsOuterHTML += this.outerHTML;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
$("#theadTr--${pageName}").html(colsOuterHTML);
|
|
|
|
|
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
|
|
|
|
|
$(this).prop("disabled", "true");
|
|
|
|
|
// URL 설정
|
|
|
|
|
$P.setURL(taskSeCd);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 설정
|
|
|
|
|
$P.setURL = (taskSeCd) => {
|
|
|
|
|
$P.control.urls.load = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/010/list.do"); // 조회
|
|
|
|
|
$P.control.urls.remove = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/010/remove.do"); // 삭제
|
|
|
|
|
$P.control.urls.getInfo = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/020/info.do"); // 수정
|
|
|
|
|
}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 최초 실행 함수
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 1. 이벤트 설정
|
|
|
|
|
$P.setEvent();
|
|
|
|
|
|
|
|
|
|
// 2. 화면 초기 설정 및 업무 구분 변경
|
|
|
|
|
$P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val());
|
|
|
|
|
|
|
|
|
|
// 3. 보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|