Commit 1f684b63 authored by 耿迪迪's avatar 耿迪迪

应还款金额计算修改

parent ced17d1d
...@@ -54,7 +54,9 @@ public class SettlementDebit { ...@@ -54,7 +54,9 @@ public class SettlementDebit {
public void repayment(TDebitCredit tDebitCredit){ public void repayment(TDebitCredit tDebitCredit){
this.tDebitCredit = tDebitCredit; this.tDebitCredit = tDebitCredit;
//计算还款日期 //计算还款日期
long time = tDebitCredit.getExpectedRepaymentDate().getTime() - tDebitCredit.getSumInterestDate().getTime(); //long time = tDebitCredit.getExpectedRepaymentDate().getTime() - tDebitCredit.getSumInterestDate().getTime();
//2023-08-25 修改为根据实际还款日计算
long time = new Date().getTime() - tDebitCredit.getSumInterestDate().getTime();
long days = Math.round(((double)time) / 1000 / 60 / 60 / 24); long days = Math.round(((double)time) / 1000 / 60 / 60 / 24);
//还款部门 //还款部门
BigDecimal repayAmount = tDebitCredit.getLittleTotal().multiply( new BigDecimal(1 + 0.08/360 * days)).setScale(2, RoundingMode.HALF_UP); BigDecimal repayAmount = tDebitCredit.getLittleTotal().multiply( new BigDecimal(1 + 0.08/360 * days)).setScale(2, RoundingMode.HALF_UP);
......
...@@ -61,9 +61,10 @@ ...@@ -61,9 +61,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="应还金额">{{ payable() }}</el-form-item> <el-form-item label="预计还款金额">{{ payable() }}</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="应还金额" v-if="debitData.debitStatus == '2'">{{ realPayable() }}</el-form-item>
<el-form-item label="备注">{{ debitData.remark==null?"-":debitData.remark }}</el-form-item> <el-form-item label="备注">{{ debitData.remark==null?"-":debitData.remark }}</el-form-item>
<el-divider></el-divider> <el-divider></el-divider>
</el-form> </el-form>
...@@ -124,6 +125,11 @@ ...@@ -124,6 +125,11 @@
let time = new Date(this.debitData.expectedRepaymentDate).getTime()/ 1000 - new Date(this.debitData.sumInterestDate).getTime()/ 1000; let time = new Date(this.debitData.expectedRepaymentDate).getTime()/ 1000 - new Date(this.debitData.sumInterestDate).getTime()/ 1000;
let day = Math.round(time / 60 / 60 / 24); let day = Math.round(time / 60 / 60 / 24);
return (this.debitData.littleTotal *(1 + 0.08 /360 * day)).toFixed(2); return (this.debitData.littleTotal *(1 + 0.08 /360 * day)).toFixed(2);
},
realPayable(){
let time = new Date().getTime()/ 1000 - new Date(this.debitData.sumInterestDate).getTime()/ 1000;
let day = Math.round(time / 60 / 60 / 24);
return (this.debitData.littleTotal *(1 + 0.08 /360 * day)).toFixed(2);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment