임차인계약서 관리 상세 정보 수정.

main
jjh 2 months ago
parent 1df696e9b0
commit 587d9b3964

@ -1,7 +1,7 @@
<%@ 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>
<c:set var="prefixName" scope="request">임대차계약 등록</c:set>
<!-- inner page html -->
<div class="content-wrapper" data-doctx="${pageName}">
@ -268,7 +268,6 @@
let params = {
callPurpose: "view"
, crdnId: $P.ctrl.getValue("CRDN_ID")
, lsctId: $P.ctrl.getValue("LSCT_ID")
};
$P.ctrl.getInfo(params);

@ -7,122 +7,127 @@
<div class="content-pop" data-doctx="${pageName}">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="crdnId" data-map="CRDN_ID" />
<!-- 단속 정보 -->
<div class="card">
<!-- 상단 버튼 -->
<!-- 업무 버튼 -->
<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-success w-px-120" name="btnOK" title="임차인 선택 확인">
선택 확인
</button>
</span>
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">단속 정보</label>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 단속 일시 -->
<div class="col-md-6">
<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-30" name="crdnDt" data-map="CRDN_DT" data-fmt-type="dt" 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="vhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-30" name="vhrno" data-map="VHRNO" 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="vltnArtcl">위반내용</label>
<input is="id-input" type="text" class="form-control w-30" name="vltnArtcl" data-map="VLTN_ARTCL" 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="ffnlgCrdnAmt">과태료단속원금</label>
<input is="id-input" type="text" class="form-control w-30 text-sm-end" name="ffnlgCrdnAmt" data-map="FFNLG_CRDN_AMT" data-fmt-type="number" 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="crdnStdgNm">법정동</label>
<input is="id-input" type="text" class="form-control w-30" name="crdnStdgNm" data-map="CRDN_STDG_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="crdnPlc">단속장소</label>
<input is="id-input" type="text" class="form-control w-50" name="crdnPlc" data-map="CRDN_PLC" readonly />
</div>
</div>
</div>
<!-- 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form name="frmSearch">
<!-- hidden -->
<input type="hidden" name="userId" />
<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>
</div> <!-- <div class="container-page-btn"> -->
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 기업 번호 -->
<div class="col-6">
<label is="name-label" class="form-label fw-bold form-search-title w-px-120 text-end" for="schEntNo">단속일자</label>
<input is="id-input" type="text" class="form-control w-px-160" name="CRDN_YMD" autocomplete="off" />
<!-- 계약 시작 일시 -->
<div class="col-md-6">
<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-30" name="ctrtBgngYmd" data-map="CTRT_BGNG_DT" data-fmt-type="dt" readonly />
</div>
<!-- 기업 명 -->
<div class="col-6">
<label is="name-label" class="form-label fw-bold form-search-title w-px-120 text-end" for="schEntNm">차량번호</label>
<input is="id-input" type="text" class="form-control w-px-200" name="schVhrno" autocomplete="off" />
<!-- 계약 종료 일시 -->
<div class="col-md-6">
<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-30" name="ctrtEndYmd" data-map="CTRT_END_DT" data-fmt-type="dt" 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="vhrno">자동차등록번호</label>
<input is="id-input" type="text" class="form-control w-30" name="vhrno" data-map="VHRNO" readonly />
</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 class="col-md-6">
<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-20" name="hirerSeNm" data-map="HIRER_SE_NM" readonly />
</div>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120" name="btnCreate" title="임차인 등록">
임차인 등록
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnUpdate" title="임차인 수정">
임차인 수정
</button>
<button type="button" class="btn btn-primary w-px-120" name="btnRemove" title="임차인 삭제">
임차인 삭제
</button>
</span>
<!-- 임차인 등록 번호 -->
<div class="col-md-6">
<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-30" name="hirerRegNo" data-map="HIRER_REG_NO" 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="hirerNm">임차인명</label>
<input is="id-input" type="text" class="form-control w-30" name="hirerNm" data-map="HIRER_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="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>
</div>
</form>
<!-- 입력 영역 -->
<!-- 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-300" 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>
<!-- 첨부 파일 -->
<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>
<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: 200px;">기업명</th>
<th class="cmn" style="width: 160px;">법인(사업자)번호</th>
<th class="cmn" style="width: 120px;">대표자명</th>
<th class="cmn" style="width: 160px;">전화번호</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: 180px;">등록일시</th>
<th class="cmn dummy-th"></th>
</template>
<tbody name="tbodyList">
<tbody name="tbodyFileList">
</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-start" onclick ondblclick>{ENT_NM}</td>
<td class="cmn text-center" onclick ondblclick>{ENT_NO}</td>
<td class="cmn text-center" onclick ondblclick>{RPRSV_NM}</td>
<td class="cmn text-center" onclick ondblclick>{ENT_TELNO}</td>
<td class="cmn text-center" onclick ondblclick>{ENT_FXNO}</td>
<td class="cmn text-center" onclick ondblclick>{ENT_ZIP}</td>
<td class="cmn text-start" onclick ondblclick>{ENT_ADDR}</td>
<td class="cmn text-center" onclick ondblclick>{REG_DT}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template name="tmpltNotFound">
<tr class="cmn">
<td valign="top" colspan="11" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- DataTables(그리드) -->
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- <div class="card"> -->
<!-- 첨부 파일 -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div>
@ -143,195 +148,79 @@
// pageObject
let $P = pageObject["${pageName}"];
// formFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
// datasetControl
$P.ctrl = newRent02020Control("${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;
$P.$findn("btnOK").prop("disabled", !atLeastOne);
$P.$findn("btnRemove").prop("disabled", !atLeastOne);
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, dataKey) => {
let params = {
entId: $P.ctrl.getValue("ENT_ID")
};
$P.ctrl.getInfo(params);
}
// DataTable에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.ctrl.load($P.ctrl.query.pageNum + 1);
}
// 파일 리스트
$P.fileListArr = new Array();
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// URL 설정
$P.setUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/020/list.do"); // 검색
$P.ctrl.urls.create = wctx.url(prefixUrl + "/020/createMpng.do") // 등록
$P.ctrl.urls.remove = wctx.url(prefixUrl + "/020/removeEnt.do") // 삭제
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/030/info.do"); // 상세 정보
$P.ctrl.urls.load = wctx.url(prefixUrl + "/020/list.do") // 검색
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경 이벤트
$P.fnReset = (initSearchYN) => {
// 화면 초기화
$P.findn("frmSearch").reset();
// dataset 초기화
$P.ctrl.dataset.clear();
// URL 설정
$P.setUrl("${prefixUrl}");
// 기본 데이터 설정
$P.$findn("userId").val("${userId}"); // 사용자 ID
$P.$findn("schEntNo").val("${schEntNo}"); // 기업 번호
// 첨부파일 조회
$P.fnSearchFileList = (hirerId) => {
let tableFileList = $P.findn("fileList"); // table element 찾기
let fileLength = tableFileList.rows.length;
// 그리드 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);
if (initSearchYN && $P.$findn("schEntNo").val() != "") {
$P.fnSearchList();
}
// 기존 table에 자료가 존재하면 tableRow 삭제
for (let iLoop = 1; iLoop < fileLength; iLoop++) {
tableFileList.deleteRow(1); // table 행(Row) 삭제
}
// 검색 버튼 클릭 이벤트
$P.fnSearchList = () => {
// 검색조건
$P.ctrl.query = $P.formFields.get(); // 검색 조건
$P.ctrl.query.fetchSize = DEFAULT_FETCH_SIZE; // 한번에 조회되는 자료 건수
$P.ctrl.query.delYn = "N"; // 삭제 여부
// 임차인 등록일 경우에는 첨부파일을 조회하지 안는다..
if (!hirerId) return;
$P.ctrl.load(1);
// 첨부파일 리스트
ajax.get({
url: "file/list.do"
, data: {
infoType: "120"
, infoKeys: hirerId
, fetchSize: 0
}
, success: (resp) => {
let fileNo = 0;
let fileList = resp.fileList;
// 엑셀 버튼 이벤트
$P.fnExcel = () => {
if ($P.ctrl.dataset.empty) {
dialog.alert({
content: "검색된 자료가 없습니다."
, onOK: () => { }
});
return;
}
fileList.forEach(function (item, index, array) {
fileNo = index + 1;
// DataTable(그리드)
$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)"));
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.ctrl.download();
}
// 확인
$P.fnOK = () => {
let selected = $P.ctrl.getDataset("selected");
if (selected.length < 1) {
dialog.alert({
content: "선택하신 " + $P.ctrl.prefixName + " 정보가 없습니다."
, onOK: () => { }
$P.$findn("tbodyFileList").append(innerHtml);
});
return;
}
dialog.alert({
content: "현재 " + $P.ctrl.prefixName + " 정보를 저장하시겠습니까?"
, onOK: () => {
let params = {
callPurpose: "create"
, userId: $P.$findn("userId").val()
, entIds: selected.map(info => info.ENT_ID).join(",")
}
$P.ctrl.save(params);
}
});
}
// 임대기업 등록 버튼 클릭 이벤트
$P.fnCreate = () => {
let params = {
entId: null
};
$P.ctrl.getInfo(params);
// 첨부파일 다운로드 아이콘 클릭 이벤트
$P.fnFileDownload = (fileID) => {
top.location.href = "/file/download.do?fileID=" + fileID;
}
// 임대기업 수정 버튼 클릭 이벤트
$P.fnUpdate = () => {
// 임대기업 ID
let entId = $P.ctrl.getValue("ENT_ID");
// 임대기업 ID 가 없다면.. return
if (typeof entId == "undefined" || entId == null || entId == "") return;
let params = {
entId: entId
};
$P.ctrl.getInfo(params);
}
// 임대기업 삭제 버튼 클릭 이벤트
$P.fnRemove = () => {
let selected = $P.ctrl.getDataset("selected"); // 선택 자료
if (selected.length < 1) {
dialog.alert({
content: "선택하신 " + $P.ctrl.prefixName + " 정보가 없습니다."
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
});
return;
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경 이벤트
$P.fnReset = () => {
// 화면 초기화
$P.findn("frmEdit").reset();
let params = {
entIds: selected.map(info => info.ENT_ID).join(",")
};
// URL 설정
$P.setUrl("${prefixUrl}");
dialog.alert({
content: "선택한 " + selected.length + "건의 " + $P.ctrl.prefixName + " 정보를 삭제하시겠습니까?"
, onOK: () => { $P.ctrl.remove(params); }
});
}
/**************************************************************************
@ -339,25 +228,7 @@
**************************************************************************/
// 이벤트
$P.setEvent = () => {
// 기본 버튼 이벤트
$P.$findn("btnReset").on("click", () => { $P.fnReset(); }); // 초기화
$P.$findn("btnSearch").on("click", () => { $P.fnSearchList(); }); // 검색
$P.$findn("btnOK").on("click", () => { $P.fnOK(); }); // 선택 확인
// input에서 엔터(Enter) 키를 누르면 검색한다.
$P.$findn("schEntNo").onEnterPress($P.fnSearchList); // 법인(사업자)번호
$P.$findn("schEntNm").onEnterPress($P.fnSearchList); // 기업명
// 업무 버튼 이벤트
$P.$findn("btnCreate").on("click", () => { $P.fnCreate(); }); // 등록
$P.$findn("btnUpdate").on("click", () => { $P.fnUpdate(); }); // 수정
$P.$findn("btnRemove").on("click", () => { $P.fnRemove(); }); // 삭제
// DataTable width 변경 조정
Componentization.fnMakeResizableTable($P.findn("tableRspns"));
// DataTable 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($P.findn("tableRspns"), $P.scrollDataList);
//
}
/**************************************************************************
@ -367,10 +238,10 @@
$P.setEvent();
// 2. 초기 설정
$P.fnReset(true);
$P.fnReset();
// 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
// 3. dataset 설정
$P.ctrl.setData([${Info}]);
});
</script>

@ -69,7 +69,7 @@
<!-- 임차인 이메일 주소 -->
<div class="col-md-12">
<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-30" name="hirerEmlAddr" data-map="HIRER_EML_ADDR" />
<input is="id-input" type="text" class="form-control w-30" name="hirerEmlAddr" data-map="HIRER_EML_ADDR" autocomplete="off" />
</div>
<!-- 주소 --><!-- 우편번호 -->
<div class="col-md-12">
@ -117,6 +117,7 @@
</div> <!-- <div class="card"> -->
<!-- 첨부 파일 -->
<p></p>
<!-- 업무 버튼 및 건수 표시 -->
<div>

@ -1,7 +1,7 @@
<%@ 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>
<c:set var="prefixName" scope="request">임대차계약 관리</c:set>
<!-- inner page html -->
<div class="content-wrapper" data-doctx="${pageName}">
@ -116,14 +116,14 @@
</li>
<li class="nav-item">
<button type="button" class="nav-link w-px-160 h-100" role="tab" data-bs-toggle="tab" name="tabItem1"
onClick="pageObject['${pageName}'].fnSearchList('대상');">
대상
onClick="pageObject['${pageName}'].fnSearchList('대상');">
대상
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link w-px-160 h-100" role="tab" data-bs-toggle="tab" name="tabItem2"
onClick="pageObject['${pageName}'].fnSearchList('대상');">
대상
onClick="pageObject['${pageName}'].fnSearchList('대상');">
대상
</button>
</li>
<li class="nav-item">
@ -309,9 +309,9 @@
// URL 설정
$P.setUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/050/list.do"); // 검색
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/020/info.do"); // 상세 정보
$P.ctrl.urls.create = wctx.url(prefixUrl + "/050/createAprv.do") // 승인 요청
$P.ctrl.urls.remove = wctx.url(prefixUrl + "/050/removeAprv.do") // 승인 요청 취소
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/060/info.do"); // 상세 정보
}
// 버튼 설정

@ -0,0 +1,264 @@
<%@ 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">
<!-- 입력 영역 -->
<form name="frmEdit">
<!-- hidden -->
<input type="hidden" name="lsctId" data-map="LSCT_ID" />
<!-- 단속 정보 -->
<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>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 단속 일시 -->
<div class="col-md-6">
<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-30" name="crdnDt" data-map="CRDN_DT" data-fmt-type="dt" 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="vhrno">차량번호</label>
<input is="id-input" type="text" class="form-control w-30" name="vhrno" data-map="VHRNO" 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="vltnArtcl">위반내용</label>
<input is="id-input" type="text" class="form-control w-30" name="vltnArtcl" data-map="VLTN_ARTCL" 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="crdnPlc">단속장소</label>
<input is="id-input" type="text" class="form-control w-30" name="crdnStdgNm" data-map="CRDN_STDG_NM" readonly />
<input is="id-input" type="text" class="form-control w-40" name="crdnPlc" data-map="CRDN_PLC" readonly />
</div>
</div>
</div>
<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>
</div> <!-- <div class="container-page-btn"> -->
<div class="row g-1">
<!-- 계약 시작 일시 -->
<div class="col-md-6">
<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-30" name="ctrtBgngYmd" data-map="CTRT_BGNG_DT" data-fmt-type="dt" 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="ctrtEndYmd">계약종료일시</label>
<input is="id-input" type="text" class="form-control w-30" name="ctrtEndYmd" data-map="CTRT_END_DT" data-fmt-type="dt" 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="vhrno">자동차등록번호</label>
<input is="id-input" type="text" class="form-control w-30" name="vhrno" data-map="VHRNO" 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="vhrno">임차인구분</label>
<input is="id-input" type="text" class="form-control w-20" name="hirerSeNm" data-map="HIRER_SE_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="hirerRegNo">임차인등록번호</label>
<input is="id-input" type="text" class="form-control w-30" name="hirerRegNo" data-map="HIRER_REG_NO" 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="hirerNm">임차인명</label>
<input is="id-input" type="text" class="form-control w-30" name="hirerNm" data-map="HIRER_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="hirerTelno">전화번호</label>
<input is="id-input" type="text" class="form-control w-30" name="hirerTelno" data-map="HIRER_TELNO" 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="hirerMblTelno">휴대전화번호</label>
<input is="id-input" type="text" class="form-control w-30" name="hirerMblTelno" data-map="HIRER_MBL_TELNO" 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="hirerEmlAddr">이메일</label>
<input is="id-input" type="text" class="form-control w-30" 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-70" name="hirerAddr" data-map="HIRER_ADDR" readonly />
<input is="id-input" type="text" class="form-control w-px-80" 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-78" 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>
</div>
</form>
<!-- 입력 영역 -->
<!-- 첨부 파일 -->
<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("rent02020Script", wctx.url("/webjars/js/fims/rent/rent02020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// datasetControl
$P.ctrl = newRent02020Control("${pageName}", "[data-doctx=${pageName}]");
// 파일 리스트
$P.fileListArr = new Array();
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// URL 설정
$P.setUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/020/list.do") // 검색
}
// 첨부파일 조회
$P.fnSearchFileList = (hirerId) => {
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) 삭제
}
// 임차인 등록일 경우에는 첨부파일을 조회하지 안는다..
if (!hirerId) return;
// 첨부파일 리스트
ajax.get({
url: "file/list.do"
, data: {
infoType: "120"
, infoKeys: hirerId
, 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 = () => {
//
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 설정
$P.fnReset();
// 3. dataset 설정
$P.ctrl.setData([${Info}]);
});
</script>

@ -1,8 +1,8 @@
function newRent02010Control(pageName, doctx="[data-doctx='rent02010']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "lsct"
, prefixName: "임대차계약"
, prefix: "crdnLsct"
, prefixName: "임대차계약 등록"
, dataGetter: obj => obj["List"]
, keys: ["CRDN_ID"]
, appendData: true
@ -107,7 +107,7 @@ function newRent02010Control(pageName, doctx="[data-doctx='rent02010']") {
AppSupport.setDialogZindex();
}
, onClose: () => { ctrl.reload({ all: true }); }
, onClose: () => { }
});
}
});

@ -1,163 +1,31 @@
function newRent02020Control(pageName, doctx="[data-doctx='rent02020']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "rentEnt"
, prefixName: "임대기업"
, dataGetter: obj => obj["List"]
, keys: ["ENT_ID"]
, appendData: true
, infoSize: "lg"
, prefix: "crdnLsct"
, prefixName: "임대차계약 등록"
, dataGetter: obj => obj["Info"]
, keys: ["CRDN_ID"]
, urls: {
load: "/list.do"
, getInfo: "/info.do"
, create: "/create.do"
, update: "/update.do"
, remove: "/remove.do"
}
, formats: {
REG_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["Total"]); // 전체 건수
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']"));
};
if (!item) return;
// 선택(체크) 변경 이벤트
ctrl.onSelectionChange = (selectedArr) => {
// gridCheckbox
Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr);
// gridButton
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnOK']"), selectedArr); // 선택 확인 버튼
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr); // 삭제 버튼
};
// 화면에 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
// 상세 정보 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: () => { } // ctrl.reload();
});
}
});
}
// 저장 callback
ctrl.onSave = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, ctrl.prefixName);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { }
, onClose: () => {
if (resp.saved) { dialog.close($(document.querySelector(doctx)).parents(".modal")[0].id); }
}
});
}
// 저장
ctrl.save = (params) => {
if (!params) return;
ajax.post({
url: ctrl.urls.create
, data: params || {}
, success: (resp) => { ctrl.onSave(params, resp); }
});
}
// 삭제 callback
ctrl.onRemove = (params, resp) => {
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, ctrl.prefixName);
// 메시지 출력
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); }
});
let key = item.data.HIRER_ID;
if (key != null) {
pageObject[pageName].fnSearchFileList(key);
}
};
return ctrl;
}

@ -108,7 +108,7 @@ function newRent02050Control(pageName, doctx="[data-doctx='rent02050']") {
AppSupport.setDialogZindex();
}
, onClose: () => { ctrl.reload({ all: true }); }
, onClose: () => { }
});
}
});

@ -0,0 +1,31 @@
function newRent02020Control(pageName, doctx="[data-doctx='rent02020']") {
let ctrl = new DatasetControl({
doctx: doctx
, prefix: "lsct"
, prefixName: "임대차계약"
, dataGetter: obj => obj["Info"]
, keys: ["LSCT_ID"]
, urls: {
load: "/list.do"
}
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
// 화면에 Dataset 셋팅
let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']"));
formFields.set(ctrl, item);
let key = item.data.HIRER_ID;
if (key != null) {
pageObject[pageName].fnSearchFileList(key);
}
};
return ctrl;
}
Loading…
Cancel
Save