feat: 단속관리 진행

main
minuk926 2 years ago
parent 0ad9cbbe52
commit ee91b5c13a

@ -43,13 +43,15 @@
<!-- 데이터 출력 -->
<div id="grid"></div>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/bizCmmUtil.js" defer></script>
<%--<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/bizCmmUtil.js" defer></script>--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/popupPageNavigation.js" defer></script>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
let GRID = null;
var callbackSearch = () => fnBiz.search();
var pageNav = null;
//var unblockUI = () => $.unblockUI();
//var popup = null;
@ -91,17 +93,21 @@
}
,onClickGrid: function(props){
const {page, perPage, totalCount} = GRID.store.data.pageOptions;
gridInfo = {
curGridDatas: GRID.store.data.rawData
,curRowData: GRID.store.data.rawData[props.rowKey]
,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
,page
,perPage
,totalCount
,isNext: null
}
fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
// gridInfo = {
// curGridDatas: GRID.store.data.rawData
// ,curRowData: GRID.store.data.rawData[props.rowKey]
// ,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
// ,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
// ,page
// ,perPage
// ,totalCount
// ,isNext: null
// }
// fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
pageNav = new PageNavigation(GRID, props);
fnBiz.pagePopup('detail', {extrlRegltCntcId: pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: pageNav.gridInfo.curRowData.regltSeCode});
}
}
@ -212,24 +218,29 @@
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data?.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
// if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
// GRID.resetData(res.data?.contents);
//
// if(gridInfo.isNext){
// gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
// gridInfo.curGridDataPos = 0;
// } else{
// gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
// gridInfo.curGridDataPos = gridInfo.perPage - 1;
// }
// // grid page data position reset
// gridInfo.isNext = null;
// gridInfo.curGridDatas = GRID.store.data.rawData;
// gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//
// fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
// }
// if(gridInfo?.isNext) gridInfo.isNext = null;
if(pageNav?.gridInfo?.curRowData) {
//loadPageNavigation(res, GRID, {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode})
pageNav.loadNavigation(res, {extrlRegltCntcId: pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: pageNav.gridInfo.curRowData.regltSeCode})
}
if(gridInfo?.isNext) gridInfo.isNext = null;
});
}

@ -176,6 +176,7 @@
<!-- //popup -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/framework/js/cmm/cmmDownloadImg.js" defer></script>
<%--<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/bizCmmUtil.js" defer></script>--%>
<script type="text/javascript">
/**************************************************************************
* Global Variable
@ -299,11 +300,17 @@
});
$('#prev').on('click', () => {
window.opener.onClickCrackdownNavigationBtn('prev');
});
//window.opener.onClickCrackdownNavigationBtn('prev');
window.opener.pageNav.onClickNavBtn('prev',
{extrlRegltCntcId: window.opener.pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: window.opener.pageNav.gridInfo.curRowData.regltSeCode});
})
$('#next').on('click', () => {
window.opener.onClickCrackdownNavigationBtn('next');
//window.opener.onClickCrackdownNavigationBtn('next');
window.opener.pageNav.onClickNavBtn('next',
{extrlRegltCntcId: window.opener.pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: window.opener.pageNav.gridInfo.curRowData.regltSeCode});
});
});
@ -314,16 +321,17 @@
// orgData = $('form').serialize();
fnBiz.downloadImg();
if(window.opener.gridInfo.curRowPos === 1){
const gridInfo = window.opener.pageNav.gridInfo;
if(gridInfo.curRowPos === 1){
$('#prev').attr('disabled', true);
}else{
$('#prev').attr('disabled', false);
}
if(window.opener.gridInfo.curRowPos === window.opener.gridInfo.totalCount){
if(gridInfo.curRowPos === gridInfo.totalCount){
$('#next').attr('disabled', true);
}else{
$('#next').attr('disabled', false);
}
$('#totCnt span').text(window.opener.gridInfo.curRowPos + " / " + window.opener.gridInfo.totalCount);
$('#totCnt span').text(gridInfo.curRowPos + " / " + gridInfo.totalCount);
});
</script>

@ -410,24 +410,29 @@
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
// if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
// GRID.resetData(res.data.contents);
//
// if(gridInfo.isNext){
// gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
// gridInfo.curGridDataPos = 0;
// } else{
// gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
// gridInfo.curGridDataPos = gridInfo.perPage - 1;
// }
// // grid page data position reset
// gridInfo.isNext = null;
// gridInfo.curGridDatas = GRID.store.data.rawData;
// gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//
// fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
// }
// if(gridInfo?.isNext) gridInfo.isNext = null;
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
if(gridInfo?.curRowData) {
pageNav.loadNavigation(res, {interfaceSeqN: gridInfo.curRowData?.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData?.ctznSttemntDetailSn})
}
if(gridInfo?.isNext) gridInfo.isNext = null;
});
}

@ -65,33 +65,14 @@
<!-- 데이터 출력 -->
<div id="grid"></div>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/bizCmmUtil.js" defer></script>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
let GRID = null;
let searchCount = null;
var callbackSearch = () => fnBiz.search();
//개별총정보 팝업내 다음/이전페이지
var pageId = null;
var lastPageId = null;
var lastPage = false;
function clickDataChangeBtn(param){
lastPageId = GRID.store.data.rawData[pageId.rowKey];
if(param == 'next') {pageId = GRID.store.data.rawData[pageId.rowKey+1];}
else {pageId = GRID.store.data.rawData[pageId.rowKey-1];}
console.log(pageId);
if(pageId == undefined){
pageId = lastPageId;
lastPage = true;
} else {
lastPage = false;
fnBiz.pagePopup('detail', {regltId: pageId.regltId});
}
}
/*******************************
* Biz function
*******************************/
@ -114,14 +95,29 @@
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
popup = CmmPopup.open(url, params, popOption, popTitle);
}
,onDbClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey);
pageId = GRID.store.data.rawData[props.rowKey];
fnBiz.pagePopup('detail', {regltId: rowData.regltId});
}
,onClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey);
//pageId = GRID.store.data.rawData[props.rowKey];
const {page, perPage, totalCount} = GRID.store.data.pageOptions;
gridInfo = {
curGridDatas: GRID.store.data.rawData
,curRowData: GRID.store.data.rawData[props.rowKey]
,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
,page
,perPage
,totalCount
,isNext: null
}
fnBiz.pagePopup('detail', {regltId: rowData.regltId});
}
}
/**************************************************************************
@ -187,7 +183,20 @@
name: 'vhcleNo',
minWidth: 100,
sortable: true,
align: 'center'
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter: (props)=>{
return {
formatter: props.grid.getRow(props.rowKey).vhcleNo
,element: "text"
}
}
,eventFunction: fnBiz.onClickGrid
,eventType: "click"
}
}
},
{
header: '위반장소',
@ -297,7 +306,29 @@
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
onDblClickEventSet();
//onDblClickEventSet();
// if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
// GRID.resetData(res.data.contents);
//
// if(gridInfo.isNext){
// gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
// gridInfo.curGridDataPos = 0;
// } else{
// gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
// gridInfo.curGridDataPos = gridInfo.perPage - 1;
// }
// // grid page data position reset
// gridInfo.isNext = null;
// gridInfo.curGridDatas = GRID.store.data.rawData;
// gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//
// fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
// }
// if(gridInfo?.isNext) gridInfo.isNext = null;
if(gridInfo.curRowData) {
loadPageNavigation(GRID, res, {interfaceSeqN: gridInfo.curRowData?.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData?.ctznSttemntDetailSn})
}
});
}

@ -21,13 +21,13 @@
</div>
<div class="listBtn">
<button type="button" id="prevData" name="prevData" value="">prev</button>
<button type="button" id="prev" name="prev">prev</button>
<div>
<span>
<div id="totCnt" style="padding: 0 10px;">전체 ㅣ <span></span></div>
<div id="totCnt" style="padding: 0 10px;"><span></span></div>
</span>
</div>
<button type="button" id="nextData" name="nextData" value="">next</button>
<button type="button" id="next" name="next">next</button>
</div>
<div class="row">
<div id="tabs_0">
@ -193,6 +193,20 @@
* event
**************************************************************************/
$(() => {
$('img').on('click', () => {
fnBiz.viewImg()
});
$(window).on("unload", function (e) {
window.opener?.unblockUI();
window.opener?.callbackSearch();
return null;
});
$("#btnClose").on('click', () => {
window.close()
});
$('#btnRegist').on('click', () => {
fnBiz.add();
});
@ -208,13 +222,13 @@
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
$('#prevData').on('click', () => {
window.opener.clickDataChangeBtn('prev');
if(window.opener.lastPage == true) alert('no more prev view');
$('#prev').on('click', () => {
window.opener.onClickRegltNavigationBtn('prev');
//if(window.opener.lastPage == true) alert('no more prev view');
});
$('#nextData').on('click', () => {
window.opener.clickDataChangeBtn('next');
if(window.opener.lastPage == true) alert('no more next view');
$('#next').on('click', () => {
window.opener.onClickRegltNavigationBtn('next');
//if(window.opener.lastPage == true) alert('no more next view');
});
});
@ -223,7 +237,18 @@
$(document).ready(function(){
orgData = $('form').serialize();
fnBiz.downloadImg();
$('#totCnt span').text(window.opener.pageId.rowKey+1 + " / " + window.opener.$('#totCnt span').text());
if(window.opener.gridInfo.curRowPos === 1){
$('#prev').attr('disabled', true);
}else{
$('#prev').attr('disabled', false);
}
if(window.opener.gridInfo.curRowPos === window.opener.gridInfo.totalCount){
$('#next').attr('disabled', true);
}else{
$('#next').attr('disabled', false);
}
$('#totCnt span').text(window.opener.gridInfo.curRowPos + " / " + window.opener.gridInfo.totalCount);
});
</script>

@ -1,4 +1,5 @@
// 이전/다음 페이지 navigation data
var gridInfo = {
// 현재 gridData 목록
curGridDatas: null
@ -18,9 +19,29 @@ var gridInfo = {
,isNext: null
}
function loadPageNavigation(res, GRID, curData){
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', curData);
}
if(gridInfo?.isNext) gridInfo.isNext = null;
}
//개별총정보 팝업내 다음/이전페이지
function onClickCrackdownNavigationBtn(evDiv) {
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
@ -31,7 +52,8 @@ function onClickCrackdownNavigationBtn(evDiv) {
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
@ -44,7 +66,9 @@ function onClickCrackdownNavigationBtn(evDiv) {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
@ -77,3 +101,32 @@ function onClickCtznStmtNavigationBtn(evDiv) {
}
}
}
function onClickRegltNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
}
}

@ -0,0 +1,131 @@
// 이전/다음 페이지 navigation data
var gridInfo = {
// 현재 gridData 목록
curGridDatas: null
// 현재 rowData
,curRowData: null
// 현재 데이타 위치
,curRowPos: null
// 현재 데이타 위치
,curGridDataPos: null
// 현재 page
,page: null
// 페이지당 갯수
,perPage: null
// 전체 데이타 count
,totalCount: null
// 페이지 이동 구분
,isNext: null
}
function loadPageNavigation(res, GRID, curData){
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', curData);
}
if(gridInfo?.isNext) gridInfo.isNext = null;
}
//개별총정보 팝업내 다음/이전페이지
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
function onClickCtznStmtNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
}
}
function onClickRegltNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
}
}

@ -0,0 +1,211 @@
// 이전/다음 페이지 navigation data
class PageNavigation {
grid = null;
// 현재 gridData 목록
gridInfo = {
curGridDatas: null
// 현재 rowData
, curRowData: null
// 현재 데이타 위치
, curRowPos: null
// 현재 데이타 위치
, curGridDataPos: null
// 현재 page
, page: null
// 페이지당 갯수
, perPage: null
// 전체 데이타 count
, totalCount: null
// 페이지 이동 구분
, isNext: null
};
curKeyData = null;
fnGetKeyData = null;
constructor(GRID, props) {
const {page, perPage, totalCount} = GRID.store.data.pageOptions;
this.gridInfo = {
curGridDatas: GRID.store.data.rawData
,curRowData: GRID.store.data.rawData[props.rowKey]
,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
,page
,perPage
,totalCount
,isNext: null
}
this.grid = GRID;
//this.fnGetKeyData = fnGetKeyData;
//this.curKeyData = this.fnGetKeyData();
};
loadNavigation(res){
if(this.gridInfo !== null && this.gridInfo?.isNext !== 'undefinded' && this.gridInfo?.isNext !== null) {
this.grid.resetData(res.data.contents);
if(this.gridInfo.isNext){
this.gridInfo.curRowPos = (this.gridInfo.page - 1) * this.gridInfo.perPage + 1;
this.gridInfo.curGridDataPos = 0;
} else{
this.gridInfo.curRowPos = this.gridInfo.page * this.gridInfo.perPage;
this.gridInfo.curGridDataPos = this.gridInfo.perPage - 1;
}
// grid page data position reset
this.gridInfo.isNext = null;
this.gridInfo.curGridDatas = this.grid.store.data.rawData;
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
this.curKeyData = this.fnGetKeyData;
//this.curKeyData = this.fnGetKeyData;
fnBiz.pagePopup('detail', curKeyData);
}
if(this.gridInfo?.isNext) this.gridInfo.isNext = null;
};
onClickNavBtn(evDiv, curData) {
if (evDiv === 'next') {
if(this.gridInfo.curGridDataPos + 1 === this.gridInfo.perPage){
this.gridInfo.isNext = true;
this.gridInfo.page++;
this.grid.getPagination().movePageTo(this.gridInfo.page);
}else{
this.gridInfo.curRowPos++;
this.gridInfo.curGridDataPos++;
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
if(this.gridInfo.curGridDataPos === 0){
this.gridInfo.isNext = false;
this.gridInfo.page--;
this.grid.getPagination().movePageTo(this.gridInfo.page);
}else {
this.gridInfo.curRowPos--;
this.gridInfo.curGridDataPos--;
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
}
function loadPageNavigation(res, GRID, curData){
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', curData);
}
if(gridInfo?.isNext) gridInfo.isNext = null;
}
//개별총정보 팝업내 다음/이전페이지
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
function onClickCtznStmtNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
}
}
function onClickRegltNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
}
}
Loading…
Cancel
Save