|
@@ -8,6 +8,7 @@ import { permissionNames } from "@@/services/PermissionNames"
|
|
|
const tableRef = ref()
|
|
const tableRef = ref()
|
|
|
const modalRef = ref()
|
|
const modalRef = ref()
|
|
|
const detailModalRef = ref()
|
|
const detailModalRef = ref()
|
|
|
|
|
+const applyModalRef = ref()
|
|
|
const opts = reactive({
|
|
const opts = reactive({
|
|
|
columns: [
|
|
columns: [
|
|
|
{ field: "activityId", name: "活动id", visible: false },
|
|
{ field: "activityId", name: "活动id", visible: false },
|
|
@@ -414,7 +415,8 @@ function handleAudit(row: any) {
|
|
|
detailModalRef.value.show()
|
|
detailModalRef.value.show()
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+const applyDetailTotal = ref(0)
|
|
|
|
|
+const applyDetailList = ref<any[]>([])
|
|
|
function handleDetail(row: any) {
|
|
function handleDetail(row: any) {
|
|
|
detailType.value = "D"
|
|
detailType.value = "D"
|
|
|
apis.amActivity.activityApi.getActivity(row.activityId).then((res) => {
|
|
apis.amActivity.activityApi.getActivity(row.activityId).then((res) => {
|
|
@@ -424,6 +426,19 @@ function handleDetail(row: any) {
|
|
|
}
|
|
}
|
|
|
detailModalRef.value.show()
|
|
detailModalRef.value.show()
|
|
|
})
|
|
})
|
|
|
|
|
+ apis.amActivity.activityApi
|
|
|
|
|
+ .listApply({
|
|
|
|
|
+ activityId: row.activityId,
|
|
|
|
|
+ auditStatus: "1",
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10000,
|
|
|
|
|
+ orderByColumn: "auditStatus",
|
|
|
|
|
+ isAsc: "ascending"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ applyDetailTotal.value = res.total
|
|
|
|
|
+ applyDetailList.value = res.rows
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function submitDetail() {
|
|
function submitDetail() {
|
|
@@ -498,7 +513,56 @@ function handleHot(row: any) {
|
|
|
row.isHot = row.isHot === "0" ? "1" : "0"
|
|
row.isHot = row.isHot === "0" ? "1" : "0"
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+const activity = ref<any>({})
|
|
|
|
|
+const currrentApplyId = ref()
|
|
|
|
|
+const applyAuditList = ref<any[]>([])
|
|
|
|
|
+function handleAplly(row: any) {
|
|
|
|
|
+ activity.value = row
|
|
|
|
|
+ currrentApplyId.value = row.activityId
|
|
|
|
|
+ handleQueryApply()
|
|
|
|
|
+}
|
|
|
|
|
+function handleQueryApply() {
|
|
|
|
|
+ apis.amActivity.activityApi
|
|
|
|
|
+ .listApply({
|
|
|
|
|
+ activityId: currrentApplyId.value,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10000,
|
|
|
|
|
+ orderByColumn: "auditStatus",
|
|
|
|
|
+ isAsc: "ascending"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ applyAuditList.value = res.rows
|
|
|
|
|
+ applyModalRef.value.show()
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+function handleApllyAudit(item: any, status: string) {
|
|
|
|
|
+ const text = status === "1" ? "通过" : "拒绝"
|
|
|
|
|
+ message.confirm("确认要" + text + " [" + item.name + "] 的报名?").then(() => {
|
|
|
|
|
+ apis.amActivity.activityApi.auditApply(item.applyId, status).then(() => {
|
|
|
|
|
+ message.msgSuccess(text + "报名成功")
|
|
|
|
|
+ handleQueryApply()
|
|
|
|
|
+ handleQuery()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleApllyCost(item: any) {
|
|
|
|
|
+ message.prompt("请输入费用(0表示未付费)", "确认付费").then((val: any) => {
|
|
|
|
|
+ console.log("val", val, item.applyId)
|
|
|
|
|
+ apis.amActivity.activityApi.auditCost(item.applyId, val.value).then(() => {
|
|
|
|
|
+ message.msgSuccess("付费审核成功")
|
|
|
|
|
+ handleQueryApply()
|
|
|
|
|
+ handleQuery()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+const formatUrl = (url: string) => {
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ url = import.meta.env.VITE_APP_BASE_API + url
|
|
|
|
|
+ }
|
|
|
|
|
+ return url
|
|
|
|
|
+}
|
|
|
function loadCategory() {
|
|
function loadCategory() {
|
|
|
apis.system.categoryApi.getActivityCategory().then((res) => {
|
|
apis.system.categoryApi.getActivityCategory().then((res) => {
|
|
|
categoryColumns.value = []
|
|
categoryColumns.value = []
|
|
@@ -574,10 +638,7 @@ onMounted(init)
|
|
|
@change="handleHot(row)"></el-switch>
|
|
@change="handleHot(row)"></el-switch>
|
|
|
</template>
|
|
</template>
|
|
|
<template #actions="{ row }">
|
|
<template #actions="{ row }">
|
|
|
- <vb-tooltip
|
|
|
|
|
- v-if="row.auditStatus != 0 && row.auditStatus != 2"
|
|
|
|
|
- content="详情 "
|
|
|
|
|
- placement="top">
|
|
|
|
|
|
|
+ <vb-tooltip v-if="row.auditStatus == 1" content="详情 " placement="top">
|
|
|
<el-button
|
|
<el-button
|
|
|
link
|
|
link
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -588,6 +649,17 @@ onMounted(init)
|
|
|
</template>
|
|
</template>
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</vb-tooltip>
|
|
</vb-tooltip>
|
|
|
|
|
+ <vb-tooltip v-if="row.auditStatus == 1" content="报名审核 " placement="top">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ link
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ @click="handleAplly(row)"
|
|
|
|
|
+ v-hasPermission="permissionNames.AmActivityActivityApply">
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <VbIcon icon-name="check-circle" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </vb-tooltip>
|
|
|
<vb-tooltip v-else content="审核" placement="top">
|
|
<vb-tooltip v-else content="审核" placement="top">
|
|
|
<el-button
|
|
<el-button
|
|
|
link
|
|
link
|
|
@@ -602,7 +674,7 @@ onMounted(init)
|
|
|
<vb-tooltip v-if="row.isClose == 0" content="关闭 " placement="top">
|
|
<vb-tooltip v-if="row.isClose == 0" content="关闭 " placement="top">
|
|
|
<el-button
|
|
<el-button
|
|
|
link
|
|
link
|
|
|
- type="warning"
|
|
|
|
|
|
|
+ type="info"
|
|
|
@click="handleClose(row)"
|
|
@click="handleClose(row)"
|
|
|
v-hasPermission="permissionNames.AmActivityActivityClose">
|
|
v-hasPermission="permissionNames.AmActivityActivityClose">
|
|
|
<template #icon>
|
|
<template #icon>
|
|
@@ -718,9 +790,103 @@ onMounted(init)
|
|
|
]"></vb-select>
|
|
]"></vb-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
- v-else-if="detailType == 'D' && detailData.auditStatus != '0'"
|
|
|
|
|
- class="d-flex align-item-center">
|
|
|
|
|
- <div>报名详情</div>
|
|
|
|
|
|
|
+ v-else-if="
|
|
|
|
|
+ detailType == 'D' && detailData.auditStatus != '0' && applyDetailList.length > 0
|
|
|
|
|
+ "
|
|
|
|
|
+ class="d-flex flex-column align-item-center py-5">
|
|
|
|
|
+ <div class="d-flex align-items-center justify-content-between mb-2">
|
|
|
|
|
+ <dl class="mb-0">
|
|
|
|
|
+ <dt>报名详情:</dt>
|
|
|
|
|
+ <dd>{{ applyDetailTotal }} 人报名</dd>
|
|
|
|
|
+ </dl>
|
|
|
|
|
+ <el-button type="primary" @click="handleAplly(detailData)">审核报名</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="d-flex flex-wrap px-20">
|
|
|
|
|
+ <VbSymbol
|
|
|
|
|
+ class="position-relative m-1"
|
|
|
|
|
+ :size="50"
|
|
|
|
|
+ shape="circle"
|
|
|
|
|
+ :src="formatUrl(v.avatar)"
|
|
|
|
|
+ :text="v.name"
|
|
|
|
|
+ v-for="(v, i) in applyDetailList"
|
|
|
|
|
+ :key="i"></VbSymbol>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </VbModal>
|
|
|
|
|
+ <VbModal
|
|
|
|
|
+ modalBodyClass="apply-modal"
|
|
|
|
|
+ v-model:modal="applyModalRef"
|
|
|
|
|
+ title="报名详情"
|
|
|
|
|
+ :shown-event="
|
|
|
|
|
+ () => {
|
|
|
|
|
+ detailModalRef.hide()
|
|
|
|
|
+ }
|
|
|
|
|
+ "
|
|
|
|
|
+ append-to-body>
|
|
|
|
|
+ <template #body>
|
|
|
|
|
+ <div class="d-flex flex-wrap justify-content-center">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="d-flex my-2 p-3 mx-2 align-items-center"
|
|
|
|
|
+ style="border-radius: 8px; background-color: #f2f2f2"
|
|
|
|
|
+ v-for="(v, i) in applyAuditList"
|
|
|
|
|
+ :key="i">
|
|
|
|
|
+ <div class="w-80px d-flex justify-content-center me-2">
|
|
|
|
|
+ <VbSymbol
|
|
|
|
|
+ class="position-relative m-1"
|
|
|
|
|
+ :size="50"
|
|
|
|
|
+ shape="circle"
|
|
|
|
|
+ :src="formatUrl(v.avatar)"
|
|
|
|
|
+ :text="v.name"></VbSymbol>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="w-100 d-flex flex-column">
|
|
|
|
|
+ <span class="d-flex align-items-center">
|
|
|
|
|
+ <span class="me-2">{{ v.name }}</span>
|
|
|
|
|
+ <el-tag v-if="v.auditStatus == '0'">待审核</el-tag>
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ v-else-if="v.auditStatus == '1' && activity.needCost == '1' && v.cost > 0">
|
|
|
|
|
+ 付费:{{ v.cost }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ v-else-if="v.auditStatus == '1' && activity.needCost == '1' && v.cost <= 0">
|
|
|
|
|
+ 未付费
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ <el-tag type="success" v-else-if="v.auditStatus == '1'">已审核</el-tag>
|
|
|
|
|
+ <el-tag type="danger" v-else-if="v.auditStatus == '2'">已拒绝</el-tag>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="my-1">{{ v.createTime }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="activity.isClose == '0'"
|
|
|
|
|
+ class="d-flex w-80px pe-2 flex-column justify-content-around">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ class="my-1 mx-0 w-100"
|
|
|
|
|
+ @click="handleApllyAudit(v, '1')"
|
|
|
|
|
+ v-if="v.auditStatus != '1'">
|
|
|
|
|
+ 通过
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ class="my-1 mx-0 w-100"
|
|
|
|
|
+ @click="handleApllyAudit(v, '2')"
|
|
|
|
|
+ v-if="v.auditStatus != '2'">
|
|
|
|
|
+ 拒绝
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ class="my-1 mx-0 w-100"
|
|
|
|
|
+ @click="handleApllyCost(v)"
|
|
|
|
|
+ v-if="activity.needCost == '1' && v.auditStatus == '1'">
|
|
|
|
|
+ 付费
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</VbModal>
|
|
</VbModal>
|