parent
4761765b12
commit
b2b12d070f
@ -0,0 +1,272 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
<!-- inner page html -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content -->
|
||||
<div class="container flex-grow-1 px-0">
|
||||
<!-- Page Body -->
|
||||
<div class="card">
|
||||
<div class="wrapper-pop">
|
||||
<!-- 입력 영역 -->
|
||||
<form id="frmEdit--${pageName}" name="frmEdit">
|
||||
<input type="hidden" id="sggCd--${pageName}" name="sggCd" />
|
||||
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" />
|
||||
</form> <!-- /입력 영역 -->
|
||||
|
||||
<!-- 업무 버튼 및 건수 표시 -->
|
||||
<div>
|
||||
<span class="container-page-btn">
|
||||
<span class="container-window-btn-right">
|
||||
<!-- 업무 버튼 -->
|
||||
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀 저장" onclick="fnExcel${pageName}();">
|
||||
엑셀 저장
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary w-px-120" id="btnHwpPrint--${pageName}" title="한글 출력" onclick="fnHwpPrint${pageName}();">
|
||||
한글 출력
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary w-px-120" id="btnSvbtcRemove--${pageName}" title="공시송달 삭제" onclick="fnSvbtcRemove${pageName}();">
|
||||
공시송달 삭제
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- / 업무 버튼 및 건수 표시 -->
|
||||
|
||||
<!-- 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:400px; 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}">
|
||||
<th class="cmn hidden" style="width: 56px;">
|
||||
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
|
||||
</th>
|
||||
<th class="cmn" style="width: 120px;">발송상태</th>
|
||||
<th class="cmn" style="width: 160px;">등기번호</th>
|
||||
<th class="cmn" style="width: 120px;">발송일자</th>
|
||||
<th class="cmn" style="width: 120px;">납기일자</th>
|
||||
<th class="cmn" style="width: 200px;">납부자명</th>
|
||||
<th class="cmn" style="width: 160px;">납부자번호</th>
|
||||
<th class="cmn" style="width: 100px;">우편번호</th>
|
||||
<th class="cmn" style="width: 280px;">주소</th>
|
||||
<th class="cmn" style="width: 320px;">상세주소</th>
|
||||
<th class="cmn" style="width: 180px;">단속일시</th>
|
||||
<th class="cmn" style="width: 140px;">차량번호</th>
|
||||
<th class="cmn" style="width: 280px;">단속장소</th>
|
||||
<th class="cmn" style="width: 120px;">단속금액</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody--${pageName}">
|
||||
</tbody>
|
||||
<template id="${infoPrefix}Row--${pageName}">
|
||||
<tr data-key="{SNDNG_DTL_ID}">
|
||||
<td class="cmn text-center hidden">
|
||||
<input type="checkbox" class="form-check-input" value="{SNDNG_DTL_ID}" onchange="${pageName}Control.select('{SNDNG_DTL_ID}', this.checked);">
|
||||
</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_DTL_STTS_NM}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RG_NO}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_YMD}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DUDT_YMD}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NO}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_ZIP}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_ADDR}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_DTL_ADDR}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_DT}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
|
||||
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{FFNLG_AMT}</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="odd">
|
||||
<td valign="top" colspan="19" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||
</tr>
|
||||
</template>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / DataTables(그리드) -->
|
||||
</div> <!-- <div class="wrapper-list"> -->
|
||||
</div> <!-- <div class="card"> -->
|
||||
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
|
||||
</div>
|
||||
<!-- / inner page html <div class="content-wrapper"> -->
|
||||
|
||||
<script>
|
||||
/**************************************************************************
|
||||
* Global Variable
|
||||
**************************************************************************/
|
||||
// URL
|
||||
var ${pageName}PrefixUrl = "/sndb/sndb01";
|
||||
// FormFields
|
||||
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl
|
||||
**************************************************************************/
|
||||
var ${pageName}Control = new DatasetControl({
|
||||
prefix : "wrngSndngDtl"
|
||||
, prefixName : "발송 대상"
|
||||
, keymapper : info => info ? info.SNDNG_DTL_ID : ""
|
||||
, dataGetter : obj => obj.wrngSndngDtlList
|
||||
, appendData : true
|
||||
, tableRenderComplete : false // dataTables 에 자료 추가 완료 여부
|
||||
, formats : {
|
||||
SNDNG_YMD : dateFormat
|
||||
, DUDT_YMD : dateFormat
|
||||
, FFNLG_AMT : numberFormat
|
||||
, REG_DT : datetimeFormat
|
||||
, MDFCN_DT : datetimeFormat
|
||||
}
|
||||
});
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl 이벤트
|
||||
**************************************************************************/
|
||||
// Dataset 변경 이벤트
|
||||
${pageName}Control.onDatasetChange = obj => {
|
||||
renderList${pageName}();
|
||||
|
||||
${pageName}Control.select(true); // 전체 선택 되도록..
|
||||
|
||||
if (obj.length > 0) {
|
||||
}
|
||||
|
||||
${pageName}Control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
|
||||
};
|
||||
|
||||
// 현재 선택 자료 변경 이벤트
|
||||
${pageName}Control.onCurrentChange = item => {
|
||||
if (!item) return;
|
||||
|
||||
let key = item.data.SNDNG_DTL_ID;
|
||||
|
||||
$("#tbody--${pageName}").setCurrentRow(key);
|
||||
|
||||
${pageName}Control.urls.getInfo = wctx.url("/" + item.data.TASK_SE_CD + "/sprt/sprt02/010/main.do"); // 개별총정보
|
||||
};
|
||||
|
||||
// 선택(체크) 변경 이벤트
|
||||
${pageName}Control.onSelectionChange = selected => {
|
||||
let ${infoPrefix}List = ${pageName}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()));
|
||||
});
|
||||
};
|
||||
|
||||
// 개별총정보 dialog
|
||||
${pageName}Control.getInfo = (crdnId) => {
|
||||
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
|
||||
|
||||
let params = {
|
||||
callControlName : "${pageName}Control"
|
||||
, viewPurpose : "readonly"
|
||||
, crdnId : crdnId
|
||||
}
|
||||
|
||||
ajax.get({
|
||||
url : ${pageName}Control.urls.getInfo
|
||||
, data : params
|
||||
, success : resp => {
|
||||
dialog.open({
|
||||
id : "totalInfoMainDialog"
|
||||
, title : "개별총정보"
|
||||
, content : resp
|
||||
, size : "xxl"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
**************************************************************************/
|
||||
// DataTables에 click, dbclick 이벤트
|
||||
renderList${pageName} = () => {
|
||||
let ${infoPrefix}List = ${pageName}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, "${pageName}Control.setCurrent('" + dataItem.getValue("SNDNG_DTL_ID") + "');")
|
||||
.replace(/{ondblclick}/gi, "${pageName}Control.getInfo('" + dataItem.getValue("CRDN_ID") + "');")
|
||||
);
|
||||
|
||||
$("#tbody--${pageName}").html(trs.join());
|
||||
$("th input[type='checkbox']").prop("checked", false);
|
||||
|
||||
//보안모드
|
||||
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 초기 셋팅
|
||||
**************************************************************************/
|
||||
// 이벤트
|
||||
setEvent${pageName} = () => {
|
||||
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
||||
$("#frmEdit--${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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// DataTables width 변경 조정
|
||||
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 버튼 clickEvent
|
||||
**************************************************************************/
|
||||
// 엑셀
|
||||
fnExcel${pageName} = () => {
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* script 진입
|
||||
**************************************************************************/
|
||||
$(document).ready(function() {
|
||||
// 기본 데이터
|
||||
$("#sggCd--${pageName}").val("${sggCd}"); // 시군구 코드
|
||||
$("#taskSeCd--${pageName}").val("${taskSeCd}"); // 업무 구분 코드
|
||||
|
||||
// 보안모드
|
||||
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
||||
|
||||
// 이벤트 설정
|
||||
setEvent${pageName}();
|
||||
|
||||
// Dataset 셋팅 - 화면이 열리면서 조회하는 경우 addData 하여 자료를 추가
|
||||
${pageName}Control.addData(${svbtcDtl});
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue