Browse Source

百分比计算修正

laiguoran 3 years ago
parent
commit
a67d116494
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/view/datacollect/index.ejs

+ 1 - 1
app/view/datacollect/index.ejs

@@ -1421,7 +1421,7 @@
             }
             // console.log(tenderList);
             $('.data_tender_num').text(tenderList.length);
-            const rate = total_price ? ZhCalc.round(ZhCalc.div(total_stage_price, total_price) * 100, 2) : 0;
+            const rate = total_price && total_change_price ? ZhCalc.round(ZhCalc.div(total_stage_price, ZhCalc.add(total_price, total_change_price)) * 100, 2) : 0;
             $('.data_tender_rate').text(rate ? rate + '%' : '0%');
             $('.data_total_price').text(formatMoney(total_price));
             $('.data_total_change_price').text(formatMoney(total_change_price));