|
|
@@ -1115,6 +1115,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
me.pageSumValLst.push(rowGrandTotal);
|
|
|
//grouping content
|
|
|
+ let grpCntIdx = 0;
|
|
|
for (let rowIdx = 0; rowIdx < contentValuesIdx.length; rowIdx++) {
|
|
|
if (contentValuesIdx[rowIdx][1] === JV.DISPLAY_VAL_TYPE_GROUP) {
|
|
|
for (let grpIdx = 0; grpIdx < rptTpl[FLOW_NODE_STR][JV.NODE_FLOW_GROUP][JV.PROP_GROUP_LINES].length; grpIdx++) {
|
|
|
@@ -1130,10 +1131,11 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- let lineRst = me.outputTabGrpLine(band, grp_line, page, contentValuesIdx[rowIdx], contentValuesIdx.length, rowIdx, 1, 0, unitFactor, true, controls, multiColIdx);
|
|
|
+ let lineRst = me.outputTabGrpLine(band, grp_line, page, contentValuesIdx[rowIdx], contentValuesIdx.length, rowIdx, 1, 0, unitFactor, true, controls, multiColIdx, grpCntIdx, $CURRENT_RPT);
|
|
|
rst = rst.concat(lineRst);
|
|
|
}
|
|
|
}
|
|
|
+ grpCntIdx++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1295,7 +1297,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
return rst;
|
|
|
}
|
|
|
};
|
|
|
- JpcFlowTabResult.outputTabGrpLine = function (band, grp_line, page, grpValueIdx, rows, rowIdx, cols, colIdx, unitFactor, isRow, controls, multiColIdx) {
|
|
|
+ JpcFlowTabResult.outputTabGrpLine = function (band, grp_line, page, grpValueIdx, rows, rowIdx, cols, colIdx, unitFactor, isRow, controls, multiColIdx, grpCntIdx, $CURRENT_RPT) {
|
|
|
let me = this, rst = [];
|
|
|
if (grp_line[JV.PROP_GROUP_SUM_KEYS]) {
|
|
|
let segIdx = JpcCommonHelper.getSegIdxByPageIdx(page, me.page_seg_map);
|
|
|
@@ -1309,7 +1311,10 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
if (grp_line[JV.PROP_TEXTS]) {
|
|
|
for (let txt of grp_line[JV.PROP_TEXTS]) {
|
|
|
+ me.checkGrpTxtOutEvent(JV.RUN_TYPE_BEFORE_GROUP_TEXT_OUT, txt, grpCntIdx, $CURRENT_RPT);
|
|
|
rst.push(JpcTextHelper.outputText(txt, band, unitFactor, rows, rowIdx, cols, colIdx, me.multiCols, multiColIdx));
|
|
|
+ // me.combinePageCells(rst, verticalCombinePos, horizonCombinePos);
|
|
|
+ // 可能会有一个After,但意义不大,用不着
|
|
|
}
|
|
|
}
|
|
|
if (grp_line[JV.PROP_DISCRETE_FIELDS]) {
|
|
|
@@ -1321,6 +1326,24 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
// console.log(rst);
|
|
|
return rst;
|
|
|
};
|
|
|
+ JpcFlowTabResult.checkGrpTxtOutEvent = function ($RUN_TYPE, $TEXT, $TIMES, $CURRENT_RPT) {
|
|
|
+ if ($CURRENT_RPT.formulas) {
|
|
|
+ for (let execFmlIdx = 0; execFmlIdx < $CURRENT_RPT.formulas.length; execFmlIdx++) {
|
|
|
+ if ($CURRENT_RPT.formulas[execFmlIdx][JV.PROP_RUN_TYPE] === $RUN_TYPE) {
|
|
|
+ let expression = $CURRENT_RPT.formulas[execFmlIdx][JV.PROP_EXPRESSION];
|
|
|
+ if (expression) {
|
|
|
+ let $ME = $CURRENT_RPT.formulas[execFmlIdx];
|
|
|
+ try {
|
|
|
+ eval(expression);
|
|
|
+ } catch (ex) {
|
|
|
+ console.log(ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
JpcFlowTabResult.commonTabRestOutput = function(dataObj, page, segIdx, bands, band, unitFactor, tab, multiColIdx){
|
|
|
let me = this, rst = [];
|
|
|
if (tab[JV.PROP_TEXT]) {
|