浏览代码

山东接口调整

Tony Kang 2 年之前
父节点
当前提交
3fec042684
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      web/building_saas/standard_interface/import/shandong_common.js

+ 8 - 3
web/building_saas/standard_interface/import/shandong_common.js

@@ -138,7 +138,8 @@ INTERFACE_IMPORT = (() => {
         return tender;
       }
 
-      function setupBills(item) { 
+      function setupBills(item, needClac = false) { 
+        const regBlank = new RegExp(' ', 'g');
         let bill = {
           code: item._ListCode,
           name: item._ListName,
@@ -151,7 +152,7 @@ INTERFACE_IMPORT = (() => {
           qtyFormula: item._QtyFormula,
           children: []
         }
-        if (bill.qtyFormula && bill.qtyFormula !== '') {
+        if ((needClac || bill.name == "暂列金额(不含计日工总额)") && bill.qtyFormula && bill.qtyFormula !== '') {
           let formula = getValue(item, ['CostComposition', 'Formula', '_Formulas']);
           let ratio = getValue(item, ['CostComposition', 'Formula', '_Ratio']);
           if (formula !== undefined && formula !== null && formula !== '') {
@@ -185,7 +186,11 @@ INTERFACE_IMPORT = (() => {
         let subItems = arrayValue(item, ['Item']);
         if (subItems && subItems.length > 0) { 
           for (let i of subItems) { 
-            bill.children.push(setupBills(i))
+            if (typeof i._ListName === 'string' && i._ListName.replace(regBlank, '') === '清单第100章总则') {
+              bill.children.push(setupBills(i, true));
+            } else {
+              bill.children.push(setupBills(i, needClac));
+            }
           }
         }
         return bill;