Kaynağa Gözat

山东接口调整

Tony Kang 2 yıl önce
ebeveyn
işleme
3c88c8c6da

+ 5 - 0
web/building_saas/standard_interface/export/shandong_common.js

@@ -1842,6 +1842,11 @@ INTERFACE_EXPORT = (() => {
   
         function setItem(bNode, level, list) {
           if (bNode.sourceType == ModuleNames.ration) return;
+          // 判断: 1. 招标清单 2. 是否量价,都是的话,return
+          if (isBidInvitation && (bNode.data.specialProvisional == "材料暂估" || bNode.data.specialProvisional == "工程设备" ||
+            bNode.data.specialProvisional == "专业工程" || bNode.data.specialProvisional == "固定费用")) {
+            return;
+          }
           let item = new bill(bNode, level);
           if (bNode.children && bNode.children.length > 0) {
             level += 1;

+ 7 - 0
web/building_saas/standard_interface/import/shandong_common.js

@@ -153,8 +153,15 @@ INTERFACE_IMPORT = (() => {
         }
         if (bill.qtyFormula && bill.qtyFormula !== '') {
           let formula = getValue(item, ['CostComposition', 'Formula', '_Formulas']);
+          let ratio = getValue(item, ['CostComposition', 'Formula', '_Ratio']);
           if (formula !== undefined && formula !== null && formula !== '') {
             bill.calcBase = formula; // 这个formula在后期还要处理的
+            if (ratio && ratio !== '') {
+              let dRation = parseFloat(ratio);
+              if (!isNaN(dRation) && dRation != 1) {
+                bill.calcBase = `(${formula} * ${dRation})`; // 如果有费率且不等于1,还需要调整基数公式
+              }
+            }
           }
         }
         if (item._ProvisionalType == '0') bill.specialProvisional = '材料暂估';