Browse Source

山东接口调整

Tony Kang 1 năm trước cách đây
mục cha
commit
2f342bf5e2
1 tập tin đã thay đổi với 13 bổ sung12 xóa
  1. 13 12
      web/building_saas/standard_interface/export/shandong_common.js

+ 13 - 12
web/building_saas/standard_interface/export/shandong_common.js

@@ -1136,9 +1136,11 @@ INTERFACE_EXPORT = (() => {
         let order = 1;
         //读取投标报价汇总表信息。1.ItemNo 序号。2.ChapterNo 章次。 3.Name 科目名称。 4.Sum 金额。
         chapterNodes.forEach((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) });
-          order++;
+          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) });
+            order++;
+          }
         });
         // nodeAttrs.push({ ItemNo: order, ChapterNo: '', Name: '第100章至700章清单合计', Sum: _getFee(topNode100To700) });
         nodeAttrs.push({ ItemNo: order, ChapterNo: '', Name: topNode100To700.name, Sum: _getFee(topNode100To700) });
@@ -1878,6 +1880,14 @@ INTERFACE_EXPORT = (() => {
 
     }
 
+    function _chkIfValid100(node) {
+      let rst = true;
+      if (node.data.name.indexOf('第100章') >= 0 && node.data.name.indexOf('总则') >= 0) {
+        let bVal = _getFee(node);
+        rst = node.children.length > 0 || bVal !== 0;
+      }
+      return rst;
+    }
 
     function getBillsItems(tenderProject, cacheForFormula) {
       let items = new emptyElement("Items");
@@ -1912,15 +1922,6 @@ INTERFACE_EXPORT = (() => {
         }
         list.push(item);
 
-        function _chkIfValid100(node) {
-          let rst = true;
-          if (node.data.name.indexOf('第100章') >= 0 && node.data.name.indexOf('总则') >= 0) {
-            let bVal = _getFee(node);
-            rst = node.children.length > 0 || bVal !== 0;
-          }
-          return rst;
-        }
-
         function getCalcType(node) {
           /*           
           判断是否父项: