Commit 97a514b1d8976aca6f157ec7eb8c3f60b81f9c3b

Authored by weixin_45529955
1 parent 9053245f

余额明细&&消费金明细UI

@@ -211,9 +211,22 @@ class _CustomerHomePageState extends State<CustomerHomePage> { @@ -211,9 +211,22 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
211 VEmptyView(24), 211 VEmptyView(24),
212 InkWell( 212 InkWell(
213 onTap: () { 213 onTap: () {
214 - // 214 + if (Utils.getAuthority(context, '全店客情')) {
  215 + if (widget.sellerNormalSpecial) {
  216 + //标准版
215 217
216 - NavigatorUtil.goCustomLabelPage(context); 218 + if (widget.sellerPreserve ||
  219 + widget.sellerMarketing) {
  220 + NavigatorUtil.goCustomLabelPage(context);
  221 + } else {
  222 + NavigatorUtil.goCustomLabelPage(context);
  223 + }
  224 + } else {
  225 + NavigatorUtil.goCustomLabelPage(context);
  226 + }
  227 + } else {
  228 + Utils.showToast('您还没有操作权限,请联系管理员');
  229 + }
217 }, 230 },
218 child: Padding( 231 child: Padding(
219 padding: EdgeInsets.only( 232 padding: EdgeInsets.only(
@@ -164,6 +164,9 @@ class _BalanceDetailsPageState extends State<BalanceDetailsPage> { @@ -164,6 +164,9 @@ class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
164 radius: r(5), 164 radius: r(5),
165 onPressed: () { 165 onPressed: () {
166 // 166 //
  167 +
  168 + DialogUtil.showDeductMoneyDialog(
  169 + context, '扣除余额', '扣除余额', (value) {});
167 }, 170 },
168 ), 171 ),
169 HEmptyView(20), 172 HEmptyView(20),
@@ -178,6 +181,8 @@ class _BalanceDetailsPageState extends State<BalanceDetailsPage> { @@ -178,6 +181,8 @@ class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
178 radius: r(5), 181 radius: r(5),
179 onPressed: () { 182 onPressed: () {
180 // 183 //
  184 +
  185 + DialogUtil.showRefundDialog(context, '余额退款', (value) {});
181 }, 186 },
182 )) 187 ))
183 ], 188 ],
  1 +import 'package:flutter/material.dart';
  2 +import 'package:one_key/res/colors.dart';
  3 +import 'package:one_key/utils/dialog_util.dart';
  4 +import 'package:one_key/utils/screen_util.dart';
  5 +import 'package:one_key/widgets/h_empty_view.dart';
  6 +import 'package:one_key/widgets/round_button.dart';
  7 +import 'package:one_key/widgets/system_app_bar.dart';
  8 +import 'package:one_key/widgets/v_empty_view.dart';
  9 +
  10 +/**
  11 + * 消费金明细页面
  12 + */
  13 +
  14 +class ConsumerDetailsPage extends StatefulWidget {
  15 + const ConsumerDetailsPage({super.key});
  16 +
  17 + @override
  18 + State<ConsumerDetailsPage> createState() => _ConsumerDetailsPageState();
  19 +}
  20 +
  21 +class _ConsumerDetailsPageState extends State<ConsumerDetailsPage> {
  22 + ScrollController controller = ScrollController();
  23 +
  24 + Widget _item() {
  25 + return Container(
  26 + padding: EdgeInsets.only(left: w(20), right: w(20), top: w(10)),
  27 + decoration: BoxDecoration(
  28 + border: Border(
  29 + bottom:
  30 + BorderSide(width: w(0.5), color: MyColours.color_CBCBCB))),
  31 + child: Column(
  32 + crossAxisAlignment: CrossAxisAlignment.start,
  33 + children: [
  34 + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
  35 + Text(
  36 + '获取/消耗',
  37 + style: TextStyle(
  38 + color: MyColours.color_000000,
  39 + fontSize: font(14),
  40 + ),
  41 + ),
  42 + Text(
  43 + '+¥300.00',
  44 + style: TextStyle(
  45 + color: MyColours.color_438E93,
  46 + fontSize: font(14),
  47 + fontWeight: FontWeight.bold),
  48 + )
  49 + ]),
  50 + VEmptyView(28),
  51 + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
  52 + Text(
  53 + '2025-08-31 15:43:23',
  54 + style: TextStyle(
  55 + color: MyColours.color_999999,
  56 + fontSize: font(14),
  57 + ),
  58 + ),
  59 + Text(
  60 + '变动后消费金 ¥220.00',
  61 + style: TextStyle(
  62 + color: MyColours.color_999999,
  63 + fontSize: font(14),
  64 + ),
  65 + )
  66 + ]),
  67 + VEmptyView(16),
  68 + Text(
  69 + '备注:顾客已付现金',
  70 + style: TextStyle(
  71 + color: MyColours.color_999999,
  72 + fontSize: font(14),
  73 + ),
  74 + ),
  75 + VEmptyView(8),
  76 + ],
  77 + ),
  78 + );
  79 + }
  80 +
  81 + @override
  82 + Widget build(BuildContext context) {
  83 + return Scaffold(
  84 + backgroundColor: MyColours.color_ffffff,
  85 + appBar: SystemAppBar('消费金明细'),
  86 + body: Column(children: [
  87 + Expanded(
  88 + child: SingleChildScrollView(
  89 + controller: controller,
  90 + child: Stack(
  91 + children: <Widget>[
  92 + ListView.builder(
  93 + padding: EdgeInsets.only(top: w(50)),
  94 + controller: controller,
  95 + shrinkWrap: true,
  96 + itemCount: 20,
  97 + itemBuilder: (BuildContext context, int index) {
  98 + return _item();
  99 + },
  100 + ),
  101 + Positioned(
  102 + top: 0, // 你可以根据需要调整位置
  103 + left: 0, // 你可以根据需要调整位置
  104 + right: 0, // 你可以根据需要调整位置
  105 + child: Container(
  106 + decoration: BoxDecoration(
  107 + border: Border(
  108 + bottom: BorderSide(
  109 + width: w(0.5),
  110 + color: MyColours.color_CBCBCB))),
  111 + margin: EdgeInsets.only(bottom: w(10)),
  112 + padding: EdgeInsets.symmetric(
  113 + horizontal: w(20),
  114 + vertical: w(10)), // 根据需要调整内边距
  115 +
  116 + child: Row(
  117 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  118 + children: [
  119 + Text(
  120 + '消费金',
  121 + style: TextStyle(
  122 + color: MyColours.color_000000,
  123 + fontSize: font(16),
  124 + fontWeight: FontWeight.bold),
  125 + ),
  126 + Text(
  127 + '¥30',
  128 + style: TextStyle(
  129 + color: MyColours.color_438E93,
  130 + fontSize: font(20),
  131 + fontWeight: FontWeight.bold),
  132 + )
  133 + ],
  134 + )),
  135 + ),
  136 + ],
  137 + ))),
  138 + Container(
  139 + padding: EdgeInsets.symmetric(horizontal: w(20), vertical: w(19)),
  140 + child: Row(
  141 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  142 + children: [
  143 + RoundButton(
  144 + text: '发放',
  145 + width: w(162),
  146 + height: w(43),
  147 + gradientStart: MyColours.color_438E93,
  148 + gradientEnd: MyColours.color_438E93,
  149 + radius: r(5),
  150 + onPressed: () {
  151 + //
  152 +
  153 + DialogUtil.showGiveMoneyDialog(context, '发放', (value) {});
  154 + },
  155 + ),
  156 + HEmptyView(20),
  157 + Expanded(
  158 + child: RoundButton(
  159 + text: '扣除',
  160 + height: w(43),
  161 + gradientStart: MyColours.color_ffffff,
  162 + gradientEnd: MyColours.color_ffffff,
  163 + borderColor: MyColours.color_438E93,
  164 + textColor: MyColours.color_438E93,
  165 + radius: r(5),
  166 + onPressed: () {
  167 + //
  168 +
  169 + DialogUtil.showDeductMoneyDialog(
  170 + context, '扣除消费金', '扣除金额', (value) {});
  171 + },
  172 + ))
  173 + ],
  174 + ),
  175 + )
  176 + ]));
  177 + }
  178 +}
@@ -356,12 +356,12 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -356,12 +356,12 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
356 ) 356 )
357 ], 357 ],
358 ), 358 ),
359 - // VEmptyView(20),  
360 - // Wrap(  
361 - // runSpacing: w(10),  
362 - // spacing: w(10),  
363 - // children: labelsWidgetNew(),  
364 - // ), 359 + VEmptyView(20),
  360 + Wrap(
  361 + runSpacing: w(10),
  362 + spacing: w(10),
  363 + children: labelsWidgetNew(),
  364 + ),
365 VEmptyView(20), 365 VEmptyView(20),
366 Wrap( 366 Wrap(
367 runSpacing: w(10), 367 runSpacing: w(10),
@@ -587,25 +587,25 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -587,25 +587,25 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
587 right: w(20), 587 right: w(20),
588 child: Column( 588 child: Column(
589 children: [ 589 children: [
590 - // RoundButton(  
591 - // text: '消费记录',  
592 - // gradientStart: MyColours.color_438E93,  
593 - // gradientEnd: MyColours.color_438E93,  
594 - // textColor: MyColours.color_ffffff,  
595 - // borderColor: MyColours.color_438E93,  
596 - // width: w(72),  
597 - // radius: r(11),  
598 - // fontSize: 24,  
599 - // isBold: true,  
600 - // height: w(22),  
601 - // onPressed: () {  
602 - // // NavigatorUtil.goCustomerDetailEditPage(  
603 - // // context,  
604 - // // customerProvider.guestInfoSunModel!.guest,  
605 - // // widget.fromPage);  
606 - // },  
607 - // ),  
608 - // VEmptyView(20), 590 + RoundButton(
  591 + text: '消费记录',
  592 + gradientStart: MyColours.color_438E93,
  593 + gradientEnd: MyColours.color_438E93,
  594 + textColor: MyColours.color_ffffff,
  595 + borderColor: MyColours.color_438E93,
  596 + width: w(72),
  597 + radius: r(11),
  598 + fontSize: 24,
  599 + isBold: true,
  600 + height: w(22),
  601 + onPressed: () {
  602 + // NavigatorUtil.goCustomerDetailEditPage(
  603 + // context,
  604 + // customerProvider.guestInfoSunModel!.guest,
  605 + // widget.fromPage);
  606 + },
  607 + ),
  608 + VEmptyView(20),
609 RoundButton( 609 RoundButton(
610 text: '编辑', 610 text: '编辑',
611 gradientStart: MyColours.color_ffffff, 611 gradientStart: MyColours.color_ffffff,
@@ -727,21 +727,26 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -727,21 +727,26 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
727 color: MyColours.color_ffffff, 727 color: MyColours.color_ffffff,
728 fontSize: ScreenUtil().setSp(20)))))); 728 fontSize: ScreenUtil().setSp(20))))));
729 729
730 - data.add(Container(  
731 - padding: EdgeInsets.symmetric(  
732 - horizontal: ScreenUtil().setWidth(10),  
733 - vertical: ScreenUtil().setWidth(4),  
734 - ),  
735 - decoration: BoxDecoration(  
736 - color: MyColours.color_438E93,  
737 - borderRadius: BorderRadius.circular(  
738 - ScreenUtil().setWidth(10),  
739 - ),  
740 - ),  
741 - child: Text('消费金¥3000',  
742 - style: TextStyle(  
743 - color: MyColours.color_ffffff,  
744 - fontSize: ScreenUtil().setSp(20))))); 730 + data.add(InkWell(
  731 + onTap: () {
  732 + //
  733 + NavigatorUtil.goConsumerDetailsPage(context);
  734 + },
  735 + child: Container(
  736 + padding: EdgeInsets.symmetric(
  737 + horizontal: ScreenUtil().setWidth(10),
  738 + vertical: ScreenUtil().setWidth(4),
  739 + ),
  740 + decoration: BoxDecoration(
  741 + color: MyColours.color_438E93,
  742 + borderRadius: BorderRadius.circular(
  743 + ScreenUtil().setWidth(10),
  744 + ),
  745 + ),
  746 + child: Text('消费金¥3000',
  747 + style: TextStyle(
  748 + color: MyColours.color_ffffff,
  749 + fontSize: ScreenUtil().setSp(20))))));
745 750
746 data.add(Container( 751 data.add(Container(
747 padding: EdgeInsets.symmetric( 752 padding: EdgeInsets.symmetric(
@@ -2636,4 +2636,19 @@ class NavigatorUtil { @@ -2636,4 +2636,19 @@ class NavigatorUtil {
2636 return _navigateTo(context, "${Routes.balance_details_page}", 2636 return _navigateTo(context, "${Routes.balance_details_page}",
2637 replace: replace); 2637 replace: replace);
2638 } 2638 }
  2639 +
  2640 +
  2641 +
  2642 +
  2643 +
  2644 +
  2645 + //消费金明细页面
  2646 + static Future<dynamic> goConsumerDetailsPage(
  2647 + BuildContext context, {
  2648 + replace = false,
  2649 + }) {
  2650 + return _navigateTo(context, "${Routes.consumer_details_page}",
  2651 + replace: replace);
  2652 + }
  2653 +
2639 } 2654 }
@@ -83,6 +83,7 @@ import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_ @@ -83,6 +83,7 @@ import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_
83 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_page.dart'; 83 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_page.dart';
84 import 'package:one_key/pages/my/customer_type/my_customer/my_show_customer_list_page.dart'; 84 import 'package:one_key/pages/my/customer_type/my_customer/my_show_customer_list_page.dart';
85 import 'package:one_key/pages/my/customer_type/store_customer/balance_details_page.dart'; 85 import 'package:one_key/pages/my/customer_type/store_customer/balance_details_page.dart';
  86 +import 'package:one_key/pages/my/customer_type/store_customer/consumer_details_page.dart';
86 import 'package:one_key/pages/my/customer_type/store_customer/set_birthday_page.dart'; 87 import 'package:one_key/pages/my/customer_type/store_customer/set_birthday_page.dart';
87 import 'package:one_key/pages/my/customer_type/store_customer/show_customer_list_page.dart'; 88 import 'package:one_key/pages/my/customer_type/store_customer/show_customer_list_page.dart';
88 89
@@ -4533,6 +4534,12 @@ var balanceDetailsPageHandle = new Handler( @@ -4533,6 +4534,12 @@ var balanceDetailsPageHandle = new Handler(
4533 create: (_) => CustomerProvider(), child: BalanceDetailsPage()); 4534 create: (_) => CustomerProvider(), child: BalanceDetailsPage());
4534 }); 4535 });
4535 4536
  4537 +var consumerDetailsPageHandle = new Handler(
  4538 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  4539 + return ChangeNotifierProvider<CustomerProvider>(
  4540 + create: (_) => CustomerProvider(), child: ConsumerDetailsPage());
  4541 +});
  4542 +
4536 var customLabelPageHandle = new Handler( 4543 var customLabelPageHandle = new Handler(
4537 handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) { 4544 handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
4538 return ChangeNotifierProvider<CustomerProvider>( 4545 return ChangeNotifierProvider<CustomerProvider>(
@@ -471,6 +471,14 @@ class Routes { @@ -471,6 +471,14 @@ class Routes {
471 471
472 static String balance_details_page = "/balance_details_page"; // 余额明细页面 472 static String balance_details_page = "/balance_details_page"; // 余额明细页面
473 473
  474 +
  475 +
  476 + static String consumer_details_page = "/consumer_details_page"; // 消费金明细页面
  477 +
  478 +
  479 +
  480 +
  481 +
474 static void configureRoutes(FluroRouter router) { 482 static void configureRoutes(FluroRouter router) {
475 router.notFoundHandler = new Handler( 483 router.notFoundHandler = new Handler(
476 handlerFunc: (BuildContext? context, Map<String, List<String>> params) { 484 handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
@@ -899,6 +907,12 @@ class Routes { @@ -899,6 +907,12 @@ class Routes {
899 router.define(balance_details_page, 907 router.define(balance_details_page,
900 handler: balanceDetailsPageHandle); 908 handler: balanceDetailsPageHandle);
901 909
  910 +
  911 +
  912 + router.define(consumer_details_page,
  913 + handler: consumerDetailsPageHandle);
  914 +
  915 +
902 916
903 } 917 }
904 } 918 }
1 import 'dart:async'; 1 import 'dart:async';
2 2
3 -  
4 import 'dart:ui'; 3 import 'dart:ui';
5 4
6 import 'package:cached_network_image/cached_network_image.dart'; 5 import 'package:cached_network_image/cached_network_image.dart';
@@ -14,7 +13,6 @@ import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart @@ -14,7 +13,6 @@ import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart
14 import 'package:flutter_picker_plus/flutter_picker_plus.dart'; 13 import 'package:flutter_picker_plus/flutter_picker_plus.dart';
15 import 'package:flutter_screenutil/flutter_screenutil.dart'; 14 import 'package:flutter_screenutil/flutter_screenutil.dart';
16 15
17 -  
18 import 'package:one_key/models/filter_btn_model.dart'; 16 import 'package:one_key/models/filter_btn_model.dart';
19 import 'package:one_key/models/remark.dart'; 17 import 'package:one_key/models/remark.dart';
20 import 'package:one_key/models/seller_role_model.dart'; 18 import 'package:one_key/models/seller_role_model.dart';
@@ -1641,83 +1639,288 @@ class DialogUtil { @@ -1641,83 +1639,288 @@ class DialogUtil {
1641 TextEditingController controller, FocusNode node) { 1639 TextEditingController controller, FocusNode node) {
1642 return Container( 1640 return Container(
1643 // height: ScreenUtil().setWidth(380), 1641 // height: ScreenUtil().setWidth(380),
1644 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),  
1645 - child: Column(  
1646 - crossAxisAlignment: CrossAxisAlignment.start,  
1647 - children: [  
1648 - Align(  
1649 - alignment: Alignment.centerLeft,  
1650 - child: Text(  
1651 - title,  
1652 - textAlign: TextAlign.left,  
1653 - style: TextStyle(  
1654 - color: MyColours.color_515151,  
1655 - fontSize: ScreenUtil().setSp(32)),  
1656 - )),  
1657 - VEmptyView(26),  
1658 - Container(  
1659 - height: ScreenUtil().setWidth(2),  
1660 - color: MyColours.color_E7E7E7, 1642 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  1643 + margin: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),
  1644 + decoration: BoxDecoration(
  1645 + borderRadius: BorderRadius.circular(r(5)),
  1646 + border: Border.all(width: w(0.5), color: MyColours.color_CBCBCB)),
  1647 + child: TextField(
  1648 + controller: controller,
  1649 + focusNode: node,
  1650 + // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
  1651 + maxLines: 3,
  1652 + maxLength: 100,
  1653 +
  1654 + // maxLengthEnforced: true,
  1655 + style: TextStyle(
  1656 + fontSize: ScreenUtil().setSp(24),
  1657 + color: MyColours.color_333333), //输入文本的样式
  1658 + decoration: InputDecoration(
  1659 + contentPadding:
  1660 + EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),
  1661 + hintText: hintText,
  1662 + hintStyle: TextStyle(
  1663 + color: MyColours.color_999999,
  1664 + fontSize: ScreenUtil().setSp(24),
1661 ), 1665 ),
1662 - TextField(  
1663 - controller: controller,  
1664 - focusNode: node,  
1665 - // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘  
1666 - maxLines: 3,  
1667 - maxLength: 150,  
1668 -  
1669 - // maxLengthEnforced: true,  
1670 - style: TextStyle(  
1671 - fontSize: ScreenUtil().setSp(32),  
1672 - color: MyColours.color_333333), //输入文本的样式  
1673 - decoration: InputDecoration(  
1674 - contentPadding:  
1675 - EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),  
1676 - hintText: hintText,  
1677 - hintStyle: TextStyle(  
1678 - color: MyColours.color_999999,  
1679 - fontSize: ScreenUtil().setSp(32),  
1680 - ),  
1681 -  
1682 - border: OutlineInputBorder(borderSide: BorderSide.none),  
1683 1666
1684 - enabledBorder: new UnderlineInputBorder(  
1685 - borderSide: BorderSide.none,  
1686 - ),  
1687 - focusedBorder: new UnderlineInputBorder(  
1688 - borderSide: BorderSide.none,  
1689 - ), 1667 + border: OutlineInputBorder(borderSide: BorderSide.none),
1690 1668
1691 - // fillColor: MyColours.color_F9F9F9,  
1692 - // // fillColor: Colors.red,  
1693 - // filled: true,  
1694 - // enabledBorder: OutlineInputBorder(  
1695 - // //未选中时候的颜色  
1696 - // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),  
1697 - // borderSide: BorderSide(  
1698 - // color: MyColours.color_cccccc,  
1699 - // width: ScreenUtil().setWidth(2)),  
1700 - // ),  
1701 - // focusedBorder: OutlineInputBorder(  
1702 - // //选中时外边框颜色  
1703 - // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),  
1704 - // borderSide: BorderSide(  
1705 - // color: MyColours.app_main,  
1706 - // ),  
1707 - // ),  
1708 - // border: OutlineInputBorder(  
1709 - // borderRadius:  
1710 - // BorderRadius.circular(ScreenUtil().setWidth(20)),  
1711 - // borderSide: BorderSide(  
1712 - // color: Colors.red, width: ScreenUtil().setWidth(2))),  
1713 - ),  
1714 - onChanged: (value) {}, 1669 + enabledBorder: new UnderlineInputBorder(
  1670 + borderSide: BorderSide.none,
1715 ), 1671 ),
1716 - ], 1672 + focusedBorder: new UnderlineInputBorder(
  1673 + borderSide: BorderSide.none,
  1674 + ),
  1675 +
  1676 + // fillColor: MyColours.color_F9F9F9,
  1677 + // // fillColor: Colors.red,
  1678 + // filled: true,
  1679 + // enabledBorder: OutlineInputBorder(
  1680 + // //未选中时候的颜色
  1681 + // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
  1682 + // borderSide: BorderSide(
  1683 + // color: MyColours.color_cccccc,
  1684 + // width: ScreenUtil().setWidth(2)),
  1685 + // ),
  1686 + // focusedBorder: OutlineInputBorder(
  1687 + // //选中时外边框颜色
  1688 + // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
  1689 + // borderSide: BorderSide(
  1690 + // color: MyColours.app_main,
  1691 + // ),
  1692 + // ),
  1693 + // border: OutlineInputBorder(
  1694 + // borderRadius:
  1695 + // BorderRadius.circular(ScreenUtil().setWidth(20)),
  1696 + // borderSide: BorderSide(
  1697 + // color: Colors.red, width: ScreenUtil().setWidth(2))),
  1698 + ),
  1699 + onChanged: (value) {},
1717 ), 1700 ),
1718 ); 1701 );
1719 } 1702 }
1720 1703
  1704 + //余额充值确认弹框
  1705 + static showRechargeConfirmDialog(BuildContext context, String title,
  1706 + {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
  1707 + return showDialog(
  1708 + context: context,
  1709 + barrierDismissible: true,
  1710 + builder: (BuildContext context) {
  1711 + return Center(child: StatefulBuilder(builder: (context, state) {
  1712 + // locationState = state;
  1713 + return Material(
  1714 + color: Colors.transparent,
  1715 + child: Container(
  1716 + width: double.infinity,
  1717 + margin: EdgeInsets.symmetric(horizontal: w(37)),
  1718 + decoration: BoxDecoration(
  1719 + color: MyColours.color_ffffff,
  1720 + borderRadius: BorderRadius.circular(
  1721 + r(8),
  1722 + )),
  1723 + child: Column(
  1724 + mainAxisSize: MainAxisSize.min,
  1725 + crossAxisAlignment: CrossAxisAlignment.start,
  1726 + children: <Widget>[
  1727 + Padding(
  1728 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  1729 + child: Column(
  1730 + crossAxisAlignment: CrossAxisAlignment.center,
  1731 + children: [
  1732 + VEmptyView(40),
  1733 + Image.asset(
  1734 + Utils.getImgPath('warn'),
  1735 + width: w(30),
  1736 + height: w(30),
  1737 + ),
  1738 + VEmptyView(28),
  1739 + Container(
  1740 + alignment: Alignment.center,
  1741 + child: Text('提示',
  1742 + style: TextStyle(
  1743 + fontWeight: FontWeight.bold,
  1744 + color: MyColours.color_515151,
  1745 + fontSize: font(16)))),
  1746 + VEmptyView(28),
  1747 + Container(
  1748 + alignment: Alignment.center,
  1749 + child: Text('为客户赵先生 ${title}1000元',
  1750 + style: TextStyle(
  1751 + fontWeight: FontWeight.bold,
  1752 + color: MyColours.color_515151,
  1753 + fontSize: font(16)))),
  1754 + VEmptyView(30),
  1755 + ])),
  1756 + MyDivider(double.infinity, w(1),
  1757 + color: MyColours.color_DBDBDB),
  1758 + Row(
  1759 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1760 + children: [
  1761 + Expanded(
  1762 + flex: 1,
  1763 + child: RoundButton(
  1764 + text: '取消',
  1765 + // width: (ScreenUtil().screenWidth -
  1766 + // ScreenUtil().setWidth(62) * 2) /
  1767 + // 2,
  1768 + height: ScreenUtil().setWidth(112),
  1769 + // radius: ScreenUtil().setWidth(10),
  1770 + gradientStart: Colors.transparent,
  1771 + gradientEnd: Colors.transparent,
  1772 + textColor: MyColours.color_515151,
  1773 + isBold: false,
  1774 + fontSize: 32,
  1775 + onPressed: () {
  1776 + Navigator.pop(context);
  1777 + })),
  1778 + MyDivider(ScreenUtil().setWidth(2),
  1779 + ScreenUtil().setWidth(112),
  1780 + color: MyColours.color_DBDBDB),
  1781 + Expanded(
  1782 + flex: 1,
  1783 + child: RoundButton(
  1784 + text: '确定',
  1785 + // width: (ScreenUtil().screenWidth -
  1786 + // ScreenUtil().setWidth(62) * 2) /
  1787 + // 2,
  1788 + height: ScreenUtil().setWidth(112),
  1789 + // radius: ScreenUtil().setWidth(10),
  1790 + gradientStart: Colors.transparent,
  1791 + gradientEnd: Colors.transparent,
  1792 + textColor: MyColours.color_438E93,
  1793 + isBold: true,
  1794 + fontSize: 32,
  1795 + onPressed: () {
  1796 + if (Navigator.canPop(context)) {
  1797 + Navigator.pop(context);
  1798 + }
  1799 + })),
  1800 + ],
  1801 + ),
  1802 + ])));
  1803 + }));
  1804 + });
  1805 + }
  1806 +
  1807 + //余额退款确认弹框
  1808 + static showRefundConfirmDialog(BuildContext context, String title,
  1809 + {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
  1810 + return showDialog(
  1811 + context: context,
  1812 + barrierDismissible: true,
  1813 + builder: (BuildContext context) {
  1814 + return Center(child: StatefulBuilder(builder: (context, state) {
  1815 + // locationState = state;
  1816 + return Material(
  1817 + color: Colors.transparent,
  1818 + child: Container(
  1819 + width: double.infinity,
  1820 + margin: EdgeInsets.symmetric(horizontal: w(37)),
  1821 + decoration: BoxDecoration(
  1822 + color: MyColours.color_ffffff,
  1823 + borderRadius: BorderRadius.circular(
  1824 + r(8),
  1825 + )),
  1826 + child: Column(
  1827 + mainAxisSize: MainAxisSize.min,
  1828 + crossAxisAlignment: CrossAxisAlignment.start,
  1829 + children: <Widget>[
  1830 + Padding(
  1831 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  1832 + child: Column(
  1833 + crossAxisAlignment: CrossAxisAlignment.center,
  1834 + children: [
  1835 + VEmptyView(40),
  1836 + Image.asset(
  1837 + Utils.getImgPath('warn'),
  1838 + width: w(30),
  1839 + height: w(30),
  1840 + ),
  1841 + VEmptyView(28),
  1842 + Container(
  1843 + alignment: Alignment.center,
  1844 + child: Text('提示',
  1845 + style: TextStyle(
  1846 + fontWeight: FontWeight.bold,
  1847 + color: MyColours.color_515151,
  1848 + fontSize: font(16)))),
  1849 + VEmptyView(28),
  1850 + Container(
  1851 + alignment: Alignment.center,
  1852 + child: Text('为客户赵先生办理余额退款,退款后余额将清零',
  1853 + style: TextStyle(
  1854 + color: MyColours.color_515151,
  1855 + fontSize: font(12)))),
  1856 + VEmptyView(12),
  1857 + Container(
  1858 + alignment: Alignment.center,
  1859 + child: Text('退款金额900元',
  1860 + style: TextStyle(
  1861 + color: MyColours.color_515151,
  1862 + fontWeight: FontWeight.bold,
  1863 + fontSize: font(16)))),
  1864 + VEmptyView(12),
  1865 + Container(
  1866 + alignment: Alignment.center,
  1867 + child: Text('(钱款交易请在线下完成)',
  1868 + style: TextStyle(
  1869 + color: MyColours.color_515151,
  1870 + fontSize: font(12)))),
  1871 + VEmptyView(30),
  1872 + ])),
  1873 + MyDivider(double.infinity, w(1),
  1874 + color: MyColours.color_DBDBDB),
  1875 + Row(
  1876 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1877 + children: [
  1878 + Expanded(
  1879 + flex: 1,
  1880 + child: RoundButton(
  1881 + text: '取消',
  1882 + // width: (ScreenUtil().screenWidth -
  1883 + // ScreenUtil().setWidth(62) * 2) /
  1884 + // 2,
  1885 + height: ScreenUtil().setWidth(112),
  1886 + // radius: ScreenUtil().setWidth(10),
  1887 + gradientStart: Colors.transparent,
  1888 + gradientEnd: Colors.transparent,
  1889 + textColor: MyColours.color_515151,
  1890 + isBold: false,
  1891 + fontSize: 32,
  1892 + onPressed: () {
  1893 + Navigator.pop(context);
  1894 + })),
  1895 + MyDivider(ScreenUtil().setWidth(2),
  1896 + ScreenUtil().setWidth(112),
  1897 + color: MyColours.color_DBDBDB),
  1898 + Expanded(
  1899 + flex: 1,
  1900 + child: RoundButton(
  1901 + text: '确定',
  1902 + // width: (ScreenUtil().screenWidth -
  1903 + // ScreenUtil().setWidth(62) * 2) /
  1904 + // 2,
  1905 + height: ScreenUtil().setWidth(112),
  1906 + // radius: ScreenUtil().setWidth(10),
  1907 + gradientStart: Colors.transparent,
  1908 + gradientEnd: Colors.transparent,
  1909 + textColor: MyColours.color_438E93,
  1910 + isBold: true,
  1911 + fontSize: 32,
  1912 + onPressed: () {
  1913 + if (Navigator.canPop(context)) {
  1914 + Navigator.pop(context);
  1915 + }
  1916 + })),
  1917 + ],
  1918 + ),
  1919 + ])));
  1920 + }));
  1921 + });
  1922 + }
  1923 +
1721 //余额充值弹框 1924 //余额充值弹框
1722 static showRechargeDialog( 1925 static showRechargeDialog(
1723 BuildContext context, String title, CustomCallBack callback, 1926 BuildContext context, String title, CustomCallBack callback,
@@ -1813,37 +2016,342 @@ class DialogUtil { @@ -1813,37 +2016,342 @@ class DialogUtil {
1813 rechargeItem(context, '赠送积分', '分'), 2016 rechargeItem(context, '赠送积分', '分'),
1814 rechargeWidget('备注', '请输入备注', 2017 rechargeWidget('备注', '请输入备注',
1815 TextEditingController(), FocusNode()), 2018 TextEditingController(), FocusNode()),
1816 - MyDivider(double.infinity, w(1),  
1817 - color: MyColours.color_DBDBDB),  
1818 - Row(  
1819 - // mainAxisAlignment: MainAxisAlignment.spaceBetween,  
1820 - children: [  
1821 - Expanded(  
1822 - flex: 1,  
1823 - child: RoundButton(  
1824 - text: '确定',  
1825 - // width: (ScreenUtil().screenWidth -  
1826 - // ScreenUtil().setWidth(62) * 2) /  
1827 - // 2,  
1828 - height:  
1829 - ScreenUtil().setWidth(112),  
1830 - // radius: ScreenUtil().setWidth(10),  
1831 - gradientStart:  
1832 - Colors.transparent,  
1833 - gradientEnd: Colors.transparent,  
1834 - textColor:  
1835 - MyColours.color_515151,  
1836 - isBold: false,  
1837 - fontSize: 32,  
1838 - onPressed: () {  
1839 - if (Navigator.canPop(  
1840 - context)) {  
1841 - Navigator.pop(context);  
1842 - }  
1843 - })),  
1844 - ],  
1845 - ),  
1846 - ])) 2019 + ])),
  2020 + MyDivider(double.infinity, w(1),
  2021 + color: MyColours.color_DBDBDB),
  2022 + Row(
  2023 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  2024 + children: [
  2025 + Expanded(
  2026 + flex: 1,
  2027 + child: RoundButton(
  2028 + text: '取消',
  2029 + // width: (ScreenUtil().screenWidth -
  2030 + // ScreenUtil().setWidth(62) * 2) /
  2031 + // 2,
  2032 + height: ScreenUtil().setWidth(112),
  2033 + // radius: ScreenUtil().setWidth(10),
  2034 + gradientStart: Colors.transparent,
  2035 + gradientEnd: Colors.transparent,
  2036 + textColor: MyColours.color_515151,
  2037 + isBold: false,
  2038 + fontSize: 32,
  2039 + onPressed: () {
  2040 + Navigator.pop(context);
  2041 + })),
  2042 + MyDivider(ScreenUtil().setWidth(2),
  2043 + ScreenUtil().setWidth(112),
  2044 + color: MyColours.color_DBDBDB),
  2045 + Expanded(
  2046 + flex: 1,
  2047 + child: RoundButton(
  2048 + text: '确定',
  2049 + // width: (ScreenUtil().screenWidth -
  2050 + // ScreenUtil().setWidth(62) * 2) /
  2051 + // 2,
  2052 + height: ScreenUtil().setWidth(112),
  2053 + // radius: ScreenUtil().setWidth(10),
  2054 + gradientStart: Colors.transparent,
  2055 + gradientEnd: Colors.transparent,
  2056 + textColor: MyColours.color_438E93,
  2057 + isBold: true,
  2058 + fontSize: 32,
  2059 + onPressed: () {
  2060 + if (Navigator.canPop(context)) {
  2061 + Navigator.pop(context);
  2062 + }
  2063 + showRechargeConfirmDialog(
  2064 + context, '充值金额');
  2065 + })),
  2066 + ],
  2067 + ),
  2068 + ])));
  2069 + }));
  2070 + });
  2071 + }
  2072 +
  2073 + //扣除余额弹框
  2074 + static showDeductMoneyDialog(BuildContext context, String title,
  2075 + String subTitle, CustomCallBack callback,
  2076 + {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
  2077 + return showDialog(
  2078 + context: context,
  2079 + barrierDismissible: true,
  2080 + builder: (BuildContext context) {
  2081 + return Center(child: StatefulBuilder(builder: (context, state) {
  2082 + // locationState = state;
  2083 + return Material(
  2084 + color: Colors.transparent,
  2085 + child: Container(
  2086 + width: double.infinity,
  2087 + margin: EdgeInsets.symmetric(horizontal: w(37)),
  2088 + decoration: BoxDecoration(
  2089 + color: MyColours.color_ffffff,
  2090 + borderRadius: BorderRadius.circular(
  2091 + r(8),
  2092 + )),
  2093 + child: Column(
  2094 + mainAxisSize: MainAxisSize.min,
  2095 + crossAxisAlignment: CrossAxisAlignment.start,
  2096 + children: <Widget>[
  2097 + Padding(
  2098 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  2099 + child: Column(
  2100 + crossAxisAlignment: CrossAxisAlignment.start,
  2101 + children: [
  2102 + VEmptyView(40),
  2103 + Container(
  2104 + alignment: Alignment.center,
  2105 + child: Text(title,
  2106 + style: TextStyle(
  2107 + fontWeight: FontWeight.bold,
  2108 + color: MyColours.color_515151,
  2109 + fontSize: font(16)))),
  2110 + VEmptyView(30),
  2111 + rechargeItem(context, subTitle, '元'),
  2112 + // VEmptyView(30),
  2113 + rechargeWidget('备注', '请输入备注',
  2114 + TextEditingController(), FocusNode()),
  2115 + ])),
  2116 + MyDivider(double.infinity, w(1),
  2117 + color: MyColours.color_DBDBDB),
  2118 + Row(
  2119 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  2120 + children: [
  2121 + Expanded(
  2122 + flex: 1,
  2123 + child: RoundButton(
  2124 + text: '取消',
  2125 + // width: (ScreenUtil().screenWidth -
  2126 + // ScreenUtil().setWidth(62) * 2) /
  2127 + // 2,
  2128 + height: ScreenUtil().setWidth(112),
  2129 + // radius: ScreenUtil().setWidth(10),
  2130 + gradientStart: Colors.transparent,
  2131 + gradientEnd: Colors.transparent,
  2132 + textColor: MyColours.color_515151,
  2133 + isBold: false,
  2134 + fontSize: 32,
  2135 + onPressed: () {
  2136 + Navigator.pop(context);
  2137 + })),
  2138 + MyDivider(ScreenUtil().setWidth(2),
  2139 + ScreenUtil().setWidth(112),
  2140 + color: MyColours.color_DBDBDB),
  2141 + Expanded(
  2142 + flex: 1,
  2143 + child: RoundButton(
  2144 + text: '确定',
  2145 + // width: (ScreenUtil().screenWidth -
  2146 + // ScreenUtil().setWidth(62) * 2) /
  2147 + // 2,
  2148 + height: ScreenUtil().setWidth(112),
  2149 + // radius: ScreenUtil().setWidth(10),
  2150 + gradientStart: Colors.transparent,
  2151 + gradientEnd: Colors.transparent,
  2152 + textColor: MyColours.color_438E93,
  2153 + isBold: true,
  2154 + fontSize: 32,
  2155 + onPressed: () {
  2156 + if (Navigator.canPop(context)) {
  2157 + Navigator.pop(context);
  2158 + }
  2159 + showRechargeConfirmDialog(
  2160 + context, '扣除消费金');
  2161 + })),
  2162 + ],
  2163 + ),
  2164 + ])));
  2165 + }));
  2166 + });
  2167 + }
  2168 +
  2169 + //发放消费金弹框
  2170 + static showGiveMoneyDialog(
  2171 + BuildContext context, String title, CustomCallBack callback,
  2172 + {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
  2173 + return showDialog(
  2174 + context: context,
  2175 + barrierDismissible: true,
  2176 + builder: (BuildContext context) {
  2177 + return Center(child: StatefulBuilder(builder: (context, state) {
  2178 + // locationState = state;
  2179 + return Material(
  2180 + color: Colors.transparent,
  2181 + child: Container(
  2182 + width: double.infinity,
  2183 + margin: EdgeInsets.symmetric(horizontal: w(37)),
  2184 + decoration: BoxDecoration(
  2185 + color: MyColours.color_ffffff,
  2186 + borderRadius: BorderRadius.circular(
  2187 + r(8),
  2188 + )),
  2189 + child: Column(
  2190 + mainAxisSize: MainAxisSize.min,
  2191 + crossAxisAlignment: CrossAxisAlignment.start,
  2192 + children: <Widget>[
  2193 + Padding(
  2194 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  2195 + child: Column(
  2196 + crossAxisAlignment: CrossAxisAlignment.start,
  2197 + children: [
  2198 + VEmptyView(40),
  2199 + Container(
  2200 + alignment: Alignment.center,
  2201 + child: Text('发放消费金',
  2202 + style: TextStyle(
  2203 + fontWeight: FontWeight.bold,
  2204 + color: MyColours.color_515151,
  2205 + fontSize: font(16)))),
  2206 + VEmptyView(30),
  2207 + rechargeItem(context, '发放金额', '元'),
  2208 + // VEmptyView(30),
  2209 + rechargeWidget('备注', '请输入备注',
  2210 + TextEditingController(), FocusNode()),
  2211 + ])),
  2212 + MyDivider(double.infinity, w(1),
  2213 + color: MyColours.color_DBDBDB),
  2214 + Row(
  2215 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  2216 + children: [
  2217 + Expanded(
  2218 + flex: 1,
  2219 + child: RoundButton(
  2220 + text: '取消',
  2221 + // width: (ScreenUtil().screenWidth -
  2222 + // ScreenUtil().setWidth(62) * 2) /
  2223 + // 2,
  2224 + height: ScreenUtil().setWidth(112),
  2225 + // radius: ScreenUtil().setWidth(10),
  2226 + gradientStart: Colors.transparent,
  2227 + gradientEnd: Colors.transparent,
  2228 + textColor: MyColours.color_515151,
  2229 + isBold: false,
  2230 + fontSize: 32,
  2231 + onPressed: () {
  2232 + Navigator.pop(context);
  2233 + })),
  2234 + MyDivider(ScreenUtil().setWidth(2),
  2235 + ScreenUtil().setWidth(112),
  2236 + color: MyColours.color_DBDBDB),
  2237 + Expanded(
  2238 + flex: 1,
  2239 + child: RoundButton(
  2240 + text: '确定',
  2241 + // width: (ScreenUtil().screenWidth -
  2242 + // ScreenUtil().setWidth(62) * 2) /
  2243 + // 2,
  2244 + height: ScreenUtil().setWidth(112),
  2245 + // radius: ScreenUtil().setWidth(10),
  2246 + gradientStart: Colors.transparent,
  2247 + gradientEnd: Colors.transparent,
  2248 + textColor: MyColours.color_438E93,
  2249 + isBold: true,
  2250 + fontSize: 32,
  2251 + onPressed: () {
  2252 + if (Navigator.canPop(context)) {
  2253 + Navigator.pop(context);
  2254 + }
  2255 + showRechargeConfirmDialog(
  2256 + context, '发放消费金');
  2257 + })),
  2258 + ],
  2259 + ),
  2260 + ])));
  2261 + }));
  2262 + });
  2263 + }
  2264 +
  2265 + //退款余额弹框
  2266 + static showRefundDialog(
  2267 + BuildContext context, String title, CustomCallBack callback,
  2268 + {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
  2269 + return showDialog(
  2270 + context: context,
  2271 + barrierDismissible: true,
  2272 + builder: (BuildContext context) {
  2273 + return Center(child: StatefulBuilder(builder: (context, state) {
  2274 + // locationState = state;
  2275 + return Material(
  2276 + color: Colors.transparent,
  2277 + child: Container(
  2278 + width: double.infinity,
  2279 + margin: EdgeInsets.symmetric(horizontal: w(37)),
  2280 + decoration: BoxDecoration(
  2281 + color: MyColours.color_ffffff,
  2282 + borderRadius: BorderRadius.circular(
  2283 + r(8),
  2284 + )),
  2285 + child: Column(
  2286 + mainAxisSize: MainAxisSize.min,
  2287 + crossAxisAlignment: CrossAxisAlignment.start,
  2288 + children: <Widget>[
  2289 + Padding(
  2290 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  2291 + child: Column(
  2292 + crossAxisAlignment: CrossAxisAlignment.start,
  2293 + children: [
  2294 + VEmptyView(40),
  2295 + Container(
  2296 + alignment: Alignment.center,
  2297 + child: Text('余额退款',
  2298 + style: TextStyle(
  2299 + fontWeight: FontWeight.bold,
  2300 + color: MyColours.color_515151,
  2301 + fontSize: font(16)))),
  2302 + VEmptyView(30),
  2303 + rechargeItem(context, '顾客余额', '元'),
  2304 + VEmptyView(30),
  2305 + rechargeItem(context, '退款金额', '元'),
  2306 + VEmptyView(30),
  2307 + ])),
  2308 + MyDivider(double.infinity, w(1),
  2309 + color: MyColours.color_DBDBDB),
  2310 + Row(
  2311 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  2312 + children: [
  2313 + Expanded(
  2314 + flex: 1,
  2315 + child: RoundButton(
  2316 + text: '取消',
  2317 + // width: (ScreenUtil().screenWidth -
  2318 + // ScreenUtil().setWidth(62) * 2) /
  2319 + // 2,
  2320 + height: ScreenUtil().setWidth(112),
  2321 + // radius: ScreenUtil().setWidth(10),
  2322 + gradientStart: Colors.transparent,
  2323 + gradientEnd: Colors.transparent,
  2324 + textColor: MyColours.color_515151,
  2325 + isBold: false,
  2326 + fontSize: 32,
  2327 + onPressed: () {
  2328 + Navigator.pop(context);
  2329 + })),
  2330 + MyDivider(ScreenUtil().setWidth(2),
  2331 + ScreenUtil().setWidth(112),
  2332 + color: MyColours.color_DBDBDB),
  2333 + Expanded(
  2334 + flex: 1,
  2335 + child: RoundButton(
  2336 + text: '确定',
  2337 + // width: (ScreenUtil().screenWidth -
  2338 + // ScreenUtil().setWidth(62) * 2) /
  2339 + // 2,
  2340 + height: ScreenUtil().setWidth(112),
  2341 + // radius: ScreenUtil().setWidth(10),
  2342 + gradientStart: Colors.transparent,
  2343 + gradientEnd: Colors.transparent,
  2344 + textColor: MyColours.color_438E93,
  2345 + isBold: true,
  2346 + fontSize: 32,
  2347 + onPressed: () {
  2348 + if (Navigator.canPop(context)) {
  2349 + Navigator.pop(context);
  2350 + }
  2351 + showRefundConfirmDialog(context, '退款');
  2352 + })),
  2353 + ],
  2354 + ),
1847 ]))); 2355 ])));
1848 })); 2356 }));
1849 }); 2357 });