Przeglądaj źródła

改进Excel导出出现NaN

TonyKang 6 lat temu
rodzic
commit
036f0cecd1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      modules/reports/util/rpt_excel_util.js

+ 1 - 1
modules/reports/util/rpt_excel_util.js

@@ -444,7 +444,7 @@ function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, ap
     };
     let private_getSharedStrIdx = function(val) {
         let strVal = val;
-        if (val === null) {
+        if (val === null || val === undefined || (typeof val === 'number' && isNaN(val))) {
             strVal = "";
         }
         let rst = sharedStrList.indexOf(strVal);