fix : 모달 팝업 창 높이 수정, tui그리드 오류 수정

main
이범준 2 years ago
parent 7ab229a00b
commit be40fb0c81

@ -1322,8 +1322,10 @@ Date Author Description
} }
} }
$("#popupTabs .nav-link").on("click", function(){
let popupHeight = $("#wrap").height();
$(window.frameElement).attr("height",popupHeight);
});
$(document).ready(function(){ $(document).ready(function(){
initPopupGrid(); initPopupGrid();

@ -314,6 +314,9 @@ Date Author Description
} }
} }
,setDblClickEvent: function (idx) { ,setDblClickEvent: function (idx) {
ARR_GRID[idx].off('dblclick');
ARR_GRID[idx].on('dblclick', function (props) { ARR_GRID[idx].on('dblclick', function (props) {
popupDiv = 'total'; popupDiv = 'total';
const rowDatas = ARR_GRID[idx].store.data.rawData.map(d => { const rowDatas = ARR_GRID[idx].store.data.rawData.map(d => {
@ -676,34 +679,43 @@ Date Author Description
} }
} }
}; };
let resetFlag = true;
const gridResponseReset = (res, idx) => { const gridResponseReset = (res, idx) => {
// FIXME:: scroll type 사용시
ARR_GRID[idx].resetData([]); if(resetFlag){
ARR_GRID[idx].refreshLayout(); // FIXME:: scroll type 사용시
// FIXME:: scroll type 사용시 ARR_GRID[idx].resetData([]);
ARR_TOTCNT[idx] = res.data.pagination.totalCount; ARR_GRID[idx].refreshLayout();
$('#totCnt span').text(ARR_TOTCNT[idx]); // FIXME:: scroll type 사용시
const gridInfo = ARR_NAV[idx]?.gridInfo; ARR_TOTCNT[idx] = res.data.pagination.totalCount;
if(gridInfo && gridInfo?.pageMove) { $('#totCnt span').text(ARR_TOTCNT[idx]);
const gridInfo = ARR_NAV[idx]?.gridInfo;
let datas; if(gridInfo && gridInfo?.pageMove) {
if(popupDiv === 'answerPreview'){
datas = res.data?.contents.map(d => { let datas;
return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.regltProcessSttusCode), resnCode: d.erppSeCode, interfaceSeqN: d.interfaceSeqN, vhcleNo: d.vhcleNo} if(popupDiv === 'answerPreview'){
}) datas = res.data?.contents.map(d => {
}else { return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.regltProcessSttusCode), resnCode: d.erppSeCode, interfaceSeqN: d.interfaceSeqN, vhcleNo: d.vhcleNo};
datas = res.data?.contents.map(d => { });
return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode} }else {
datas = res.data?.contents.map(d => {
return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode};
});
}
ARR_NAV[idx].resetGrid(res, datas, (pagiNavigation)=>{
ARR_NAV[idx] = pagiNavigation;
fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData);
}); });
} }
ARR_NAV[idx].resetGrid(res, datas, (pagiNavigation)=>{ fnBiz.setDblClickEvent(idx);
ARR_NAV[idx] = pagiNavigation;
fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData); resetFlag = false;
})
} }
fnBiz.setDblClickEvent(idx);
} };
const initGrid = () => { const initGrid = () => {
ARR_GRID[0] = TuiGrid.of(gridOptions, gridDatasource, (res) => gridResponseReset(res, 0)); ARR_GRID[0] = TuiGrid.of(gridOptions, gridDatasource, (res) => gridResponseReset(res, 0));
const options = $.extend(gridOptions, gridOptions.columns[1].renderer = null, true); const options = $.extend(gridOptions, gridOptions.columns[1].renderer = null, true);

Loading…
Cancel
Save