|
@@ -91,8 +91,9 @@
|
|
|
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div style="display: flex; align-items: center; justify-content: center; gap: 12px;">
|
|
<div style="display: flex; align-items: center; justify-content: center; gap: 12px;">
|
|
|
- <el-button link type="primary" icon="Printer" @click="handlePrintTicket(scope.row)">手动取票</el-button>
|
|
|
|
|
- <el-button v-if="scope.row.tournamentType === 0" link type="danger" icon="CircleClose" @click="handleCancelRegistration(scope.row)">取消报名</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="scope.row.status !== 2" link type="primary" icon="Printer" @click="handlePrintTicket(scope.row)">手动取票</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.tournamentType === 0 && scope.row.status !== 2" link type="danger" icon="CircleClose" @click="handleCancelRegistration(scope.row)">取消报名</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 2" link type="success" icon="Refresh" @click="handleReRegister(scope.row)">帮他报名</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -211,7 +212,8 @@ import {
|
|
|
updateParticipants,
|
|
updateParticipants,
|
|
|
promoteTournament,
|
|
promoteTournament,
|
|
|
printTicketInfo,
|
|
printTicketInfo,
|
|
|
- cancelRegistration
|
|
|
|
|
|
|
+ cancelRegistration,
|
|
|
|
|
+ reRegister
|
|
|
} from '@/api/system/physical/participants';
|
|
} from '@/api/system/physical/participants';
|
|
|
import { ParticipantsVO, ParticipantsQuery, ParticipantsForm, TicketTournamentsVo } from '@/api/system/physical/participants/types';
|
|
import { ParticipantsVO, ParticipantsQuery, ParticipantsForm, TicketTournamentsVo } from '@/api/system/physical/participants/types';
|
|
|
import { parseTime } from '@/utils/dateUtils';
|
|
import { parseTime } from '@/utils/dateUtils';
|
|
@@ -541,6 +543,26 @@ const handleCancelRegistration = async (row: ParticipantsVO) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+/** 帮他报名(恢复已取消的报名) */
|
|
|
|
|
+const handleReRegister = async (row: ParticipantsVO) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await proxy?.$modal.confirm('确认替该选手重新报名吗?恢复后该报名记录将重新生效。');
|
|
|
|
|
+ const res = await reRegister({
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ tournamentId: row.tournamentId
|
|
|
|
|
+ } as ParticipantsForm);
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ proxy?.$modal.msgSuccess('已帮他重新报名');
|
|
|
|
|
+ await getList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ proxy?.$modal.msgError(res.msg || '帮他报名失败');
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ if (error !== 'cancel') {
|
|
|
|
|
+ proxy?.$modal.msgError('帮他报名失败:' + (error as Error).message);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
// 监听路由变化
|
|
// 监听路由变化
|
|
|
watch(
|
|
watch(
|
|
|
() => route.query,
|
|
() => route.query,
|