MaiXinRong 5 роки тому
батько
коміт
2fecf58966
2 змінених файлів з 14 додано та 12 видалено
  1. 13 11
      app/public/report/js/rpt_custom.js
  2. 1 1
      app/service/report.js

+ 13 - 11
app/public/report/js/rpt_custom.js

@@ -189,17 +189,19 @@ const rptCustomObj = (function () {
         for (const bc of grSpreadSetting.baseCols) {
             grSpreadSetting.cols.push(bc);
         }
-        for (const s of gsSetting.special) {
-            for (const ec of grSpreadSetting.extraCols) {
-                const c = {};
-                c.title = ec.title.replace('%s', s.title);
-                c.colSpan = ec.colSpan;
-                c.field = ec.field.replace('%s', s.key);
-                c.hAlign = ec.hAlign;
-                c.width = s.width ? s.width : ec.width;
-                c.cellType = ec.cellType;
-                c.readOnly = ec.readOnly;
-                grSpreadSetting.cols.push(c);
+        if (gsSetting.special) {
+            for (const s of gsSetting.special) {
+                for (const ec of grSpreadSetting.extraCols) {
+                    const c = {};
+                    c.title = ec.title.replace('%s', s.title);
+                    c.colSpan = ec.colSpan;
+                    c.field = ec.field.replace('%s', s.key);
+                    c.hAlign = ec.hAlign;
+                    c.width = s.width ? s.width : ec.width;
+                    c.cellType = ec.cellType;
+                    c.readOnly = ec.readOnly;
+                    grSpreadSetting.cols.push(c);
+                }
             }
         }
     };

+ 1 - 1
app/service/report.js

@@ -122,7 +122,7 @@ module.exports = app => {
                             break;
                         case 'mem_gather_stage_bills':
                             runnableRst.push(service.rptGatherMemory.getGatherStageBills(memFieldKeys[filter],
-                                customDefine.gather_select.setting, customSelect.gather_select));
+                                customDefine.gather_select.setting, customSelect ? customSelect.gather_select : null));
                             runnableKey.push(filter);
                             break;
                         default: