From 4626913d8798ce6ff35156a93cb713b4c93da975 Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 16 Apr 2025 15:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E5=8C=85=E5=85=85=E5=80=BC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wallet/wallet-recharge-apply/form.vue | 34 ++++++++++++++----- .../wallet-recharge-apply/preview-excel.vue | 12 +++++-- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/views/wallet/wallet-recharge-apply/form.vue b/src/views/wallet/wallet-recharge-apply/form.vue index 40ff3b6..8addf21 100644 --- a/src/views/wallet/wallet-recharge-apply/form.vue +++ b/src/views/wallet/wallet-recharge-apply/form.vue @@ -17,7 +17,7 @@ - + @@ -66,6 +66,27 @@ const form = reactive({ remark: "", }) const walletTypeOptions = ref() +const walletTypeIdDisabled = ref(true) +watch( + () => form.bizType, + (val) => { + if (!val) return + + if (val == "2" && roleCodes.includes("CANTEEN_FINANCE")) { + walletTypeIdDisabled.value = false + } else { + walletTypeIdDisabled.value = true + if (roleCodes.includes("CAN_RECH_CONS_WALLET")) { + form.walletTypeId = walletTypeOptions.value?.find((item: any) => item.uniqueCode == "2").id || "" + } else { + form.walletTypeId = walletTypeOptions.value?.find((item: any) => item.uniqueCode == "1").id || "" + } + } + }, + { + immediate: true, + }, +) // 定义校验规则 const dataRules = ref({ @@ -85,19 +106,14 @@ const openDialog = async (id: string) => { form.walletTypeId = "" }) + const res = await getWalletTypeSimple() + walletTypeOptions.value = res.data.records + // 获取walletRechargeApply信息 if (id) { form.id = id await getwalletRechargeApplyData(id) } - - const res = await getWalletTypeSimple() - walletTypeOptions.value = res.data.records - if (roleCodes.includes("CAN_RECH_CONS_WALLET")) { - form.walletTypeId = res.data.records.find((item: any) => item.uniqueCode == "2").id - } else { - form.walletTypeId = res.data.records.find((item: any) => item.uniqueCode == "1").id - } } // 提交 diff --git a/src/views/wallet/wallet-recharge-apply/preview-excel.vue b/src/views/wallet/wallet-recharge-apply/preview-excel.vue index 5b9c9b0..b0f9179 100644 --- a/src/views/wallet/wallet-recharge-apply/preview-excel.vue +++ b/src/views/wallet/wallet-recharge-apply/preview-excel.vue @@ -38,8 +38,16 @@
(余额不足记账扣款)
- - + + +