Quellcode durchsuchen

山东综合电价和台班,中山接口调整

zhangweicheng vor 5 Jahren
Ursprung
Commit
3b43b3473a

+ 50 - 44
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -63,6 +63,7 @@ INTERFACE_EXPORT = (() => {
   const itemFeeMap = {
     'marketLabour': 'RGF',
     'marketMaterial': 'CLF',
+    'marketMachine':'JXSYF',
     'marketEquipment': 'SBGZF',
     'direct': 'DEZJF',
     'equipment': 'DESBF',
@@ -371,29 +372,32 @@ INTERFACE_EXPORT = (() => {
         ],
         children: [],
       };
-      let elecDatas = electrovalenceObj.getElectrovalenceDatas(null, pgljData.com_electrovalence, pgljData.gljList);
-      electrovalenceObj.calcPertElectrovalenceMarketPrice(elecDatas);
-      for (let e of elecDatas) {
-        let Electro = {
-          name: "Electro",
-          attrs: [{
-              name: "Code",
-              value: e.code,
-            },
-            {
-              name: "Price",
-              value: e.electPrice,
-            },
-            {
-              name: "Ratio",
-              value: e.coe,
-            },
-          ],
-          children: [],
-        };
-        Param.children.push(Electro);
+      if (isBidSubmission) { //导出到招标、招标控制价文件中,不输出这一部分。
+        let elecDatas = electrovalenceObj.getElectrovalenceDatas(null, pgljData.com_electrovalence, pgljData.gljList);
+        electrovalenceObj.calcPertElectrovalenceMarketPrice(elecDatas);
+        for (let e of elecDatas) {
+          let Electro = {
+            name: "Electro",
+            attrs: [{
+                name: "Code",
+                value: e.code,
+              },
+              {
+                name: "Price",
+                value: e.electPrice,
+              },
+              {
+                name: "Ratio",
+                value: e.coe,
+              },
+            ],
+            children: [],
+          };
+          Param.children.push(Electro);
+        }
       }
 
+
       this.children.push(Param);
 
       function MP(g) {
@@ -704,9 +708,6 @@ INTERFACE_EXPORT = (() => {
           Element.call(this, "FixedCostItem", attrs);
 
         }
-        
-        
-
       }
 
       let Mps = new emptyElement("Mps");
@@ -714,22 +715,23 @@ INTERFACE_EXPORT = (() => {
       let Mechs = new emptyElement("Mechs");
       let gljKeyMap = {};
       let temMechs = [];
-      for (let g of pgljData.gljList) {
-        let type = g.type + "";
-        gljKeyMap[gljUtil.getIndex(g)] = g;
-        type = type.charAt(0);
-        if (type == "1") {
-          Mps.children.push(new MP(g));
-        } else if (type == "2" || type == 5) {
-          Materials.children.push(new Material(g));
-        } else if (type == "3") {
-          temMechs.push(g);
+      if (isBidSubmission) { //导出到招标、招标控制价文件中,不输出这一部分。
+        for (let g of pgljData.gljList) {
+          let type = g.type + "";
+          gljKeyMap[gljUtil.getIndex(g)] = g;
+          type = type.charAt(0);
+          if (type == "1") {
+            Mps.children.push(new MP(g));
+          } else if (type == "2" || type == 5) {
+            Materials.children.push(new Material(g));
+          } else if (type == "3") {
+            temMechs.push(g);
+          }
+        }
+        for (let t of temMechs) { 
+          Mechs.children.push(new Mech(t,gljKeyMap));
         }
       }
-      for (let t of temMechs) { 
-        Mechs.children.push(new Mech(t,gljKeyMap));
-      }
-
       this.children.push(Mps);
       this.children.push(Materials);
       this.children.push(Mechs);
@@ -737,6 +739,7 @@ INTERFACE_EXPORT = (() => {
 
     function EprjInfo(tenderProject) {
       let bills = tenderProject.Bills.datas;
+      let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
       let totalItem = null;
       let proItem = null; //暂列金额项
       for (let b of bills) {
@@ -754,7 +757,7 @@ INTERFACE_EXPORT = (() => {
         },
       ];
       Element.call(this, "EprjInfo", attrs);
-      this.children.push(new SummaryOfCost(totalItem, proItem));
+      this.children.push(new SummaryOfCost(totalItem, proItem,feature));
       this.children.push(new MakeInfo(tenderProject));
       this.children.push(new Params(tenderProject));
       this.children.push(new getBillsItems(tenderProject));
@@ -916,7 +919,7 @@ INTERFACE_EXPORT = (() => {
               value: data.quantity,
             },
             {
-              name: "QtyFomula",
+              name: "QtyFormula",
               value: data.calcBase //data.calcBase ? cbParser.toFExpr(data.calcBase, tenderProject.mainTree.items) : "",
             },
             {
@@ -1297,7 +1300,7 @@ INTERFACE_EXPORT = (() => {
       Element.call(this, "Params", attrs);
     }
 
-    function SummaryOfCost(totalItem, proItem) {
+    function SummaryOfCost(totalItem, proItem,feature) {
       const attrs = [{
           name: "TenderSumLimit",
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
@@ -1323,9 +1326,12 @@ INTERFACE_EXPORT = (() => {
           value: totalItem.feesIndex && totalItem.feesIndex.estimate && totalItem.feesIndex.estimate.tenderTotalFee ? totalItem.feesIndex.estimate.tenderTotalFee : 0,
         },
       ];
-      if (isBidInvitation || isControl) attrs.splice(1, 1); //招标 - 控制价
-      if (isBidSubmission) attrs.splice(0, 1); //投标
-
+      if(isBidInvitation) attrs = [] //招标
+      if (isControl) attrs.splice(1, 5); //控制价
+      if (isBidSubmission) { //投标文件时,读工程特征中的 招标控制价 值
+        let tenderSumLimit = _.find(feature, { "dispName": "招标控制价" }); 
+        if(tenderSumLimit) attrs[0].value = tenderSumLimit.value
+      } 
       Element.call(this, "SummaryOfCost", attrs);
     }
 

+ 19 - 0
web/over_write/js/shandong_2016.js

@@ -352,6 +352,25 @@ if (typeof gljOprObj !== 'undefined') {
     }
 }
 
+
+if (typeof electrovalenceObj !== 'undefined') {
+  electrovalenceObj.options = [
+      { code: "870", name: "电网电", specs: "", unit: "kW·h", type: "201" },
+      { code: "1791", name: "5kw以内柴油发电机组", specs: "5GF1", unit: "台班", type: "301" },
+      { code: "1792", name: "15kw以内柴油发电机组", specs: "12GF1", unit: "台班", type: "301" },
+      { code: "1793", name: "30kw以内柴油发电机组", specs: "30GFY-2", unit: "台班", type: "301" },
+      { code: "1794", name: "50kw以内柴油发电机组", specs: "50GFY-2", unit: "台班", type: "301" },
+      { code: "1795", name: "75kw以内柴油发电机组", specs: "75GFY-4", unit: "台班", type: "301" },
+      { code: "1796", name: "100kw以内柴油发电机组", specs: "90GFZ", unit: "台班", type: "301" },
+      { code: "1797", name: "120kw以内柴油发电机组", specs: "120GFY-4", unit: "台班", type: "301" },
+      { code: "1798", name: "160kw以内柴油发电机组", specs: "160GF", unit: "台班", type: "301" },
+      { code: "1799", name: "200kw以内柴油发电机组", specs: "200GF", unit: "台班", type: "301" },
+      { code: "1800", name: "250kw以内柴油发电机组", specs: "250GF4-4", unit: "台班", type: "301" },
+      { code: "1801", name: "320kw以内柴油发电机组", specs: "320GF-2", unit: "台班", type: "301" }
+  ]
+}
+
+
 if (typeof module !== "undefined" && !module.nodeType) {
   module.exports = {
     progression,