浏览代码

需求bug 816项 + 账单式没电子签名显示问题

TonyKang 5 年之前
父节点
当前提交
c5330b1681

+ 4 - 2
app/reports/rpt_component/jpc_bill_tab.js

@@ -60,6 +60,8 @@ JpcBillTabSrv.prototype.createNew = function() {
     JpcBillTabResult.outputAsSimpleJSONPage = function(rptTpl, dataObj, page, bands, controls, $CURRENT_RPT, customizeCfg) {
         const me = this;
         let rst = [];
+        me.signatureRst = [];
+        me.signatureDateRst = [];
         const tabRstLst = [];
         // 1. calculate the band position
         const pageStatus = [true, false, false, false, false, false, false, false];
@@ -69,7 +71,7 @@ JpcBillTabSrv.prototype.createNew = function() {
         //  2.1 output content
         tabRstLst.push(me.outputContent(rptTpl, dataObj, page, bands, unitFactor, controls, pageStatus, $CURRENT_RPT, customizeCfg));
         //  2.2 output discrete
-        tabRstLst.push(JpcDiscreteHelper.outputDiscreteInfo(rptTpl[JV.NODE_BILL_INFO][JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, pageStatus, page - 1, 1, 0, $CURRENT_RPT, customizeCfg));
+        tabRstLst.push(JpcDiscreteHelper.outputDiscreteInfo(rptTpl[JV.NODE_BILL_INFO][JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, pageStatus, page - 1, 1, 0, $CURRENT_RPT, customizeCfg, me.signatureRst, me.signatureDateRst));
         for (let i = 0; i < tabRstLst.length; i++) {
             rst = rst.concat(tabRstLst[i]);
             tabRstLst[i] = null;
@@ -163,7 +165,7 @@ JpcBillTabSrv.prototype.createNew = function() {
                     }
                 }
                 if (tab[JV.NODE_DISCRETE_INFO]) {
-                    rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, pageStatus, page - 1, 1, 0, customizeCfg));
+                    rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, pageStatus, page - 1, 1, 0, customizeCfg, me.signatureRst, me.signatureDateRst));
                 }
             }
         }

+ 19 - 0
app/reports/rpt_component/jpc_flow_tab.js

@@ -1172,9 +1172,28 @@ JpcFlowTabSrv.prototype.createNew = function() {
         for (let idIdx = eliminateCells.length - 1; idIdx >= 0; idIdx--) {
             rst.splice(eliminateCells[idIdx], 1);
         }
+        me.checkCombineEvent(JV.RUN_TYPE_BEFORE_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT);
         me.combinePageCells(rst, verticalCombinePos, horizonCombinePos);
+        me.checkCombineEvent(JV.RUN_TYPE_AFTER_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT);
         return rst;
     };
+    JpcFlowTabResult.checkCombineEvent = function($RUN_TYPE, $VER_COMB_ARRAY, $HOR_COMB_ARRAY, $CURRENT_CELL_ITEMS, $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) {
+                    const expression = $CURRENT_RPT.formulas[execFmlIdx][JV.PROP_EXPRESSION];
+                    if (expression) {
+                        const $ME = $CURRENT_RPT.formulas[execFmlIdx];
+                        try {
+                            eval(expression);
+                        } catch (ex) {
+                            console.log(ex);
+                        }
+                    }
+                }
+            }
+        }
+    };
     JpcFlowTabResult.outputColumn = function(rptTpl, dataObj, page, segIdx, bands, unitFactor, multiColIdx, $CURRENT_RPT, customizeCfg) {
         const me = this;
         let rst = [];

+ 3 - 0
app/reports/rpt_component/jpc_value_define.js

@@ -210,6 +210,9 @@ module.exports = {
     RUN_TYPE_BEFORE_ANALYZING: 'before_analyzing',
     RUN_TYPE_BEFORE_PAGING: 'before_paging',
     RUN_TYPE_BEFORE_OUTPUT: 'before_output',
+    RUN_TYPE_BEFORE_COMBINE: 'before_combine',
+    RUN_TYPE_AFTER_COMBINE: 'after_combine',
+
 
     SIGNATURE_NAME_DUMMY: 'dummy_pic',