|
|
@@ -1,13 +1,31 @@
|
|
|
-import React, { useState } from 'react'
|
|
|
+import React, { useState, useEffect } from 'react'
|
|
|
import { View, Text, ScrollView, Input, Button } from '@tarojs/components'
|
|
|
+import Taro from '@tarojs/taro'
|
|
|
import { YongrenTabBarLayout } from '@d8d/yongren-shared-ui/components/YongrenTabBarLayout'
|
|
|
import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
|
|
|
+import { enterpriseOrderClient } from '../../api'
|
|
|
|
|
|
type OrderStatus = 'all' | 'in_progress' | 'completed' | 'cancelled'
|
|
|
|
|
|
const OrderList: React.FC = () => {
|
|
|
const [activeStatus, setActiveStatus] = useState<OrderStatus>('all')
|
|
|
const [searchKeyword, setSearchKeyword] = useState('')
|
|
|
+ const [orders, setOrders] = useState<any[]>([])
|
|
|
+ const [loading, setLoading] = useState(false)
|
|
|
+ const [error, setError] = useState<string | null>(null)
|
|
|
+ const [pagination, setPagination] = useState({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ total: 0,
|
|
|
+ totalPages: 1
|
|
|
+ })
|
|
|
+ const [sortBy, setSortBy] = useState('createTime')
|
|
|
+ const [sortOrder, setSortOrder] = useState<'asc' | 'desc'>('desc')
|
|
|
+
|
|
|
+ // 初始加载订单数据
|
|
|
+ useEffect(() => {
|
|
|
+ fetchOrders(1, '', 'all')
|
|
|
+ }, [])
|
|
|
|
|
|
const statusFilters = [
|
|
|
{ key: 'all', label: '全部订单', activeClass: 'bg-blue-100 text-blue-800', inactiveClass: 'bg-gray-100 text-gray-800' },
|
|
|
@@ -16,71 +34,139 @@ const OrderList: React.FC = () => {
|
|
|
{ key: 'cancelled', label: '已取消', activeClass: 'bg-gray-100 text-gray-800', inactiveClass: 'bg-gray-100 text-gray-800' },
|
|
|
]
|
|
|
|
|
|
- // 模拟订单数据
|
|
|
- const mockOrders = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- orderNumber: 'ALIBABA-2023-11',
|
|
|
- name: '阿里巴巴2023-11',
|
|
|
- createdAt: '2023-11-01',
|
|
|
- status: 'in_progress',
|
|
|
- statusLabel: '进行中',
|
|
|
- statusClass: 'bg-green-100 text-green-800',
|
|
|
- expectedPeople: 30,
|
|
|
- actualPeople: 24,
|
|
|
- startDate: '2023-11-01',
|
|
|
- endDate: '2024-10-31',
|
|
|
- checkinStats: { current: 24, total: 30, percentage: 80 },
|
|
|
- salaryVideoStats: { current: 22, total: 24, percentage: 92 },
|
|
|
- taxVideoStats: { current: 20, total: 24, percentage: 83 },
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- orderNumber: 'TENCENT-2023-08',
|
|
|
- name: '腾讯科技2023-08',
|
|
|
- createdAt: '2023-08-15',
|
|
|
- status: 'completed',
|
|
|
- statusLabel: '已完成',
|
|
|
- statusClass: 'bg-blue-100 text-blue-800',
|
|
|
- expectedPeople: 20,
|
|
|
- actualPeople: 18,
|
|
|
- startDate: '2023-08-15',
|
|
|
- endDate: '2023-10-31',
|
|
|
- checkinStats: { current: 18, total: 18, percentage: 100 },
|
|
|
- salaryVideoStats: { current: 18, total: 18, percentage: 100 },
|
|
|
- taxVideoStats: { current: 18, total: 18, percentage: 100 },
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- orderNumber: 'BYTEDANCE-2023-12',
|
|
|
- name: '字节跳动2023-12',
|
|
|
- createdAt: '2023-11-20',
|
|
|
- status: 'pending',
|
|
|
- statusLabel: '待开始',
|
|
|
- statusClass: 'bg-yellow-100 text-yellow-800',
|
|
|
- expectedPeople: 25,
|
|
|
- actualPeople: 5,
|
|
|
- startDate: '2023-12-01',
|
|
|
- endDate: '2024-11-30',
|
|
|
- checkinStats: { current: 0, total: 5, percentage: 0 },
|
|
|
- salaryVideoStats: { current: 0, total: 5, percentage: 0 },
|
|
|
- taxVideoStats: { current: 0, total: 5, percentage: 0 },
|
|
|
- },
|
|
|
- ]
|
|
|
+ // 状态标签和样式辅助函数
|
|
|
+ const getStatusLabel = (status: string) => {
|
|
|
+ switch (status) {
|
|
|
+ case 'draft': return '草稿'
|
|
|
+ case 'confirmed': return '已确认'
|
|
|
+ case 'in_progress': return '进行中'
|
|
|
+ case 'completed': return '已完成'
|
|
|
+ case 'cancelled': return '已取消'
|
|
|
+ default: return status
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const getStatusClass = (status: string) => {
|
|
|
+ switch (status) {
|
|
|
+ case 'draft': return 'bg-gray-100 text-gray-800'
|
|
|
+ case 'confirmed': return 'bg-blue-100 text-blue-800'
|
|
|
+ case 'in_progress': return 'bg-green-100 text-green-800'
|
|
|
+ case 'completed': return 'bg-purple-100 text-purple-800'
|
|
|
+ case 'cancelled': return 'bg-red-100 text-red-800'
|
|
|
+ default: return 'bg-gray-100 text-gray-800'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取企业用户信息
|
|
|
+ const getEnterpriseUserInfo = () => {
|
|
|
+ try {
|
|
|
+ const userInfo = Taro.getStorageSync('enterpriseUserInfo')
|
|
|
+ return userInfo || null
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取企业用户信息失败:', error)
|
|
|
+ return null
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取订单列表
|
|
|
+ const fetchOrders = async (page = 1, search = '', status = 'all') => {
|
|
|
+ setLoading(true)
|
|
|
+ setError(null)
|
|
|
+ try {
|
|
|
+ const userInfo = getEnterpriseUserInfo()
|
|
|
+ const companyId = userInfo?.companyId || 0
|
|
|
+
|
|
|
+ // 构建查询参数
|
|
|
+ const queryParams: any = {
|
|
|
+ page,
|
|
|
+ pageSize: pagination.pageSize,
|
|
|
+ sortBy,
|
|
|
+ sortOrder
|
|
|
+ }
|
|
|
+
|
|
|
+ // 添加公司ID(API可能需要)
|
|
|
+ if (companyId) {
|
|
|
+ queryParams.companyId = companyId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 搜索关键词
|
|
|
+ if (search) {
|
|
|
+ queryParams.orderName = search
|
|
|
+ }
|
|
|
+
|
|
|
+ // 状态筛选(排除'all'状态)
|
|
|
+ if (status !== 'all') {
|
|
|
+ queryParams.orderStatus = status
|
|
|
+ }
|
|
|
+
|
|
|
+ // 调用企业专用订单API
|
|
|
+ const response = await enterpriseOrderClient['company-orders'].$get({
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+
|
|
|
+ if (response.ok) {
|
|
|
+ const data = await response.json() as any
|
|
|
+ // 转换API数据到UI格式
|
|
|
+ const transformedOrders = (data.data || []).map((order: any) => ({
|
|
|
+ id: order.id,
|
|
|
+ orderNumber: order.orderNumber || `ORDER-${order.id}`,
|
|
|
+ name: order.orderName || '未命名订单',
|
|
|
+ createdAt: order.createTime ? new Date(order.createTime).toISOString().split('T')[0] : '未知日期',
|
|
|
+ status: order.orderStatus || 'draft',
|
|
|
+ statusLabel: getStatusLabel(order.orderStatus),
|
|
|
+ statusClass: getStatusClass(order.orderStatus),
|
|
|
+ expectedPeople: order.expectedPersonCount || 0,
|
|
|
+ actualPeople: order.actualPersonCount || 0,
|
|
|
+ startDate: order.expectedStartDate ? new Date(order.expectedStartDate).toISOString().split('T')[0] : '未设置',
|
|
|
+ endDate: order.expectedEndDate ? new Date(order.expectedEndDate).toISOString().split('T')[0] : '未设置',
|
|
|
+ // 新增字段:人才姓名和岗位
|
|
|
+ talentName: order.talentName || '待关联',
|
|
|
+ position: order.position || '未设置',
|
|
|
+ // 统计字段 - 需要后续通过单独的API获取
|
|
|
+ checkinStats: { current: 0, total: order.actualPersonCount || 0, percentage: 0 },
|
|
|
+ salaryVideoStats: { current: 0, total: order.actualPersonCount || 0, percentage: 0 },
|
|
|
+ taxVideoStats: { current: 0, total: order.actualPersonCount || 0, percentage: 0 }
|
|
|
+ }))
|
|
|
+ setOrders(transformedOrders)
|
|
|
+ setPagination({
|
|
|
+ page: data.meta?.page || page,
|
|
|
+ pageSize: data.meta?.pageSize || pagination.pageSize,
|
|
|
+ total: data.meta?.total || 0,
|
|
|
+ totalPages: data.meta?.totalPages || 1
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ throw new Error(`获取订单列表失败: ${response.status}`)
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.error('获取订单列表错误:', err)
|
|
|
+ setError(err instanceof Error ? err.message : '获取订单列表失败')
|
|
|
+ Taro.showToast({
|
|
|
+ title: '获取订单列表失败',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } finally {
|
|
|
+ setLoading(false)
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
const handleSearch = () => {
|
|
|
console.log('搜索关键词:', searchKeyword)
|
|
|
- // TODO: 调用API搜索订单
|
|
|
+ // 搜索订单
|
|
|
+ fetchOrders(1, searchKeyword, activeStatus)
|
|
|
}
|
|
|
|
|
|
const handleStatusFilter = (status: OrderStatus) => {
|
|
|
setActiveStatus(status)
|
|
|
- // TODO: 根据状态筛选订单
|
|
|
+ // 根据状态筛选订单
|
|
|
+ fetchOrders(1, searchKeyword, status)
|
|
|
}
|
|
|
|
|
|
const handleViewDetail = (orderId: number) => {
|
|
|
console.log('查看订单详情:', orderId)
|
|
|
- // TODO: 跳转到订单详情页
|
|
|
+ // 跳转到订单详情页
|
|
|
+ Taro.navigateTo({
|
|
|
+ url: `/pages/yongren/order/detail?id=${orderId}`
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const handleDownloadVideo = (orderId: number) => {
|
|
|
@@ -93,6 +179,20 @@ const OrderList: React.FC = () => {
|
|
|
// TODO: 跳转到创建订单页
|
|
|
}
|
|
|
|
|
|
+ const handlePrevPage = () => {
|
|
|
+ if (pagination.page > 1) {
|
|
|
+ const newPage = pagination.page - 1
|
|
|
+ fetchOrders(newPage, searchKeyword, activeStatus)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const handleNextPage = () => {
|
|
|
+ if (pagination.page < pagination.totalPages) {
|
|
|
+ const newPage = pagination.page + 1
|
|
|
+ fetchOrders(newPage, searchKeyword, activeStatus)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<YongrenTabBarLayout activeKey="order">
|
|
|
<ScrollView
|
|
|
@@ -133,13 +233,25 @@ const OrderList: React.FC = () => {
|
|
|
{/* 标题和新建订单按钮 */}
|
|
|
<View className="flex justify-between items-center mb-4">
|
|
|
<Text className="font-semibold text-gray-700">订单列表</Text>
|
|
|
- <Button
|
|
|
- className="bg-blue-500 text-white text-xs px-3 py-1 rounded-lg"
|
|
|
- onClick={handleCreateOrder}
|
|
|
- >
|
|
|
- <Text className="fas fa-plus mr-1">+</Text>
|
|
|
- <Text>新建订单</Text>
|
|
|
- </Button>
|
|
|
+ <View className="flex items-center space-x-2">
|
|
|
+ <Button
|
|
|
+ className="bg-gray-100 text-gray-700 text-xs px-2 py-1 rounded-lg"
|
|
|
+ onClick={() => {
|
|
|
+ const newSortOrder = sortOrder === 'desc' ? 'asc' : 'desc'
|
|
|
+ setSortOrder(newSortOrder)
|
|
|
+ fetchOrders(1, searchKeyword, activeStatus)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Text>{sortOrder === 'desc' ? '↓ 最新' : '↑ 最早'}</Text>
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ className="bg-blue-500 text-white text-xs px-3 py-1 rounded-lg"
|
|
|
+ onClick={handleCreateOrder}
|
|
|
+ >
|
|
|
+ <Text className="fas fa-plus mr-1">+</Text>
|
|
|
+ <Text>新建订单</Text>
|
|
|
+ </Button>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
|
|
|
{/* 搜索栏 */}
|
|
|
@@ -159,91 +271,130 @@ const OrderList: React.FC = () => {
|
|
|
</View>
|
|
|
|
|
|
{/* 订单卡片列表 */}
|
|
|
- <View className="space-y-4">
|
|
|
- {mockOrders.map((order) => (
|
|
|
- <View key={order.id} className="card bg-white p-4">
|
|
|
- {/* 订单头部 */}
|
|
|
- <View className="flex justify-between items-start mb-3">
|
|
|
- <View>
|
|
|
- <Text className="font-semibold text-gray-800">{order.name}</Text>
|
|
|
- <Text className="text-xs text-gray-500">{order.createdAt} 创建</Text>
|
|
|
- </View>
|
|
|
- <Text className={`text-xs px-2 py-1 rounded-full ${order.statusClass}`}>
|
|
|
- {order.statusLabel}
|
|
|
- </Text>
|
|
|
+ {loading && (
|
|
|
+ <View className="flex justify-center items-center py-8">
|
|
|
+ <Text className="text-gray-500">加载中...</Text>
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ {error && (
|
|
|
+ <View className="bg-red-50 border border-red-200 rounded-lg p-4 mb-4">
|
|
|
+ <Text className="text-red-700">{error}</Text>
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ {!loading && !error && (
|
|
|
+ <View className="space-y-4">
|
|
|
+ {orders.length === 0 ? (
|
|
|
+ <View className="flex justify-center items-center py-8">
|
|
|
+ <Text className="text-gray-500">暂无订单数据</Text>
|
|
|
</View>
|
|
|
+ ) : (
|
|
|
+ orders.map((order) => (
|
|
|
+ <View key={order.id} className="card bg-white p-4">
|
|
|
+ {/* 订单头部 */}
|
|
|
+ <View className="flex justify-between items-start mb-3">
|
|
|
+ <View>
|
|
|
+ <Text className="font-semibold text-gray-800">{order.name}</Text>
|
|
|
+ <Text className="text-xs text-gray-500">{order.createdAt} 创建</Text>
|
|
|
+ </View>
|
|
|
+ <Text className={`text-xs px-2 py-1 rounded-full ${order.statusClass}`}>
|
|
|
+ {order.statusLabel}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
|
|
|
- {/* 订单信息网格 */}
|
|
|
- <View className="grid grid-cols-2 gap-3 text-sm mb-3">
|
|
|
- <View>
|
|
|
- <Text className="text-gray-500">预计人数</Text>
|
|
|
- <Text className="text-gray-800">{order.expectedPeople}人</Text>
|
|
|
- </View>
|
|
|
- <View>
|
|
|
- <Text className="text-gray-500">实际人数</Text>
|
|
|
- <Text className="text-gray-800">{order.actualPeople}人</Text>
|
|
|
- </View>
|
|
|
- <View>
|
|
|
- <Text className="text-gray-500">开始日期</Text>
|
|
|
- <Text className="text-gray-800">{order.startDate}</Text>
|
|
|
- </View>
|
|
|
- <View>
|
|
|
- <Text className="text-gray-500">预计结束</Text>
|
|
|
- <Text className="text-gray-800">{order.endDate}</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
-
|
|
|
- {/* 打卡数据统计网格 */}
|
|
|
- <View className="grid grid-cols-3 gap-2 mb-3">
|
|
|
- <View className="bg-blue-50 rounded-lg p-2 text-center">
|
|
|
- <Text className="text-xs text-gray-600">本月打卡</Text>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {order.checkinStats.current}/{order.checkinStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{order.checkinStats.percentage}%</Text>
|
|
|
- </View>
|
|
|
- <View className="bg-green-50 rounded-lg p-2 text-center">
|
|
|
- <Text className="text-xs text-gray-600">工资视频</Text>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {order.salaryVideoStats.current}/{order.salaryVideoStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{order.salaryVideoStats.percentage}%</Text>
|
|
|
- </View>
|
|
|
- <View className="bg-purple-50 rounded-lg p-2 text-center">
|
|
|
- <Text className="text-xs text-gray-600">个税视频</Text>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {order.taxVideoStats.current}/{order.taxVideoStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{order.taxVideoStats.percentage}%</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+ {/* 订单信息网格 */}
|
|
|
+ <View className="grid grid-cols-2 gap-3 text-sm mb-3">
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">预计人数</Text>
|
|
|
+ <Text className="text-gray-800">{order.expectedPeople}人</Text>
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">实际人数</Text>
|
|
|
+ <Text className="text-gray-800">{order.actualPeople}人</Text>
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">开始日期</Text>
|
|
|
+ <Text className="text-gray-800">{order.startDate}</Text>
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">预计结束</Text>
|
|
|
+ <Text className="text-gray-800">{order.endDate}</Text>
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">人才姓名</Text>
|
|
|
+ <Text className="text-gray-800">{order.talentName}</Text>
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text className="text-gray-500">岗位</Text>
|
|
|
+ <Text className="text-gray-800">{order.position}</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
|
|
|
- {/* 操作按钮区域 */}
|
|
|
- <View className="flex justify-between text-sm">
|
|
|
- <Button
|
|
|
- className="text-blue-500"
|
|
|
- onClick={() => handleViewDetail(order.id)}
|
|
|
- >
|
|
|
- <Text className="fas fa-eye mr-1">👁️</Text>
|
|
|
- <Text>查看详情</Text>
|
|
|
- </Button>
|
|
|
- <Button
|
|
|
- className="text-gray-500"
|
|
|
- onClick={() => handleDownloadVideo(order.id)}
|
|
|
- >
|
|
|
- <Text className="fas fa-download mr-1">⬇️</Text>
|
|
|
- <Text>下载视频</Text>
|
|
|
- </Button>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- ))}
|
|
|
- </View>
|
|
|
+ {/* 打卡数据统计网格 */}
|
|
|
+ <View className="grid grid-cols-3 gap-2 mb-3">
|
|
|
+ <View className="bg-blue-50 rounded-lg p-2 text-center">
|
|
|
+ <Text className="text-xs text-gray-600">本月打卡</Text>
|
|
|
+ <Text className="text-sm font-bold text-gray-800">
|
|
|
+ {order.checkinStats.current}/{order.checkinStats.total}
|
|
|
+ </Text>
|
|
|
+ <Text className="text-xs text-gray-500">{order.checkinStats.percentage}%</Text>
|
|
|
+ </View>
|
|
|
+ <View className="bg-green-50 rounded-lg p-2 text-center">
|
|
|
+ <Text className="text-xs text-gray-600">工资视频</Text>
|
|
|
+ <Text className="text-sm font-bold text-gray-800">
|
|
|
+ {order.salaryVideoStats.current}/{order.salaryVideoStats.total}
|
|
|
+ </Text>
|
|
|
+ <Text className="text-xs text-gray-500">{order.salaryVideoStats.percentage}%</Text>
|
|
|
+ </View>
|
|
|
+ <View className="bg-purple-50 rounded-lg p-2 text-center">
|
|
|
+ <Text className="text-xs text-gray-600">个税视频</Text>
|
|
|
+ <Text className="text-sm font-bold text-gray-800">
|
|
|
+ {order.taxVideoStats.current}/{order.taxVideoStats.total}
|
|
|
+ </Text>
|
|
|
+ <Text className="text-xs text-gray-500">{order.taxVideoStats.percentage}%</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
|
|
|
+ {/* 操作按钮区域 */}
|
|
|
+ <View className="flex justify-between text-sm">
|
|
|
+ <Button
|
|
|
+ className="text-blue-500"
|
|
|
+ onClick={() => handleViewDetail(order.id)}
|
|
|
+ >
|
|
|
+ <Text className="fas fa-eye mr-1">👁️</Text>
|
|
|
+ <Text>查看详情</Text>
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ className="text-gray-500"
|
|
|
+ onClick={() => handleDownloadVideo(order.id)}
|
|
|
+ >
|
|
|
+ <Text className="fas fa-download mr-1">⬇️</Text>
|
|
|
+ <Text>下载视频</Text>
|
|
|
+ </Button>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ ))
|
|
|
+ )}
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
{/* 分页控件 */}
|
|
|
<View className="flex justify-center items-center mt-6">
|
|
|
- <Button className="text-gray-500 text-sm px-3 py-1">上一页</Button>
|
|
|
- <Text className="mx-4 text-sm">1 / 3</Text>
|
|
|
- <Button className="text-gray-500 text-sm px-3 py-1">下一页</Button>
|
|
|
+ <Button
|
|
|
+ className="text-gray-500 text-sm px-3 py-1"
|
|
|
+ onClick={handlePrevPage}
|
|
|
+ disabled={pagination.page <= 1}
|
|
|
+ >
|
|
|
+ 上一页
|
|
|
+ </Button>
|
|
|
+ <Text className="mx-4 text-sm">
|
|
|
+ {pagination.page} / {pagination.totalPages}
|
|
|
+ </Text>
|
|
|
+ <Button
|
|
|
+ className="text-gray-500 text-sm px-3 py-1"
|
|
|
+ onClick={handleNextPage}
|
|
|
+ disabled={pagination.page >= pagination.totalPages}
|
|
|
+ >
|
|
|
+ 下一页
|
|
|
+ </Button>
|
|
|
</View>
|
|
|
</View>
|
|
|
</ScrollView>
|