ソースを参照

BUG #2990 空格横向合并失败问题

TonyKang 4 年 前
コミット
dd3957e898

+ 1 - 1
app/reports/public/stringUtil.js

@@ -142,7 +142,7 @@ module.exports = {
     leftTrim: function(str) {
         return str.replace(/(^\s*)/g,"");
     },
-    rightTrim: function(rst) {
+    rightTrim: function(str) {
         return str.replace(/(\s*$)/g,"");
     },
     replaceAll: function (targetStr, FindText, RepText) {

+ 2 - 2
app/reports/rpt_component/helper/jpc_helper_field.js

@@ -82,10 +82,10 @@ const JpcFieldHelper = {
     },
     decorateValue: function(cell, controls) {
         if (controls) {
-            const val = cell[JV.PROP_VALUE];
             const showZero = controls[cell[JV.PROP_CONTROL]][JV.PROP_SHOW_ZERO];
             if (showZero && showZero === 'F') {
-                if (1.0 * (0 + val) === 0) {
+                const val = parseFloat(cell[JV.PROP_VALUE]);
+                if (val === 0) {
                     cell[JV.PROP_VALUE] = '';
                 }
             }