From 63844facafa7e62e65cb6886a11d76906414b7bb Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 31 Mar 2026 16:25:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A0=A1=E9=AA=8C=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E7=9A=84=E5=85=85=E5=80=BC/=E6=89=A3=E6=AC=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BD=93=E5=89=8D=E6=98=AF=E5=90=A6=E5=90=88=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wallet/wallet-recharge-apply.ts | 9 +++ src/components/processDrawer/index.vue | 56 ++++++++----- .../wallet/wallet-recharge-apply/index.vue | 81 ++++++++++++++++++- 3 files changed, 126 insertions(+), 20 deletions(-) diff --git a/src/api/wallet/wallet-recharge-apply.ts b/src/api/wallet/wallet-recharge-apply.ts index 28d3a6c..56da1bb 100644 --- a/src/api/wallet/wallet-recharge-apply.ts +++ b/src/api/wallet/wallet-recharge-apply.ts @@ -78,3 +78,12 @@ export function putObj(obj?: Object) { data: obj, }) } + +// 校验申请的充值/扣款数据当前是否合法 +export function validateError(params: any) { + return request({ + url: "/wallet/wallet-recharge-apply/validate-error", + method: "get", + params: params, + }) +} diff --git a/src/components/processDrawer/index.vue b/src/components/processDrawer/index.vue index bcc4033..1a5cc7d 100644 --- a/src/components/processDrawer/index.vue +++ b/src/components/processDrawer/index.vue @@ -1,30 +1,31 @@ @@ -203,6 +240,11 @@ const activeName = ref() const tabItems = ref([{}]) const processDrawerRef = ref() +const errorState = reactive({ + errorList: [], + loading: false, +}) + const state: BasicTableProps = reactive({ queryForm: {}, pageList: walletRechargeApplyApi.pageJoin, @@ -309,8 +351,23 @@ const handleDelete = async (ids: string[]) => { * 点击开始处理 * @param row */ -const deal = (row: any) => { +const deal = async (row: any) => { if (!row.processId) return useMessage().info("流程id不存在") + try { + errorState.loading = true + // 查询是否有错误 + const { data }: any = await walletRechargeApplyApi.validateError({ applyId: row.id }) + if (data && data.length) { + errorState.errorList = data + } else { + errorState.errorList = [] + } + } catch (error) { + console.log("查询是否有错误error:", error); + errorState.errorList = [] + } finally { + errorState.loading = false + } processDrawerRef.value.openProcessDrawer(row) } @@ -321,6 +378,26 @@ const taskSubmitEvent = () => {