Explorar o código

百分比计算修正

laiguoran %!s(int64=3) %!d(string=hai) anos
pai
achega
a67d116494
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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));