You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
195 lines
7.0 KiB
195 lines
7.0 KiB
import 'package:dating_touchme_app/components/page_appbar.dart';
|
|
import 'package:dating_touchme_app/controller/mine/withdraw_history_controller.dart';
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart';
|
|
import 'package:easy_refresh/easy_refresh.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:tdesign_flutter/tdesign_flutter.dart';
|
|
|
|
import '../../model/mine/withdraw_audit_data.dart';
|
|
|
|
class WithdrawHistoryPage extends StatelessWidget {
|
|
const WithdrawHistoryPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetX<WithdrawHistoryController>(
|
|
init: WithdrawHistoryController(),
|
|
builder: (controller){
|
|
return Scaffold(
|
|
appBar: PageAppbar(title: "提现"),
|
|
body: EasyRefresh(
|
|
controller: controller.listRefreshController,
|
|
header: const ClassicHeader(
|
|
dragText: '下拉刷新',
|
|
armedText: '释放刷新',
|
|
readyText: '刷新中...',
|
|
processingText: '刷新中...',
|
|
processedText: '刷新完成',
|
|
failedText: '刷新失败',
|
|
noMoreText: '没有更多数据',
|
|
showMessage: false
|
|
),
|
|
footer: ClassicFooter(
|
|
dragText: '上拉加载',
|
|
armedText: '释放加载',
|
|
readyText: '加载中...',
|
|
processingText: '加载中...',
|
|
processedText: '加载完成',
|
|
failedText: '加载失败',
|
|
noMoreText: '没有更多数据',
|
|
showMessage: false
|
|
),
|
|
// 下拉刷新
|
|
onRefresh: () async {
|
|
print('推荐列表下拉刷新被触发');
|
|
controller.page.value = 1;
|
|
controller.historyList.clear();
|
|
await controller.getHistoryList();
|
|
controller.listRefreshController.finishRefresh(IndicatorResult.success);
|
|
controller.listRefreshController.finishLoad(IndicatorResult.none);
|
|
},
|
|
// 上拉加载更多
|
|
onLoad: () async {
|
|
print('推荐列表上拉加载被触发, hasMore: ');
|
|
controller.page.value += 1;
|
|
controller.getHistoryList();
|
|
},
|
|
child: SingleChildScrollView(
|
|
child: Container(
|
|
width: 375.w,
|
|
padding: EdgeInsetsGeometry.symmetric(
|
|
vertical: 11.w,
|
|
horizontal: 16.w
|
|
),
|
|
constraints: BoxConstraints(
|
|
minHeight: MediaQuery.of(context).size.height - MediaQuery.of(context).padding.top,
|
|
),
|
|
child: Column(
|
|
children: [
|
|
...controller.historyList.map((e){
|
|
return historyItem(e, context);
|
|
}),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
|
|
Widget historyItem(Records item, BuildContext context) {
|
|
return Container(
|
|
padding: EdgeInsets.only(
|
|
bottom: 12.w
|
|
),
|
|
margin: EdgeInsets.only(
|
|
bottom: 16.w
|
|
),
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
bottom: BorderSide(
|
|
width: 1,
|
|
color: const Color.fromRGBO(238, 238, 238, 1)
|
|
)
|
|
)
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
RichText(
|
|
text: TextSpan(
|
|
children: [
|
|
TextSpan(
|
|
text: "提现金额:",
|
|
style: TextStyle(
|
|
fontSize: 14.w,
|
|
fontWeight: FontWeight.w500,
|
|
color: const Color.fromRGBO(51, 51, 51, 1)
|
|
)
|
|
),
|
|
TextSpan(
|
|
text: "${item.withdrawAmount}",
|
|
style: TextStyle(
|
|
fontSize: 14.w,
|
|
fontWeight: FontWeight.w500,
|
|
color: const Color.fromRGBO(238, 129, 27, 1)
|
|
)
|
|
),
|
|
]
|
|
),
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 2.w,
|
|
horizontal: 4.w
|
|
),
|
|
margin: EdgeInsets.only(
|
|
left: 8.w
|
|
),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(5.w)),
|
|
color: (item.remitStatus ?? false) ? const Color.fromRGBO(25, 114, 248, 1) : const Color.fromRGBO(238, 129, 27, 1)
|
|
),
|
|
child: Text(
|
|
item.status == 1 ? "待审核" :
|
|
item.status == 2 && item.remitStatus == true ? "提现成功" :
|
|
item.status == 2 && (item.remitStatus ?? false) == false ? "待打款" :
|
|
item.status == 3 ? "审核失败" :
|
|
"",
|
|
style: TextStyle(
|
|
fontSize: 10.w,
|
|
color: Colors.white
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
SizedBox(height: 8.w,),
|
|
if(item.extDetailsInfo?.bankName != null && item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4) != null) Text(
|
|
"${item.extDetailsInfo?.bankName ?? ""}(${item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4) ?? ""})",
|
|
style: TextStyle(
|
|
fontSize: 12.w,
|
|
),
|
|
),
|
|
SizedBox(height: 8.w,),
|
|
Text(
|
|
"申请时间:${item.applyTime}",
|
|
style: TextStyle(
|
|
fontSize: 12.w,
|
|
color: const Color.fromRGBO(153, 153, 153, 1)
|
|
),
|
|
),
|
|
SizedBox(height: 8.w,),
|
|
if(item.remitStatus ?? false) Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"处理时间:${item.remitDateTime}",
|
|
style: TextStyle(
|
|
fontSize: 12.w,
|
|
color: const Color.fromRGBO(153, 153, 153, 1)
|
|
),
|
|
),
|
|
if(item.remitUrl != "" && item.remitUrl != null)Text(
|
|
"查看打款凭证",
|
|
style: TextStyle(
|
|
fontSize: 12.w,
|
|
color: const Color.fromRGBO(25, 114, 248, 1)
|
|
),
|
|
).onTap(() {
|
|
TDImageViewer.showImageViewer(context: context, images: [item.remitUrl]);
|
|
})
|
|
],
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|