增加核销功能

This commit is contained in:
qiuyuan 2025-08-27 16:58:19 +08:00
parent e0cb8f132a
commit 7d5fc00a62

View File

@ -24,7 +24,6 @@
</a-form> </a-form>
</template> </template>
</x-search-bar> </x-search-bar>
<a-row :gutter="8" :wrap="false"> <a-row :gutter="8" :wrap="false">
<a-col flex="auto"> <a-col flex="auto">
<a-card type="flex"> <a-card type="flex">
@ -41,15 +40,17 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'createdAt'"> <template v-if="column.dataIndex === 'createdAt'">
<span>{{ record.createdAt && dayjs(record.createdAt).format('YYYY-MM-DD HH:mm') }}</span> <span>{{ record.createdAt && dayjs(record.createdAt).format('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
<template v-else-if="column.dataIndex === 'concatType'">
<a-tag :color="getConcatTypeColor(record['concatType'])">
{{ getConcatTypeText(record['concatType']) }}
</a-tag>
</template>
<!-- <template v-if="'action' === column.key"> <!-- <template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)"> <x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip> <a-tooltip>
<template #title> {{ $t('pages.system.user.edit') }}</template> <template #title> {{ $t('pages.system.user.edit') }}</template>
<edit-outlined /> </a-tooltip></x-action-button> <edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="handleDelete(record)"> <x-action-button @click="handleDelete(record)">
<a-tooltip> <a-tooltip>
<template #title>{{ $t('pages.system.delete') }}</template> <template #title>{{ $t('pages.system.delete') }}</template>
@ -71,12 +72,10 @@
<template v-else> <template v-else>
<span>{{ content }}</span> <span>{{ content }}</span>
</template> </template>
</a-modal> </a-modal>
</template> </template>
<script setup> <script setup>
import { message, Modal } from 'ant-design-vue' import { message, Modal, Tag } from 'ant-design-vue'
import { ref } from 'vue' import { ref } from 'vue'
import apis from '@/apis' import apis from '@/apis'
import { formatUtcDateTime } from '@/utils/util' import { formatUtcDateTime } from '@/utils/util'
@ -91,22 +90,44 @@ defineOptions({
name: 'activityOrder', name: 'activityOrder',
}) })
const { t } = useI18n() // t const { t } = useI18n() // t
//
const getConcatTypeText = (type) => {
const typeMap = {
owner: '业主',
customers: '客户',
mediator: '中介',
peer: '同行'
};
return typeMap[type] || type || '未知';
}
const getConcatTypeColor = (type) => {
const colorMap = {
owner: 'blue',
customers: 'green',
mediator: 'orange',
peer: 'purple'
};
return colorMap[type] || 'default';
}
const open = ref(false) const open = ref(false)
const imgList = ref([]) const imgList = ref([])
const type = ref(1) const type = ref(1)
const columns = [ const columns = [
{ title: '活动名称', dataIndex: 'activityName' }, { title: '活动名称', dataIndex: 'activityName' },
{ title: '客户姓名', dataIndex: 'customerName' }, { title: '客户姓名', dataIndex: 'concatName' },
{ title: '联系方式', dataIndex: 'customerPhone' }, { title: '联系方式', dataIndex: 'concatPhone' },
{ title: '身份类别', dataIndex: 'concatType' },
{ title: '认证信息', dataIndex: 'concatAddress'},
{ title: '报名时间', dataIndex: 'createdAt', width: 150, align: 'center' }, { title: '报名时间', dataIndex: 'createdAt', width: 150, align: 'center' },
// { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' }, // { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' },
] ]
const activityList = ref([]) const activityList = ref([])
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
usePagination() usePagination()
const editDialogRef = ref() const editDialogRef = ref()
getPageList() getPageList()
getActiveList() getActiveList()
@ -155,7 +176,6 @@ async function getPageList() {
hideLoading() hideLoading()
} }
} }
/** /**
* 删除 * 删除
*/ */
@ -184,7 +204,6 @@ function handleDelete({ id }) {
}, },
}) })
} }
/** /**
* 分页 * 分页
*/ */
@ -193,7 +212,6 @@ function onTableChange({ current, pageSize }) {
paginationState.pageSize = pageSize paginationState.pageSize = pageSize
getPageList() getPageList()
} }
/** /**
* 搜索 * 搜索
*/ */
@ -201,7 +219,6 @@ function handleSearch() {
resetPagination() resetPagination()
getPageList() getPageList()
} }
/** /**
* 下载文件 * 下载文件
*/ */
@ -212,7 +229,6 @@ async function handleExport() {
message.warning('请选择活动') message.warning('请选择活动')
return return
} }
// { responseType: 'blob' } // { responseType: 'blob' }
const response = await apis.activity.exportFile({ activityId }) const response = await apis.activity.exportFile({ activityId })
console.log(response) console.log(response)
@ -244,5 +260,4 @@ async function onOk() {
await getPageList() await getPageList()
} }
</script> </script>
<style lang="less" scoped></style> <style lang="less" scoped></style>