From 1b512e704d6fd7226e8244520b6abf4ce9d1e3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Fri, 1 May 2026 12:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E6=8A=A5=E5=90=8D=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/record/index.vue | 42 +++++++++++++++++++++++++++ src/views/user/registration/index.vue | 6 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/views/user/record/index.vue b/src/views/user/record/index.vue index 89533d8..df94366 100644 --- a/src/views/user/record/index.vue +++ b/src/views/user/record/index.vue @@ -814,6 +814,21 @@ const getEventStatusText = (status) => { const disableCancel = computed(() => { if (!currentRow.value) return true; + + // 检查是否已超过赛事报名截止时间 + if (currentRow.value.registrationEndTime) { + try { + const endTime = new Date(currentRow.value.registrationEndTime); + const currentTime = new Date(); + if (currentTime > endTime) { + // 已超过报名截止时间,禁用取消报名 + return true; + } + } catch { + // 日期解析失败,继续检查其他条件 + } + } + const payStatus = normalizeToNumber(currentRow.value.payStatus); const paymentMethod = normalizeToNumber(currentRow.value.paymentMethod); // 如果是线下支付(1),仅当支付状态为未支付(0)或已支付(1)时允许取消 @@ -827,6 +842,21 @@ const disableCancel = computed(() => { const isCancelDisabledByRow = (row) => { if (!row) return true; + + // 检查是否已超过赛事报名截止时间 + if (row.registrationEndTime) { + try { + const endTime = new Date(row.registrationEndTime); + const currentTime = new Date(); + if (currentTime > endTime) { + // 已超过报名截止时间,禁用取消报名 + return true; + } + } catch { + // 日期解析失败,继续检查其他条件 + } + } + const payStatus = normalizeToNumber(row.payStatus); const paymentMethod = normalizeToNumber(row.paymentMethod); // 如果是线下支付(1),仅当支付状态为未支付(0)或已支付(1)时允许取消 @@ -1565,6 +1595,7 @@ watch(cancelAll, async (newVal) => { const openCancelDialog = async (row) => { if (!row?.registrationId) return; + isShowCancelDialog.value = true; isCancelConfirmed.value = false; cancelLoading.value = true; @@ -1590,6 +1621,17 @@ const openCancelDialog = async (row) => { // 根据后端返回的数据设置是否为免费项目 isFreeProject.value = data?.chargeMode === 0 || data?.actualPaidAmount <= 0; + // 检查支付方式和审核状态:如果是银行卡转账且未审批通过,则显示提示 + const paymentMethod = normalizeToNumber(data.paymentMethod || row.paymentMethod); + const auditStatus = normalizeToNumber(data.auditStatus || row.auditStatus); // 审核状态字段 + + // 银行卡转账为 3,已审核通过为 2,未审核/审核中为 0/1 + if (paymentMethod === 3 && auditStatus !== 2) { + ElMessage.warning('该订单目前处于审核处理阶段,暂时无法进行退款操作,请等待审核完成后方可申请退款'); + isShowCancelDialog.value = false; + return; + } + // 初始化退款计算结果 - 先使用preview数据 refundCalculationResult.value = { // 初始状态下没有选择取消项,所以本次退款金额为0 diff --git a/src/views/user/registration/index.vue b/src/views/user/registration/index.vue index d229b1a..5b95957 100644 --- a/src/views/user/registration/index.vue +++ b/src/views/user/registration/index.vue @@ -313,7 +313,7 @@
- 请使用银行APP或网银进行转账,转账完成后系统会自动审核。 + 请使用银行APP或网银进行转账,转账完成后到【赛事管理】-参赛记录上传付款凭证,上传完成后系统会自动审核。
@@ -402,7 +402,7 @@ - + { // 保存完整的详情数据,用于项目类型显示等 detailData.value = data; projects.value = Array.isArray(data?.projects) ? data.projects : []; + // 确保支付方式默认为微信支付(隐藏了支付宝选项) + paymentMethod.value = 1; isShowRegisterDialog.value = true; activeStep.value = 0; } catch (error) {