|
@@ -422,7 +422,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
if (isMix) {
|
|
|
//先处理上半部分
|
|
|
- private_addPageValue(me.dispValueIdxLst, me.segments[segIdx], grpSeqInfo, counterRowRec, mixSplitPoint,me.page_seg_map, segIdx, pageIdx, grpPageInfo, false, null, 0);
|
|
|
+ prePageLeftAutoHeightRecAmt = private_addPageValue(me.dispValueIdxLst, me.segments[segIdx], grpSeqInfo, counterRowRec, mixSplitPoint,me.page_seg_map, segIdx, pageIdx, grpPageInfo, false, me.auto_height_info, prePageLeftAutoHeightRecAmt);
|
|
|
for (let dv of me.dispValueIdxLst[me.dispValueIdxLst.length - 1]) {
|
|
|
private_chk_handle_rec_amt(dv, false);
|
|
|
}
|
|
@@ -439,7 +439,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
me.dispValueIdxLst.splice(me.dispValueIdxLst.length - 1, 1);
|
|
|
} else if (isFollow) {
|
|
|
- private_addPageValue(me.dispValueIdxLst, followTabEx.segments[segIdx], null, counterRowRecEx, maxRowRec, me.page_seg_map, segIdx, pageIdx, null, true, null, 0);
|
|
|
+ prePageLeftAutoHeightRecAmt = private_addPageValue(me.dispValueIdxLst, followTabEx.segments[segIdx], null, counterRowRecEx, maxRowRec, me.page_seg_map, segIdx, pageIdx, null, true, me.auto_height_info, prePageLeftAutoHeightRecAmt);
|
|
|
for (let dv of me.dispValueIdxLst[me.dispValueIdxLst.length - 1]) {
|
|
|
private_chk_handle_rec_amt(dv, true);
|
|
|
}
|
|
@@ -472,9 +472,16 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
let ttlSegRecAmtNormal = me.segments[segIdx].length + grpRecAmt; //正常的segment下的数据长度累计(含grouping data)
|
|
|
let ttlSegRecAmt = (followTabEx)?(me.segments[segIdx].length + grpRecAmt + followTabEx.segments[segIdx].length + grpRecAmtEx):(me.segments[segIdx].length + grpRecAmt); //所有的segment下的数据长度累计(包括ex部分)
|
|
|
let adHocAutoHeightAmt = 0;
|
|
|
+ let adHocAutoHeightGrpStartIdx = 0;
|
|
|
if (me.auto_height_fields_idx.length > 0) {
|
|
|
for (let loop = 0; loop < me.auto_height_info[segIdx].length; loop++) {
|
|
|
adHocAutoHeightAmt += (me.auto_height_info[segIdx][loop] - 1);
|
|
|
+ if (me.group_node_info && me.group_node_info[segIdx]) {
|
|
|
+ if (me.group_node_info[segIdx][adHocAutoHeightGrpStartIdx] === loop) {
|
|
|
+ me.group_node_info[segIdx][adHocAutoHeightGrpStartIdx] = me.group_node_info[segIdx][adHocAutoHeightGrpStartIdx] + adHocAutoHeightAmt;
|
|
|
+ adHocAutoHeightGrpStartIdx++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
ttlSegRecAmtNormal += adHocAutoHeightAmt;
|
|
|
ttlSegRecAmt += adHocAutoHeightAmt;
|
|
@@ -484,15 +491,29 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
if (currentRecAmt > 0) pageStatus[JV.STATUS_SEGMENT_START] = false;
|
|
|
if (pageIdx > 0) pageStatus[JV.STATUS_REPORT_START] = false;
|
|
|
//开始判断各种scenarios
|
|
|
+ adHocAutoHeightAmt = 0;
|
|
|
+ let recAmtForAdHocAutoHeight = 0;
|
|
|
+ if (me.auto_height_fields_idx.length > 0) {
|
|
|
+ adHocAutoHeightAmt -= prePageLeftAutoHeightRecAmt;
|
|
|
+ //for (let loop = currentRecAmt; loop < me.auto_height_info[segIdx].length; loop++) {
|
|
|
+ for (let loop = currentRecAmt; loop < currentRecAmt + maxRowRec; loop++) {
|
|
|
+ if (me.auto_height_info[segIdx].length > loop) {
|
|
|
+ adHocAutoHeightAmt += (me.auto_height_info[segIdx][loop] - 1);
|
|
|
+ recAmtForAdHocAutoHeight++;
|
|
|
+ } else {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if ((ttlSegRecAmtNormal < ttlSegRecAmt) || (followTabEx != null)) {
|
|
|
//有流水拓展,并且是follow mode
|
|
|
- if (currentRecAmt + maxRowRec > ttlSegRecAmtNormal) {
|
|
|
- if (currentRecAmt >= ttlSegRecAmtNormal) {
|
|
|
+ if (currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight + maxRowRec > ttlSegRecAmtNormal) {
|
|
|
+ if (currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight >= ttlSegRecAmtNormal) {
|
|
|
//纯 followTabEx 数据
|
|
|
- if (currentRecAmt + maxRowRec >= ttlSegRecAmt) {
|
|
|
+ if (currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight + maxRowRec >= ttlSegRecAmt) {
|
|
|
pageStatus[JV.STATUS_SEGMENT_END] = true;
|
|
|
private_resetBandArea();
|
|
|
- let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, ttlSegRecAmt, currentRecAmt, maxRowRec, me.isEx);
|
|
|
+ let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, ttlSegRecAmt, currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight, maxRowRec, me.isEx);
|
|
|
if (hasAdHocRow) {
|
|
|
//add page info(pre segment end)
|
|
|
pageStatus[JV.STATUS_SEGMENT_END] = false;
|
|
@@ -506,10 +527,10 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
} else {
|
|
|
//混合数据
|
|
|
- if (currentRecAmt + maxRowRec >= ttlSegRecAmt) {
|
|
|
+ if (currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight + maxRowRec >= ttlSegRecAmt) {
|
|
|
pageStatus[JV.STATUS_SEGMENT_END] = true;
|
|
|
private_resetBandArea();
|
|
|
- let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, ttlSegRecAmt, currentRecAmt, maxRowRec, me.isEx);
|
|
|
+ let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, ttlSegRecAmt, currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight, maxRowRec, me.isEx);
|
|
|
if (hasAdHocRow) {
|
|
|
//add page info(pre segment end)
|
|
|
pageStatus[JV.STATUS_SEGMENT_END] = false;
|
|
@@ -517,7 +538,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
//add page info
|
|
|
pageStatus[JV.STATUS_SEGMENT_END] = true;
|
|
|
- if (currentRecAmt >= ttlSegRecAmtNormal) {
|
|
|
+ if (currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight >= ttlSegRecAmtNormal) {
|
|
|
//纯 followTabEx 数据啦
|
|
|
private_addPage(segIdx, null, true, false, -1);
|
|
|
} else {
|
|
@@ -533,20 +554,6 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
} else {
|
|
|
//普通流水数据情况
|
|
|
- let adHocAutoHeightAmt = 0;
|
|
|
- let recAmtForAdHocAutoHeight = 0;
|
|
|
- if (me.auto_height_fields_idx.length > 0) {
|
|
|
- adHocAutoHeightAmt -= prePageLeftAutoHeightRecAmt;
|
|
|
- //for (let loop = currentRecAmt; loop < me.auto_height_info[segIdx].length; loop++) {
|
|
|
- for (let loop = currentRecAmt; loop < currentRecAmt + maxRowRec; loop++) {
|
|
|
- if (me.auto_height_info[segIdx].length > loop) {
|
|
|
- adHocAutoHeightAmt += (me.auto_height_info[segIdx][loop] - 1);
|
|
|
- recAmtForAdHocAutoHeight++;
|
|
|
- } else {
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
if ((currentRecAmt + adHocAutoHeightAmt + recAmtForAdHocAutoHeight + maxRowRec >= ttlSegRecAmt)
|
|
|
&& (recAmtForAdHocAutoHeight + adHocAutoHeightAmt < 2 * maxRowRec) ) {
|
|
|
//备注: 理论上自动行高是没有上限的,有可能正常一页的数据可以拓展到3页及以上,在此极端情况下,必须做一些限制判断,否则会出现缺页情况。
|