generated from Leo_Ding/web-template
增加核销功能
This commit is contained in:
parent
e0cb8f132a
commit
7d5fc00a62
@ -7,7 +7,7 @@
|
||||
<a-form-item label="活动名称" name="name">
|
||||
<a-select v-model:value="searchFormData.activityId">
|
||||
<a-select-option v-for="item of activityList" :value="item.id">{{ item.title
|
||||
}}</a-select-option>
|
||||
}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -24,7 +24,6 @@
|
||||
</a-form>
|
||||
</template>
|
||||
</x-search-bar>
|
||||
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card type="flex">
|
||||
@ -41,15 +40,17 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'createdAt'">
|
||||
<span>{{ record.createdAt && dayjs(record.createdAt).format('YYYY-MM-DD HH:mm') }}</span>
|
||||
|
||||
</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">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
||||
<a-tooltip>
|
||||
<template #title> {{ $t('pages.system.user.edit') }}</template>
|
||||
<edit-outlined /> </a-tooltip></x-action-button>
|
||||
|
||||
<x-action-button @click="handleDelete(record)">
|
||||
<a-tooltip>
|
||||
<template #title>{{ $t('pages.system.delete') }}</template>
|
||||
@ -71,12 +72,10 @@
|
||||
<template v-else>
|
||||
<span>{{ content }}</span>
|
||||
</template>
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { message, Modal, Tag } from 'ant-design-vue'
|
||||
import { ref } from 'vue'
|
||||
import apis from '@/apis'
|
||||
import { formatUtcDateTime } from '@/utils/util'
|
||||
@ -91,22 +90,44 @@ defineOptions({
|
||||
name: 'activityOrder',
|
||||
})
|
||||
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 imgList = ref([])
|
||||
const type = ref(1)
|
||||
|
||||
const columns = [
|
||||
{ title: '活动名称', dataIndex: 'activityName' },
|
||||
{ title: '客户姓名', dataIndex: 'customerName' },
|
||||
{ title: '联系方式', dataIndex: 'customerPhone' },
|
||||
{ title: '客户姓名', dataIndex: 'concatName' },
|
||||
{ title: '联系方式', dataIndex: 'concatPhone' },
|
||||
{ title: '身份类别', dataIndex: 'concatType' },
|
||||
{ title: '认证信息', dataIndex: 'concatAddress'},
|
||||
{ title: '报名时间', dataIndex: 'createdAt', width: 150, align: 'center' },
|
||||
|
||||
// { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' },
|
||||
]
|
||||
const activityList = ref([])
|
||||
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
|
||||
usePagination()
|
||||
|
||||
const editDialogRef = ref()
|
||||
getPageList()
|
||||
getActiveList()
|
||||
@ -155,7 +176,6 @@ async function getPageList() {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ -184,7 +204,6 @@ function handleDelete({ id }) {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@ -193,7 +212,6 @@ function onTableChange({ current, pageSize }) {
|
||||
paginationState.pageSize = pageSize
|
||||
getPageList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
@ -201,7 +219,6 @@ function handleSearch() {
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@ -212,7 +229,6 @@ async function handleExport() {
|
||||
message.warning('请选择活动')
|
||||
return
|
||||
}
|
||||
|
||||
// 注意添加 { responseType: 'blob' }
|
||||
const response = await apis.activity.exportFile({ activityId })
|
||||
console.log(response)
|
||||
@ -244,5 +260,4 @@ async function onOk() {
|
||||
await getPageList()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
Loading…
x
Reference in New Issue
Block a user