Merge commit 'b0b6c30'
This commit is contained in:
commit
78bbe7893f
|
|
@ -4,3 +4,8 @@ import { request } from '@/api';
|
|||
export const getFundDetailListApi = (params: any) => {
|
||||
return request.get('/user/FundFlowRecords', {...params})
|
||||
}
|
||||
|
||||
//获取枚举字典选项
|
||||
export const getEnumDicOptionsApi = () => {
|
||||
return request.get('/user/getEnumDicOptions', {})
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ import { usePageLoading } from '@/composables/useLoading'
|
|||
// 配置以及表单验证
|
||||
import { search, tableColumns } from './options'
|
||||
// 接口
|
||||
import { getFundDetailListApi } from '@/api/modules/funding/fundDetail'
|
||||
import { getFundDetailListApi, getEnumDicOptionsApi } from '@/api/modules/funding/fundDetail'
|
||||
import { getRecentSevenDays, utcToUtc8 } from '@/utils/handleTime.ts'
|
||||
|
||||
// 导出表格
|
||||
|
|
@ -41,9 +41,24 @@ const searchOptions = ref(search)
|
|||
const searchForm = ref({
|
||||
username: '',
|
||||
subAccountId: '',
|
||||
type: '',
|
||||
startTime: initTime.start,
|
||||
endTime: initTime.end,
|
||||
})
|
||||
|
||||
/**
|
||||
* @description: 获取操作类型枚举选项
|
||||
*/
|
||||
const getEnumDicOptions = async () => {
|
||||
const res: any = await getEnumDicOptionsApi()
|
||||
const typeIndex = searchOptions.value.findIndex((item: any) => item.prop === 'type')
|
||||
if (typeIndex !== -1 && res) {
|
||||
searchOptions.value[typeIndex].options = res.map((item: any) => ({
|
||||
label: item.value,
|
||||
value: item.id
|
||||
}))
|
||||
}
|
||||
}
|
||||
const { loading, startLoading, stopLoading } = usePageLoading()
|
||||
/**
|
||||
* @description: 定义表格数据
|
||||
|
|
@ -77,6 +92,7 @@ const getFundDetailList = async () => {
|
|||
: '2026-03-15 23:59:59',
|
||||
user_name: searchForm.value.username,
|
||||
account_id: searchForm.value.subAccountId,
|
||||
type: searchForm.value.type,
|
||||
}
|
||||
// 调用接口获取数据
|
||||
const data: any = await getFundDetailListApi(params)
|
||||
|
|
@ -106,7 +122,8 @@ const getFundDetailList = async () => {
|
|||
/**
|
||||
* @description: 页面加载完成需要请求的数据
|
||||
*/
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
await getEnumDicOptions()
|
||||
getFundDetailList()
|
||||
})
|
||||
/**
|
||||
|
|
@ -119,6 +136,7 @@ const handleReset = () => {
|
|||
searchForm.value = {
|
||||
username: '',
|
||||
subAccountId: '',
|
||||
type: '',
|
||||
startTime: initTime.start,
|
||||
endTime: initTime.end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,14 @@ export const search = [
|
|||
width: '220px',
|
||||
},
|
||||
//操作类型
|
||||
// { prop: 'type', label: '操作类型', type: 'select' as const, placeholder: '请选择操作类型', width: '140px', options: [
|
||||
// {label:"充值",value:"1"},
|
||||
// {label:"提现",value:"2"},
|
||||
// ] },
|
||||
{
|
||||
prop: 'type',
|
||||
label: '操作类型',
|
||||
type: 'select' as const,
|
||||
placeholder: '请选择操作类型',
|
||||
width: '140px',
|
||||
options: []
|
||||
},
|
||||
//钱包
|
||||
// { prop: 'wallet', label: '钱包', type: 'select' as const, placeholder: '请选择钱包', width: '140px', options: [
|
||||
// {label:"主钱包",value:"1"},
|
||||
|
|
|
|||
Loading…
Reference in New Issue