审核列表添加字段

This commit is contained in:
2026-06-15 16:01:21 +08:00
parent 11dc5759ce
commit 27c1c02dcf
8 changed files with 115 additions and 16 deletions

View File

@ -8,3 +8,8 @@ export const getRechargeCheckListApi = (params: any) => {
export const reviewRechargeOrder = (params: any) => { export const reviewRechargeOrder = (params: any) => {
return request.post('/user/reviewRechargeOrder', { ...params }) return request.post('/user/reviewRechargeOrder', { ...params })
} }
// 获取充值渠道选项(下拉框用)
export const getRechargeChannelOptions = () => {
return request.get('/user/rechargeChannelOptions', undefined, { showMessage: false })
}

View File

@ -1,5 +1,10 @@
import { request } from '@/api' import { request } from '@/api'
// 获取取款渠道选项(下拉框用)
export const getWithdrawChannelOptions = () => {
return request.get('/withdraw/withdrawChannelOptions', undefined, { showMessage: false })
}
// 获取用户钱包信息 // 获取用户钱包信息
export const getWalletCapital = () => { export const getWalletCapital = () => {
return request.get('/user/getWalletCapital', undefined, { showMessage: false }) return request.get('/user/getWalletCapital', undefined, { showMessage: false })
@ -53,6 +58,7 @@ export const getWithdrawReviewList = (params: {
start_time?: string start_time?: string
end_time?: string end_time?: string
user_name?: string user_name?: string
channel_id?: number
}) => { }) => {
return request.get('/withdraw/withdrawReviewList', params as any) return request.get('/withdraw/withdrawReviewList', params as any)
} }

View File

@ -59,22 +59,23 @@ export const tableColumns = [
// 用户名 // 用户名
{ prop: 'username', label: '用户名' }, { prop: 'username', label: '用户名' },
//单号 //单号
{ prop: 'orderNo', label: '单号' }, { prop: 'orderNo', label: '单号' , width:'200' },
{ prop: 'account_id', label: '子账号' }, { prop: 'account_id', label: '子账号'},
//操作类型 //操作类型
{ prop: 'type', label: '操作类型' }, { prop: 'type', label: '操作类型', width:'120' },
//资金流向 //资金流向
// { prop: 'fundDirection', label: '资金流向' }, // { prop: 'fundDirection', label: '资金流向' },
//原有金额 //原有金额
{ prop: 'amount', label: '变动金额', isNumber: true }, { prop: 'amount', label: '变动金额', isNumber: true , width:'120' },
{ prop: 'description', label: '描述', isNumber: true , width:'120'},
//余额变动 //余额变动
{ prop: 'balance', label: '变动后余额' , isNumber: true}, { prop: 'balance', label: '变动后余额' , isNumber: true, width:'120' },
//现有余额 //现有余额
// { prop: 'currentBalance', label: '现有余额' }, // { prop: 'currentBalance', label: '现有余额' },
//状态 //状态
// { prop: 'status', label: '状态' }, // { prop: 'status', label: '状态' },
//创建时间 //创建时间
{ prop: 'createTime', label: '创建时间' }, { prop: 'createTime', label: '创建时间' , width:'180' },
//钱包类型 //钱包类型
{ prop: 'walletType', label: '钱包类型' }, { prop: 'walletType', label: '钱包类型', width:'120' },
] ]

View File

@ -2,12 +2,18 @@
<div class="rechange-check table_form-container"> <div class="rechange-check table_form-container">
<!-- 搜索区域默认把当天 0 点到当前时间写入时间输入框 --> <!-- 搜索区域默认把当天 0 点到当前时间写入时间输入框 -->
<RechangeSearch <RechangeSearch
:buttonLoading="loading" :buttonLoading="loading"
:search-form="searchForm" :search-form="searchForm"
:search-options="searchOptions" :search-options="searchOptions"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
> >
<!-- 渠道下拉框插槽 -->
<template #channel_id>
<el-select v-model="searchForm.channel_id" placeholder="请选择渠道" clearable style="width: 200px;">
<el-option v-for="item in channelOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template>
<template #button> <template #button>
<el-button type="primary" plain @click="handleExport">导出</el-button> <el-button type="primary" plain @click="handleExport">导出</el-button>
</template> </template>
@ -58,7 +64,7 @@ import Table from '@/components/common/Table.vue'
import { usePageLoading } from '@/composables/useLoading' import { usePageLoading } from '@/composables/useLoading'
import RechangePagination from '@/components/common/Pagination.vue' import RechangePagination from '@/components/common/Pagination.vue'
import { exportToExcel } from '@/utils/exportToExcel' import { exportToExcel } from '@/utils/exportToExcel'
import { getRechargeCheckListApi, reviewRechargeOrder } from '@/api/modules/capital/rechargeCheck' import { getRechargeCheckListApi, reviewRechargeOrder, getRechargeChannelOptions } from '@/api/modules/capital/rechargeCheck'
import { rechangeCheckSearch, rechangeCheckTableColumns } from './options' import { rechangeCheckSearch, rechangeCheckTableColumns } from './options'
import { getRecentSevenDays } from '@/utils/handleTime.ts' import { getRecentSevenDays } from '@/utils/handleTime.ts'
@ -77,10 +83,31 @@ interface TableRow {
rechangeTime: string rechangeTime: string
} }
//
interface ChannelOption {
id: number
name: string
channel_code: string
}
//
const channelOptions = ref<ChannelOption[]>([])
//
const getChannelOptions = async () => {
try {
const res = await getRechargeChannelOptions() as unknown as ChannelOption[]
channelOptions.value = res || []
} catch (error) {
console.error('获取渠道选项失败:', error)
}
}
// //
interface SearchFormData { interface SearchFormData {
orderNo: string orderNo: string
userName: string userName: string
channel_id: number | string
startTime: string startTime: string
endTime: string endTime: string
} }
@ -105,6 +132,7 @@ const initTime = getRecentSevenDays()
const createDefaultSearchForm = (): SearchFormData => ({ const createDefaultSearchForm = (): SearchFormData => ({
orderNo: '', orderNo: '',
userName: '', userName: '',
channel_id: '',
startTime: initTime.start, startTime: initTime.start,
endTime: initTime.end, endTime: initTime.end,
}) })
@ -135,6 +163,7 @@ const getList = async () => {
start_time: searchForm.value.startTime || initTime.start, start_time: searchForm.value.startTime || initTime.start,
end_time: searchForm.value.endTime || initTime.end, end_time: searchForm.value.endTime || initTime.end,
user_name: searchForm.value.userName || null, user_name: searchForm.value.userName || null,
channel_id: searchForm.value.channel_id || null,
} }
try { try {
@ -169,6 +198,7 @@ const getList = async () => {
// //
onMounted(() => { onMounted(() => {
getChannelOptions()
getList() getList()
}) })

View File

@ -14,6 +14,14 @@ export const rechangeCheckSearch = [
placeholder: '请输入用户名', placeholder: '请输入用户名',
width: '200px', width: '200px',
}, },
{
prop: 'channel_id',
label: '渠道',
type: 'select' as const,
placeholder: '请选择渠道',
width: '200px',
slot: true,
},
{ {
prop: 'startTime', prop: 'startTime',
label: '开始时间', label: '开始时间',

View File

@ -6,7 +6,7 @@ export const internalFormItem = [
// 转出账号 // 转出账号
{ prop: 'transferOutAccount', label: '转出账号', type: 'select' as const, placeholder: '请选择转出账号', width: '150px', labelPosition: 'top' as const }, { prop: 'transferOutAccount', label: '转出账号', type: 'select' as const, placeholder: '请选择转出账号', width: '150px', labelPosition: 'top' as const },
// 转入账号 // 转入账号
{ prop: 'transferInAccount', label: '转入账号', type: 'input' as const, placeholder: '请输入转入账号', width: '150px', labelPosition: 'top' as const }, { prop: 'transferInAccount', label: '转入账号', type: 'select' as const, placeholder: '请选择转入账号', width: '150px', labelPosition: 'top' as const },
// 转账金额 // 转账金额
{ prop: 'transferAmount', label: '转账金额', type: 'input' as const, placeholder: '请输入转账金额', width: '150px', labelPosition: 'top' as const }, { prop: 'transferAmount', label: '转账金额', type: 'input' as const, placeholder: '请输入转账金额', width: '150px', labelPosition: 'top' as const },
// 备注 // 备注
@ -15,7 +15,7 @@ export const internalFormItem = [
export const externalFormItem = [ export const externalFormItem = [
// 转入账号 // 转入账号
{ prop: 'transferInAccount', label: '转入账号', type: 'select' as const, placeholder: '请选择转入账号', width: '150px', labelPosition: 'top' as const }, { prop: 'transferInAccount', label: '转入账号', type: 'input' as const, placeholder: '请输入转入账号', width: '150px', labelPosition: 'top' as const },
// 转账金额 // 转账金额
{ prop: 'transferAmount', label: '转账金额', type: 'input' as const, placeholder: '请输入转账金额', width: '150px', labelPosition: 'top' as const }, { prop: 'transferAmount', label: '转账金额', type: 'input' as const, placeholder: '请输入转账金额', width: '150px', labelPosition: 'top' as const },
// 备注 // 备注

View File

@ -1,7 +1,18 @@
<template> <template>
<div class="withdraw-check table_form-container"> <div class="withdraw-check table_form-container">
<!-- 搜索区域复用项目内搜索组件 --> <!-- 搜索区域复用项目内搜索组件 -->
<WithdrawSearch :search-form="searchForm" :search-options="searchOptions" @search="handleSearch" @reset="handleReset" /> <WithdrawSearch :search-form="searchForm" :search-options="searchOptions" @search="handleSearch" @reset="handleReset">
<!-- 渠道下拉框插槽 -->
<template #channel_id>
<el-select v-model="searchForm.channel_id" placeholder="请选择渠道" clearable style="width: 200px;">
<el-option v-for="item in channelOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template>
<!-- 导出按钮插槽 -->
<template #button>
<el-button type="primary" @click="handleExport">导出</el-button>
</template>
</WithdrawSearch>
<!-- 列表区域使用公共 Table 组件 --> <!-- 列表区域使用公共 Table 组件 -->
<Table <Table
@ -44,7 +55,15 @@ import Table from '@/components/common/Table.vue'
import { usePageLoading } from '@/composables/useLoading' import { usePageLoading } from '@/composables/useLoading'
import WithdrawPagination from '@/components/common/Pagination.vue' import WithdrawPagination from '@/components/common/Pagination.vue'
import { withdrawCheckSearch, withdrawCheckTableColumns } from './options' import { withdrawCheckSearch, withdrawCheckTableColumns } from './options'
import { getWithdrawReviewList, withdrawReviewOrder } from '@/api/modules/capital/withdraw' import { getWithdrawReviewList, withdrawReviewOrder, getWithdrawChannelOptions } from '@/api/modules/capital/withdraw'
import { exportToExcel } from '@/utils/exportToExcel'
//
interface ChannelOption {
id: number
name: string
channel_code: string
}
// //
interface TableRow { interface TableRow {
@ -109,10 +128,24 @@ interface TransformedTableRow {
created_at: string created_at: string
} }
//
const channelOptions = ref<ChannelOption[]>([])
//
const getChannelOptions = async () => {
try {
const res = await getWithdrawChannelOptions() as unknown as ChannelOption[]
channelOptions.value = res || []
} catch (error) {
console.error('获取渠道选项失败:', error)
}
}
// //
const searchOptions = ref(withdrawCheckSearch) const searchOptions = ref(withdrawCheckSearch)
const searchForm = ref({ const searchForm = ref({
user_name: '', user_name: '',
channel_id: '' as number | string,
timeRange: [] as string[] timeRange: [] as string[]
}) })
@ -182,7 +215,8 @@ const getList = async () => {
page_size: pageSize.value, page_size: pageSize.value,
start_time: start_time || undefined, start_time: start_time || undefined,
end_time: end_time || undefined, end_time: end_time || undefined,
user_name: searchForm.value.user_name || undefined user_name: searchForm.value.user_name || undefined,
channel_id: searchForm.value.channel_id || undefined
}) as unknown as ListResponse }) as unknown as ListResponse
tableData.value = transformTableData(res.data || []) tableData.value = transformTableData(res.data || [])
@ -197,6 +231,7 @@ const getList = async () => {
// //
onMounted(() => { onMounted(() => {
getChannelOptions()
getList() getList()
}) })
@ -210,6 +245,7 @@ const handleSearch = () => {
const handleReset = () => { const handleReset = () => {
searchForm.value = { searchForm.value = {
user_name: '', user_name: '',
channel_id: '',
timeRange: getDefaultTimeRange() timeRange: getDefaultTimeRange()
} }
currentPage.value = 1 currentPage.value = 1
@ -301,8 +337,12 @@ const handleReject = async (row?: TableRow) => {
} }
// //
const handleExport = () => { const handleExport = async () => {
ElMessage.info('导出功能开发中') await exportToExcel({
tableData: tableData.value,
columns: withdrawCheckTableColumns,
fileName: '提现审核列表'
})
} }
// //

View File

@ -8,6 +8,15 @@ export const withdrawCheckSearch = [
placeholder: '请输入账户持有人', placeholder: '请输入账户持有人',
width: '280px' width: '280px'
}, },
{
// 渠道
prop: 'channel_id',
label: '渠道',
type: 'select' as const,
placeholder: '请选择渠道',
width: '200px',
slot: true
},
// { // {
// // 时间范围选择 // // 时间范围选择
// prop: 'timeRange', // prop: 'timeRange',