단속조회 및 납부안내 추가.

main
jjh 3 weeks ago
parent eeb89b08f9
commit 414abe0e31

@ -389,6 +389,7 @@
// 검색 조건 // 검색 조건
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건 $P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수 $P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.ffnlgSysInqYn = "Y"; // 과태료 시스템 조회 여부
$P.ctrl.query.delYn = "N"; // 삭제 여부 $P.ctrl.query.delYn = "N"; // 삭제 여부
// 날짜 차이 계산 // 날짜 차이 계산

@ -0,0 +1,344 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">단속조회 및 납부안내</c:set>
<!-- inner page html -->
<div class="content-wrapper" data-doctx="${pageName}">
<!-- Content -->
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" name="btnReset" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" name="btnSearch" title="검색">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" name="btnExcel" title="엑셀">
엑셀
</button>
</span>
</div>
<!-- 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form name="frmSearch">
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 자동차등록번호 -->
<div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold required" for="schVhrno">자동차등록번호</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schVhrno" autocomplete="off" required />
</div>
<!-- 단속 일자 -->
<div class="col-6">
<label class="form-label form-search-title w-px-120 text-end fw-bold">단속일자</label>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" name="schCrdnYmdFrom"
data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" name="schCrdnYmdTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</span>
</div>
<!-- 납부자 명 -->
<div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schRtpyrNm">납부자명</label>
<input is="id-input" type="text" class="form-control w-px-160" name="schRtpyrNm" autocomplete="off" />
</div>
<!-- -->
<div class="col-6">
</div>
<!-- 기업 번호 -->
<div class="col-6">
<label is="name-label" class="form-label form-search-title w-px-120 text-end fw-bold" for="schEntRegNo">임대기업번호</label>
<select is="id-select" class="form-select w-px-160" name="schEntRegNo">
<option value="">전체</option>
<c:forEach items="${entRegNoList}" var="item">
<option value="${item.ENT_REG_NO}">${item.ENT_REG_NO}</option>
</c:forEach>
</select>
</div>
<!-- 동적검색 -->
<div class="col-6">
<input type="hidden" name="by" />
<input type="text" class="form-control w-px-120 text-end fw-bold" name="byOutput" value="동적 검색" readonly />
<input type="hidden" name="mainOption" />
<input type="hidden" name="subOption" />
<input type="text" class="form-control w-px-400" name="term" autocomplete="off" />
</div> <!-- 동적검색 -->
</div>
</div> <!-- 메인 조건 -->
</form>
<!-- 검색 조건 영역 -->
<!-- 업무 버튼 및 건수 표시 -->
<div>
<div class="container-page-btn" name="gridButtonArea">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" class="dataTables_info" name="dataPagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" name="dataPaging">
</ul>
</div>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
</span>
</div>
</div>
<!-- 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-500" name="tableRspns">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
</thead>
<template name="tmpltCols">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></th>
<th class="cmn" style="width: 160px;">업무구분</th>
<th class="cmn" style="width: 180px;" onclick="FimsSupport.searchFromGridTitle('CRDN_YMD', this.innerText, 'ymd', '');">단속일시</th>
<th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('VHRNO', this.innerText, 'match', 'part');">자동차등록번호</th>
<th class="cmn" style="width: 200px;" onclick="FimsSupport.searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'part');">납부자명</th>
<th class="cmn" style="width: 120px;" onclick="FimsSupport.searchFromGridTitle('CRDN_STDG_NM', this.innerText, 'match', 'part');">단속법정동</th>
<th class="cmn" style="width: 280px;" onclick="FimsSupport.searchFromGridTitle('CRDN_PLC', this.innerText, 'match', 'part');">단속장소</th>
<th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('VLTN_ARTCL', this.innerText, 'match', 'part');">위반항목</th>
<th class="cmn" style="width: 120px;" onclick="FimsSupport.searchFromGridTitle('FFNLG_CRDN_AMT', this.innerText, 'match', 'part');">단속원금</th>
<th class="cmn" style="width: 160px;" onclick="FimsSupport.searchFromGridTitle('CRDN_STTS_CD', this.innerText, 'codeValue', 'FIM010');">처리상태</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>
<tbody name="tbodyList">
</tbody>
<template is="curly-brackets" name="tmpltRows">
<tr data-index="{data-index}">
<td class="cmn text-center" onclick ondblclick>{ROW_NUM}</td>
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="{data-index}" onchange="pageObject['${pageName}'].dataTableCheckbox(this, this.checked);" /></td>
<td class="cmn text-center" onclick ondblclick>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{CRDN_DT}</td>
<td class="cmn text-start" onclick ondblclick>{VHRNO}</td>
<td class="cmn text-start" onclick ondblclick>{RTPYR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{CRDN_STDG_NM}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_PLC}</td>
<td class="cmn text-start" onclick ondblclick>{VLTN_ARTCL}</td>
<td class="cmn text-end" onclick ondblclick>{FFNLG_CRDN_AMT}</td>
<td class="cmn text-start" onclick ondblclick>{CRDN_STTS_NM}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn text-center" onclick ondblclick>{RGTR_NM}</td>
<td class="cmn text-center" onclick ondblclick>{MDFCN_DT}</td>
<td class="cmn text-center" onclick ondblclick>{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFound">
<tr class="cmn">
<td valign="top" colspan="16" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- DataTables(그리드) -->
</div> <!-- <div class="card wrapper-list"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<!-- Content -->
<div class="content-backdrop fade"></div>
</div>
<!-- / inner page html <div class="content-wrapper"> -->
<script>
LoadScript("rent03010Script", wctx.url("/webjars/js/fims/rent/rent03010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// datasetControl
$P.ctrl = newRent03010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
$P.pagingSupport = new FimsPagingSupport({
ctrl: $P.ctrl // DatasetControl
, ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시
, linkContainer: "[name='dataPaging']" // <ul class="pagination pagination-primary" name="dataPaging">
});
/**************************************************************************
* DataTable 이벤트
**************************************************************************/
// dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
let atLeastOne = GRID.checkbox.countChecked(element) > 0;
Apply.toDataset.selection($P.ctrl.dataset, element, bool);
}
// dataTable 클릭 이벤트
$P.dataTableClick = (dataIndex) => {
if (dataIndex == "") return;
$P.$findn("tbodyList").setCurrentRow(dataIndex);
Apply.toDataset.current($P.ctrl.dataset, dataIndex);
}
// dataTable 더블 클릭 이벤트
$P.dataTableDblClick = (dataIndex) => {
//
let params = {
callPageName: "${pageName}"
, callPurpose: "view"
, sggCd: $P.ctrl.getValue("SGG_CD")
, taskSeCd: $P.ctrl.getValue("TASK_SE_CD")
, crdnId: $P.ctrl.getValue("CRDN_ID")
};
$P.ctrl.getInfo(params);
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.ctrl.load($P.ctrl.query.pageNum + 1);
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// URL 설정
$P.setUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/010/list.do"); // 검색
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/020/info.do"); // 상세 정보
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 초기화
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmSearch").reset();
// dataset 초기화
$P.ctrl.dataset.clear();
// URL 설정
$P.setUrl("${prefixUrl}");
// input, select 초기화
let searchForm = $P.$findn("frmSearch");
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); });
AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화
AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표
// 기본 데이터 설정
$P.$findn("schCrdnYmdFrom").datepicker("setDate", "2024-06-01"); // 단속 일자 시작
$P.$findn("schCrdnYmdTo").datepicker("setDate", TODAY()); // 단속 일자 종료
$P.$findn("schVhrno").val("12보3663"); // 자동차등록번호
$P.$findn("byOutput").val("동적 검색"); // 동적 검색
// 그리드 th
let colContent = $P.findn("tmpltCols").content;
let cols = $(colContent).find(".cmn");
let colsOuterHTML = "";
cols.each(function() {
colsOuterHTML += this.outerHTML;
});
$P.findn("tableRspns").changeColumn(colsOuterHTML);
}
// 검색
$P.fnSearchList = (tabName) => {
// validate 확인
if (!AppSupport.customValidate($P.$findn("frmSearch").find("input,select,textarea"))) return;
// 검색 조건
$P.ctrl.query = new FimsFormFields($P.selectorn("frmSearch")).get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.ffnlgSysInqYn = "Y"; // 과태료 시스템 조회 여부
$P.ctrl.query.delYn = "N"; // 삭제 여부
$P.ctrl.load(1);
}
// 엑셀
$P.fnExcel = () => {
if ($P.ctrl.dataset.empty) {
dialog.alert({
content: "검색된 자료가 없습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
// 검색 조건
$P.ctrl.query.ffnlgSysInqYn = "N"; // 과태료 시스템 조회 여부
// DataTables(그리드)
$P.ctrl.query.cellDefs =
AppSupport.getCellDefs($P.$findn("theadTr").find("th").not(".dummy-th").not(":eq(0)")
, $($P.findn("tmpltRows").content).find("td").not(".dummy-td").not(":eq(0)"));
$P.ctrl.download();
}
/**************************************************************************
* 초기 설정
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// 기본 버튼 이벤트
$P.$findn("btnReset").on("click", () => { $P.fnReset() }); // 초기화
$P.$findn("btnSearch").on("click", () => { $P.fnSearchList() }); // 검색
$P.$findn("btnExcel").on("click", () => { $P.fnExcel() }); // 엑셀
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 설정
$P.fnReset();
// 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
</script>

@ -0,0 +1,449 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">단속조회 및 납부안내 상세 정보</c:set>
<!-- inner page html -->
<div class="content-pop" data-doctx="${pageName}">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<!-- 단속 정보 -->
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">단속 정보</label>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
<!-- 자료 이동 버튼 -->
<input is="id-input" type="text" class="form-control w-px-120 text-center fw-bold" name="countStatus" readonly />
<button type="button" class="w-px-50 btn-PageUp" name="btnPrev">◀</button>
<button type="button" class="w-px-50 btn-PageDown" name="btnNext">▶</button>
</span>
</div> <!-- <div class="container-page-btn"> -->
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<div class="row g-1">
<!-- 단속 일시 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnDt">단속일시</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnDt" data-map="CRDN_DT" data-fmt-type="dt" readonly />
</div>
<!-- 차량번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 위반 항목 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vltnArtcl">위반항목</label>
<input is="id-input" type="text" class="form-control w-45" name="vltnArtcl" data-map="VLTN_ARTCL" readonly />
</div>
<!-- 법정동 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnStdgNm">법정동</label>
<input is="id-input" type="text" class="form-control w-45" name="crdnStdgNm" data-map="CRDN_STDG_NM" readonly />
</div>
<!-- 단속 장소 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnPlc">단속장소</label>
<input is="id-input" type="text" class="form-control w-60" name="crdnPlc" data-map="CRDN_PLC" readonly />
</div>
<!-- 단속상태 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="crdnSttsNm">단속상태</label>
<input is="id-input" type="text" class="form-control w-45 fw-bold text-primary" name="crdnSttsNm" data-map="CRDN_STTS_NM" readonly />
</div>
<!-- 납부자 구분 코드 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrSeNm">납부자 구분</label>
<input is="id-input" type="text" class="form-control w-25" name="rtpyrSeNm" data-map="RTPYR_SE_NM" readonly />
</div>
<!-- 납부자 번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNo">납부자번호</label>
<input is="id-input" type="text" class="form-control w-45" name="rtpyrNo" data-map="RTPYR_NO" readonly />
</div>
<!-- 납부자 명 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="rtpyrNm">납부자명</label>
<input is="id-input" type="text" class="form-control w-45" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</div>
</div>
</form>
<!-- 입력 영역 -->
</div>
<!-- 단속 정보 -->
<!-- 단속 이미지 -->
<jsp:include page="/WEB-INF/jsp/fims/photo-main.jsp" />
<p></p>
<!-- 임대차계약 정보 -->
<div class="card">
<!-- 업무 버튼 -->
<div class="container-page-btn">
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">임대차계약 정보</label>
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
</span>
</div> <!-- <div class="container-page-btn"> -->
<!-- 입력 영역 -->
<form name="frmEditLsct">
<div class="row g-1">
<!-- 계약 시작 일시 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ctrtBgngYmd">계약시작일시</label>
<input is="id-input" type="text" class="form-control w-45" name="ctrtBgngYmd" data-map="CTRT_BGNG_DT" data-fmt-type="dt" readonly />
</div>
<!-- 계약 종료 일시 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="ctrtEndYmd">계약종료일시</label>
<input is="id-input" type="text" class="form-control w-45" name="ctrtEndYmd" data-map="CTRT_END_DT" data-fmt-type="dt" readonly />
</div>
<!-- 자동차등록번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">자동차등록번호</label>
<input is="id-input" type="text" class="form-control w-45" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 임차인 구분 코드 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="vhrno">임차인구분</label>
<input is="id-input" type="text" class="form-control w-25" name="hirerSeNm" data-map="HIRER_SE_NM" readonly />
</div>
<!-- 임차인 등록 번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerRegNo">임차인등록번호</label>
<input is="id-input" type="text" class="form-control w-45" name="hirerRegNo" data-map="HIRER_REG_NO" readonly />
</div>
<!-- 임차인 명 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerNm">임차인명</label>
<input is="id-input" type="text" class="form-control w-45" name="hirerNm" data-map="HIRER_NM" readonly />
</div>
<!-- 임차인 전화번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerTelno">전화번호</label>
<input is="id-input" type="text" class="form-control w-45" name="hirerTelno" data-map="HIRER_TELNO" readonly />
</div>
<!-- 임차인 휴대 전화번호 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerMblTelno">휴대전화번호</label>
<input is="id-input" type="text" class="form-control w-45" name="hirerMblTelno" data-map="HIRER_MBL_TELNO" readonly />
</div>
<!-- 임차인 이메일 주소 -->
<div class="col-md-4">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerEmlAddr">이메일</label>
<input is="id-input" type="text" class="form-control w-60" name="hirerEmlAddr" data-map="HIRER_EML_ADDR" readonly />
</div>
<!-- 주소 --><!-- 우편번호 -->
<div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerAddr">주소</label>
<input is="id-input" type="text" class="form-control w-80" name="hirerAddr" data-map="HIRER_ADDR" readonly />
<input is="id-input" type="text" class="form-control w-px-75" name="hirerZip" data-map="HIRER_ZIP" readonly />
</div>
<!-- 상세주소 -->
<div class="col-md-12">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="hirerDtlAddr">상세주소</label>
<input is="id-input" type="text" class="form-control w-87" name="hirerDtlAddr" data-map="HIRER_DTL_ADDR" readonly />
</div>
<!-- 등록 일시 / 등록자 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="regDt">등록일시</label>
<input is="id-input" type="text" class="form-control w-30" name="regDt" data-map="REG_DT" data-fmt-type="dt" readonly />
<input is="id-input" type="text" class="form-control w-25" name="rgtrNm" data-map="RGTR_NM" readonly />
</div>
<!-- 수정 일시 / 수정자 -->
<div class="col-md-6">
<label is="name-label" class="col-form-label bg-lighter pe-2 w-px-120 text-sm-end" for="mdfcnDt">수정일시</label>
<input is="id-input" type="text" class="form-control w-30" name="mdfcnDt" data-map="MDFCN_DT" data-fmt-type="dt" readonly />
<input is="id-input" type="text" class="form-control w-25" name="mdfrNm" data-map="MDFR_NM" readonly />
</div>
</div>
</form>
<!-- 입력 영역 -->
</div>
<!-- 임대차계약 정보 -->
<!-- 첨부 파일 -->
<div class="card">
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" name="fileList">
<thead>
<th class="text-center" style="width: 24px">No.</th>
<th class="text-center" style="width: 200px">파일번호</th>
<th class="text-center">파일이름</th>
<th class="text-center" style="width: 200px">파일크기</th>
<th class="text-center" style="width: 120px">다운로드</th>
</thead>
<tbody name="tbodyFileList">
</tbody>
</table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="card"> -->
<!-- 첨부 파일 -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div>
<!-- / inner page html <div class="content-pop"> -->
<script>
LoadScript("rent03020Script", wctx.url("/webjars/js/fims/rent/rent03020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
$P.$findn("photoMainWrapper").addClass("w-px-1050 min-w-px-640");
// datasetControl
$P.ctrl = newRent03020Control("${pageName}", "[data-doctx=${pageName}]");
// 자료 이동을 위한 자료의 Index. 0부터 시작.
$P.curDataIndex;
// 단속 사진
$P.existFileArr = [];
$P.localUploadArr = [];
// infoDialog 호출한 pageName
$P.callPageName = "${callPageName}";
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
$P.callPurpose = "${callPurpose}";
/**************************************************************************
* 네이게이션 Event
**************************************************************************/
// 건수 표기
$P.fnChangeCountStatus = () => {
// 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
// $P.curDataIndex 에 값이 없다면..
if ($P.curDataIndex == null) {
let curCrdnId = $P.ctrl.getValue("CRDN_ID");
for (iLoop = 0; iLoop < dataItems.length; iLoop++) {
if (dataItems[iLoop].data.CRDN_ID == curCrdnId) {
$P.curDataIndex = iLoop;
break;
}
}
}
// 건수 표시
let viewNumber = $P.curDataIndex + 1;
$P.$findn("countStatus").val(viewNumber + " of " + dataItems.length);
}
// 이전 자료 조회
$P.fnPrev = () => {
// 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.ctrl.getValue("CRDN_ID");
// 초기 값은 callControl dataset 의 총 건수 - 1
if ($P.curDataIndex == null) {
$P.curDataIndex = dataItems.length - 1;
}
for (iLoop = $P.curDataIndex; iLoop >= 0; iLoop--) {
if (dataItems[iLoop].data.CRDN_ID == curCrdnId) {
if (iLoop - 1 < 0) return; // 종료
$P.curDataIndex = iLoop - 1;
break;
}
}
let crdnId = dataItems[$P.curDataIndex].data.CRDN_ID;
// 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") return;
let params = {
callPurpose: "view"
, sggCd: dataItems[$P.curDataIndex].data.SGG_CD
, taskSeCd: dataItems[$P.curDataIndex].data.TASK_SE_CD
, crdnId: dataItems[$P.curDataIndex].data.CRDN_ID
, delYn: "N"
};
$P.ctrl.refresh(params);
}
// 다음 자료 조회
$P.fnNext = () => {
// 종료
if ($P.callPageName == "" || $P.callPageName == "noPageName") return;
let dataItems = pageObject[$P.callPageName].ctrl.dataset._items;
let curCrdnId = $P.ctrl.getValue("CRDN_ID");
// 초기 값은 0
if ($P.curDataIndex == null) {
$P.curDataIndex = 0;
}
for (iLoop = $P.curDataIndex; iLoop < dataItems.length; iLoop++) {
if (dataItems[iLoop].data.CRDN_ID == curCrdnId) {
if (iLoop + 1 >= dataItems.length) return; // 종료
$P.curDataIndex = iLoop + 1;
break;
}
}
let crdnId = dataItems[$P.curDataIndex].data.CRDN_ID;
// 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") return;
let params = {
callPurpose: "view"
, sggCd: dataItems[$P.curDataIndex].data.SGG_CD
, taskSeCd: dataItems[$P.curDataIndex].data.TASK_SE_CD
, crdnId: dataItems[$P.curDataIndex].data.CRDN_ID
, delYn: "N"
};
$P.ctrl.refresh(params);
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// URL 설정
$P.setUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/020/info.do") // 검색
}
// 임대차계약 첨부 파일 조회
$P.fnSearchFileList = (lsctId) => {
let tableFileList = $P.findn("fileList"); // table element 찾기
let fileLength = tableFileList.rows.length;
// 기존 table에 자료가 존재하면 tableRow 삭제
for (let iLoop = 1; iLoop < fileLength; iLoop++) {
tableFileList.deleteRow(1); // table 행(Row) 삭제
}
// 임대차계약 ID가 없다면 첨부파일을 조회하지 안는다..
if (!lsctId) return;
// 첨부파일 리스트
ajax.get({
url: "file/list.do"
, data: {
infoType: "120"
, infoKeys: lsctId
, fetchSize: 0
}
, success: (resp) => {
let fileNo = 0;
let fileList = resp.fileList;
fileList.forEach(function (item, index, array) {
fileNo = index + 1;
let innerHtml = "";
innerHtml += "<tr>";
innerHtml += "<td class='text-center'>" + fileNo + "</td>";
innerHtml += "<td class='text-center'>" + item.FILE_ID + "</td>";
innerHtml += "<td class='text-center'>" + item.FILE_NM + "</td>";
innerHtml += "<td class='text-center'>" + item.FILE_SIZE + " byte</td>";
innerHtml += "<td class='text-center'>" + "<button type='button' class='btn' onclick=";
innerHtml += "pageObject['${pageName}'].fnFileDownload(" + item.FILE_ID + ");" + "><i class='bx bx-download me-1'></i></button>" + "</td>";
innerHtml += "</tr>";
$P.$findn("tbodyFileList").append(innerHtml);
});
}
});
}
// 첨부파일 다운로드 아이콘 클릭 이벤트
$P.fnFileDownload = (fileID) => {
top.location.href = "/file/download.do?fileID=" + fileID;
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경 이벤트
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
// URL 설정
$P.setUrl("${prefixUrl}");
}
/**************************************************************************
* 초기 설정
**************************************************************************/
// 이벤트
$P.setEvent = () => {
// 기본 버튼 이벤트
$P.$findn("btnPrev").on("click", () => { $P.fnPrev() }); // 이전
$P.$findn("btnNext").on("click", () => { $P.fnNext() }); // 다음
}
// 기본 데이터 설정
$P.initData = () => {
// 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
$P.curDataIndex = null;
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 설정
$P.fnReset();
// 3. 기본 데이터 설정
$P.initData();
// 4. dataset 설정
$P.ctrl.setData([${Info}]);
// 5. 사진영역 설정
settingPhotoMain("${pageName}"
, $P.findn("crdnId")
, function() {
return {
vhrno: $P.$findn("vhrno").val()
, vhclNm: $P.$findn("vhclNm").val()
, vhclColr: $P.$findn("vhclColr").val()
};
}
, async function(vhrnoEl) {
return await $P.getVehicleTotalInfo(vhrnoEl); // 차적조회는 "단속정보 수정" 에서 해라...
}
);
// 6. 사진영역 초기화
let crdnInfo = $P.ctrl.getCurrent();
let existVideo = false;
initPhotoMain("${pageName}", crdnInfo.fileList, existVideo);
});
</script>

@ -0,0 +1,113 @@
function newRent03010Control(pageName, doctx="[data-doctx='rent03010']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "crdn"
, prefixName: "단속"
, dataGetter: obj => obj["List"]
, keys: ["CRDN_ID"]
, appendData: true
, infoSize: "xl"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do"
}
, formats: {
CHG_DMND_DT: datetimeFormat
, CHG_APRV_DT: datetimeFormat
, CRDN_DT: datetimeFormat
, FFNLG_CRDN_AMT: numberFormat
, REG_DT: datetimeFormat
, MDFCN_DT: datetimeFormat
}
});
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// Dataset 변경 이벤트
ctrl.onDatasetChange = (obj, option) => {
// 데이터 셋
let dataList = ctrl.dataset;
let empty = dataList.empty;
// 업무별 dataTables(그리드) tr, td
let foundContent = ctrl.find("[name='tmpltRows']").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find(".cmn");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").content.querySelector(".cmn").outerHTML]
: dataList.inStrings(foundTr.outerHTML, replacer);
let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수
let initScroll = (ctrl.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
// dataTables(그리드)에 자료 표시 td
ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].pagingSupport.setPagingInfo(obj);
};
// 현재 선택 자료 변경 이벤트
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);
};
// 상세 정보 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: ctrl.prefixName + " 정보"
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
});
}
return ctrl;
}

@ -0,0 +1,89 @@
function newRent03020Control(pageName, doctx="[data-doctx='rent03020']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "crdn"
, prefixName: "단속"
, dataGetter: obj => obj["Info"]
, keys: ["CRDN_ID"]
, infoSize: "lg"
, urls: {
load: "/list.do"
, getInfo: "/info.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 건수를 표시한다.
pageObject[pageName].fnChangeCountStatus();
// 화면에 단속 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 화면에 임대차계약 Dataset 셋팅
let formFields2 = new FimsFormFields(ctrl.selector("[name='frmEditLsct']"));
formFields2.set(ctrl, item);
let fileKey = item.data.LSCT_ID;
if (fileKey != null) {
pageObject[pageName].fnSearchFileList(fileKey);
}
};
// 상세 정보 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: "임대차계약 상세 정보"
, size: ctrl.infoSize
, content: resp
, init: () => {
$("#" + dialogId).attr("name", dialogName);
$("#" + dialogId).attr("data-ref-doctx", pageName);
AppSupport.setDialogZindex();
}
, onClose: () => { }
});
}
});
}
// 재 조회 -> 1건일때 reload 사용시 오류 발생. 배열이 아니여서 발생.. 한실장님에게 수정 요청
ctrl.refresh = (query) => {
if (query) {
ctrl.query = query;
}
ajax.get({
url: ctrl.urls.load
, headers: { Accept: "application/json; charset=utf-8" } // json
, data: ctrl.query
, success: (resp) => {
// 초기화
ctrl.find("[name='frmEdit']").reset(); // 화면 초기화
ctrl.dataset.clear(); // Dataset 초기화
// Dataset 셋팅
ctrl.setData([resp.Info]); // 정보
}
});
}
return ctrl;
}
Loading…
Cancel
Save