From f855d54174e7baa563727009ae1e0c79c7aa40ef Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 1 Apr 2024 15:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E8=A1=8C=E7=9B=B8=E5=85=B3=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/bank/Add.vue | 10 ++++++ src/views/product/bank/CardList.vue | 4 +++ src/views/product/bank/Info.vue | 55 +++++++++++++++-------------- src/views/product/bank/List.vue | 2 +- 4 files changed, 43 insertions(+), 28 deletions(-) diff --git a/src/views/product/bank/Add.vue b/src/views/product/bank/Add.vue index 0f96c63..80b128d 100644 --- a/src/views/product/bank/Add.vue +++ b/src/views/product/bank/Add.vue @@ -425,6 +425,7 @@ const getConfig = async () => { }; // 详情 const getDetail = async () => { + if (!route.query.show) curTab.value = 'tab1'; userName.value = await getUsername(); info.value = null; @@ -492,6 +493,15 @@ const submit = async (formEl: FormInstance | undefined) => { return ElMessage.error('请输入合理的贷款利率'); if (isIllegalNum(param.minimumTermOfLoan) || isIllegalNum(param.maximumTermOfLoan) || +param.minimumTermOfLoan > +param.maximumTermOfLoan) return ElMessage.error('请输入合理的贷款期限'); + + if (param.ageSelectedState !== 795) { + param.minimumAge = ''; + param.maximumAge = ''; + } + + if (param.degreeSelectedStatus !== 795) param.educationalRequirements = []; + if (param.workingLifeSelectedState !== 795) param.currentWorkingLife = []; + param.currentWorkingLife = param.currentWorkingLife.join(); param.educationalRequirements = param.educationalRequirements.join(); param.modeRepayment = param.modeRepayment.join(); diff --git a/src/views/product/bank/CardList.vue b/src/views/product/bank/CardList.vue index 126c17f..55c1c38 100644 --- a/src/views/product/bank/CardList.vue +++ b/src/views/product/bank/CardList.vue @@ -47,6 +47,7 @@ @getList="getList"> @@ -80,6 +81,7 @@ const productType = computed(() => route.query.type); // 个人/企业 const role = computed(() => +route.query.role || 41); const id = computed(() => +route.query.id); const configKey = ref(1); +const addKey = ref(1); // 列表 const getList = async (refresh?: number) => { loading.value = true; @@ -122,9 +124,11 @@ const switchProduct = (row: any, refresh?: number) => { const path = `/product/bank/${toAction}`; router.push(`${path}?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${row.id}&name=${route.query.name ?? ''}`); if (toAction === 'config' && curAction === 'config') configKey.value += 1; + if (toAction === 'add' && curAction === 'add') addKey.value += 1; }; // 新增 const toAdd = () => { + if (action.value === 'add') addKey.value += 1; router.push(`/product/bank/add?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}`); }; // 返回列表 diff --git a/src/views/product/bank/Info.vue b/src/views/product/bank/Info.vue index 862876f..a93fbae 100644 --- a/src/views/product/bank/Info.vue +++ b/src/views/product/bank/Info.vue @@ -1,14 +1,15 @@