From 999d07fc5d17a9f2751203a62b5349cde34607d3 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Thu, 21 Sep 2023 14:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=91=E8=9E=8D=E6=96=B9?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/publicPage/financialscheme.vue | 37 ++++++++++++++----- .../workFlow/publicPage/financialscheme.vue | 36 +++++++++++++----- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/anrui-riskcenter-ui/src/components/publicPage/financialscheme.vue b/anrui-riskcenter-ui/src/components/publicPage/financialscheme.vue index 2911d3bff7..d6cc37a7ff 100644 --- a/anrui-riskcenter-ui/src/components/publicPage/financialscheme.vue +++ b/anrui-riskcenter-ui/src/components/publicPage/financialscheme.vue @@ -55,13 +55,15 @@
首付金额
- + + {{ finance.downPayAmount }}
产品贷款金额
- {{ finance.loanAmount }} + +
@@ -395,7 +397,7 @@ export default { }) } if (this.finance.policySid !== '' && this.finance.isPack !== null) { - selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid, modelSid: this.modelSid }).then((res) => { + selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid, modelSid: this.modelSid, period: this.finance.loanPeriod }).then((res) => { if (res.success) { this.other_list = res.data } @@ -520,7 +522,7 @@ export default { this.finance.otherPolicyPeriod = '' this.finance.otherPolicyYearRatio = '' } - selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid, modelSid: this.modelSid }).then((res) => { + selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid, modelSid: this.modelSid, period: this.finance.loanPeriod }).then((res) => { if (res.success) { this.other_list = res.data } @@ -612,18 +614,33 @@ export default { } }, // 主方案 -- 修改首付金额 - downPayAmountInput() { - if (this.finance.loanTotal !== '') { + // downPayAmountInput() { + // if (this.finance.loanTotal !== '') { + // // 重新计算首付比例 + // this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toPrecision(2) + // // 重新计算产品贷款金额 + // this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount))) + // if (this.finance.serviceChargeTypeKey === '03') { + // // 贷款金额 * 贷款金额比例(金融产品政策中服务费) + // this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue))) + // } + // // 主方案 -- 贷款保证金 + // this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) + // } + // }, + // 主方案 -- 修改产品贷款金额 + loanAmountInput() { + if (this.finance.loanAmount !== '' && this.finance.loanTotal !== '') { + // 重新计算首付金额 + this.finance.downPayAmount = parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.loanAmount)) // 重新计算首付比例 this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toPrecision(2) - // 重新计算产品贷款金额 - this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount))) + // 重新计算贷款保证金 + this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) if (this.finance.serviceChargeTypeKey === '03') { // 贷款金额 * 贷款金额比例(金融产品政策中服务费) this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue))) } - // 主方案 -- 贷款保证金 - this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) } }, // 主方案 -- 修改贷款保证金,重新计算贷款保证金比例 diff --git a/anrui-riskcenter-ui/src/views/workFlow/publicPage/financialscheme.vue b/anrui-riskcenter-ui/src/views/workFlow/publicPage/financialscheme.vue index 06977b02eb..8500211ab2 100644 --- a/anrui-riskcenter-ui/src/views/workFlow/publicPage/financialscheme.vue +++ b/anrui-riskcenter-ui/src/views/workFlow/publicPage/financialscheme.vue @@ -55,13 +55,15 @@
首付金额
- + + {{ finance.downPayAmount }}
产品贷款金额
- {{ finance.loanAmount }} + +
@@ -397,7 +399,7 @@ export default { }) } if (this.finance.policySid !== '' && this.finance.isPack !== null) { - selectListByOther({ orgPath: this.orgPath, userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid, modelSid: this.modelSid }).then((res) => { + selectListByOther({ orgPath: this.orgPath, userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid, modelSid: this.modelSid, period: this.finance.loanPeriod }).then((res) => { if (res.success) { this.other_list = res.data } @@ -522,7 +524,7 @@ export default { this.finance.otherPolicyPeriod = '' this.finance.otherPolicyYearRatio = '' } - selectListByOther({ orgPath: this.orgPath, userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid, modelSid: this.modelSid }).then((res) => { + selectListByOther({ orgPath: this.orgPath, userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid, modelSid: this.modelSid, period: this.finance.loanPeriod }).then((res) => { if (res.success) { this.other_list = res.data } @@ -614,18 +616,32 @@ export default { } }, // 主方案 -- 修改首付金额 - downPayAmountInput() { - if (this.finance.loanTotal !== '') { + // downPayAmountInput() { + // if (this.finance.loanTotal !== '') { + // // 重新计算首付比例 + // this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toPrecision(2) + // // 重新计算产品贷款金额 + // this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount))) + // if (this.finance.serviceChargeTypeKey === '03') { + // // 贷款金额 * 贷款金额比例(金融产品政策中服务费) + // this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue))) + // } + // // 主方案 -- 贷款保证金 + // this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) + // } + // }, + loanAmountInput() { + if (this.finance.loanAmount !== '' && this.finance.loanTotal !== '') { + // 重新计算首付金额 + this.finance.downPayAmount = parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.loanAmount)) // 重新计算首付比例 this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toPrecision(2) - // 重新计算产品贷款金额 - this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount))) + // 重新计算贷款保证金 + this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) if (this.finance.serviceChargeTypeKey === '03') { // 贷款金额 * 贷款金额比例(金融产品政策中服务费) this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue))) } - // 主方案 -- 贷款保证金 - this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100) } }, // 主方案 -- 修改贷款保证金,重新计算贷款保证金比例