Pārlūkot izejas kodu

报表合计格式跟随列配置

zhuth 7 gadi atpakaļ
vecāks
revīzija
aec74e9726

+ 9 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -239,7 +239,15 @@ Ext.define('saas.view.core.report.ReportPanel', {
                                     return s.hasOwnProperty(name);
                                 })
                                 if(type && d) {
-                                    c.summaryValue = Ext.util.Format.number(d[name], c.format || '0.00');
+                                    if(type == 'count') {
+                                        c.summaryValue = Ext.util.Format.number(d[name], c.format || '0');
+                                    }else if(typeof c.summaryRender == 'function') {
+                                        c.summaryValue = c.summaryRender(d[name]);
+                                    }else if(typeof c.renderer == 'function') {
+                                        c.summaryValue = c.renderer(d[name]);
+                                    }else {
+                                        c.summaryValue = Ext.util.Format.number(d[name], c.format || '0.00');
+                                    }
                                 }else {
                                     c.summaryValue = 0;
                                 }