feat : 상세보기 다음/이전 기능 구현

main
Kurt92 2 years ago
parent fc8eb6166d
commit 6b276eabe3

@ -61,6 +61,25 @@
let GRID = null; let GRID = null;
var callbackSearch = () => fnBiz.search(); var callbackSearch = () => fnBiz.search();
//개별총정보 팝업내 다음/이전페이지
var pageId = null;
var lastPageId = null;
var lastPage = false;
function clickDataChangeBtn(param){
lastPageId = GRID.store.data.rawData[pageId.rowKey];
console.log(lastPageId);
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', {interfaceSeqN: pageId.interfaceSeqN, ctznSttemntDetailSn: pageId.ctznSttemntDetailSn});
}
}
/* ******************************* /* *******************************
@ -93,6 +112,7 @@
} }
,onClickGrid: function(props){ ,onClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey); const rowData = props.grid.getRow(props.rowKey);
pageId = GRID.store.data.rawData[props.rowKey];
fnBiz.pagePopup('detail', {interfaceSeqN: rowData.interfaceSeqN, ctznSttemntDetailSn: rowData.ctznSttemntDetailSn}); fnBiz.pagePopup('detail', {interfaceSeqN: rowData.interfaceSeqN, ctznSttemntDetailSn: rowData.ctznSttemntDetailSn});
} }
} }

@ -9,7 +9,15 @@
<p class="pop_title"> <p class="pop_title">
<c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/>) 상세 <c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/>) 상세
</p> </p>
<div class="listBtn">
<button type="button" id="prevData" name="prevData" value="">prev</button>
<div>
<span>
<div id="totCnt" style="padding: 0 10px;">전체 ㅣ <span></span></div>
</span>
</div>
<button type="button" id="nextData" name="nextData" value="">next</button>
</div>
<form name="frmStmt"> <form name="frmStmt">
<table class="tbl03"> <table class="tbl03">
<caption><c:out value="${bizName}"/> 상세</caption> <caption><c:out value="${bizName}"/> 상세</caption>
@ -373,6 +381,15 @@
$('img').on('click', () => { $('img').on('click', () => {
fnBiz.viewImg() fnBiz.viewImg()
}); });
$('#prevData').on('click', () => {
window.opener.clickDataChangeBtn('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');
});
}); });
/************************************************************************** /**************************************************************************
@ -385,6 +402,8 @@
orgDtlDatas.push($('form[name=frmStmtDtl${dtlDTO.ctznSttemntDetailSn}]').serialize()) orgDtlDatas.push($('form[name=frmStmtDtl${dtlDTO.ctznSttemntDetailSn}]').serialize())
</c:forEach> </c:forEach>
fnBiz.downloadImg(); fnBiz.downloadImg();
$('#totCnt span').text(window.opener.pageId.rowKey+1 + " / " + window.opener.$('#totCnt span').text());
}); });

Loading…
Cancel
Save