From ca656d4cd91c63dec0535053b495d2b0c28e4d3f Mon Sep 17 00:00:00 2001 From: wuzebang Date: Tue, 12 Sep 2023 14:17:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tools/code/amount.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pages/tools/code/amount.vue b/pages/tools/code/amount.vue index 340e053..94fb788 100644 --- a/pages/tools/code/amount.vue +++ b/pages/tools/code/amount.vue @@ -62,8 +62,8 @@

 申请金额 = 预计放款 / (1 - 融资账期 * 预计融资利率 / 360 - 融资账期 * 预计运维利率 / 360)
 融资成本 = 申请金额 - 预计放款
-预计融资利息 = 申请金额 * 预计融资利率 * day / 360
 预计运维支出 = 申请金额 * 预计运维利率 * day / 360
+预计融资利息 = 申请金额 - 融资成本
 
@@ -184,22 +184,21 @@ export default { financing_service_rate, radio ) { - const apply_amount = - amount / - (1 - - (day * financing_rate) / 360.0 - - (day * financing_service_rate) / 360.0); + // 账期百分比 + const financing_period_percent = (day / 360.0).toFixed(8); + const apply_amount = (amount / (1 - financing_rate * financing_period_percent - financing_service_rate * financing_period_percent)).toFixed(2); const financing_cost = apply_amount - amount; - const financing_interest = - (apply_amount * financing_rate * day) / 360.0; - const service_amount = - (apply_amount * financing_service_rate * day) / 360.0; + const service_amount = (apply_amount * financing_service_rate * financing_period_percent).toFixed(2); + const financing_interest = financing_cost - service_amount; + const expect_financing_amount = apply_amount - financing_cost; // 本期申请支付金额 const payment_apply_amount = amount * radio + financing_cost; return ( '申请金额: ' + apply_amount.toFixed(2) + + '\n预计融资金额: ' + + expect_financing_amount.toFixed(2) + '\n融资成本: ' + financing_cost.toFixed(2) + '\n预计融资利息: ' +