Forráskód Böngészése

fixed: 补漏 bug#3411 (有百分号的情况下)

Tony Kang 3 éve
szülő
commit
83286d26dc
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      modules/main/facade/project_facade.js

+ 2 - 0
modules/main/facade/project_facade.js

@@ -353,6 +353,8 @@ function getReportData(nameList, items, prjTypeNames, compilationScopes, decimal
         totalExp = totalExp.replace(t.ID, t.billsTtlPrice + "");
       }
       totalExp = totalExp.replace(/@/g, "");
+      //还有其他符号(如%)
+      totalExp = totalExp.replace(/%/g, " / 100 ");
       let nTotal = eval(totalExp);
       item.billsTtlPrice = scMathUtil.roundForObj(nTotal, decimal.bills.totalPrice);
       item['技术经济综合指标'] = (item.billsTtlAmt && parseFloat(item.billsTtlAmt) !== 0) ? scMathUtil.roundForObj(item.billsTtlPrice / item.billsTtlAmt, 2) : scMathUtil.roundForObj(item.billsTtlPrice, 2);