main
jjh 2 months ago
parent fabeb9f91a
commit 8ac313e2e1

@ -68,7 +68,7 @@
<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 name="rent01010table" class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr name="theadTr" data-search-target="[data-doctx='${pageName}']">
</tr>
@ -155,9 +155,22 @@
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
// paging
$P.pagingSupport = new FimsPagingSupport({
doq: $P
, linkContainer: "[name='dataPaging']"
});
/**************************************************************************
* DataTable 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (obj, option) => {
// dataTables(그리드)에 페이지 표시 pagingInfo
$P.pagingSupport.setPagingInfo(obj);
}
// dataTable 체크박스 클릭 이벤트
$P.dataTableCheckbox = (element, bool) => {
GRID.checkbox.sync(element, bool);
@ -178,11 +191,11 @@
}
// dataTable 더블 클릭 이벤트
$P.dataTableDblClick = (dataKey) => {
$P.dataTableDblClick = (dataIndex) => {
let params = {
callPurpose: "update"
, mpngId: dataKey
, userId: $P.$findn("userId").val()
, mpngId: dataIndex
, userId: $P.ctrl.getValue("USER_ID")
, schEntNo: $P.ctrl.getValue("ENT_NO")
};

@ -76,14 +76,14 @@
</div>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-160" name="btnCreate" title="임대차계약서 등록">
임대계약서 등록
<button type="button" class="btn btn-primary w-px-120" name="btnCreate" title="임대차계약서 등록">
계약서 등록
</button>
<button type="button" class="btn btn-primary w-px-160" name="btnUpdate" title="임대차계약서 수정">
임대계약서 수정
<button type="button" class="btn btn-primary w-px-120" name="btnUpdate" title="임대차계약서 수정">
계약서 수정
</button>
<button type="button" class="btn btn-primary w-px-160" name="btnRemove" title="임대차계약서 삭제">
임대계약서 삭제
<button type="button" class="btn btn-primary w-px-120" name="btnRemove" title="임대차계약서 삭제">
계약서 삭제
</button>
</span>
</div>
@ -126,8 +126,7 @@
</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: 56px;"><input type="checkbox" class="form-check-input" name="gridAllCheckbox" onchange="dataTableCheckbox(this, this.checked);" /></th>
<th class="cmn" style="width: 160px;">업무구분</th>
<th class="cmn" style="width: 100px;">대상여부</th>
<th class="cmn" style="width: 180px;" onclick="FimsSupport.searchFromGridTitle('CRDN_YMD', this.innerText, 'ymd', '');">단속일시</th>
@ -152,7 +151,7 @@
<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"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="DATA-INDEX" onchange="dataTableCheckbox(this, this.checked);" /></td>
<td class="cmn text-center" onclick ondblclick>{TASK_SE_NM}</td>
<td class="cmn text-center" onclick ondblclick>{TRGT_YN}</td>
<td class="cmn text-center" onclick ondblclick>{CRDN_YMD_TM}</td>
@ -194,7 +193,7 @@
<!-- / inner page html <div class="content-wrapper"> -->
<script>
LoadScript("rent02010Script",wctx.url("/webjars/js/fims/rent/rent02010.js?ver=${ver}"));
LoadScript("rent02010Script", wctx.url("/webjars/js/fims/rent/rent02010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -205,24 +204,36 @@
* script 진입
**************************************************************************/
$(document).ready(function() {
/**************************************************************************
* pageObject
**************************************************************************/
// pageObject
let $P = pageObject["${pageName}"];
// datasetControl
$P.ctrl = newRent02010Control("${pageName}", "[data-doctx=${pageName}]");
// formFields
$P.formFields = new FimsFormFields($P.selectorn("frmSearch"));
// datasetControl
$P.ctrl = newRent02010Control("${pageName}", "[data-doctx=${pageName}]");
// paging
$P.pagingSupport = new FimsPagingSupport({
doq: $P
, linkContainer: "[name='dataPaging']"
});
// DataTables에 click, dbclick 이벤트
$P.renderList = (obj, option) => {
// dataTables(그리드)에 페이지 표시 pagingInfo
$P.pagingSupport.setPagingInfo(obj);
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// URL 설정
$P.fnSetUrl = (prefixUrl) => {
$P.ctrl.urls.load = wctx.url(prefixUrl + "/010/list.do"); // 검색 url
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/020/info.do"); // 상세 정보 url
$P.ctrl.urls.load = wctx.url(prefixUrl + "/010/list.do"); // 검색
$P.ctrl.urls.getInfo = wctx.url(prefixUrl + "/020/info.do"); // 상세 정보
}
/**************************************************************************

@ -23,10 +23,10 @@ function newRent01010Control(pageName, doctx="[data-doctx='rent01010']") {
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
// paging
pagingSupport = new FimsPagingSupport({
doq: ctrl
, linkContainer: "[name='dataPaging']"
});
// ctrl.pagingSupport = new FimsPagingSupport({
// doq: ctrl
// , linkContainer: "[name='dataPaging']"
// });
/**************************************************************************
* DatasetControl Events
@ -37,10 +37,9 @@ function newRent01010Control(pageName, doctx="[data-doctx='rent01010']") {
let dataList = ctrl.dataset;
let empty = dataList.empty;
// 업무별 DataTables(그리드) tr, td
// 업무별 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() {
@ -49,7 +48,7 @@ function newRent01010Control(pageName, doctx="[data-doctx='rent01010']") {
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');")
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{MPNG_ID}');");
.replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');");
let trs = empty ?
[ctrl.find("[name='tmpltNotFound']").content.querySelector(".cmn").outerHTML]
@ -62,14 +61,14 @@ function newRent01010Control(pageName, doctx="[data-doctx='rent01010']") {
initScroll = false;
}
//
// dataTables(그리드)에 자료 표시 td
ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore);
// checkbox 체크 해제
$(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false);
// pagingInfo
pagingSupport.setPagingInfo(obj);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].renderList(obj, option);
};
// 현재 선택 자료 변경 이벤트
@ -81,8 +80,8 @@ function newRent01010Control(pageName, doctx="[data-doctx='rent01010']") {
ctrl.onSelectionChange = (selectedArr) => {
// gridCheckbox
Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr);
// 삭제 버튼
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr);
// gridButton
Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr); // 삭제 버튼
};
// 상세 정보 dialog

@ -25,12 +25,6 @@ function newRent02010Control(pageName, doctx="[data-doctx='rent02010']") {
// 검색 조건
ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인
// paging
pagingSupport = new FimsPagingSupport({
doq: ctrl
, linkContainer: "[name='dataPaging']"
});
/**************************************************************************
* DatasetControl Events
**************************************************************************/
@ -70,8 +64,8 @@ function newRent02010Control(pageName, doctx="[data-doctx='rent02010']") {
// checkbox 체크 해제
$(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false);
// pagingInfo
pagingSupport.setPagingInfo(obj);
// dataTables(그리드)에 페이지 표시 pagingInfo
pageObject[pageName].renderList(obj, option);
};
// 현재 선택 자료 변경 이벤트

Loading…
Cancel
Save