diff --git a/src/app/(main)/withdraws/page.tsx b/src/app/(main)/withdraws/page.tsx index 2844323..94011d7 100644 --- a/src/app/(main)/withdraws/page.tsx +++ b/src/app/(main)/withdraws/page.tsx @@ -29,7 +29,6 @@ import { CheckCircleOutlined, ClearOutlined, CloseCircleOutlined, - FilterOutlined, ReloadOutlined, SearchOutlined, SortAscendingOutlined, @@ -86,29 +85,6 @@ const STATUS_TABS = [ ]; const REJECT_TEMPLATES = ['账号异常', '提现金额异常', '微信实名不匹配', '风控拦截', '其他原因']; -const QUICK_FILTER_OPTIONS = [ - { value: 'abnormal', label: '异常单' }, - { value: 'failed', label: '打款失败' }, - { value: 'overdue_reviewing', label: '待审核超30分钟' }, - { value: 'pending_overdue', label: '打款中超15分钟' }, - { value: 'today', label: '今日申请' }, - { value: 'high_risk', label: '高风险用户' }, -]; -const QUICK_FILTER_STATUS: Record = { - abnormal: 'all', - failed: 'failed', - overdue_reviewing: 'reviewing', - pending_overdue: 'pending', - high_risk: 'all', -}; -const SORT_OPTIONS = [ - { value: 'created_at', label: '申请时间' }, - { value: 'amount_cents', label: '提现金额' }, -]; -const DATE_FIELD_OPTIONS = [ - { value: 'created_at', label: '申请时间' }, - { value: 'updated_at', label: '更新时间' }, -]; function statusTag(status: string) { return {STATUS_LABEL[status] || status}; @@ -184,19 +160,15 @@ export default function WithdrawsPage() { const [searchDraft, setSearchDraft] = useState(''); const [keyword, setKeyword] = useState(''); const [dateRange, setDateRange] = useState<[Dayjs, Dayjs] | null>(null); - const [dateField, setDateField] = useState<'created_at' | 'updated_at'>('created_at'); - const [sortBy, setSortBy] = useState<'created_at' | 'amount_cents'>('created_at'); const [sortOrder, setSortOrder] = useState<'asc' | 'desc'>('desc'); - const [quickFilter, setQuickFilter] = useState(undefined); const filters: Record = {}; if (activeStatus !== 'all') filters.status = activeStatus; if (keyword.trim()) filters.keyword = keyword.trim(); if (dateRange?.[0]) filters.date_from = dateRange[0].startOf('day').toISOString(); if (dateRange?.[1]) filters.date_to = dateRange[1].endOf('day').toISOString(); - if (quickFilter) filters.quick_filter = quickFilter; - filters.date_field = dateField; - filters.sort_by = sortBy; + filters.date_field = 'created_at'; + filters.sort_by = 'created_at'; filters.sort_order = sortOrder; const filterKey = JSON.stringify(filters); const { items, total, page, pageSize, loading, onChange: onPageChange, reload } = @@ -211,26 +183,7 @@ export default function WithdrawsPage() { setSearchDraft(''); setKeyword(''); setDateRange(null); - setDateField('created_at'); - setSortBy('created_at'); setSortOrder('desc'); - setQuickFilter(undefined); - }; - - const applyQuickFilter = (value?: string) => { - setQuickFilter(value); - const targetStatus = value ? QUICK_FILTER_STATUS[value] : undefined; - if (targetStatus) setActiveStatus(targetStatus); - }; - - const changeStatus = (status: string) => { - setActiveStatus(status); - setQuickFilter((current) => { - if (!current) return current; - const targetStatus = QUICK_FILTER_STATUS[current]; - if (!targetStatus || status === targetStatus) return current; - return undefined; - }); }; const loadSummary = useCallback(async () => { @@ -774,7 +727,7 @@ export default function WithdrawsPage() { { const count = summaryCount(summary, tab.key); return { @@ -796,81 +749,55 @@ export default function WithdrawsPage() { align="start" style={{ width: '100%', - justifyContent: 'space-between', marginBottom: 12, paddingBottom: 12, borderBottom: '1px solid #f0f0f0', }} > - - } - placeholder="用户手机号" - value={searchDraft} - style={{ width: 240 }} - onChange={(e) => { - const value = e.target.value; - setSearchDraft(value); - if (!value) setKeyword(''); - }} - onSearch={(value) => setKeyword(value.trim())} - /> - setDateField(value)} - /> - setDateRange(values as [Dayjs, Dayjs] | null)} - /> - - - setSortOrder(value)} - /> - - + } + placeholder="用户手机号" + value={searchDraft} + style={{ width: 240 }} + onChange={(e) => { + const value = e.target.value; + setSearchDraft(value); + if (!value) setKeyword(''); + }} + onSearch={(value) => setKeyword(value.trim())} + /> + setDateRange(values as [Dayjs, Dayjs] | null)} + /> +