111
This commit is contained in:
@@ -14,7 +14,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
|
||||
Color _getStatusColor(int status, bool isDeposit) {
|
||||
if (isDeposit) {
|
||||
// 充值状态: 1=待付款, 2=待确认, 3=已完成, 4=已驳回, 5=已取消
|
||||
// 充值狀態: 1=待付款, 2=待確認, 3=已完成, 4=已駁回, 5=已取消
|
||||
switch (status) {
|
||||
case 1:
|
||||
return AppColorScheme.warning;
|
||||
@@ -30,7 +30,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
return AppColorScheme.muted;
|
||||
}
|
||||
} else {
|
||||
// 提现状态: 1=待审批, 2=已出款, 3=已驳回, 4=已取消, 5=待财务审核
|
||||
// 提現狀態: 1=待審批, 2=已出款, 3=已駁回, 4=已取消, 5=待財務審核
|
||||
switch (status) {
|
||||
case 1:
|
||||
return AppColorScheme.warning;
|
||||
@@ -54,11 +54,11 @@ class _FundOrderCard extends StatelessWidget {
|
||||
case 1:
|
||||
return '待付款';
|
||||
case 2:
|
||||
return '待确认';
|
||||
return '待確認';
|
||||
case 3:
|
||||
return '已完成';
|
||||
case 4:
|
||||
return '已驳回';
|
||||
return '已駁回';
|
||||
case 5:
|
||||
return '已取消';
|
||||
default:
|
||||
@@ -67,15 +67,15 @@ class _FundOrderCard extends StatelessWidget {
|
||||
} else {
|
||||
switch (status) {
|
||||
case 1:
|
||||
return '待审批';
|
||||
return '待審批';
|
||||
case 2:
|
||||
return '已出款';
|
||||
case 3:
|
||||
return '已驳回';
|
||||
return '已駁回';
|
||||
case 4:
|
||||
return '已取消';
|
||||
case 5:
|
||||
return '待财务审核';
|
||||
return '待財務審核';
|
||||
default:
|
||||
return '未知';
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (order.fee != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('手续费(10%): ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('手續費(10%): ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('-${order.fee} USDT', style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
@@ -130,7 +130,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (order.receivableAmount != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('到账金额: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('到賬金額: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('${order.receivableAmount} USDT', style: AppTextStyles.bodyMedium(context).copyWith(fontWeight: FontWeight.w700)),
|
||||
],
|
||||
),
|
||||
@@ -139,7 +139,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (order.network != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('提现网络: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('提現網絡: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(order.network!, style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
@@ -148,7 +148,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (order.walletAddress != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('提现地址: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('提現地址: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
order.walletAddress!,
|
||||
@@ -164,16 +164,16 @@ class _FundOrderCard extends StatelessWidget {
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
Text('订单号: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('訂單號: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(order.orderNo, style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: AppSpacing.xs),
|
||||
Row(
|
||||
children: [
|
||||
Text('创建时间: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('創建時間: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(
|
||||
order.createTime?.toString() ?? '无',
|
||||
order.createTime?.toString() ?? '無',
|
||||
style: AppTextStyles.bodyMedium(context),
|
||||
),
|
||||
],
|
||||
@@ -182,7 +182,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
SizedBox(height: AppSpacing.xs),
|
||||
Row(
|
||||
children: [
|
||||
Text('驳回原因: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('駁回原因: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
order.rejectReason!,
|
||||
@@ -206,7 +206,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
Expanded(
|
||||
child: ShadButton.outline(
|
||||
onPressed: () => _handleCancel(context),
|
||||
child: const Text('取消订单'),
|
||||
child: const Text('取消訂單'),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -222,12 +222,12 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (context.mounted) {
|
||||
if (response.success) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('已确认打款,请等待审核')),
|
||||
const SnackBar(content: Text('已確認打款,請等待審核')),
|
||||
);
|
||||
context.read<AssetProvider>().loadFundOrders();
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(response.message ?? '确认失败')),
|
||||
SnackBar(content: Text(response.message ?? '確認失敗')),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -238,12 +238,12 @@ class _FundOrderCard extends StatelessWidget {
|
||||
if (context.mounted) {
|
||||
if (response.success) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('订单已取消')),
|
||||
const SnackBar(content: Text('訂單已取消')),
|
||||
);
|
||||
context.read<AssetProvider>().loadFundOrders();
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(response.message ?? '取消失败')),
|
||||
SnackBar(content: Text(response.message ?? '取消失敗')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class FundOrdersList extends StatelessWidget {
|
||||
if (orders.isEmpty) {
|
||||
return _EmptyState(
|
||||
icon: LucideIcons.receipt,
|
||||
message: '暂无订单记录',
|
||||
message: '暫無訂單記錄',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class FundOrdersList extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// 空状态组件
|
||||
/// 空狀態組件
|
||||
class _EmptyState extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String message;
|
||||
@@ -70,7 +70,7 @@ class _EmptyState extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// 充值订单卡片 - 公开类
|
||||
/// 充值訂單卡片 - 公開類
|
||||
class FundOrderCard extends StatelessWidget {
|
||||
final OrderFund order;
|
||||
|
||||
@@ -78,12 +78,12 @@ class FundOrderCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// 直接使用 _FundOrderCard 的实现
|
||||
// 直接使用 _FundOrderCard 的實現
|
||||
return _FundOrderCardContent(order: order);
|
||||
}
|
||||
}
|
||||
|
||||
/// 订单卡片内容
|
||||
/// 訂單卡片內容
|
||||
class _FundOrderCardContent extends StatelessWidget {
|
||||
final OrderFund order;
|
||||
|
||||
@@ -127,11 +127,11 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
case 1:
|
||||
return '待付款';
|
||||
case 2:
|
||||
return '待确认';
|
||||
return '待確認';
|
||||
case 3:
|
||||
return '已完成';
|
||||
case 4:
|
||||
return '已驳回';
|
||||
return '已駁回';
|
||||
case 5:
|
||||
return '已取消';
|
||||
default:
|
||||
@@ -140,11 +140,11 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
} else {
|
||||
switch (status) {
|
||||
case 1:
|
||||
return '待审批';
|
||||
return '待審批';
|
||||
case 2:
|
||||
return '已出款';
|
||||
case 3:
|
||||
return '已驳回';
|
||||
return '已駁回';
|
||||
case 4:
|
||||
return '已取消';
|
||||
default:
|
||||
@@ -192,7 +192,7 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
if (order.fee != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('手续费(10%): ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('手續費(10%): ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('-${order.fee} USDT', style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
@@ -201,7 +201,7 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
if (order.receivableAmount != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('到账金额: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('到賬金額: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('${order.receivableAmount} USDT', style: AppTextStyles.bodyMedium(context).copyWith(fontWeight: FontWeight.w700)),
|
||||
],
|
||||
),
|
||||
@@ -210,7 +210,7 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
if (order.network != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('提现网络: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('提現網絡: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(order.network!, style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
@@ -219,7 +219,7 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
if (order.walletAddress != null) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text('提现地址: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('提現地址: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
order.walletAddress!,
|
||||
@@ -234,16 +234,16 @@ class _FundOrderCardContent extends StatelessWidget {
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
Text('订单号: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('訂單號: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(order.orderNo, style: AppTextStyles.bodyMedium(context)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: AppSpacing.xs),
|
||||
Row(
|
||||
children: [
|
||||
Text('创建时间: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text('創建時間: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
|
||||
Text(
|
||||
order.createTime?.toString() ?? '无',
|
||||
order.createTime?.toString() ?? '無',
|
||||
style: AppTextStyles.bodyMedium(context),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -13,7 +13,7 @@ import '../../../core/event/app_event_bus.dart';
|
||||
import '../../../providers/asset_provider.dart';
|
||||
import '../../../data/models/order_models.dart';
|
||||
|
||||
/// 充提订单页面
|
||||
/// 充提訂單頁面
|
||||
class FundOrdersPage extends StatefulWidget {
|
||||
const FundOrdersPage({super.key});
|
||||
|
||||
@@ -22,7 +22,7 @@ class FundOrdersPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
int _activeTab = 0; // 0=全部, 1=充值, 2=提现
|
||||
int _activeTab = 0; // 0=全部, 1=充值, 2=提現
|
||||
StreamSubscription<AppEvent>? _eventSub;
|
||||
|
||||
@override
|
||||
@@ -53,7 +53,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 构建 UI
|
||||
// 構建 UI
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
@@ -65,7 +65,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
icon: const Icon(LucideIcons.arrowLeft, size: 20),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: Text('充提记录', style: AppTextStyles.headlineLarge(context).copyWith(color: context.colors.onSurface)),
|
||||
title: Text('充提記錄', style: AppTextStyles.headlineLarge(context).copyWith(color: context.colors.onSurface)),
|
||||
backgroundColor: context.colors.surface,
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
@@ -97,7 +97,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
children: [
|
||||
_buildPillTab('全部', 0),
|
||||
_buildPillTab('充值', 1),
|
||||
_buildPillTab('提现', 2),
|
||||
_buildPillTab('提現', 2),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -153,7 +153,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
children: [
|
||||
Icon(LucideIcons.inbox, size: 64, color: context.appColors.onSurfaceMuted),
|
||||
const SizedBox(height: AppSpacing.md),
|
||||
Text('暂无订单记录', style: AppTextStyles.headlineMedium(context).copyWith(color: context.colors.onSurfaceVariant)),
|
||||
Text('暫無訂單記錄', style: AppTextStyles.headlineMedium(context).copyWith(color: context.colors.onSurfaceVariant)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -199,7 +199,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
],
|
||||
if (order.withdrawContact != null) ...[
|
||||
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
|
||||
_buildDetailRow('联系方式', order.withdrawContact!),
|
||||
_buildDetailRow('聯繫方式', order.withdrawContact!),
|
||||
],
|
||||
if (order.receivableAmount != null && !order.isDeposit) ...[
|
||||
const SizedBox(height: AppSpacing.sm),
|
||||
@@ -214,13 +214,13 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'创建: ${_formatTime(order.createTime)}',
|
||||
'創建: ${_formatTime(order.createTime)}',
|
||||
style: AppTextStyles.bodySmall(context).copyWith(color: context.appColors.onSurfaceMuted),
|
||||
),
|
||||
if (order.rejectReason != null)
|
||||
Expanded(
|
||||
child: Text(
|
||||
'驳回: ${order.rejectReason}',
|
||||
'駁回: ${order.rejectReason}',
|
||||
style: AppTextStyles.bodySmall(context).copyWith(color: context.appColors.down),
|
||||
textAlign: TextAlign.right,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -241,7 +241,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
order.isDeposit ? '充值' : '提现',
|
||||
order.isDeposit ? '充值' : '提現',
|
||||
style: AppTextStyles.headlineMedium(context).copyWith(color: context.colors.onSurface),
|
||||
),
|
||||
_buildStatusBadge(order),
|
||||
@@ -261,7 +261,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
if (order.isDeposit) {
|
||||
switch (order.status) {
|
||||
case 1: // 待付款
|
||||
case 2: // 待确认
|
||||
case 2: // 待確認
|
||||
bgColor = AppColorScheme.warning.withValues(alpha: 0.12);
|
||||
textColor = AppColorScheme.warning;
|
||||
break;
|
||||
@@ -269,14 +269,14 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
bgColor = upBg;
|
||||
textColor = upColor;
|
||||
break;
|
||||
default: // 已驳回/已取消
|
||||
default: // 已駁回/已取消
|
||||
bgColor = downBg;
|
||||
textColor = downColor;
|
||||
}
|
||||
} else {
|
||||
switch (order.status) {
|
||||
case 1: // 待审批
|
||||
case 5: // 待财务审核
|
||||
case 1: // 待審批
|
||||
case 5: // 待財務審核
|
||||
bgColor = AppColorScheme.warning.withValues(alpha: 0.12);
|
||||
textColor = AppColorScheme.warning;
|
||||
break;
|
||||
@@ -284,7 +284,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
bgColor = upBg;
|
||||
textColor = upColor;
|
||||
break;
|
||||
default: // 已驳回/已取消
|
||||
default: // 已駁回/已取消
|
||||
bgColor = downBg;
|
||||
textColor = downColor;
|
||||
}
|
||||
@@ -320,10 +320,10 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
Widget _buildDetailRows(OrderFund order) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildDetailRow('订单号', order.orderNo),
|
||||
_buildDetailRow('訂單號', order.orderNo),
|
||||
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
|
||||
if (order.network != null) ...[
|
||||
_buildDetailRow('网络', order.network!),
|
||||
_buildDetailRow('網絡', order.network!),
|
||||
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
|
||||
],
|
||||
if (order.walletAddress != null) ...[
|
||||
@@ -333,7 +333,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
trailing: GestureDetector(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: order.walletAddress!));
|
||||
ToastUtils.show('地址已复制');
|
||||
ToastUtils.show('地址已複製');
|
||||
},
|
||||
child: Icon(LucideIcons.copy, size: 14, color: context.appColors.onSurfaceMuted),
|
||||
),
|
||||
@@ -341,11 +341,11 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
|
||||
],
|
||||
if (order.fee != null && !order.isDeposit) ...[
|
||||
_buildDetailRow('手续费', '${order.fee}%'),
|
||||
_buildDetailRow('手續費', '${order.fee}%'),
|
||||
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
|
||||
],
|
||||
_buildDetailRow(
|
||||
'时间',
|
||||
'時間',
|
||||
_formatTime(order.createTime),
|
||||
),
|
||||
],
|
||||
@@ -383,7 +383,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildRejectionReason(OrderFund order) {
|
||||
return Text(
|
||||
'拒绝原因: ${order.rejectReason}',
|
||||
'拒絕原因: ${order.rejectReason}',
|
||||
style: AppTextStyles.bodyMedium(context).copyWith(color: context.appColors.down),
|
||||
);
|
||||
}
|
||||
@@ -401,7 +401,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('应付金额', style: AppTextStyles.headlineSmall(context).copyWith(color: context.colors.onSurfaceVariant)),
|
||||
Text('應付金額', style: AppTextStyles.headlineSmall(context).copyWith(color: context.colors.onSurfaceVariant)),
|
||||
Text('${order.receivableAmount} USDT', style: AppTextStyles.headlineMedium(context).copyWith(color: context.colors.onSurface)),
|
||||
],
|
||||
),
|
||||
@@ -427,7 +427,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
borderRadius: AppRadius.radiusSm,
|
||||
border: Border.all(color: downColor, width: 1),
|
||||
),
|
||||
child: Text('取消订单', style: AppTextStyles.headlineSmall(context).copyWith(color: downColor)),
|
||||
child: Text('取消訂單', style: AppTextStyles.headlineSmall(context).copyWith(color: downColor)),
|
||||
),
|
||||
),
|
||||
if (order.canCancel && order.canConfirmPay)
|
||||
@@ -467,14 +467,14 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
void _confirmPay(OrderFund order) async {
|
||||
final confirmed = await showShadConfirmDialog(
|
||||
context: context,
|
||||
title: '确认已打款',
|
||||
description: '确认您已完成向指定地址的转账?',
|
||||
title: '確認已打款',
|
||||
description: '確認您已完成向指定地址的轉賬?',
|
||||
);
|
||||
|
||||
if (confirmed == true && mounted) {
|
||||
final response = await context.read<AssetProvider>().confirmPay(order.orderNo);
|
||||
if (mounted) {
|
||||
BotToast.showText(text: response.success ? '确认成功,请等待审核' : response.message ?? '确认失败');
|
||||
BotToast.showText(text: response.success ? '確認成功,請等待審核' : response.message ?? '確認失敗');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -482,15 +482,15 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
void _cancelOrder(OrderFund order) async {
|
||||
final confirmed = await showShadConfirmDialog(
|
||||
context: context,
|
||||
title: '取消订单',
|
||||
description: '确定要取消订单 ${order.orderNo} 吗?',
|
||||
title: '取消訂單',
|
||||
description: '確定要取消訂單 ${order.orderNo} 嗎?',
|
||||
destructive: true,
|
||||
);
|
||||
|
||||
if (confirmed == true && mounted) {
|
||||
final response = await context.read<AssetProvider>().cancelOrder(order.orderNo);
|
||||
if (mounted) {
|
||||
BotToast.showText(text: response.success ? '订单已取消' : response.message ?? '取消失败');
|
||||
BotToast.showText(text: response.success ? '訂單已取消' : response.message ?? '取消失敗');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -512,7 +512,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
onPressed: () => Navigator.pop(context, false),
|
||||
),
|
||||
TextButton(
|
||||
child: Text(destructive ? '确定取消' : '确认'),
|
||||
child: Text(destructive ? '確定取消' : '確認'),
|
||||
onPressed: () => Navigator.pop(context, true),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -8,7 +8,7 @@ import '../../../core/theme/app_theme_extension.dart';
|
||||
import '../../../providers/asset_provider.dart';
|
||||
import 'fund_orders_list.dart';
|
||||
|
||||
/// 订单管理页面
|
||||
/// 訂單管理頁面
|
||||
class OrdersPage extends StatefulWidget {
|
||||
const OrdersPage({super.key});
|
||||
|
||||
@@ -50,7 +50,7 @@ class _OrdersPageState extends State<OrdersPage> with AutomaticKeepAliveClientMi
|
||||
child: Column(
|
||||
children: [
|
||||
TabSelector(
|
||||
tabs: const ['订单记录', '交易记录'],
|
||||
tabs: const ['訂單記錄', '交易記錄'],
|
||||
selectedIndex: _activeTab,
|
||||
onChanged: (index) => setState(() => _activeTab = index),
|
||||
),
|
||||
@@ -68,7 +68,7 @@ class _OrdersPageState extends State<OrdersPage> with AutomaticKeepAliveClientMi
|
||||
}
|
||||
}
|
||||
|
||||
/// Tab 选择器
|
||||
/// Tab 選擇器
|
||||
class TabSelector extends StatelessWidget {
|
||||
final List<String> tabs;
|
||||
final int selectedIndex;
|
||||
@@ -129,7 +129,7 @@ class TabSelector extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// 交易订单列表
|
||||
/// 交易訂單列表
|
||||
class TradeOrdersList extends StatelessWidget {
|
||||
final AssetProvider provider;
|
||||
|
||||
@@ -147,7 +147,7 @@ class TradeOrdersList extends StatelessWidget {
|
||||
children: [
|
||||
Icon(LucideIcons.receipt, size: 48, color: theme.colorScheme.mutedForeground),
|
||||
SizedBox(height: AppSpacing.sm + AppSpacing.xs),
|
||||
Text('暂无交易记录', style: theme.textTheme.muted),
|
||||
Text('暫無交易記錄', style: theme.textTheme.muted),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user