Browse Source

fix: excel里存在空表时,导入报错问题

vian 4 years atrás
parent
commit
4a3f94e2b0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      web/building_saas/main/js/views/importBills.js

+ 3 - 0
web/building_saas/main/js/views/importBills.js

@@ -308,6 +308,9 @@ const importBills = (function () {
         let curSheetType = null;
         for (let sheetName in sheets) {
             let sheetData = sheets[sheetName];
+            if (!sheetData.data.dataTable) {
+                continue;
+            }
             let sheetType = getFileType(sheetData);
             if (curSheetType !== null && sheetType !== curSheetType) {
                 throw 'excel文件中存在不同格式的表格。';