TonyKang пре 7 година
родитељ
комит
7bb68760a8

+ 15 - 1
modules/reports/rpt_component/helper/jpc_helper_common_output.js

@@ -44,7 +44,21 @@ function innerFormat(formatStr, rst) {
         if (!(isNaN(parseFloat(rst[JV.PROP_VALUE])))) {
             let dotIdx = formatStr.indexOf(".");
             if (dotIdx >= 0) {
-                rst[JV.PROP_VALUE] = parseFloat(rst[JV.PROP_VALUE]).toFixed(formatStr.length - dotIdx - 1);
+                let tmpStr = parseFloat(rst[JV.PROP_VALUE]).toFixed(formatStr.length - dotIdx - 1);
+                let digStr = formatStr.substr(dotIdx + 1, formatStr.length - dotIdx);
+                for (let sIdx = digStr.length - 1; sIdx >= 0; sIdx--) {
+                    if (digStr[sIdx] === '#') {
+                        if (tmpStr.length > 0 && tmpStr[tmpStr.length - 1] === '0') {
+                            tmpStr = tmpStr.substr(0, tmpStr.length - 1);
+                        } else {
+                            break;
+                        }
+                    } else {
+                        break;
+                    }
+                }
+                if (tmpStr[tmpStr.length - 1] === '.') tmpStr = tmpStr.substr(0, tmpStr.length - 1);
+                rst[JV.PROP_VALUE] = tmpStr;
             } else {
                 rst[JV.PROP_VALUE] = parseFloat(rst[JV.PROP_VALUE]).toFixed(0);
             }

+ 1 - 1
modules/reports/rpt_component/jpc_flow_tab.js

@@ -484,7 +484,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
                     if (currentRecAmt > 0) pageStatus[JV.STATUS_SEGMENT_START] = false;
                     if (pageIdx > 0) pageStatus[JV.STATUS_REPORT_START] = false;
                     //开始判断各种scenarios
-                    if (ttlSegRecAmtNormal < ttlSegRecAmt) {
+                    if ((ttlSegRecAmtNormal < ttlSegRecAmt) || (followTabEx != null)) {
                         //有流水拓展,并且是follow mode
                         if (currentRecAmt + maxRowRec > ttlSegRecAmtNormal) {
                             if (currentRecAmt >= ttlSegRecAmtNormal) {