|
@@ -208,6 +208,18 @@ JpcExSrv.prototype.createNew = function(){
|
|
|
};
|
|
|
JpcResult.outputAsSimpleJSONPage = function(rptTpl, dataObj, bands, page, controls) {
|
|
|
let me = this, rst = null;
|
|
|
+ function getPageMergeBorder() {
|
|
|
+ let rst = null;
|
|
|
+ if (bands[JV.BAND_PROP_MERGE_BAND]) {
|
|
|
+ let mergedBand = bands[JV.BAND_PROP_MERGE_BAND];
|
|
|
+ rst = {};
|
|
|
+ rst[JV.PROP_LEFT] = parseInt(mergedBand[JV.PROP_LEFT].toFixed(0));
|
|
|
+ rst[JV.PROP_RIGHT] = parseInt(mergedBand[JV.PROP_RIGHT].toFixed(0));
|
|
|
+ rst[JV.PROP_TOP] = parseInt(mergedBand[JV.PROP_TOP].toFixed(0));
|
|
|
+ rst[JV.PROP_BOTTOM] = parseInt(mergedBand[JV.PROP_BOTTOM].toFixed(0));
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ }
|
|
|
if (me.totalPages >= page) {
|
|
|
rst = {};
|
|
|
rst[JV.PROP_PAGE_SEQ] = page;
|
|
@@ -218,7 +230,7 @@ JpcExSrv.prototype.createNew = function(){
|
|
|
if (me.flowTab.paging_option === JV.PAGING_OPTION_INFINITY) {
|
|
|
adHocMergePos = {};
|
|
|
}
|
|
|
- rst.cells = me.flowTab.outputAsSimpleJSONPage(rptTpl, dataObj, page, bands, controls, adHocMergePos, me);
|
|
|
+ rst[JV.PROP_CELLS] = me.flowTab.outputAsSimpleJSONPage(rptTpl, dataObj, page, bands, controls, adHocMergePos, me);
|
|
|
if (adHocMergePos) {
|
|
|
adHocMergePos[JV.NODE_PAGE_SIZE] = JpcCommonHelper.getPageSize(rptTpl);
|
|
|
rst[JV.PAGE_SPECIAL_MERGE_POS] = adHocMergePos;
|
|
@@ -226,14 +238,20 @@ JpcExSrv.prototype.createNew = function(){
|
|
|
|
|
|
} else {
|
|
|
if (!me.isFollowMode) {
|
|
|
- rst.cells = me.flowTabEx.outputAsSimpleJSONPage(rptTpl, dataObj, page - (me.totalPages - me.exTotalPages), bands, controls, adHocMergePos, me);
|
|
|
+ rst[JV.PROP_CELLS] = me.flowTabEx.outputAsSimpleJSONPage(rptTpl, dataObj, page - (me.totalPages - me.exTotalPages), bands, controls, adHocMergePos, me);
|
|
|
}
|
|
|
}
|
|
|
} else if (me.crossTab) {
|
|
|
- rst.cells = me.crossTab.outputAsSimpleJSONPage(rptTpl, dataObj, page, bands, controls, me);
|
|
|
+ rst[JV.PROP_CELLS] = me.crossTab.outputAsSimpleJSONPage(rptTpl, dataObj, page, bands, controls, me);
|
|
|
} else if (me.billTab) {
|
|
|
//
|
|
|
}
|
|
|
+ if (!(me.flowTab && me.flowTab.paging_option === JV.PAGING_OPTION_INFINITY)) {
|
|
|
+ let pageMergeBorder = getPageMergeBorder();
|
|
|
+ if (pageMergeBorder) {
|
|
|
+ rst[JV.PROP_PAGE_MERGE_BORDER] = pageMergeBorder;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return rst;
|
|
|
};
|