From 5172cd123423e9e31c63d9a05d76476260715fda Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 27 Jun 2024 14:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B7=E6=AC=BE=E4=B8=9A=E5=8A=A1=E8=81=94?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 2 +- src/api/http.js | 3 + .../apply/creditApplication/index.vue | 13 +- .../apply/creditEvaluation/rating.vue | 2 +- .../apply/loanApplication/step1.vue | 28 +-- .../apply/loanApplication/step2.vue | 62 +++-- .../manage/list/corporateLoans/detail.vue | 119 ++++++--- src/pages/manage/list/corporateLoans/list.js | 7 - src/pages/manage/list/corporateLoans/loan.vue | 4 + .../manage/list/corporateLoans/management.vue | 104 +++++--- .../manage/list/corporateLoans/repayment.vue | 78 +++++- src/pages/manage/list/personalLoans/index.vue | 232 +++++++++--------- src/pages/manage/list/personalLoans/list.js | 7 - src/pages/manage/list/personalLoans/list.vue | 2 + 14 files changed, 420 insertions(+), 243 deletions(-) delete mode 100644 src/pages/manage/list/corporateLoans/list.js delete mode 100644 src/pages/manage/list/personalLoans/list.js diff --git a/src/api/api.js b/src/api/api.js index a09c21b..386ce55 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -10,7 +10,7 @@ if (dev) { // 本地 host = 'http://121.37.12.51/' // 中台测试服 // host = 'https://www.occupationlab.com/' // 正式服 - host = 'http://192.168.31.217:9000/' + host = 'http://192.168.31.51:9000/' } // 创建axios实例 const service = axios.create({ diff --git a/src/api/http.js b/src/api/http.js index 16d6d02..caeeab6 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -86,6 +86,9 @@ export const badDebtRecognition = data => { export const postLoanInvestigationInput = data => { return post(`${host}/judgment/bankPostLoanInvestigation/postLoanInvestigationInput`, data) } +export const addExtensionPeriod = data => { + return post(`${host}/judgment/bankCompanyLoans/addExtensionPeriod`, data) +} export const loanContractSave = (data) => { return post('/judgment/bankPersonalLoanContractInfo/saveOrUpdate', data) diff --git a/src/pages/manage/list/corporateLoans/apply/creditApplication/index.vue b/src/pages/manage/list/corporateLoans/apply/creditApplication/index.vue index cfae213..c32517c 100644 --- a/src/pages/manage/list/corporateLoans/apply/creditApplication/index.vue +++ b/src/pages/manage/list/corporateLoans/apply/creditApplication/index.vue @@ -326,13 +326,18 @@ export default { }, async submit () { try { - const { data } = await creditApplicationInput({ + const { form } = this + if (!form.matureRepayment && !form.otherRepayments) return this.$message.error('请选择还款来源!') + if (!form.paymentForMaterials && !form.payLaborCosts && !form.payExpenses && !form.otherUses) return this.$message.error('请选择贷款用途!') + + await creditApplicationInput({ ...this.$store.state.system.creditIds, ...this.$store.state.system.creditImportIds, - ...this.form, + ...form, }) - this.$message[data.status === 200 ? 'success' : 'error']('创建成功!') - setTimeout(this.$router.push('/counter/list/manage/orporateLoans-application'), 1500) + this.$message.success('保存成功!') + this.$parent.active = '3' + this.$parent.curStep = 0 } catch { (e) => { } } }, }, diff --git a/src/pages/manage/list/corporateLoans/apply/creditEvaluation/rating.vue b/src/pages/manage/list/corporateLoans/apply/creditEvaluation/rating.vue index d56f8a1..38c4286 100644 --- a/src/pages/manage/list/corporateLoans/apply/creditEvaluation/rating.vue +++ b/src/pages/manage/list/corporateLoans/apply/creditEvaluation/rating.vue @@ -205,7 +205,7 @@ export default { ...this.creditIds, ...this.form, }) - this.$message[data.status === 200 ? 'success' : 'error']('创建成功!') + this.$message.success('创建成功!') this.$parent.active = '2' } catch { (e) => { } } }, diff --git a/src/pages/manage/list/corporateLoans/apply/loanApplication/step1.vue b/src/pages/manage/list/corporateLoans/apply/loanApplication/step1.vue index 38bd9dd..7a5f596 100644 --- a/src/pages/manage/list/corporateLoans/apply/loanApplication/step1.vue +++ b/src/pages/manage/list/corporateLoans/apply/loanApplication/step1.vue @@ -69,7 +69,7 @@ - + @@ -102,24 +102,24 @@ export default { creditTerm: 231, annualizedInterestRate: '', loanApplicationAmount: '', - repaymentMethod: 235, + repaymentMethodOne: 235, distributionMethod: 238, }, opt1: [ { - id: 231, + id: 1, name: '1年' }, { - id: 232, + id: 3, name: '3年' }, { - id: 233, + id: 5, name: '5年' }, { - id: 234, + id: 10, name: '10年' }, ], @@ -132,10 +132,10 @@ export default { id: 236, name: '等额本息' }, - { - id: 237, - name: '先息后本' - }, + // { + // id: 237, + // name: '先息后本' + // }, ], opt3: [ { @@ -165,10 +165,10 @@ export default { companyLoanId: this.$store.state.system.creditIds.companyLoanId, }) // 缓存信用评估几个id - // this.setCreditIds({ - // companyLoanId: data.companyLoanId, // 顶部三个tab切换的公共id - // creditEvaluationId: data.creditEvaluationId, // 信用评估的id - // }) + this.setCreditIds({ + companyLoanId: data.companyLoanId, // 顶部三个tab切换的公共id + loanId: data.loanId, // 贷款申请的id + }) this.$emit('updateStep', 1) } catch { (e) => { } } }, diff --git a/src/pages/manage/list/corporateLoans/apply/loanApplication/step2.vue b/src/pages/manage/list/corporateLoans/apply/loanApplication/step2.vue index 09ce590..3340f3f 100644 --- a/src/pages/manage/list/corporateLoans/apply/loanApplication/step2.vue +++ b/src/pages/manage/list/corporateLoans/apply/loanApplication/step2.vue @@ -2,7 +2,7 @@ - + 客户信息 @@ -15,25 +15,25 @@ - + - + - + - + - + - + @@ -43,7 +43,7 @@ - + @@ -56,10 +56,9 @@ - - - - + + + @@ -70,7 +69,6 @@ - 上一步 提交 @@ -83,15 +81,36 @@ export default { return { form: { valueDate: '', - creditTerm: '', + creditTerm: 3, + guaranteeMethod: 242, expirationDate: '', totalInterestAmount: '', loanAmount: '', propertyCertificateNo: '', - repaymentMethod: '', + repaymentMethodTwo: '', interestTotal: '', repaymentAccount: '', }, + opt1: [ + { + id: 242, + name: '质押' + }, + { + id: 243, + name: '抵押' + }, + ], + opt2: [ + { + id: 235, + name: '等额本金' + }, + { + id: 236, + name: '等额本息' + }, + ], } }, mounted () { @@ -103,18 +122,21 @@ export default { const { valueDate, creditTerm } = this.form if (valueDate && creditTerm) { const date = new Date(valueDate) - date.setMonth(creditTerm) + date.setFullYear(date.getFullYear() + creditTerm) this.form.expirationDate = Util.formatDate('yyyy-MM-dd', date) } }, async submit () { try { - const { data } = await loanApplicationInput({ + const { form } = this + if (!form.valueDate) return this.$message.error('请选择起息日期!') + if (!form.repaymentAccount) return this.$message.error('请输入还款账号!') + await loanApplicationInput({ ...this.$store.state.system.creditIds, - ...this.form, + ...form, }) - this.$message[data.status === 200 ? 'success' : 'error']('创建成功!') - setTimeout(this.$router.push('/counter/list/manage/orporateLoans-application'), 1500) + this.$message.success('保存成功!') + this.$router.back() } catch { (e) => { } } }, }, diff --git a/src/pages/manage/list/corporateLoans/detail.vue b/src/pages/manage/list/corporateLoans/detail.vue index ec3d95a..44ad1ec 100644 --- a/src/pages/manage/list/corporateLoans/detail.vue +++ b/src/pages/manage/list/corporateLoans/detail.vue @@ -9,7 +9,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -53,13 +53,13 @@ 贷款申请 - - + + - - + + @@ -68,8 +68,8 @@ - - + + @@ -86,10 +86,10 @@ - + - @@ -99,29 +99,29 @@ - - + + - + - + - + - - + + - + @@ -129,21 +129,21 @@ - - - - + + + - + - 放款 + 放款 关闭 @@ -190,8 +190,62 @@ export default { financialReportSubmissionMethod: '', natureOfBorrower: '', }, + opt1: [ + { + id: 1, + name: '1年' + }, + { + id: 3, + name: '3年' + }, + { + id: 5, + name: '5年' + }, + { + id: 10, + name: '10年' + }, + ], + opt2: [ + { + id: 235, + name: '等额本金' + }, + { + id: 236, + name: '等额本息' + }, + // { + // id: 237, + // name: '先息后本' + // }, + ], + opt3: [ + { + id: 238, + name: '一次性到账' + }, + { + id: 239, + name: '随借随还' + }, + ], + opt4: [ + { + id: 242, + name: '质押' + }, + { + id: 243, + name: '抵押' + }, + ], loanDate: '', loanVisible: false, + bankCompanyLoans: {}, + bankLoanApplication: {}, } }, mounted () { @@ -203,7 +257,15 @@ export default { if (this.id) { // 查看及展期 const { data } = await companyLoanDetails(this.id) - this.form = data.bankCreditEvaluation + this.form = data.bankCreditEvaluation || {} + this.bankCompanyLoans = data.bankCompanyLoans || {} + + const app = data.bankLoanApplication || {} + if (app.distributionMethod) app.distributionMethod = +app.distributionMethod + if (app.repaymentMethodOne) app.repaymentMethodOne = +app.repaymentMethodOne + if (app.creditTerm) app.creditTerm = +app.creditTerm + if (app.guaranteeMethod) app.guaranteeMethod = +app.guaranteeMethod + this.bankLoanApplication = app } }, // 展示放款弹框 @@ -214,11 +276,10 @@ export default { async loanSubmit () { if (!this.loanDate) return this.$message.error('请选择放款日期!') const { data } = await loanDisbursement({ - companyLoanId: this.form.contractId, + companyLoanId: this.id, loanDate: this.loanDate, }) this.$message[data.status === 200 ? 'success' : 'error'](data.message) - setTimeout(this.$router.push('/counter/list/manage/personalLoans'), 1500) }, }, } diff --git a/src/pages/manage/list/corporateLoans/list.js b/src/pages/manage/list/corporateLoans/list.js deleted file mode 100644 index 7b6d469..0000000 --- a/src/pages/manage/list/corporateLoans/list.js +++ /dev/null @@ -1,7 +0,0 @@ -export default [ - { - id: 1, - name: '维新集团', - serial: 'F10628012', - } -] \ No newline at end of file diff --git a/src/pages/manage/list/corporateLoans/loan.vue b/src/pages/manage/list/corporateLoans/loan.vue index 585ca64..cfc661f 100644 --- a/src/pages/manage/list/corporateLoans/loan.vue +++ b/src/pages/manage/list/corporateLoans/loan.vue @@ -12,6 +12,10 @@ + + + {{ scope.row.loanDate ? '已放款' : '待放款' }} + 详情 diff --git a/src/pages/manage/list/corporateLoans/management.vue b/src/pages/manage/list/corporateLoans/management.vue index e48da5c..60f4b21 100644 --- a/src/pages/manage/list/corporateLoans/management.vue +++ b/src/pages/manage/list/corporateLoans/management.vue @@ -40,22 +40,25 @@ + + {{ today }} + - 炳胜集团 + {{ curRow.customerName }} - 炳胜集团 + {{ curRow.customerName }} - - 炳胜集团 + + {{ curRow.customerName }} - F10666123 + {{ curRow.applicationNumber }} - F10666123 + A012346156281 @@ -76,57 +79,58 @@ 贷后调查 - 调查日期:2024-04-02 + 调查日期:{{ today }} - - + + - - - + + + - + - + - + - + - + - + - + - + - + - + - + @@ -146,6 +150,7 @@ import { headerCellStyle } from '@/assets/js/myConfig' import { companyLoanList, loanCollection, nonPerformingLoans, badDebtRecognition, postLoanInvestigationInput } from '@/api/http'; import MyTitle from '@/components/myTitle' +import Util from '@/libs/util' export default { components: { MyTitle, @@ -159,6 +164,7 @@ export default { page: 1, pageSize: 10, total: 0, + today: Util.formatDate('yyyy-MM-dd', new Date()), msgs: [ '向贷款人预留各渠道联系方式发送催收信息', '确认提交吗?', @@ -174,14 +180,15 @@ export default { postLoanVisible: false, selects: [], + originForm: {}, form: { stateChange: '', - changesInSituation: '', - debtPayingAbility: '', - adverseChanges: '', - businessStatus: '', - creditStatus: '', - fiveLevelClassification: '', + changesInSituation: 203, + debtPayingAbility: 1, + adverseChanges: 203, + businessStatus: 205, + creditStatus: 205, + fiveLevelClassification: 1, conclusionAndSuggestions: '', }, opt1: [ @@ -210,16 +217,34 @@ export default { ], opt3: [ { - id: 205, - name: '优' + id: 1, + name: '能按期偿还' }, { - id: 206, - name: '良' + id: 2, + name: '不能按期偿还' }, + ], + opt4: [ { - id: 207, - name: '差' + id: 1, + name: '正常贷款' + }, + { + id: 2, + name: '关注贷款' + }, + { + id: 3, + name: '次级贷款' + }, + { + id: 4, + name: '可疑贷款' + }, + { + id: 5, + name: '损失贷款' }, ], curRow: {}, @@ -234,6 +259,7 @@ export default { }, }, mounted () { + this.originForm = JSON.parse(JSON.stringify(this.form)) this.initData() }, methods: { @@ -263,12 +289,15 @@ export default { }, // 贷后调查 postLoan (row) { + this.form = JSON.parse(JSON.stringify(this.originForm)) this.curRow = row this.postLoanVisible = true }, // 贷后调查提交 async postLoanSubmit () { - await postLoanInvestigationInput(this.form) + const { form } = this + if (!form.stateChange) return this.$message.error('请填写客户基本状态变化!') + await postLoanInvestigationInput(form) this.postLoanVisible = false }, @@ -316,9 +345,6 @@ export default { this.visible = false } }, - extension (row) { - - }, }, }; diff --git a/src/pages/manage/list/corporateLoans/repayment.vue b/src/pages/manage/list/corporateLoans/repayment.vue index 5246d99..1d707ee 100644 --- a/src/pages/manage/list/corporateLoans/repayment.vue +++ b/src/pages/manage/list/corporateLoans/repayment.vue @@ -15,7 +15,7 @@ 详情 - 展期 + 展期 @@ -24,12 +24,23 @@ + + + + + + + + 取消 + 确定 + + diff --git a/src/pages/manage/list/personalLoans/index.vue b/src/pages/manage/list/personalLoans/index.vue index ae4dc1a..0402ea1 100644 --- a/src/pages/manage/list/personalLoans/index.vue +++ b/src/pages/manage/list/personalLoans/index.vue @@ -2,10 +2,7 @@ - + 全部 正常还款 展期 @@ -13,7 +10,7 @@ - + @@ -29,7 +26,6 @@ export default { data () { return { text: '',/* 顶部文字 */ - cacheVal: '', textObj: { '1': '全部', '2': '正常还款', @@ -40,136 +36,134 @@ export default { }, visible: false, options: [], - activeIndex: '', - second: [// 二级卡数组 - - ], - - - + active: '1', } }, methods: { handleSelect (val) { this.text = this.textObj[val] - this.activeIndex = val - this.cacheVal = val + this.active = val }, }, - created () { - if (sessionStorage.getItem('personalLoansIndex')) { - this.handleSelect(sessionStorage.getItem('personalLoansIndex')) - } else { - this.handleSelect('1') - } - }, - destroyed () { - sessionStorage.setItem('personalLoansIndex', this.cacheVal) - } }; diff --git a/src/pages/manage/list/personalLoans/list.js b/src/pages/manage/list/personalLoans/list.js deleted file mode 100644 index 13ccbed..0000000 --- a/src/pages/manage/list/personalLoans/list.js +++ /dev/null @@ -1,7 +0,0 @@ -export default [ - { - id: 1, - name: '刘亚东', - serial: 'F10628012', - } -] \ No newline at end of file diff --git a/src/pages/manage/list/personalLoans/list.vue b/src/pages/manage/list/personalLoans/list.vue index 87a683a..e3300a9 100644 --- a/src/pages/manage/list/personalLoans/list.vue +++ b/src/pages/manage/list/personalLoans/list.vue @@ -177,6 +177,8 @@ export default { pageNum: this.page, pageSize: this.pageSize, customerName: this.keyword, + renewalOrNot: this.$parent.active === '3' ? 1 : '', + normalRepayment: this.$parent.active === '2' ? 1 : '', }) this.list = data.list.records this.total = data.list.total
{{ today }}
炳胜集团
{{ curRow.customerName }}
F10666123
{{ curRow.applicationNumber }}
A012346156281