Explorar o código

修改价差预备费变量,计算问题

zhongzewei %!s(int64=6) %!d(string=hai) anos
pai
achega
f7c8982890

+ 3 - 3
web/building_saas/main/js/models/calc_base.js

@@ -688,7 +688,7 @@ let baseFigureMap = {
             multiRef: [fixedFlag.CONSTRUCTION_INSTALL_FEE]},
         '独立桥梁隧道维修加固勘察设计费': {base: 'QLSDKCSJF',
             multiRef: [fixedFlag.CONSTRUCTION_INSTALL_FEE]},
-        '招标代理及标底(最高投标限价)编制费': {base: 'ZBDLJBDBZF',
+        '招标代理及标底(最高投标限价)编制费': {base: 'ZBDLJBDBZF',
             multiRef: [fixedFlag.CONSTRUCTION_INSTALL_FEE]},
         '价差预备费': {base: 'JCYBF', fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE}
     },
@@ -729,7 +729,7 @@ let cbAnalyzer = {
         let cnExps = cbParser.getCN(exp);
         let expFigures = cbParser.getFigure(exp);
         if(cnExps.length !== expFigures.length){
-            throw '清单基数必须要用花括号{}括起来'
+            throw '清单基数必须要用花括号{}括起来';
             return false;
         }
         for(let i = 0, len = cnExps.length; i < len; i++){
@@ -913,7 +913,7 @@ let cbParser = {
     },
     //获取表达式中的中文式
     getCN: function(expr){
-        let cnRex = /[\u4e00-\u9fa5]{1,}\({0,}[\u4e00-\u9fa5]{0,}\){0,}[\u4e00-\u9fa5]{0,}/g;
+        let cnRex = /\d*[\u4e00-\u9fa5]{1,}\({0,}[\u4e00-\u9fa5]{0,}\){0,}[\u4e00-\u9fa5]{0,}/g;
         return _.filter(expr.match(cnRex), function (data) {
             return data
         });

+ 2 - 1
web/building_saas/main/js/views/project_view.js

@@ -2390,7 +2390,6 @@ $('#property_ok').click(function () {
         project.property.zanguCalcMode = zg;
         reCalcRations = true;
     };
-
     //价差预备费,预算项目才有
     if (project.property.valuationType === 'bill') {
         let costGrowthRateV = $('#costGrowthRate').val(),
@@ -2399,10 +2398,12 @@ $('#property_ok').click(function () {
             growthPeriod = growthPeriodV ? parseFloat(growthPeriodV) : 0;
         if (project.property.costGrowthRate !== costGrowthRate) {
             properties['property.costGrowthRate'] = costGrowthRate;
+            project.property.costGrowthRate = costGrowthRate;
             reCalcBills = true;
         }
         if (project.property.growthPeriod !== growthPeriod) {
             properties['property.growthPeriod'] = growthPeriod;
+            project.property.growthPeriod = growthPeriod;
             reCalcBills = true;
         }
     }