Pārlūkot izejas kodu

山东接口调整(新增'固定费用')

Tony Kang 2 gadi atpakaļ
vecāks
revīzija
5ab9fce6b2

+ 1 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -476,7 +476,7 @@ let MainTreeCol = {
     specialProvisional: function (node) {
       if (!MainTreeCol.readOnly.specialProvisional(node)) {
         let dynamicCombo = sheetCommonObj.getDynamicCombo();
-        dynamicCombo.items(["材料暂估", "工程设备", "专业工程", ""]); //工程量清单项目,专项暂定的下拉加上“材料暂估”、“工程设备”(原来隐藏了) 20210913
+        dynamicCombo.items(["材料暂估", "工程设备", "专业工程", "固定费用"]); //工程量清单项目,专项暂定的下拉加上“材料暂估”、“工程设备”(原来隐藏了) 20210913 固定费用是山东用20230531
         return dynamicCombo;
       }
     },

+ 23 - 3
web/building_saas/standard_interface/export/shandong_common.js

@@ -988,6 +988,17 @@ INTERFACE_EXPORT = (() => {
         return rst;
       }
 
+      function _getFixedSum(tenderProject) {
+        let rst = 0;
+        tenderProject.Bills.datas.forEach((bill)=> {
+          if (bill.specialProvisional == "固定费用") {
+            let bVal = _getFee(bill);
+            rst += bVal;
+          }
+        });
+        return rst;
+      }
+
       function quoteSummary(tenderProject) {
         let quoteSummaryItem = new emptyElement('QuoteSummary');
         // let attrs = [];
@@ -1000,6 +1011,7 @@ INTERFACE_EXPORT = (() => {
         // 1.6 投标报价 标记:9
         let topNode100To700, nodeZXZDJ, nodeQDKCZXZDJ, nodeJRG, nodeZLJE, nodeTBBJ;
         let chapterNodes = [];
+        let fixedSum = _getFixedSum(tenderProject); //山东有固定费用,此费用不参与到此项中去
         tenderProject.Bills.datas.forEach((bill)=> {
             if (bill.flags && bill.flags.length > 0) {
                 for (let flag of bill.flags) {
@@ -1056,7 +1068,7 @@ INTERFACE_EXPORT = (() => {
           nodeAttrs.push({ItemNo: order, ChapterNo: '', Name: '第100章至700章清单合计', Sum: _getFee(topNode100To700)});
           order++;
           if (nodeZXZDJ) {
-            nodeAttrs.push({ItemNo: order, ChapterNo: '', Name: '已包含在清单合计中的材料、工程设备、专业工程暂估价合计', Sum: _getFee(nodeZXZDJ)});
+            nodeAttrs.push({ItemNo: order, ChapterNo: '', Name: '已包含在清单合计中的材料、工程设备、专业工程暂估价合计', Sum: _getFee(nodeZXZDJ) - fixedSum});
             order++;
           }
           if (nodeQDKCZXZDJ) {
@@ -1838,6 +1850,7 @@ INTERFACE_EXPORT = (() => {
             if (data.specialProvisional == "材料暂估") ProvisionalType = 0;
             if (data.specialProvisional == "工程设备") ProvisionalType = 1;
             if (data.specialProvisional == "专业工程") ProvisionalType = 2;
+            if (data.specialProvisional == "固定费用") ProvisionalType = 3;
   
             //MpRatio
             let MpRatio = "";
@@ -1977,6 +1990,7 @@ INTERFACE_EXPORT = (() => {
               //暂列金额 数量为0的时候,单价输出0
               if( CostKind==2 && !gljUtil.isNotEmpty(data.quantity)) attrs[5].value  = 0
             }
+            let fixedSumVal = _getFixedSum(tenderProject); // 固定费用
   
             Element.call(this, "Item", attrs);
             let cc = CostComposition(bNode);
@@ -2029,6 +2043,7 @@ INTERFACE_EXPORT = (() => {
               
   
               function Formula(bills) {
+                let sumFix = (bills.name === '已包含在清单合计中的材料、工程设备、专业工程暂估价合计') ? fixedSumVal : 0;
                 const attrs = [{
                     name: "Name",
                     value: bills.name
@@ -2044,7 +2059,7 @@ INTERFACE_EXPORT = (() => {
                   {
                     name: "Sum",
                     // value: bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : "",
-                    value: _getNumValueByExportKind(bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : ""),
+                    value: _getNumValueByExportKind(bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : "") - sumFix,
                     type:TYPE.DECIMAL
                   },
                   {
@@ -2214,7 +2229,12 @@ INTERFACE_EXPORT = (() => {
                   name: 'Sum',
                   value: 0 //fee.tenderTotalFee
                 }]
-                if ((isBidSubmission || isControl) && item.feesIndex && item.feesIndex[type]) attrs[1].value = item.feesIndex[type].tenderTotalFee;
+                if ((isBidSubmission || isControl) && item.feesIndex && item.feesIndex[type]) {
+                  attrs[1].value = item.feesIndex[type].tenderTotalFee;
+                  if ((item.name === '已包含在清单合计中的材料、工程设备、专业工程暂估价合计') && (itemFeeMap[type] === 'JAF')) {
+                    attrs[1].value = attrs[1].value - fixedSumVal;
+                  }
+                }
                 Element.call(this, "CostItem", attrs);
               }
               return CostStructure;

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

@@ -147,12 +147,20 @@ INTERFACE_IMPORT = (() => {
         if (item._ProvisionalType == '0') bill.specialProvisional = '材料暂估';
         if (item._ProvisionalType == '1') bill.specialProvisional = '工程设备';
         if (item._ProvisionalType == '2') bill.specialProvisional = '专业工程';
+        if (item._ProvisionalType == '3') bill.specialProvisional = '固定费用';
         if (item._ProvisionalType == '2') {
           let sumVal = getValue(item, ['_Sum']);
           bill.fees = [{ fieldName: "common",tenderTotalFee:sumVal, tenderUnitFee: "0", totalFee: sumVal, unitFee: "0" }];
           bill.calcBase = sumVal;
           bill.calcFlag = 1;
         }
+        if (item._ProvisionalType == '3') {
+          let sumVal = getValue(item, ['_Sum']);
+          let priceVal = getValue(item, ['_Price']);
+          bill.fees = [{ fieldName: "common",tenderTotalFee:sumVal, tenderUnitFee: priceVal, totalFee: sumVal, unitFee: priceVal }];
+          bill.calcBase = sumVal;
+          bill.calcFlag = 1;
+        }
 
         let subItems = arrayValue(item, ['Item']);
         if (subItems && subItems.length > 0) {