From d038fbeb37924d663c32f48f545c8a7622f84310 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 28 Sep 2023 16:04:38 +0800 Subject: [PATCH] fix --- src/api/bank.ts | 2 + src/api/judgment.ts | 1 - src/styles/form.scss | 2 +- src/views/product/Add.vue | 169 ++++++++++++++++++++++++++++++---- src/views/product/Approve.vue | 2 +- src/views/product/Config.vue | 98 +++++++++++--------- src/views/product/Info.vue | 75 ++++++++++++--- src/views/product/List.vue | 27 +++--- 8 files changed, 284 insertions(+), 92 deletions(-) diff --git a/src/api/bank.ts b/src/api/bank.ts index 40dde5f..3373d64 100644 --- a/src/api/bank.ts +++ b/src/api/bank.ts @@ -17,3 +17,5 @@ export const riskUpdate = async (data: Record): Promise => (aw export const riskById = async (id: number): Promise => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/findById?id=${id}`)).data; export const examineAndApprove = async (id: number | string, opinionDescription: string, status: number, approvalTime: string): Promise => (await axios.post(`/product/product/bank/products/examineAndApprove?id=${id}&opinionDescription=${opinionDescription}&status=${status}&approvalTime=${approvalTime}`)).data; + +export const update = async (data: Record): Promise => (await axios.post(`/product/product/bank/products/update`, data)).data; diff --git a/src/api/judgment.ts b/src/api/judgment.ts index 5fcc3ca..1d5131a 100644 --- a/src/api/judgment.ts +++ b/src/api/judgment.ts @@ -4,5 +4,4 @@ export const imageUploadUrl = `${import.meta.env.VITE_BASE_API}/backend/image-up export const getProcess = async (): Promise => (await axios.post('/judgment/judgment/stRecord/getProcess?systemId=19')).data; export const getProcessInformationBasedOnRoles = async (id: number): Promise => (await axios.post(`/judgment/judgment/stRecord/getProcessInformationBasedOnRoles?systemId=19&parentId=${id}`)).data; -export const getAllBusiness = async (): Promise => (await axios.post('/judgment/judgment/stRecord/getAllBusiness?systemId=19')).data; export const addOperation = async (data: Record): Promise => (await axios.post('/product/product/bank/operation/addOperation', data)).data; diff --git a/src/styles/form.scss b/src/styles/form.scss index b828ea8..9f0909f 100644 --- a/src/styles/form.scss +++ b/src/styles/form.scss @@ -1,5 +1,5 @@ .form { - @apply max-h-[calc(100vh-270px)] overflow-auto; + @apply max-h-[calc(100vh-270px)] pr-2 overflow-auto; .step { @apply relative pl-[42px]; &:before { diff --git a/src/views/product/Add.vue b/src/views/product/Add.vue index e89d302..29c1048 100644 --- a/src/views/product/Add.vue +++ b/src/views/product/Add.vue @@ -2,8 +2,22 @@
- +
+
+ 审批意见: + {{ getStatus(+info?.status) }} +
+
+ 意见描述: + {{ info.opinionDescription }} +
+

审查日期:{{ info.approvalTime }}

+

审查员:公瑾

+
+ + prop="loanPurpose" + :rules="[ + { required: true, message: '请选择贷款用途', trigger: 'change' }, + { + asyncValidator: async (rule, value, callback) => { + if (value === 107 && !form.otherPurposesOfLoan) { + callback('请输入其他贷款用途') + } else { + callback() + } + }, + }, + ]">

选择本产品贷款资金的用途。

@@ -120,14 +146,28 @@
+ prop="bankGuaranteeTypeIds" + :rules="[ + { required: true, message: '请选择担保方式', trigger: 'change' }, + { + asyncValidator: async (rule, value, callback) => { + if (value.includes(110) && !value.find((e: any) => e > 22 && e < 33)) { + callback('请选择抵押物') + } else if (value.includes(111) && !value.find((e: any) => e > 32 && e < 38)) { + callback('请选择质押贷') + } else { + callback() + } + }, + }, + ]">

选择本产品的担保种类。

+ prop="minimumLoan" + :rules="[ + { required: true, message: '请输入贷款额度', trigger: 'blur' }, + { + asyncValidator: async (rule, value, callback) => { + const max = form.loanCeiling + if (isNaN(value) || value < 0 || max === '' || isNaN(max) || max < 0 || value > max) { + callback('请输入合理的贷款额度') + } else { + callback() + } + }, + }, + ]">
+ prop="minimumAprOnLoan" + :rules="[ + { required: true, message: '请输入贷款利率', trigger: 'blur' }, + { + asyncValidator: async (rule, value, callback) => { + const max = form.maximumAnnualInterestRate + if (isNaN(value) || value < 0 || max === '' || isNaN(max) || max < 0 || value > max) { + callback('请输入合理的贷款利率') + } else { + callback() + } + }, + }, + ]">
+ prop="minimumTermOfLoan" + :rules="[ + { required: true, message: '请输入贷款期限', trigger: 'blur' }, + { + asyncValidator: async (rule, value, callback) => { + const max = form.maximumTermOfLoan + if (isNaN(value) || value < 0 || max === '' || isNaN(max) || max < 0 || value > max) { + callback('请输入合理的贷款期限') + } else { + callback() + } + }, + }, + ]">
+ + +