Showing
12 changed files
with
783 additions
and
45 deletions
assets/calender.png
0 → 100644
1.68 KB
| @@ -49,11 +49,11 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -49,11 +49,11 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 49 | TextEditingController _couponRequireEditControl = TextEditingController(); | 49 | TextEditingController _couponRequireEditControl = TextEditingController(); |
| 50 | TextEditingController _couponExplainEditControl = TextEditingController(); | 50 | TextEditingController _couponExplainEditControl = TextEditingController(); |
| 51 | TextEditingController _limitNumControl = TextEditingController(); | 51 | TextEditingController _limitNumControl = TextEditingController(); |
| 52 | - TextEditingController _commissionControl = TextEditingController(); | 52 | + // TextEditingController _commissionControl = TextEditingController(); |
| 53 | TextEditingController _limitDay = TextEditingController(); | 53 | TextEditingController _limitDay = TextEditingController(); |
| 54 | FocusNode _limitNumFocusNode = FocusNode(); | 54 | FocusNode _limitNumFocusNode = FocusNode(); |
| 55 | FocusNode _limitDayFocusNode = FocusNode(); | 55 | FocusNode _limitDayFocusNode = FocusNode(); |
| 56 | - FocusNode _commissionFocusNode = FocusNode(); | 56 | + // FocusNode _commissionFocusNode = FocusNode(); |
| 57 | 57 | ||
| 58 | final heightCell = ScreenUtil().setWidth(48 * 2); | 58 | final heightCell = ScreenUtil().setWidth(48 * 2); |
| 59 | bool swichState = true; //默认启用 开关状态 | 59 | bool swichState = true; //默认启用 开关状态 |
| @@ -112,7 +112,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -112,7 +112,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 112 | 112 | ||
| 113 | bool isShareLose = true; //分享好友 | 113 | bool isShareLose = true; //分享好友 |
| 114 | bool isShareHave = true; //分享好友后继续拥有此券 | 114 | bool isShareHave = true; //分享好友后继续拥有此券 |
| 115 | - bool isCommission = true; //返佣金 | 115 | + // bool isCommission = true; //返佣金 |
| 116 | 116 | ||
| 117 | @override | 117 | @override |
| 118 | void initState() { | 118 | void initState() { |
| @@ -226,8 +226,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -226,8 +226,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 226 | isAppointment = widget.couponSunModel!.arule!.isAppointment; | 226 | isAppointment = widget.couponSunModel!.arule!.isAppointment; |
| 227 | isShareLose = widget.couponSunModel!.arule!.isShareLose; //分享好友 | 227 | isShareLose = widget.couponSunModel!.arule!.isShareLose; //分享好友 |
| 228 | isShareHave = widget.couponSunModel!.arule!.isShareHave; //分享好友后继续拥有此券 | 228 | isShareHave = widget.couponSunModel!.arule!.isShareHave; //分享好友后继续拥有此券 |
| 229 | - isCommission = widget.couponSunModel!.arule!.isCommission; //返佣金 | ||
| 230 | - _commissionControl.text = widget.couponSunModel!.arule!.commission; | 229 | + // isCommission = widget.couponSunModel!.arule!.isCommission; //返佣金 |
| 230 | + // _commissionControl.text = widget.couponSunModel!.arule!.commission; | ||
| 231 | weekShow = widget.couponSunModel!.expDate!.weekShow ?? '无'; | 231 | weekShow = widget.couponSunModel!.expDate!.weekShow ?? '无'; |
| 232 | weekData = widget.couponSunModel!.expDate!.weekData ?? []; | 232 | weekData = widget.couponSunModel!.expDate!.weekData ?? []; |
| 233 | _limitNumControl.text = widget.couponSunModel!.grantNum ?? ''; | 233 | _limitNumControl.text = widget.couponSunModel!.grantNum ?? ''; |
| @@ -375,8 +375,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -375,8 +375,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 375 | 'is_appointment': isAppointment ? '1' : '0', | 375 | 'is_appointment': isAppointment ? '1' : '0', |
| 376 | 'is_share_lose': isShareLose ? '1' : '0', | 376 | 'is_share_lose': isShareLose ? '1' : '0', |
| 377 | 'is_share_have': isShareHave ? '1' : '0', | 377 | 'is_share_have': isShareHave ? '1' : '0', |
| 378 | - 'is_commission': isCommission ? '1' : '0', | ||
| 379 | - 'commission': _commissionControl.text | 378 | + // 'is_commission': isCommission ? '1' : '0', |
| 379 | + // 'commission': _commissionControl.text | ||
| 380 | }; | 380 | }; |
| 381 | params['arule'] = jsonEncode(setting); | 381 | params['arule'] = jsonEncode(setting); |
| 382 | params['is_examine'] = "1"; | 382 | params['is_examine'] = "1"; |
| @@ -1373,17 +1373,17 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -1373,17 +1373,17 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 1373 | isShareHave = !isShareHave; | 1373 | isShareHave = !isShareHave; |
| 1374 | }); | 1374 | }); |
| 1375 | }, isBig: false), | 1375 | }, isBig: false), |
| 1376 | - _canUse('分享核销后,分享用户获得佣金', isCommission, () { | ||
| 1377 | - setState(() { | ||
| 1378 | - isCommission = !isCommission; | ||
| 1379 | - }); | ||
| 1380 | - }, isBig: false), | ||
| 1381 | - _textfield( | ||
| 1382 | - '分享佣金', | ||
| 1383 | - '点击输入佣金比例(实际消费金额计算)', | ||
| 1384 | - _commissionControl, | ||
| 1385 | - _commissionFocusNode, | ||
| 1386 | - textInputType: TextInputType.number), | 1376 | + // _canUse('分享核销后,分享用户获得佣金', isCommission, () { |
| 1377 | + // setState(() { | ||
| 1378 | + // isCommission = !isCommission; | ||
| 1379 | + // }); | ||
| 1380 | + // }, isBig: false), | ||
| 1381 | + // _textfield( | ||
| 1382 | + // '分享佣金', | ||
| 1383 | + // '点击输入佣金比例(实际消费金额计算)', | ||
| 1384 | + // _commissionControl, | ||
| 1385 | + // _commissionFocusNode, | ||
| 1386 | + // textInputType: TextInputType.number), | ||
| 1387 | ], | 1387 | ], |
| 1388 | ), | 1388 | ), |
| 1389 | ), | 1389 | ), |
| @@ -1616,12 +1616,12 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -1616,12 +1616,12 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 1616 | return; | 1616 | return; |
| 1617 | } | 1617 | } |
| 1618 | 1618 | ||
| 1619 | - if (isCommission && | ||
| 1620 | - (_commissionControl.text.trim().length == 0 || | ||
| 1621 | - _commissionControl.text == '0')) { | ||
| 1622 | - Utils.showToast('请填写分享佣金的比例'); | ||
| 1623 | - return; | ||
| 1624 | - } | 1619 | + // if (isCommission && |
| 1620 | + // (_commissionControl.text.trim().length == 0 || | ||
| 1621 | + // _commissionControl.text == '0')) { | ||
| 1622 | + // Utils.showToast('请填写分享佣金的比例'); | ||
| 1623 | + // return; | ||
| 1624 | + // } | ||
| 1625 | if (!widget.isMine) { | 1625 | if (!widget.isMine) { |
| 1626 | if (uids == null || uids == '') { | 1626 | if (uids == null || uids == '') { |
| 1627 | Utils.showToast('请设置发放人!'); | 1627 | Utils.showToast('请设置发放人!'); |
| @@ -1645,11 +1645,11 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -1645,11 +1645,11 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 1645 | _couponRequireEditControl.text = ''; | 1645 | _couponRequireEditControl.text = ''; |
| 1646 | return; | 1646 | return; |
| 1647 | } | 1647 | } |
| 1648 | - if (!Utils.isInteger(_commissionControl.text.trim())) { | ||
| 1649 | - Utils.showToast('分享佣金请输入数字'); | ||
| 1650 | - _commissionControl.text = ''; | ||
| 1651 | - return; | ||
| 1652 | - } | 1648 | + // if (!Utils.isInteger(_commissionControl.text.trim())) { |
| 1649 | + // Utils.showToast('分享佣金请输入数字'); | ||
| 1650 | + // _commissionControl.text = ''; | ||
| 1651 | + // return; | ||
| 1652 | + // } | ||
| 1653 | 1653 | ||
| 1654 | // ***参数*** | 1654 | // ***参数*** |
| 1655 | // _couponNameEditControl.text | 1655 | // _couponNameEditControl.text |
| @@ -73,7 +73,9 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> { | @@ -73,7 +73,9 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> { | ||
| 73 | _item('门店收款码', () { | 73 | _item('门店收款码', () { |
| 74 | NavigatorUtil.goPaymentCodePage(context); | 74 | NavigatorUtil.goPaymentCodePage(context); |
| 75 | }), | 75 | }), |
| 76 | - _item('资金明细', () {}), | 76 | + _item('交易记录', () { |
| 77 | + NavigatorUtil.goTransactionRecordHomePage(context); | ||
| 78 | + }), | ||
| 77 | _item('提现设置', () {}) | 79 | _item('提现设置', () {}) |
| 78 | ], | 80 | ], |
| 79 | ), | 81 | ), |
| @@ -112,12 +112,18 @@ class _PaymentCodePageState extends State<PaymentCodePage> { | @@ -112,12 +112,18 @@ class _PaymentCodePageState extends State<PaymentCodePage> { | ||
| 112 | Consumer<FinanceProvider>( | 112 | Consumer<FinanceProvider>( |
| 113 | builder: (context, model, _) { | 113 | builder: (context, model, _) { |
| 114 | if (model.pageState != PageState.Success) { | 114 | if (model.pageState != PageState.Success) { |
| 115 | - return Center( | ||
| 116 | - child: SizedBox( | ||
| 117 | - width: ScreenUtil().setWidth(80), | ||
| 118 | - height: ScreenUtil().setWidth(80), | ||
| 119 | - child: | ||
| 120 | - CupertinoActivityIndicator()), | 115 | + return Container( |
| 116 | + height: w(210), | ||
| 117 | + child: Center( | ||
| 118 | + child: SizedBox( | ||
| 119 | + width: | ||
| 120 | + ScreenUtil().setWidth(40), | ||
| 121 | + height: | ||
| 122 | + ScreenUtil().setWidth(40), | ||
| 123 | + child: | ||
| 124 | + CupertinoActivityIndicator( | ||
| 125 | + color: MyColours.color_ffffff, | ||
| 126 | + ))), | ||
| 121 | ); | 127 | ); |
| 122 | } else { | 128 | } else { |
| 123 | return Container( | 129 | return Container( |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 3 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 4 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 5 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 6 | + | ||
| 7 | +import '../../../res/colors.dart'; | ||
| 8 | +import '../../../utils/screen_util.dart'; | ||
| 9 | +import '../../../widgets/h_empty_view.dart'; | ||
| 10 | +import '../../../widgets/round_button.dart'; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 交易记录详情 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +class TransactionRecordDetailPage extends StatefulWidget { | ||
| 17 | + const TransactionRecordDetailPage({super.key}); | ||
| 18 | + | ||
| 19 | + @override | ||
| 20 | + State<TransactionRecordDetailPage> createState() => | ||
| 21 | + _TransactionRecordDetailPageState(); | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +class _TransactionRecordDetailPageState | ||
| 25 | + extends State<TransactionRecordDetailPage> { | ||
| 26 | + Widget _item(String title, String subTitle) { | ||
| 27 | + return Container( | ||
| 28 | + padding: EdgeInsets.symmetric(vertical: w(8), horizontal: w(20)), | ||
| 29 | + child: Row( | ||
| 30 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 31 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 32 | + children: [ | ||
| 33 | + Container( | ||
| 34 | + child: Text( | ||
| 35 | + title, | ||
| 36 | + style: TextStyle( | ||
| 37 | + color: MyColours.color_515151, | ||
| 38 | + fontWeight: FontWeight.bold, | ||
| 39 | + fontSize: font(12)), | ||
| 40 | + ), | ||
| 41 | + ), | ||
| 42 | + HEmptyView(60), | ||
| 43 | + Expanded( | ||
| 44 | + child: Text( | ||
| 45 | + subTitle, | ||
| 46 | + maxLines: 20, | ||
| 47 | + textAlign: TextAlign.right, | ||
| 48 | + overflow: TextOverflow.ellipsis, | ||
| 49 | + style: TextStyle( | ||
| 50 | + color: MyColours.color_515151, | ||
| 51 | + fontSize: font(12), | ||
| 52 | + ), | ||
| 53 | + )) | ||
| 54 | + ], | ||
| 55 | + ), | ||
| 56 | + ); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @override | ||
| 60 | + Widget build(BuildContext context) { | ||
| 61 | + return Scaffold( | ||
| 62 | + appBar: SystemAppBar('交易详情'), | ||
| 63 | + body: false | ||
| 64 | + ? SingleChildScrollView( | ||
| 65 | + child: Column( | ||
| 66 | + children: [ | ||
| 67 | + VEmptyView(80), | ||
| 68 | + Text( | ||
| 69 | + '金额', | ||
| 70 | + textAlign: TextAlign.center, | ||
| 71 | + style: TextStyle( | ||
| 72 | + color: MyColours.color_515151, | ||
| 73 | + fontWeight: FontWeight.bold, | ||
| 74 | + fontSize: font(14)), | ||
| 75 | + ), | ||
| 76 | + VEmptyView(40), | ||
| 77 | + Text( | ||
| 78 | + '¥290.00', | ||
| 79 | + textAlign: TextAlign.center, | ||
| 80 | + style: TextStyle( | ||
| 81 | + color: MyColours.color_515151, | ||
| 82 | + fontWeight: FontWeight.bold, | ||
| 83 | + fontSize: font(32)), | ||
| 84 | + ), | ||
| 85 | + VEmptyView(60), | ||
| 86 | + Padding( | ||
| 87 | + padding: EdgeInsets.symmetric(horizontal: w(20)), | ||
| 88 | + child: MyDivider(double.infinity, w(0.5))), | ||
| 89 | + _item('商户简称', '独一处'), | ||
| 90 | + _item('交易状态', '退款中'), | ||
| 91 | + _item('时间', '2022-05-01 18:00'), | ||
| 92 | + _item('收款账户', '原路返回'), | ||
| 93 | + VEmptyView(8), | ||
| 94 | + Padding( | ||
| 95 | + padding: EdgeInsets.symmetric(horizontal: w(20)), | ||
| 96 | + child: MyDivider(double.infinity, w(0.5))), | ||
| 97 | + ], | ||
| 98 | + ), | ||
| 99 | + ) | ||
| 100 | + : Column( | ||
| 101 | + children: [ | ||
| 102 | + Expanded( | ||
| 103 | + child: SingleChildScrollView( | ||
| 104 | + child: Column( | ||
| 105 | + children: [ | ||
| 106 | + VEmptyView(80), | ||
| 107 | + Text( | ||
| 108 | + '收入金额', | ||
| 109 | + textAlign: TextAlign.center, | ||
| 110 | + style: TextStyle( | ||
| 111 | + color: MyColours.color_515151, | ||
| 112 | + fontWeight: FontWeight.bold, | ||
| 113 | + fontSize: font(14)), | ||
| 114 | + ), | ||
| 115 | + VEmptyView(40), | ||
| 116 | + Text( | ||
| 117 | + '¥290.00', | ||
| 118 | + textAlign: TextAlign.center, | ||
| 119 | + style: TextStyle( | ||
| 120 | + color: MyColours.color_515151, | ||
| 121 | + fontWeight: FontWeight.bold, | ||
| 122 | + fontSize: font(32)), | ||
| 123 | + ), | ||
| 124 | + VEmptyView(60), | ||
| 125 | + Padding( | ||
| 126 | + padding: EdgeInsets.symmetric(horizontal: w(20)), | ||
| 127 | + child: MyDivider(double.infinity, w(0.5))), | ||
| 128 | + _item('时间', '2022-05-01 18:00'), | ||
| 129 | + _item('收支类型', '收入'), | ||
| 130 | + _item('交易名称', '扫码支付'), | ||
| 131 | + _item('订单金额', '¥350.00'), | ||
| 132 | + _item('优惠券使用', '¥30.00*1\n¥30.00*1\n¥30.00*1'), | ||
| 133 | + _item('变更后余额', '3133.60'), | ||
| 134 | + _item('备注', | ||
| 135 | + '结算总金额290.00元,包含微信支付手续费。结算总金额290.00元,包含微信支付手续费。结算总金额290.00元,包含微信支付手续费。结算总金额290.00元,包含微信支付手续费。结算总金额290.00元,包含微信支付手续费。'), | ||
| 136 | + VEmptyView(8), | ||
| 137 | + Padding( | ||
| 138 | + padding: EdgeInsets.symmetric(horizontal: w(20)), | ||
| 139 | + child: MyDivider(double.infinity, w(0.5))), | ||
| 140 | + ], | ||
| 141 | + ), | ||
| 142 | + )), | ||
| 143 | + Container( | ||
| 144 | + padding: EdgeInsets.only( | ||
| 145 | + top: w(13), left: w(45), right: w(45), bottom: w(26)), | ||
| 146 | + child: RoundButton( | ||
| 147 | + text: '申请退款', | ||
| 148 | + height: w(43), | ||
| 149 | + radius: r(5), | ||
| 150 | + gradientStart: MyColours.color_438E93, | ||
| 151 | + gradientEnd: MyColours.color_438E93, | ||
| 152 | + borderColor: MyColours.color_438E93, | ||
| 153 | + textColor: MyColours.color_ffffff, | ||
| 154 | + isBold: true, | ||
| 155 | + fontSize: 32, | ||
| 156 | + onPressed: () { | ||
| 157 | + //余额不足 | ||
| 158 | + // "available_amount": 33, 可用余额和订单需退款金额比较,可用, 不可用 | ||
| 159 | + | ||
| 160 | + // DialogUtil.cupertinoAlertDialogOnly(); | ||
| 161 | + | ||
| 162 | + | ||
| 163 | + //余额充足,可申请退款 | ||
| 164 | + // DialogUtil.cupertinoAlertDialog(); | ||
| 165 | + }, | ||
| 166 | + ), | ||
| 167 | + ) | ||
| 168 | + ], | ||
| 169 | + ), | ||
| 170 | + ); | ||
| 171 | + } | ||
| 172 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/res/colors.dart'; | ||
| 3 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 4 | +import 'package:one_key/utils/utils.dart'; | ||
| 5 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 6 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 7 | + | ||
| 8 | +import '../../../utils/screen_util.dart'; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 交易记录列表 | ||
| 12 | + */ | ||
| 13 | + | ||
| 14 | +class TransactionRecordHomePage extends StatefulWidget { | ||
| 15 | + const TransactionRecordHomePage({super.key}); | ||
| 16 | + | ||
| 17 | + @override | ||
| 18 | + State<TransactionRecordHomePage> createState() => | ||
| 19 | + _TransactionRecordHomePageState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _TransactionRecordHomePageState extends State<TransactionRecordHomePage> { | ||
| 23 | + ScrollController controller = ScrollController(); | ||
| 24 | + @override | ||
| 25 | + Widget build(BuildContext context) { | ||
| 26 | + return Scaffold( | ||
| 27 | + appBar: SystemAppBar('交易记录'), | ||
| 28 | + body: Column( | ||
| 29 | + children: [ | ||
| 30 | + Expanded( | ||
| 31 | + child: ListView.builder( | ||
| 32 | + itemCount: 10, | ||
| 33 | + shrinkWrap: true, | ||
| 34 | + controller: controller, | ||
| 35 | + itemBuilder: (context, index) { | ||
| 36 | + return Container( | ||
| 37 | + child: Column( | ||
| 38 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 39 | + children: [ | ||
| 40 | + Stack(children: [ | ||
| 41 | + Container( | ||
| 42 | + width: double.infinity, | ||
| 43 | + | ||
| 44 | + // height: w(40), | ||
| 45 | + alignment: Alignment.center, | ||
| 46 | + color: MyColours.color_4DDBDBDB, | ||
| 47 | + padding: EdgeInsets.symmetric(vertical: w(10)), | ||
| 48 | + margin: EdgeInsets.only( | ||
| 49 | + top: index == 0 ? 0 : w(12)), | ||
| 50 | + child: Wrap( | ||
| 51 | + runSpacing: w(5), | ||
| 52 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 53 | + children: [ | ||
| 54 | + Text( | ||
| 55 | + '2025年2月12日', | ||
| 56 | + style: TextStyle( | ||
| 57 | + color: MyColours.color_515151, | ||
| 58 | + fontSize: font(14)), | ||
| 59 | + ), | ||
| 60 | + HEmptyView(16), | ||
| 61 | + Padding( | ||
| 62 | + padding: EdgeInsets.only( | ||
| 63 | + right: index == 0 ? w(33) : 0), | ||
| 64 | + child: Text( | ||
| 65 | + '收入580.00,支出290.00', | ||
| 66 | + maxLines: 3, | ||
| 67 | + overflow: TextOverflow.ellipsis, | ||
| 68 | + style: TextStyle( | ||
| 69 | + color: MyColours.color_999999, | ||
| 70 | + fontSize: font(12)), | ||
| 71 | + ), | ||
| 72 | + ), | ||
| 73 | + ], | ||
| 74 | + )), | ||
| 75 | + if (index == 0) | ||
| 76 | + Positioned( | ||
| 77 | + top: 0, | ||
| 78 | + right: 0, | ||
| 79 | + child: InkWell( | ||
| 80 | + onTap: () { | ||
| 81 | + //跳转筛选页面 | ||
| 82 | + NavigatorUtil | ||
| 83 | + .goTransactionRecordSearchPage( | ||
| 84 | + context); | ||
| 85 | + }, | ||
| 86 | + child: Container( | ||
| 87 | + padding: EdgeInsets.only( | ||
| 88 | + right: w(20), | ||
| 89 | + left: w(20), | ||
| 90 | + top: w(10), | ||
| 91 | + bottom: w(10)), | ||
| 92 | + child: Image.asset( | ||
| 93 | + Utils.getImgPath('calender'), | ||
| 94 | + width: w(20), | ||
| 95 | + ), | ||
| 96 | + ))) | ||
| 97 | + ]), | ||
| 98 | + ListView.builder( | ||
| 99 | + itemCount: 5, | ||
| 100 | + shrinkWrap: true, | ||
| 101 | + controller: controller, | ||
| 102 | + itemBuilder: (context, index) { | ||
| 103 | + return InkWell( | ||
| 104 | + onTap: () { | ||
| 105 | + NavigatorUtil | ||
| 106 | + .goTransactionRecordDetailPage( | ||
| 107 | + context); | ||
| 108 | + }, | ||
| 109 | + child: Container( | ||
| 110 | + height: w(37), | ||
| 111 | + decoration: BoxDecoration( | ||
| 112 | + border: Border( | ||
| 113 | + bottom: BorderSide( | ||
| 114 | + color: MyColours.color_E7E7E7, | ||
| 115 | + width: w(0.5)))), | ||
| 116 | + margin: EdgeInsets.only( | ||
| 117 | + left: w(20), | ||
| 118 | + bottom: w(10), | ||
| 119 | + right: w(20)), | ||
| 120 | + padding: EdgeInsets.only(top: w(5)), | ||
| 121 | + child: Row( | ||
| 122 | + mainAxisAlignment: | ||
| 123 | + MainAxisAlignment.spaceBetween, | ||
| 124 | + children: [ | ||
| 125 | + Text( | ||
| 126 | + '收入', | ||
| 127 | + style: TextStyle( | ||
| 128 | + color: MyColours.color_515151, | ||
| 129 | + fontWeight: FontWeight.bold, | ||
| 130 | + fontSize: font(12)), | ||
| 131 | + ), | ||
| 132 | + HEmptyView(8), | ||
| 133 | + Text( | ||
| 134 | + '扫码支付', | ||
| 135 | + style: TextStyle( | ||
| 136 | + color: MyColours.color_515151, | ||
| 137 | + fontWeight: FontWeight.bold, | ||
| 138 | + fontSize: font(12)), | ||
| 139 | + ), | ||
| 140 | + HEmptyView(70), | ||
| 141 | + Text( | ||
| 142 | + '2022-05-01 18:00', | ||
| 143 | + style: TextStyle( | ||
| 144 | + color: MyColours.color_515151, | ||
| 145 | + fontSize: font(10)), | ||
| 146 | + ), | ||
| 147 | + HEmptyView(8), | ||
| 148 | + Expanded( | ||
| 149 | + child: Text( | ||
| 150 | + '+290.00', | ||
| 151 | + textAlign: TextAlign.right, | ||
| 152 | + style: TextStyle( | ||
| 153 | + color: MyColours.color_515151, | ||
| 154 | + fontWeight: FontWeight.bold, | ||
| 155 | + fontSize: font(18)), | ||
| 156 | + )), | ||
| 157 | + ], | ||
| 158 | + ), | ||
| 159 | + )); | ||
| 160 | + }) | ||
| 161 | + ], | ||
| 162 | + ), | ||
| 163 | + ); | ||
| 164 | + })), | ||
| 165 | + Container( | ||
| 166 | + width: double.infinity, | ||
| 167 | + height: w(40), | ||
| 168 | + color: MyColours.color_4DDBDBDB, | ||
| 169 | + alignment: Alignment.center, | ||
| 170 | + child: Text( | ||
| 171 | + '仅展示近5天的交易信息,如果需要展示更多信息,请使用右上角日期筛选', | ||
| 172 | + style: | ||
| 173 | + TextStyle(color: MyColours.color_999999, fontSize: font(10)), | ||
| 174 | + ), | ||
| 175 | + ) | ||
| 176 | + ], | ||
| 177 | + ), | ||
| 178 | + ); | ||
| 179 | + } | ||
| 180 | +} |
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | +import 'package:flutter_picker_plus/picker.dart'; | ||
| 4 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 5 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 6 | + | ||
| 7 | +import '../../../res/colors.dart'; | ||
| 8 | +import '../../../utils/dialog_util.dart'; | ||
| 9 | +import '../../../utils/screen_util.dart'; | ||
| 10 | +import '../../../utils/utils.dart'; | ||
| 11 | +import '../../../widgets/h_empty_view.dart'; | ||
| 12 | +import '../../../widgets/round_button.dart'; | ||
| 13 | +import '../../../widgets/v_empty_view.dart'; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * 自定义查询 | ||
| 17 | + */ | ||
| 18 | + | ||
| 19 | +class TransactionRecordSearchPage extends StatefulWidget { | ||
| 20 | + const TransactionRecordSearchPage({super.key}); | ||
| 21 | + | ||
| 22 | + @override | ||
| 23 | + State<TransactionRecordSearchPage> createState() => | ||
| 24 | + _TransactionRecordSearchPageState(); | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class _TransactionRecordSearchPageState | ||
| 28 | + extends State<TransactionRecordSearchPage> { | ||
| 29 | + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); | ||
| 30 | + String fromDate = '选择日期'; | ||
| 31 | + String endDate = '选择日期'; | ||
| 32 | + ScrollController controller = ScrollController(); | ||
| 33 | + | ||
| 34 | + ///时间选择 | ||
| 35 | + Widget _select(String title, String hintText, GestureTapCallback onTap) { | ||
| 36 | + return InkWell( | ||
| 37 | + onTap: onTap, | ||
| 38 | + child: Container( | ||
| 39 | + padding: EdgeInsets.only(top: w(12), bottom: w(12), left: w(16)), | ||
| 40 | + child: Row( | ||
| 41 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 42 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 43 | + children: [ | ||
| 44 | + Container( | ||
| 45 | + // height: ScreenUtil().setWidth(40), | ||
| 46 | + // color: Colors.red, | ||
| 47 | + child: Text( | ||
| 48 | + title, | ||
| 49 | + style: TextStyle( | ||
| 50 | + color: MyColours.color_515151, | ||
| 51 | + fontSize: ScreenUtil().setSp(32)), | ||
| 52 | + ), | ||
| 53 | + ), | ||
| 54 | + HEmptyView(20), | ||
| 55 | + Spacer(), | ||
| 56 | + Text(hintText, | ||
| 57 | + style: TextStyle( | ||
| 58 | + color: hintText == '选择日期' | ||
| 59 | + ? MyColours.color_999999 | ||
| 60 | + : MyColours.color_515151, | ||
| 61 | + fontSize: ScreenUtil().setSp(32), | ||
| 62 | + )), | ||
| 63 | + HEmptyView(20), | ||
| 64 | + Image.asset( | ||
| 65 | + Utils.getImgPath('arrow_right_new'), | ||
| 66 | + width: ScreenUtil().setWidth(20), | ||
| 67 | + ), | ||
| 68 | + HEmptyView(32), | ||
| 69 | + ], | ||
| 70 | + ), | ||
| 71 | + ), | ||
| 72 | + ); | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @override | ||
| 76 | + Widget build(BuildContext context) { | ||
| 77 | + return Scaffold( | ||
| 78 | + appBar: SystemAppBar('自定义查询'), | ||
| 79 | + key: scaffoldKey, | ||
| 80 | + body: Column( | ||
| 81 | + children: [ | ||
| 82 | + Expanded( | ||
| 83 | + child: SingleChildScrollView( | ||
| 84 | + controller: controller, | ||
| 85 | + child: Column(children: [ | ||
| 86 | + Container( | ||
| 87 | + width: double.infinity, | ||
| 88 | + height: w(33), | ||
| 89 | + alignment: Alignment.centerLeft, | ||
| 90 | + color: MyColours.color_4DDBDBDB, | ||
| 91 | + padding: EdgeInsets.only(left: w(16)), | ||
| 92 | + child: Text( | ||
| 93 | + '查询时间跨度不超过31天', | ||
| 94 | + style: TextStyle( | ||
| 95 | + color: MyColours.color_999999, fontSize: font(12)), | ||
| 96 | + ), | ||
| 97 | + ), | ||
| 98 | + _select('开始日期', fromDate, () { | ||
| 99 | + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 100 | + //弹出时间选择器 | ||
| 101 | + // showPickerDateTime(context); | ||
| 102 | + // showDateSelWidget = true; | ||
| 103 | + DialogUtil.showPickerDateTime24( | ||
| 104 | + context, | ||
| 105 | + scaffoldKey, | ||
| 106 | + (value) { | ||
| 107 | + // {'text': picker.adapter.text, 'select': selecteds} | ||
| 108 | + if (value != null) { | ||
| 109 | + setState(() { | ||
| 110 | + print(value); | ||
| 111 | + fromDate = DateUtil.formatDateStr(value, | ||
| 112 | + format: DateFormats.y_mo_d); | ||
| 113 | + }); | ||
| 114 | + } | ||
| 115 | + // showDateSelWidget = false; | ||
| 116 | + }, | ||
| 117 | + dateTime: fromDate == '选择日期' | ||
| 118 | + ? null | ||
| 119 | + : DateUtil.getDateTime(fromDate), | ||
| 120 | + pickerDateTimeType: PickerDateTimeType.kYMD, | ||
| 121 | + onCancel: () { | ||
| 122 | + // showDateSelWidget = false; | ||
| 123 | + }); | ||
| 124 | + }), | ||
| 125 | + Container( | ||
| 126 | + height: ScreenUtil().setWidth(1), | ||
| 127 | + color: MyColours.color_E7E7E7, | ||
| 128 | + ), | ||
| 129 | + VEmptyView(24), | ||
| 130 | + _select('结束日期', endDate, () { | ||
| 131 | + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 132 | + //弹出时间选择器 | ||
| 133 | + // showPickerDateTime(context); | ||
| 134 | + // showDateSelWidget = true; | ||
| 135 | + DialogUtil.showPickerDateTime24( | ||
| 136 | + context, | ||
| 137 | + scaffoldKey, | ||
| 138 | + (value) { | ||
| 139 | + // {'text': picker.adapter.text, 'select': selecteds} | ||
| 140 | + if (value != null) { | ||
| 141 | + setState(() { | ||
| 142 | + print(value); | ||
| 143 | + endDate = DateUtil.formatDateStr(value, | ||
| 144 | + format: DateFormats.y_mo_d); | ||
| 145 | + }); | ||
| 146 | + } | ||
| 147 | + // showDateSelWidget = false; | ||
| 148 | + }, | ||
| 149 | + dateTime: endDate == '选择日期' | ||
| 150 | + ? null | ||
| 151 | + : DateUtil.getDateTime(endDate), | ||
| 152 | + pickerDateTimeType: PickerDateTimeType.kYMD, | ||
| 153 | + onCancel: () { | ||
| 154 | + // showDateSelWidget = false; | ||
| 155 | + }); | ||
| 156 | + }), | ||
| 157 | + Container( | ||
| 158 | + height: ScreenUtil().setWidth(1), | ||
| 159 | + color: MyColours.color_E7E7E7, | ||
| 160 | + ), | ||
| 161 | + // VEmptyView(48), | ||
| 162 | + //结果展示 | ||
| 163 | + Column( | ||
| 164 | + children: [ | ||
| 165 | + Container( | ||
| 166 | + width: double.infinity, | ||
| 167 | + height: w(40), | ||
| 168 | + alignment: Alignment.center, | ||
| 169 | + color: MyColours.color_4DDBDBDB, | ||
| 170 | + child: Text( | ||
| 171 | + '收入580.00,支出290.00', | ||
| 172 | + style: TextStyle( | ||
| 173 | + color: MyColours.color_999999, fontSize: font(12)), | ||
| 174 | + ), | ||
| 175 | + ), | ||
| 176 | + ListView.builder( | ||
| 177 | + itemCount: 25, | ||
| 178 | + shrinkWrap: true, | ||
| 179 | + controller: controller, | ||
| 180 | + itemBuilder: (context, index) { | ||
| 181 | + return Container( | ||
| 182 | + height: w(37), | ||
| 183 | + decoration: BoxDecoration( | ||
| 184 | + border: Border( | ||
| 185 | + bottom: BorderSide( | ||
| 186 | + color: MyColours.color_E7E7E7, | ||
| 187 | + width: w(0.5)))), | ||
| 188 | + margin: EdgeInsets.only( | ||
| 189 | + left: w(20), bottom: w(10), right: w(20)), | ||
| 190 | + padding: EdgeInsets.only(top: w(5)), | ||
| 191 | + child: Row( | ||
| 192 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 193 | + children: [ | ||
| 194 | + Text( | ||
| 195 | + '收入', | ||
| 196 | + style: TextStyle( | ||
| 197 | + color: MyColours.color_515151, | ||
| 198 | + fontWeight: FontWeight.bold, | ||
| 199 | + fontSize: font(12)), | ||
| 200 | + ), | ||
| 201 | + HEmptyView(8), | ||
| 202 | + Text( | ||
| 203 | + '扫码支付', | ||
| 204 | + style: TextStyle( | ||
| 205 | + color: MyColours.color_515151, | ||
| 206 | + fontWeight: FontWeight.bold, | ||
| 207 | + fontSize: font(12)), | ||
| 208 | + ), | ||
| 209 | + HEmptyView(70), | ||
| 210 | + Text( | ||
| 211 | + '2022-05-01 18:00', | ||
| 212 | + style: TextStyle( | ||
| 213 | + color: MyColours.color_515151, | ||
| 214 | + fontSize: font(10)), | ||
| 215 | + ), | ||
| 216 | + HEmptyView(8), | ||
| 217 | + Expanded( | ||
| 218 | + child: Text( | ||
| 219 | + '+290.00', | ||
| 220 | + textAlign: TextAlign.right, | ||
| 221 | + style: TextStyle( | ||
| 222 | + color: MyColours.color_515151, | ||
| 223 | + fontWeight: FontWeight.bold, | ||
| 224 | + fontSize: font(18)), | ||
| 225 | + )), | ||
| 226 | + ], | ||
| 227 | + ), | ||
| 228 | + ); | ||
| 229 | + }) | ||
| 230 | + ], | ||
| 231 | + ) | ||
| 232 | + ]), | ||
| 233 | + )), | ||
| 234 | + Container( | ||
| 235 | + width: double.infinity, | ||
| 236 | + padding: EdgeInsets.symmetric(vertical: w(13), horizontal: w(79)), | ||
| 237 | + child: Row( | ||
| 238 | + children: [ | ||
| 239 | + RoundButton( | ||
| 240 | + width: w(160), | ||
| 241 | + text: '数据导出', | ||
| 242 | + height: w(43), | ||
| 243 | + radius: r(5), | ||
| 244 | + gradientStart: MyColours.color_ffffff, | ||
| 245 | + gradientEnd: MyColours.color_ffffff, | ||
| 246 | + borderColor: MyColours.color_438E93, | ||
| 247 | + textColor: MyColours.color_438E93, | ||
| 248 | + isBold: true, | ||
| 249 | + fontSize: 32, | ||
| 250 | + onPressed: () { | ||
| 251 | + //导出数据 | ||
| 252 | + }, | ||
| 253 | + ), | ||
| 254 | + Expanded( | ||
| 255 | + child: RoundButton( | ||
| 256 | + text: '查询交易记录', | ||
| 257 | + height: w(43), | ||
| 258 | + radius: r(5), | ||
| 259 | + gradientStart: MyColours.color_438E93, | ||
| 260 | + gradientEnd: MyColours.color_438E93, | ||
| 261 | + borderColor: MyColours.color_438E93, | ||
| 262 | + textColor: MyColours.color_ffffff, | ||
| 263 | + isBold: true, | ||
| 264 | + fontSize: 32, | ||
| 265 | + onPressed: () { | ||
| 266 | + // 查询交易记录 | ||
| 267 | + }, | ||
| 268 | + )), | ||
| 269 | + ], | ||
| 270 | + )) | ||
| 271 | + ], | ||
| 272 | + ), | ||
| 273 | + ); | ||
| 274 | + } | ||
| 275 | +} |
| @@ -17,12 +17,11 @@ class FinanceProvider extends ChangeNotifier { | @@ -17,12 +17,11 @@ class FinanceProvider extends ChangeNotifier { | ||
| 17 | String paymentCodeUrl = ''; | 17 | String paymentCodeUrl = ''; |
| 18 | 18 | ||
| 19 | ///客户经理获取所创建活动列表 | 19 | ///客户经理获取所创建活动列表 |
| 20 | - Future createPayQrcode( | ||
| 21 | - BuildContext context, | ||
| 22 | - {isShowLoading = true}) async { | 20 | + Future createPayQrcode(BuildContext context, {isShowLoading = true}) async { |
| 23 | try { | 21 | try { |
| 24 | Map<String, String?> params = { | 22 | Map<String, String?> params = { |
| 25 | - 'sellerid':Provider.of<UserModel>(context,listen: false).user!.sellerid, | 23 | + 'sellerid': |
| 24 | + Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 26 | }; | 25 | }; |
| 27 | BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>( | 26 | BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>( |
| 28 | context, Method.post, HttpUrl.create_pay_qrcode, | 27 | context, Method.post, HttpUrl.create_pay_qrcode, |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | 2 | ||
| 3 | class MyColours { | 3 | class MyColours { |
| 4 | - | ||
| 5 | - static const Color color_FFEFC5 = Color(0xFFFFEFC5); | 4 | + static const Color color_FFEFC5 = Color(0xFFFFEFC5); |
| 6 | static const Color color_E4461D = Color(0xFFE4461D); | 5 | static const Color color_E4461D = Color(0xFFE4461D); |
| 7 | static const Color color_F8F7F3 = Color(0xFFF8F7F3); | 6 | static const Color color_F8F7F3 = Color(0xFFF8F7F3); |
| 8 | static const Color color_33438E93 = Color(0x33438E93); | 7 | static const Color color_33438E93 = Color(0x33438E93); |
| @@ -22,7 +21,7 @@ class MyColours { | @@ -22,7 +21,7 @@ class MyColours { | ||
| 22 | static const Color color_C76216 = Color(0xFFC76216); | 21 | static const Color color_C76216 = Color(0xFFC76216); |
| 23 | static const Color color_0C0F0E = Color(0xFF0C0F0E); | 22 | static const Color color_0C0F0E = Color(0xFF0C0F0E); |
| 24 | static const Color color_09BB07 = Color(0xFF09BB07); | 23 | static const Color color_09BB07 = Color(0xFF09BB07); |
| 25 | - | 24 | + |
| 26 | static const Color color_0143A3 = Color(0xFF0143A3); | 25 | static const Color color_0143A3 = Color(0xFF0143A3); |
| 27 | static const Color color_438E93 = Color(0xFF438E93); | 26 | static const Color color_438E93 = Color(0xFF438E93); |
| 28 | static const Color color_28323B = Color(0xFF28323B); | 27 | static const Color color_28323B = Color(0xFF28323B); |
| @@ -33,8 +32,8 @@ class MyColours { | @@ -33,8 +32,8 @@ class MyColours { | ||
| 33 | static const Color color_F7C797 = Color(0xffF7C797); | 32 | static const Color color_F7C797 = Color(0xffF7C797); |
| 34 | static const Color color_FEF3E6 = Color(0xffFEF3E6); | 33 | static const Color color_FEF3E6 = Color(0xffFEF3E6); |
| 35 | static const Color color_66000000 = Color(0x66000000); | 34 | static const Color color_66000000 = Color(0x66000000); |
| 36 | - static const Color color_66FFEFC5= Color(0x66FFEFC5); | ||
| 37 | - | 35 | + static const Color color_66FFEFC5 = Color(0x66FFEFC5); |
| 36 | + | ||
| 38 | static const Color color_00A870 = Color(0xff00A870); | 37 | static const Color color_00A870 = Color(0xff00A870); |
| 39 | static const Color color_F6F6F6 = Color(0xffF6F6F6); | 38 | static const Color color_F6F6F6 = Color(0xffF6F6F6); |
| 40 | static const Color color_E6000000 = Color(0xE6000000); | 39 | static const Color color_E6000000 = Color(0xE6000000); |
| @@ -80,6 +79,8 @@ class MyColours { | @@ -80,6 +79,8 @@ class MyColours { | ||
| 80 | static const Color color_199095 = Color(0xff199095); | 79 | static const Color color_199095 = Color(0xff199095); |
| 81 | static const Color color_afbcc4 = Color(0xffAFBCC4); | 80 | static const Color color_afbcc4 = Color(0xffAFBCC4); |
| 82 | static const Color color_999999 = Color(0xff999999); | 81 | static const Color color_999999 = Color(0xff999999); |
| 82 | + static const Color color_4DDBDBDB = Color(0x4DDBDBDB); | ||
| 83 | + | ||
| 83 | static const Color color_353535 = Color(0xff353535); | 84 | static const Color color_353535 = Color(0xff353535); |
| 84 | static const Color color_d8d8d8 = Color(0xffD8D8D8); | 85 | static const Color color_d8d8d8 = Color(0xffD8D8D8); |
| 85 | static const Color color_bff6f7 = Color(0xffBFF6F7); | 86 | static const Color color_bff6f7 = Color(0xffBFF6F7); |
| @@ -2364,4 +2364,34 @@ class NavigatorUtil { | @@ -2364,4 +2364,34 @@ class NavigatorUtil { | ||
| 2364 | return _navigateTo(context, "${Routes.payment_code_page}", | 2364 | return _navigateTo(context, "${Routes.payment_code_page}", |
| 2365 | replace: replace); | 2365 | replace: replace); |
| 2366 | } | 2366 | } |
| 2367 | + | ||
| 2368 | + ///交易记录 | ||
| 2369 | + static Future<dynamic> goTransactionRecordHomePage( | ||
| 2370 | + BuildContext context, { | ||
| 2371 | + replace = false, | ||
| 2372 | + }) { | ||
| 2373 | + return _navigateTo(context, "${Routes.transaction_record_home_page}", | ||
| 2374 | + replace: replace); | ||
| 2375 | + } | ||
| 2376 | + | ||
| 2377 | + | ||
| 2378 | + ///交易记录自定义查询 | ||
| 2379 | + static Future<dynamic> goTransactionRecordSearchPage( | ||
| 2380 | + BuildContext context, { | ||
| 2381 | + replace = false, | ||
| 2382 | + }) { | ||
| 2383 | + return _navigateTo(context, "${Routes.transaction_record_search_page}", | ||
| 2384 | + replace: replace); | ||
| 2385 | + } | ||
| 2386 | + | ||
| 2387 | + | ||
| 2388 | + | ||
| 2389 | + ///交易详情 | ||
| 2390 | + static Future<dynamic> goTransactionRecordDetailPage( | ||
| 2391 | + BuildContext context, { | ||
| 2392 | + replace = false, | ||
| 2393 | + }) { | ||
| 2394 | + return _navigateTo(context, "${Routes.transaction_record_detail_page}", | ||
| 2395 | + replace: replace); | ||
| 2396 | + } | ||
| 2367 | } | 2397 | } |
| @@ -223,6 +223,9 @@ import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart'; | @@ -223,6 +223,9 @@ import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart'; | ||
| 223 | import '../pages/my/feast_manage/feast_wine_manage_page.dart'; | 223 | import '../pages/my/feast_manage/feast_wine_manage_page.dart'; |
| 224 | import '../pages/my/finance_manage/finance_manage_home_page.dart'; | 224 | import '../pages/my/finance_manage/finance_manage_home_page.dart'; |
| 225 | import '../pages/my/finance_manage/payment_code_page.dart'; | 225 | import '../pages/my/finance_manage/payment_code_page.dart'; |
| 226 | +import '../pages/my/finance_manage/transaction_record_detail_page.dart'; | ||
| 227 | +import '../pages/my/finance_manage/transaction_record_home_page.dart'; | ||
| 228 | +import '../pages/my/finance_manage/transaction_record_search_page.dart'; | ||
| 226 | import '../pages/my/input_name_phone_setting_page.dart'; | 229 | import '../pages/my/input_name_phone_setting_page.dart'; |
| 227 | import '../pages/my/marketing_center/birthday_setting_page.dart'; | 230 | import '../pages/my/marketing_center/birthday_setting_page.dart'; |
| 228 | import '../pages/my/marketing_center/birthday_sms_module_setting_page.dart'; | 231 | import '../pages/my/marketing_center/birthday_sms_module_setting_page.dart'; |
| @@ -4137,3 +4140,55 @@ var paymentCodePageHandle = new Handler( | @@ -4137,3 +4140,55 @@ var paymentCodePageHandle = new Handler( | ||
| 4137 | return ChangeNotifierProvider<FinanceProvider>( | 4140 | return ChangeNotifierProvider<FinanceProvider>( |
| 4138 | create: (_) => FinanceProvider(), child: PaymentCodePage()); | 4141 | create: (_) => FinanceProvider(), child: PaymentCodePage()); |
| 4139 | }); | 4142 | }); |
| 4143 | + | ||
| 4144 | +///交易记录 | ||
| 4145 | +var transactionRecordHomePageHandle = new Handler( | ||
| 4146 | + handlerFunc: (BuildContext? context, Map<String, List<Object>> params) { | ||
| 4147 | + // String rid = params["rid"].first; | ||
| 4148 | + // bool isMine = | ||
| 4149 | + // FluroConvertUtils.string2bool(params["isMine"]!.first as String); | ||
| 4150 | + // CouponSunModel? couponSunModel; | ||
| 4151 | + // if (params.keys.contains("couponSunModel")) { | ||
| 4152 | + // couponSunModel = CouponSunModel.fromJson(json.decode( | ||
| 4153 | + // FluroConvertUtils.fluroCnParamsDecode( | ||
| 4154 | + // params["couponSunModel"]!.first as String))); | ||
| 4155 | + // } | ||
| 4156 | + | ||
| 4157 | + return ChangeNotifierProvider<FinanceProvider>( | ||
| 4158 | + create: (_) => FinanceProvider(), child: TransactionRecordHomePage()); | ||
| 4159 | +}); | ||
| 4160 | + | ||
| 4161 | +///交易记录自定义查询 | ||
| 4162 | +var transactionRecordSearchPageHandle = new Handler( | ||
| 4163 | + handlerFunc: (BuildContext? context, Map<String, List<Object>> params) { | ||
| 4164 | + // String rid = params["rid"].first; | ||
| 4165 | + // bool isMine = | ||
| 4166 | + // FluroConvertUtils.string2bool(params["isMine"]!.first as String); | ||
| 4167 | + // CouponSunModel? couponSunModel; | ||
| 4168 | + // if (params.keys.contains("couponSunModel")) { | ||
| 4169 | + // couponSunModel = CouponSunModel.fromJson(json.decode( | ||
| 4170 | + // FluroConvertUtils.fluroCnParamsDecode( | ||
| 4171 | + // params["couponSunModel"]!.first as String))); | ||
| 4172 | + // } | ||
| 4173 | + | ||
| 4174 | + return ChangeNotifierProvider<FinanceProvider>( | ||
| 4175 | + create: (_) => FinanceProvider(), child: TransactionRecordSearchPage()); | ||
| 4176 | +}); | ||
| 4177 | + | ||
| 4178 | +///订单消费详情 | ||
| 4179 | + | ||
| 4180 | +var transactionRecordDetailPageHandle = new Handler( | ||
| 4181 | + handlerFunc: (BuildContext? context, Map<String, List<Object>> params) { | ||
| 4182 | + // String rid = params["rid"].first; | ||
| 4183 | + // bool isMine = | ||
| 4184 | + // FluroConvertUtils.string2bool(params["isMine"]!.first as String); | ||
| 4185 | + // CouponSunModel? couponSunModel; | ||
| 4186 | + // if (params.keys.contains("couponSunModel")) { | ||
| 4187 | + // couponSunModel = CouponSunModel.fromJson(json.decode( | ||
| 4188 | + // FluroConvertUtils.fluroCnParamsDecode( | ||
| 4189 | + // params["couponSunModel"]!.first as String))); | ||
| 4190 | + // } | ||
| 4191 | + | ||
| 4192 | + return ChangeNotifierProvider<FinanceProvider>( | ||
| 4193 | + create: (_) => FinanceProvider(), child: TransactionRecordDetailPage()); | ||
| 4194 | +}); |
| @@ -407,6 +407,15 @@ class Routes { | @@ -407,6 +407,15 @@ class Routes { | ||
| 407 | 407 | ||
| 408 | static String payment_code_page = "/payment_code_page"; //门店收款码 | 408 | static String payment_code_page = "/payment_code_page"; //门店收款码 |
| 409 | 409 | ||
| 410 | + static String transaction_record_home_page = | ||
| 411 | + "/transaction_record_home_page"; //交易记录 | ||
| 412 | + | ||
| 413 | + static String transaction_record_search_page = | ||
| 414 | + "/transaction_record_search_page"; //自定义查询 | ||
| 415 | + static String transaction_record_detail_page = | ||
| 416 | + "/transaction_record_detail_page"; //订单消费详情 | ||
| 417 | + | ||
| 418 | + | ||
| 410 | static void configureRoutes(FluroRouter router) { | 419 | static void configureRoutes(FluroRouter router) { |
| 411 | router.notFoundHandler = new Handler( | 420 | router.notFoundHandler = new Handler( |
| 412 | handlerFunc: (BuildContext? context, Map<String, List<String>> params) { | 421 | handlerFunc: (BuildContext? context, Map<String, List<String>> params) { |
| @@ -769,5 +778,14 @@ class Routes { | @@ -769,5 +778,14 @@ class Routes { | ||
| 769 | router.define(finance_manage_home_page, | 778 | router.define(finance_manage_home_page, |
| 770 | handler: financeManageHomePageHandle); | 779 | handler: financeManageHomePageHandle); |
| 771 | router.define(payment_code_page, handler: paymentCodePageHandle); | 780 | router.define(payment_code_page, handler: paymentCodePageHandle); |
| 781 | + | ||
| 782 | + router.define(transaction_record_home_page, | ||
| 783 | + handler: transactionRecordHomePageHandle); | ||
| 784 | + router.define(transaction_record_search_page, | ||
| 785 | + handler: transactionRecordSearchPageHandle); | ||
| 786 | + router.define(transaction_record_detail_page, | ||
| 787 | + handler: transactionRecordDetailPageHandle); | ||
| 788 | + | ||
| 789 | + | ||
| 772 | } | 790 | } |
| 773 | } | 791 | } |
-
Please register or login to post a comment