111
This commit is contained in:
@@ -282,7 +282,7 @@ class _FundAccountCard extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'充提记录',
|
||||
'订单记录',
|
||||
style: TextStyle(
|
||||
color: colorScheme.primary,
|
||||
fontSize: 12,
|
||||
@@ -924,8 +924,20 @@ void _showWithdrawDialog(BuildContext context, String? balance) {
|
||||
final addressController = TextEditingController();
|
||||
final contactController = TextEditingController();
|
||||
final formKey = GlobalKey<ShadFormState>();
|
||||
final feeNotifier = ValueNotifier<String>('提现将扣除10%手续费');
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
amountController.addListener(() {
|
||||
final amount = double.tryParse(amountController.text) ?? 0;
|
||||
if (amount > 0) {
|
||||
final fee = amount * 0.1;
|
||||
final receivable = amount - fee;
|
||||
feeNotifier.value = '手续费(10%): -${fee.toStringAsFixed(2)} USDT | 应付款: ${receivable.toStringAsFixed(2)} USDT';
|
||||
} else {
|
||||
feeNotifier.value = '提现将扣除10%手续费';
|
||||
}
|
||||
});
|
||||
|
||||
showShadDialog(
|
||||
context: context,
|
||||
builder: (ctx) => Dialog(
|
||||
@@ -1020,6 +1032,36 @@ void _showWithdrawDialog(BuildContext context, String? balance) {
|
||||
keyboardType: const TextInputType.numberWithOptions(decimal: true),
|
||||
validator: Validators.amount,
|
||||
),
|
||||
SizedBox(height: AppSpacing.xs),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: AppSpacing.md,
|
||||
vertical: AppSpacing.sm,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||
border: Border.all(color: Colors.orange.withOpacity(0.3)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.info_outline, size: 14, color: Colors.orange),
|
||||
SizedBox(width: AppSpacing.xs),
|
||||
Expanded(
|
||||
child: ValueListenableBuilder<String>(
|
||||
valueListenable: feeNotifier,
|
||||
builder: (_, text, __) => Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Colors.orange.shade800,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: AppSpacing.md),
|
||||
ShadInputFormField(
|
||||
id: 'address',
|
||||
|
||||
@@ -126,7 +126,7 @@ class _FundOrderCard extends StatelessWidget {
|
||||
SizedBox(height: AppSpacing.xs),
|
||||
Row(
|
||||
children: [
|
||||
Text('应收款项: ', style: theme.textTheme.muted),
|
||||
Text('应付款: ', style: theme.textTheme.muted),
|
||||
Text('${order.receivableAmount ?? "0"} USDT', style: theme.textTheme.small.copyWith(fontWeight: FontWeight.bold)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -19,7 +19,7 @@ class FundOrdersList extends StatelessWidget {
|
||||
if (orders.isEmpty) {
|
||||
return _EmptyState(
|
||||
icon: LucideIcons.receipt,
|
||||
message: '暂无充提记录',
|
||||
message: '暂无订单记录',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: theme.colorScheme.background,
|
||||
appBar: AppBar(
|
||||
title: const Text('充提记录'),
|
||||
title: const Text('订单记录'),
|
||||
backgroundColor: theme.colorScheme.background,
|
||||
elevation: 0,
|
||||
),
|
||||
|
||||
@@ -48,7 +48,7 @@ class _OrdersPageState extends State<OrdersPage> with AutomaticKeepAliveClientMi
|
||||
child: Column(
|
||||
children: [
|
||||
TabSelector(
|
||||
tabs: const ['充提记录', '交易记录'],
|
||||
tabs: const ['订单记录', '交易记录'],
|
||||
selectedIndex: _activeTab,
|
||||
onChanged: (index) => setState(() => _activeTab = index),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user