feat(admin): 增加履约渠道批量删除并统一分页配置
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
Typography,
|
||||
} from 'antd'
|
||||
import PercentTable from '@/components/common/PercentTable'
|
||||
import { buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import type { TableColumnsType } from 'antd'
|
||||
import { useState } from 'react'
|
||||
|
||||
@@ -880,18 +881,16 @@ export default function ConsignmentInventoryPanel() {
|
||||
dataSource={items}
|
||||
loading={inventoriesQuery.isLoading}
|
||||
scroll={{ x: 1590 }}
|
||||
pagination={{
|
||||
pagination={buildAdminTablePagination({
|
||||
current: page,
|
||||
pageSize,
|
||||
total,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ['10', '20', '50', '100'],
|
||||
showTotal: (t) => `共 ${t} 件物品`,
|
||||
onChange: (p, ps) => {
|
||||
setPage(p)
|
||||
setPageSize(ps)
|
||||
},
|
||||
}}
|
||||
})}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
App,
|
||||
} from 'antd'
|
||||
import PercentTable from '@/components/common/PercentTable'
|
||||
import { buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import type { TableColumnsType } from 'antd'
|
||||
import { useState } from 'react'
|
||||
|
||||
@@ -474,17 +475,16 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
dataSource={submissions}
|
||||
loading={submissionsQuery.isLoading}
|
||||
scroll={{ x: 1490 }}
|
||||
pagination={{
|
||||
pagination={buildAdminTablePagination({
|
||||
current: submissionPage,
|
||||
pageSize: submissionPageSize,
|
||||
total: submissionTotal,
|
||||
showSizeChanger: true,
|
||||
showTotal: (t) => `共 ${t} 条提报记录`,
|
||||
onChange: (p, ps) => {
|
||||
setSubmissionPage(p)
|
||||
setSubmissionPageSize(ps)
|
||||
},
|
||||
}}
|
||||
})}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -44,7 +44,11 @@ import {
|
||||
import type { KuaishouMatchSource, WorkProductMatchLog } from '@/types/worker-platform'
|
||||
import type { AdminKuaishouIndustryShopOption } from '@/types/admin'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
import { ADMIN_DEFAULT_PAGE_SIZE, buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import {
|
||||
ADMIN_DEFAULT_PAGE_SIZE,
|
||||
buildAdminLocalTablePagination,
|
||||
buildAdminTablePagination,
|
||||
} from '@/utils/admin-pagination'
|
||||
import { formatMoney } from './shared'
|
||||
|
||||
export default function ProductMatchPanel() {
|
||||
@@ -366,7 +370,7 @@ export default function ProductMatchPanel() {
|
||||
loading={sourcesQuery.isLoading}
|
||||
columns={sourceColumns}
|
||||
dataSource={sources}
|
||||
pagination={{ pageSize: 10, showSizeChanger: false }}
|
||||
pagination={buildAdminLocalTablePagination()}
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
Tag,
|
||||
} from 'antd'
|
||||
import PercentTable from '@/components/common/PercentTable'
|
||||
import { buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import type { ColumnsType } from 'antd/es/table'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
@@ -635,16 +636,15 @@ export default function RiskControlPanel() {
|
||||
dataSource={bans?.items || []}
|
||||
loading={bansQuery.isLoading}
|
||||
locale={{ emptyText: '暂无封禁记录' }}
|
||||
pagination={{
|
||||
pagination={buildAdminTablePagination({
|
||||
current: banPage,
|
||||
pageSize: banPageSize,
|
||||
total: bans?.total || 0,
|
||||
showSizeChanger: true,
|
||||
onChange: (nextPage, nextPageSize) => {
|
||||
setBanPage(nextPage)
|
||||
setBanPageSize(nextPageSize)
|
||||
},
|
||||
}}
|
||||
})}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
@@ -690,16 +690,15 @@ export default function RiskControlPanel() {
|
||||
columns={eventColumns}
|
||||
dataSource={events?.items || []}
|
||||
loading={eventsQuery.isLoading}
|
||||
pagination={{
|
||||
pagination={buildAdminTablePagination({
|
||||
current: page,
|
||||
pageSize,
|
||||
total: events?.total || 0,
|
||||
showSizeChanger: true,
|
||||
onChange: (nextPage, nextPageSize) => {
|
||||
setPage(nextPage)
|
||||
setPageSize(nextPageSize)
|
||||
},
|
||||
}}
|
||||
})}
|
||||
/>
|
||||
</Card>
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user