|
@@ -199,7 +199,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
if (typeof(me.seg_sum_fields_idx[i]) === "object") {
|
|
if (typeof(me.seg_sum_fields_idx[i]) === "object") {
|
|
let exField = JE.F(me.seg_sum_fields_idx[i][JV.PROP_ID], $CURRENT_RPT);
|
|
let exField = JE.F(me.seg_sum_fields_idx[i][JV.PROP_ID], $CURRENT_RPT);
|
|
if (exField) {
|
|
if (exField) {
|
|
- data_fields.push(exField["data_field"]);
|
|
|
|
|
|
+ data_fields.push(exField[JV.PROP_AD_HOC_DATA]);
|
|
} else {
|
|
} else {
|
|
data_fields.push(null);
|
|
data_fields.push(null);
|
|
}
|
|
}
|
|
@@ -737,59 +737,10 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
vIdx.push([-1, JV.DISPLAY_VAL_TYPE_NORMAL, JV.BLANK_VALUE_INDEX]);
|
|
vIdx.push([-1, JV.DISPLAY_VAL_TYPE_NORMAL, JV.BLANK_VALUE_INDEX]);
|
|
}
|
|
}
|
|
let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
|
|
let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
|
|
- // me.multiCols = 1 * rptTpl[JV.NODE_FLOW_INFO][JV.PROP_MULTI_COLUMN];
|
|
|
|
- let newMultiCols = 1 * rptTpl[JV.NODE_FLOW_INFO][JV.PROP_MULTI_COLUMN];
|
|
|
|
// 2.2 Column tab
|
|
// 2.2 Column tab
|
|
- let private_colone_cells = function(orgCells) {
|
|
|
|
- let newRst = [];
|
|
|
|
- let newCopyCells = [];
|
|
|
|
- newCopyCells.push(orgCells);
|
|
|
|
- if (newMultiCols > 1) {
|
|
|
|
- let minX = 10000, maxX = -10;
|
|
|
|
- for (let cell of orgCells) {
|
|
|
|
- if (minX > parseInt(cell[JV.PROP_AREA][JV.PROP_LEFT])) minX = cell[JV.PROP_AREA][JV.PROP_LEFT];
|
|
|
|
- if (maxX < parseInt(cell[JV.PROP_AREA][JV.PROP_RIGHT])) maxX = cell[JV.PROP_AREA][JV.PROP_RIGHT];
|
|
|
|
- }
|
|
|
|
- let newW = maxX - minX, newSegW = newW / newMultiCols;
|
|
|
|
- for (let i = 1; i < newMultiCols; i++) {
|
|
|
|
- let cells = [];
|
|
|
|
- for (let cell of orgCells) {
|
|
|
|
- let copyCell = {Value: cell.Value, area: {}, font: cell[JV.PROP_FONT], control: cell[JV.PROP_CONTROL], style: cell[JV.PROP_STYLE]};
|
|
|
|
- cells.push(copyCell);
|
|
|
|
- copyCell[JV.PROP_AREA][JV.PROP_LEFT] = cell[JV.PROP_AREA][JV.PROP_LEFT];
|
|
|
|
- copyCell[JV.PROP_AREA][JV.PROP_RIGHT] = cell[JV.PROP_AREA][JV.PROP_RIGHT];
|
|
|
|
- copyCell[JV.PROP_AREA][JV.PROP_TOP] = cell[JV.PROP_AREA][JV.PROP_TOP];
|
|
|
|
- copyCell[JV.PROP_AREA][JV.PROP_BOTTOM] = cell[JV.PROP_AREA][JV.PROP_BOTTOM];
|
|
|
|
- }
|
|
|
|
- newCopyCells.push(cells);
|
|
|
|
- }
|
|
|
|
- for (let ci = 0; ci < newCopyCells.length; ci++) {
|
|
|
|
- for (let cCell of newCopyCells[ci]) {
|
|
|
|
- cCell[JV.PROP_AREA][JV.PROP_LEFT] = Math.round(minX + newSegW * ci + (cCell[JV.PROP_AREA][JV.PROP_LEFT] - minX) / newMultiCols);
|
|
|
|
- cCell[JV.PROP_AREA][JV.PROP_RIGHT] = Math.round(minX + newSegW * ci + (cCell[JV.PROP_AREA][JV.PROP_RIGHT] - minX) / newMultiCols);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let cCells of newCopyCells) {
|
|
|
|
- for (let dCell of cCells) {
|
|
|
|
- newRst.push(dCell);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return newRst;
|
|
|
|
- };
|
|
|
|
- let tmpColCells = me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, 0);
|
|
|
|
- if (newMultiCols > 1) {
|
|
|
|
- tmpColCells = private_colone_cells(tmpColCells);
|
|
|
|
- }
|
|
|
|
- rst = rst.concat(tmpColCells);
|
|
|
|
|
|
+ rst = rst.concat(me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, 0));
|
|
// 2.1 Content-Tab
|
|
// 2.1 Content-Tab
|
|
- let tmpContentCells = me.outputPreviewContent(rptTpl, bands, unitFactor, controls, pageStatus, maxRowRec);
|
|
|
|
- if (newMultiCols > 1) {
|
|
|
|
- tmpContentCells = private_colone_cells(tmpContentCells);
|
|
|
|
- } else {
|
|
|
|
- // rst = rst.concat(me.outputPreviewContent(rptTpl, bands, unitFactor, controls, pageStatus, maxRowRec));
|
|
|
|
- }
|
|
|
|
- rst = rst.concat(tmpContentCells);
|
|
|
|
|
|
+ rst = rst.concat(me.outputPreviewContent(rptTpl, bands, unitFactor, controls, pageStatus, maxRowRec));
|
|
// 2.3 Sum Seg
|
|
// 2.3 Sum Seg
|
|
rst = rst.concat(me.outputPreviewSegSum(rptTpl, bands, unitFactor, controls, pageStatus));
|
|
rst = rst.concat(me.outputPreviewSegSum(rptTpl, bands, unitFactor, controls, pageStatus));
|
|
// 2.4 Sum Page
|
|
// 2.4 Sum Page
|
|
@@ -903,10 +854,10 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
let contentValuesIdx = me.dispValueIdxLst[page - 1];
|
|
let contentValuesIdx = me.dispValueIdxLst[page - 1];
|
|
let page_sum_data_fields = [];
|
|
let page_sum_data_fields = [];
|
|
for (let i = 0; i < me.page_sum_fields_idx.length; i++) {
|
|
for (let i = 0; i < me.page_sum_fields_idx.length; i++) {
|
|
- if (typeof(me.page_sum_fields_idx[i])=="object") {
|
|
|
|
|
|
+ if (typeof(me.page_sum_fields_idx[i]) === "object") {
|
|
let exField = JE.F(me.page_sum_fields_idx[i][JV.PROP_ID], $CURRENT_RPT);
|
|
let exField = JE.F(me.page_sum_fields_idx[i][JV.PROP_ID], $CURRENT_RPT);
|
|
if (exField) {
|
|
if (exField) {
|
|
- page_sum_data_fields.push(exField["data_field"]);
|
|
|
|
|
|
+ page_sum_data_fields.push(exField[JV.PROP_AD_HOC_DATA]);
|
|
} else {
|
|
} else {
|
|
page_sum_data_fields.push(null);
|
|
page_sum_data_fields.push(null);
|
|
}
|
|
}
|