소스 검색

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

Tony Kang 3 년 전
부모
커밋
83286d26dc
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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);