Explorar o código

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

vian %!s(int64=5) %!d(string=hai) anos
pai
achega
96a58bc4a6
Modificáronse 2 ficheiros con 55 adicións e 4 borrados
  1. 14 4
      modules/fee_rates/facade/fee_rates_facade.js
  2. 41 0
      web/over_write/js/hunan_2014.js

+ 14 - 4
modules/fee_rates/facade/fee_rates_facade.js

@@ -320,10 +320,20 @@ function setRatesByMap(newFeeRate,subMap,decimal){
                 let t_p = subMap[p.name];
                 if(t_p){//找到同名的子项
                     //获取选中的节点
-                    let selected = _.find(t_p.optionList,{"selected":true});
-                    for(let s of p.optionList){
-                        s.selected = selected && selected.name == s.name?true:false;//设置新费率的选中项
-                    }
+                    let selected = _.find(t_p.optionList, { "selected": true });
+                    let match = false;
+                    for (let s of p.optionList) {
+                      s.selected = false;
+                      if (selected && selected.name == s.name) { 
+                        s.selected = true;//设置新费率的选中项
+                        match = true;
+                      }     
+                     }
+                    if (selected && match == false) { 
+                      //如果原来旧的有选中项,但是新的却没匹配上,说明没有对应的下拉框,选择默认第一个
+                      p.optionList[0].selected = true;
+                      selected = p.optionList[0];
+                    }  
                     if(selected){//如果有选中项,则从valueMap中找出值并设置到rate上// ;
                         let map = _.find(r.subFeeRate.valueMaps,{ID:selected.name});
                         if(map){

+ 41 - 0
web/over_write/js/hunan_2014.js

@@ -254,10 +254,51 @@ if (typeof baseFigureTemplate !== 'undefined') {
   };
 }
 
+//湖南2014工地转移费率值修改特殊处理
+if (typeof feeRateObject !== "undefined") {
+  feeRateObject.feeRateSpecialHandle = function (subRate, value) {
+    let result = {};
+    if (subRate.name == "工地转移(km)" && value && value < 50) {
+      //工地转移50km以内按0km算
+      result.valueKey = "0";
+      result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
+    }
+    return result;
+  };
+}
+
+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 gljUtil !== 'undefined') {
+  gljUtil.getCodeSortMath = getCodeSortMath;
+  gljUtil.getElecCoe = function () {
+      return 0.24;
+  }
+}
+
 if (typeof module !== 'undefined') {
   module.exports = {
       progression,
       deficiency,
       beyond,
+      getDefalutAssistProductionFeeRate: function () {
+        return 5
+      }
   };
+ 
 }