|
|
@@ -10,7 +10,7 @@ import { JpcFunc } from './jpc_function';
|
|
|
import { JpcEvent } from './jpc_event';
|
|
|
import { JpcData } from './jpc_data';
|
|
|
import { JpcCommonHelper } from './helper/jpc_helper_common';
|
|
|
-import { IDefProperties, IFormula, IParams, ICurrent_RPT, ICustomizeCfg, ITargetFields, IRptTpl, IDataObj, IBands, IControlCollection, IStyles, BorderStyle, IFontSubCollection, IControlSubCollection, IRstPage, IMergeBand } from '../interface/basic'
|
|
|
+import { IDefProperties, IFormula, IParams, ICurrent_RPT, ICustomizeCfg, ITargetFields, IRptTpl, IDataObj, IBands, IControlCollection, IStyles, BorderStyle, IFontSubCollection, IControlSubCollection, IRstPage, IMergeBand, IFormulasObject } from '../interface/basic'
|
|
|
import { IFlowTabClass, IBillTabClass, ICostTabClass } from '../interface/classType';
|
|
|
import { IPagingOption } from '../interface/enum';
|
|
|
import { Key } from 'readline';
|
|
|
@@ -30,6 +30,7 @@ export class JpcExClass {
|
|
|
params: IParams;
|
|
|
formulas: IFormula[];
|
|
|
events: any;
|
|
|
+ formulasObject :IFormulasObject={};
|
|
|
|
|
|
constructor(rptTpl: IRptTpl) {
|
|
|
if (rptTpl.流水式表_信息) {
|
|
|
@@ -121,7 +122,7 @@ export class JpcExClass {
|
|
|
|
|
|
//根据步骤,对formulas中的计算式进行处理,并赋值到相应属性中
|
|
|
executeFormulas(runType: string, $CURRENT_TEMPLATE: IRptTpl, $CURRENT_DATA: IDataObj, $CURRENT_RPT: ICurrent_RPT) {
|
|
|
- formulaExec(runType, $CURRENT_TEMPLATE, $CURRENT_DATA, $CURRENT_RPT)
|
|
|
+ return formulaExec(runType, $CURRENT_TEMPLATE, $CURRENT_DATA, $CURRENT_RPT);
|
|
|
};
|
|
|
|
|
|
outputAsPreviewPage(rptTpl: IRptTpl, defProperties: IDefProperties) {
|
|
|
@@ -200,7 +201,7 @@ export class JpcExClass {
|
|
|
try {
|
|
|
for (let page = startPage; page <= endPage; page++) {
|
|
|
me.runTimePageData.currentPage = page;
|
|
|
- me.executeFormulas('before_output', rptTpl, dataObj, me);
|
|
|
+ this.formulasObject = me.executeFormulas('before_output', rptTpl, dataObj, me);
|
|
|
// console.log('=======================');
|
|
|
rst.items.push(me.outputAsSimpleJSONPage(rptTpl, dataObj, bands, page, rst.control_collection, customizeCfg));
|
|
|
}
|