Forráskód Böngészése

山东电子接口调整

Tony Kang 1 éve
szülő
commit
d54ab65759

+ 9 - 1
web/building_saas/standard_interface/export/shandong_common.js

@@ -1145,7 +1145,15 @@ INTERFACE_EXPORT = (() => {
         chapterNodes.forEach((cnode) => {
           if (_chkIfValid100(cnode)) {
             let chapterIdx = cnode.data.name.indexOf("00章");
-            nodeAttrs.push({ ItemNo: order, ChapterNo: cnode.data.name.substr(chapterIdx - 1, 3), Name: cnode.data.name, Sum: _getFee(cnode) });
+            let chpNoStr = '';
+            const ch = cnode.data.name.substr(chapterIdx - 2, 2);
+            if (isNaN(parseFloat(ch))) {
+              chpNoStr = cnode.data.name.substr(chapterIdx - 1, 3);
+            } else {
+              chpNoStr = cnode.data.name.substr(chapterIdx - 2, 4);
+            }
+            // nodeAttrs.push({ ItemNo: order, ChapterNo: cnode.data.name.substr(chapterIdx - 1, 3), Name: cnode.data.name, Sum: _getFee(cnode) });
+            nodeAttrs.push({ ItemNo: order, ChapterNo: chpNoStr, Name: cnode.data.name, Sum: _getFee(cnode) });
             order++;
           }
         });