Showing
3 changed files
with
387 additions
and
185 deletions
| @@ -84,6 +84,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -84,6 +84,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 84 | 84 | ||
| 85 | Manager manager = Manager(); | 85 | Manager manager = Manager(); |
| 86 | List cancelReasonList = []; | 86 | List cancelReasonList = []; |
| 87 | + List depositReasonList = []; | ||
| 87 | bool isShowTF = false; | 88 | bool isShowTF = false; |
| 88 | // int paddingBottom; | 89 | // int paddingBottom; |
| 89 | int paddingTop = 138; | 90 | int paddingTop = 138; |
| @@ -91,6 +92,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -91,6 +92,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 91 | TextEditingController _cancelController = TextEditingController(); | 92 | TextEditingController _cancelController = TextEditingController(); |
| 92 | StateSetter _cancelState; | 93 | StateSetter _cancelState; |
| 93 | 94 | ||
| 95 | + FocusNode _depositNode = FocusNode(); | ||
| 96 | + TextEditingController _depositController = TextEditingController(); | ||
| 97 | + | ||
| 94 | ScrollController _scrollController; | 98 | ScrollController _scrollController; |
| 95 | 99 | ||
| 96 | String formatPhone = ""; | 100 | String formatPhone = ""; |
| @@ -136,6 +140,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -136,6 +140,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 136 | getSellerVersion(); | 140 | getSellerVersion(); |
| 137 | _getReserveTypeField(); | 141 | _getReserveTypeField(); |
| 138 | _initCancel(); | 142 | _initCancel(); |
| 143 | + _initdDeposit(); | ||
| 139 | _getReserveDetail(); | 144 | _getReserveDetail(); |
| 140 | _getOrderInfo(); | 145 | _getOrderInfo(); |
| 141 | _getReserveDepositByRid(); | 146 | _getReserveDepositByRid(); |
| @@ -152,11 +157,37 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -152,11 +157,37 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 152 | _cancelNode.addListener(() { | 157 | _cancelNode.addListener(() { |
| 153 | if (_cancelNode.hasFocus) { | 158 | if (_cancelNode.hasFocus) { |
| 154 | print('得到焦点'); | 159 | print('得到焦点'); |
| 155 | - paddingTop = 80; | ||
| 156 | - _scrollController.jumpTo(_scrollController.position.maxScrollExtent); | 160 | + for (var item in cancelReasonList) { |
| 161 | + item['select'] = false; | ||
| 162 | + | ||
| 163 | + if (item['title'] == '其他原因') { | ||
| 164 | + item['select'] = true; | ||
| 165 | + } | ||
| 166 | + } | ||
| 167 | + // state(() {}); | ||
| 168 | + | ||
| 169 | + // _scrollController.jumpTo(_scrollController.position.maxScrollExtent); | ||
| 170 | + } else { | ||
| 171 | + print('失去焦点'); | ||
| 172 | + } | ||
| 173 | + _cancelState(() {}); | ||
| 174 | + }); | ||
| 175 | + | ||
| 176 | + _depositNode.addListener(() { | ||
| 177 | + if (_depositNode.hasFocus) { | ||
| 178 | + print('得到焦点'); | ||
| 179 | + for (var item in depositReasonList) { | ||
| 180 | + item['select'] = false; | ||
| 181 | + | ||
| 182 | + if (item['title'] == '其他原因') { | ||
| 183 | + item['select'] = true; | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + // state(() {}); | ||
| 187 | + | ||
| 188 | + // _scrollController.jumpTo(_scrollController.position.maxScrollExtent); | ||
| 157 | } else { | 189 | } else { |
| 158 | print('失去焦点'); | 190 | print('失去焦点'); |
| 159 | - paddingTop = 138; | ||
| 160 | } | 191 | } |
| 161 | _cancelState(() {}); | 192 | _cancelState(() {}); |
| 162 | }); | 193 | }); |
| @@ -486,8 +517,20 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -486,8 +517,20 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 486 | cancelReasonList = [ | 517 | cancelReasonList = [ |
| 487 | {'title': '顾客取消', 'select': false}, | 518 | {'title': '顾客取消', 'select': false}, |
| 488 | {'title': '顾客行程有变', 'select': false}, | 519 | {'title': '顾客行程有变', 'select': false}, |
| 489 | - {'title': '信息填写有误', 'select': false}, | ||
| 490 | {'title': '操作失误', 'select': false}, | 520 | {'title': '操作失误', 'select': false}, |
| 521 | + {'title': '信息填写有误', 'select': false}, | ||
| 522 | + {'title': '其他原因', 'select': false}, | ||
| 523 | + ]; | ||
| 524 | + } | ||
| 525 | + | ||
| 526 | + _initdDeposit() { | ||
| 527 | + isShowTF = false; | ||
| 528 | + // paddingBottom = ScreenUtil().screenHeight.ceil() - 138 - 340; | ||
| 529 | + depositReasonList = [ | ||
| 530 | + {'title': '订金已退', 'select': false}, | ||
| 531 | + {'title': '充入会员卡', 'select': false}, | ||
| 532 | + {'title': '留下次使用', 'select': false}, | ||
| 533 | + {'title': '抵做餐费用', 'select': false}, | ||
| 491 | {'title': '其他原因', 'select': false}, | 534 | {'title': '其他原因', 'select': false}, |
| 492 | ]; | 535 | ]; |
| 493 | } | 536 | } |
| @@ -582,6 +625,111 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -582,6 +625,111 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 582 | ); | 625 | ); |
| 583 | } | 626 | } |
| 584 | 627 | ||
| 628 | + Widget _depositWidget() { | ||
| 629 | + return Column( | ||
| 630 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 631 | + children: [ | ||
| 632 | + Container( | ||
| 633 | + padding: EdgeInsets.symmetric(horizontal: w(24)), | ||
| 634 | + height: ScreenUtil().setWidth(48), | ||
| 635 | + child: Text( | ||
| 636 | + '请选择预订订金走向', | ||
| 637 | + style: TextStyle( | ||
| 638 | + fontSize: ScreenUtil().setSp(32), | ||
| 639 | + fontWeight: FontWeight.bold, | ||
| 640 | + decoration: TextDecoration.none, | ||
| 641 | + color: MyColours.color_E5000000), | ||
| 642 | + ), | ||
| 643 | + ), | ||
| 644 | + VEmptyView(40), | ||
| 645 | + Container( | ||
| 646 | + padding: EdgeInsets.symmetric(horizontal: w(24)), | ||
| 647 | + child: Wrap( | ||
| 648 | + runSpacing: w(20), | ||
| 649 | + // mainAxisSize: MainAxisSize.min, | ||
| 650 | + children: depositReasonList.map((value) { | ||
| 651 | + return GestureDetector( | ||
| 652 | + onTap: () { | ||
| 653 | + FocusScope.of(context).requestFocus(new FocusNode()); | ||
| 654 | + for (var item in depositReasonList) { | ||
| 655 | + item['select'] = false; | ||
| 656 | + isShowTF = false; | ||
| 657 | + | ||
| 658 | + if (item['title'] == value['title']) { | ||
| 659 | + item['select'] = true; | ||
| 660 | + if (item['title'] == '其他原因') { | ||
| 661 | + isShowTF = true; | ||
| 662 | + } | ||
| 663 | + } | ||
| 664 | + } | ||
| 665 | + _cancelState(() {}); | ||
| 666 | + }, | ||
| 667 | + child: Row( | ||
| 668 | + mainAxisSize: MainAxisSize.min, | ||
| 669 | + children: [ | ||
| 670 | + Image.asset( | ||
| 671 | + value['select'] | ||
| 672 | + ? 'assets/select.png' | ||
| 673 | + : 'assets/unselect.png', | ||
| 674 | + width: ScreenUtil().setWidth(48)), | ||
| 675 | + HEmptyView(16), | ||
| 676 | + value['title'] == '其他原因' | ||
| 677 | + ? Expanded( | ||
| 678 | + child: Container( | ||
| 679 | + // height: w(42), | ||
| 680 | + | ||
| 681 | + decoration: BoxDecoration( | ||
| 682 | + color: MyColours.color_f3f3f3, | ||
| 683 | + borderRadius: BorderRadius.circular(r(4))), | ||
| 684 | + padding: EdgeInsets.only( | ||
| 685 | + left: w(8), top: w(10), bottom: w(10)), | ||
| 686 | + child: TextField( | ||
| 687 | + maxLines: 1, | ||
| 688 | + controller: _depositController, | ||
| 689 | + focusNode: _depositNode, | ||
| 690 | + | ||
| 691 | + // textAlignVertical: | ||
| 692 | + // TextAlignVertical | ||
| 693 | + // .bottom, | ||
| 694 | + | ||
| 695 | + decoration: InputDecoration( | ||
| 696 | + isCollapsed: true, | ||
| 697 | + contentPadding: EdgeInsets.zero, | ||
| 698 | + hintText: "其他", | ||
| 699 | + hintStyle: TextStyle( | ||
| 700 | + color: MyColours.color_999999, | ||
| 701 | + fontSize: ScreenUtil().setSp(30), | ||
| 702 | + ), | ||
| 703 | + border: InputBorder.none, | ||
| 704 | + ), | ||
| 705 | + onChanged: (_) {}, | ||
| 706 | + onEditingComplete: () { | ||
| 707 | + print('fff'); | ||
| 708 | + _depositNode.unfocus(); | ||
| 709 | + }, | ||
| 710 | + // keyboardType: TextInputType.numberWithOptions(decimal: true), | ||
| 711 | + ), | ||
| 712 | + )) | ||
| 713 | + : Container( | ||
| 714 | + width: w(100), | ||
| 715 | + child: Text(value['title'], | ||
| 716 | + style: TextStyle( | ||
| 717 | + overflow: TextOverflow.ellipsis, | ||
| 718 | + fontSize: ScreenUtil().setSp(32), | ||
| 719 | + fontWeight: FontWeight.normal, | ||
| 720 | + decoration: TextDecoration.none, | ||
| 721 | + color: MyColours.color_E5000000))) | ||
| 722 | + ], | ||
| 723 | + ), | ||
| 724 | + ); | ||
| 725 | + }).toList(), | ||
| 726 | + )), | ||
| 727 | + VEmptyView(34), | ||
| 728 | + MyDivider(double.infinity, w(1), color: MyColours.color_E7E7E7) | ||
| 729 | + ], | ||
| 730 | + ); | ||
| 731 | + } | ||
| 732 | + | ||
| 585 | ///取消预订弹框 | 733 | ///取消预订弹框 |
| 586 | _showCancelWidget(context, phone) { | 734 | _showCancelWidget(context, phone) { |
| 587 | _scrollController = ScrollController(); | 735 | _scrollController = ScrollController(); |
| @@ -595,197 +743,251 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -595,197 +743,251 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 595 | Animation secondaryAnimation) { | 743 | Animation secondaryAnimation) { |
| 596 | return StatefulBuilder(builder: (context, state) { | 744 | return StatefulBuilder(builder: (context, state) { |
| 597 | _cancelState = state; | 745 | _cancelState = state; |
| 598 | - return GestureDetector( | ||
| 599 | - behavior: HitTestBehavior.opaque, | ||
| 600 | - // onTap: () { | ||
| 601 | - // Navigator.of(context).pop(); | ||
| 602 | - // }, | ||
| 603 | - child: Container( | ||
| 604 | - decoration: BoxDecoration( | ||
| 605 | - color: Color.fromRGBO(00, 00, 00, 0.5), | ||
| 606 | - ), | ||
| 607 | - padding: EdgeInsets.fromLTRB( | ||
| 608 | - ScreenUtil().setWidth(50), | ||
| 609 | - ScreenUtil().setWidth(paddingTop * 2), | ||
| 610 | - ScreenUtil().setWidth(50), | ||
| 611 | - ScreenUtil().setWidth(0)), | ||
| 612 | - child: Align( | ||
| 613 | - alignment: Alignment.topCenter, | ||
| 614 | - child: Container( | ||
| 615 | - padding: EdgeInsets.all(ScreenUtil().setWidth(40)), | ||
| 616 | - decoration: BoxDecoration( | ||
| 617 | - color: Colors.white, | 746 | + |
| 747 | + return Scaffold( | ||
| 748 | + backgroundColor: Colors.transparent, | ||
| 749 | + body: Center( | ||
| 750 | + child: Container( | ||
| 751 | + padding: EdgeInsets.symmetric( | ||
| 752 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 753 | + // height: ScreenUtil().setWidth(421 * 2), | ||
| 754 | + decoration: BoxDecoration( | ||
| 618 | borderRadius: | 755 | borderRadius: |
| 619 | - BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 620 | - ), | ||
| 621 | - child: Column( | ||
| 622 | - mainAxisSize: MainAxisSize.min, | ||
| 623 | - children: [ | ||
| 624 | - Stack( | ||
| 625 | - children: [ | ||
| 626 | - Container( | ||
| 627 | - height: ScreenUtil().setWidth(48), | ||
| 628 | - child: Center( | ||
| 629 | - child: Text( | ||
| 630 | - '请选择取消原因', | ||
| 631 | - style: TextStyle( | ||
| 632 | - fontSize: ScreenUtil().setSp(34), | ||
| 633 | - fontWeight: FontWeight.bold, | ||
| 634 | - decoration: TextDecoration.none, | ||
| 635 | - color: MyColours.color_353535), | ||
| 636 | - ), | ||
| 637 | - ), | ||
| 638 | - ), | ||
| 639 | - Positioned( | ||
| 640 | - top: ScreenUtil().setWidth(8), | ||
| 641 | - right: ScreenUtil().setWidth(0), | ||
| 642 | - child: GestureDetector( | ||
| 643 | - onTap: () { | ||
| 644 | - _initCancel(); | ||
| 645 | - Navigator.of(context).pop(); | ||
| 646 | - }, | ||
| 647 | - child: Container( | ||
| 648 | - padding: EdgeInsets.only(left: 20), | ||
| 649 | - child: Image.asset( | ||
| 650 | - 'assets/close.png', | ||
| 651 | - width: ScreenUtil().setWidth(32), | ||
| 652 | - height: ScreenUtil().setWidth(32), | ||
| 653 | - ), | ||
| 654 | - ))) | ||
| 655 | - ], | ||
| 656 | - ), | ||
| 657 | - VEmptyView(60), | ||
| 658 | - SingleChildScrollView( | ||
| 659 | - controller: _scrollController, | ||
| 660 | - child: Column( | ||
| 661 | - mainAxisSize: MainAxisSize.min, | ||
| 662 | - children: cancelReasonList.map((value) { | ||
| 663 | - return GestureDetector( | ||
| 664 | - onTap: () { | ||
| 665 | - for (var item in cancelReasonList) { | ||
| 666 | - item['select'] = false; | ||
| 667 | - isShowTF = false; | ||
| 668 | - // paddingBottom = | ||
| 669 | - // ScreenUtil().screenHeight.ceil() - | ||
| 670 | - // 138 - | ||
| 671 | - // 340; | ||
| 672 | - if (item['title'] == value['title']) { | ||
| 673 | - item['select'] = true; | ||
| 674 | - if (item['title'] == '其他原因') { | ||
| 675 | - isShowTF = true; | ||
| 676 | - // paddingBottom = 130; | ||
| 677 | - // paddingBottom = | ||
| 678 | - // ScreenUtil().screenHeight.ceil() - | ||
| 679 | - // 138 - | ||
| 680 | - // 340 - | ||
| 681 | - // 46; | ||
| 682 | - } | ||
| 683 | - } | ||
| 684 | - } | ||
| 685 | - state(() {}); | ||
| 686 | - }, | ||
| 687 | - child: Column(children: [ | ||
| 688 | - Row( | ||
| 689 | - children: [ | ||
| 690 | - Image.asset( | ||
| 691 | - value['select'] | ||
| 692 | - ? 'assets/select.png' | ||
| 693 | - : 'assets/unselect.png', | ||
| 694 | - width: ScreenUtil().setWidth(44)), | ||
| 695 | - HEmptyView(30), | ||
| 696 | - Text(value['title'], | ||
| 697 | - style: TextStyle( | ||
| 698 | - fontSize: | ||
| 699 | - ScreenUtil().setSp(32), | ||
| 700 | - fontWeight: FontWeight.normal, | ||
| 701 | - decoration: TextDecoration.none, | ||
| 702 | - color: MyColours.color_515151)) | ||
| 703 | - ], | 756 | + BorderRadius.circular(ScreenUtil().setWidth(16))), |
| 757 | + child: SingleChildScrollView( | ||
| 758 | + child: Card( | ||
| 759 | + shape: RoundedRectangleBorder( | ||
| 760 | + borderRadius: BorderRadius.all(Radius.circular( | ||
| 761 | + ScreenUtil().setWidth(10)))), //设置圆角 | ||
| 762 | + child: Container( | ||
| 763 | + child: Column( | ||
| 764 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 765 | + mainAxisSize: MainAxisSize.min, | ||
| 766 | + children: [ | ||
| 767 | + VEmptyView(48), | ||
| 768 | + // Stack( | ||
| 769 | + // children: [ | ||
| 770 | + | ||
| 771 | + VEmptyView(40), | ||
| 772 | + SingleChildScrollView( | ||
| 773 | + controller: _scrollController, | ||
| 774 | + child: Column( | ||
| 775 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 776 | + children: [ | ||
| 777 | + Container( | ||
| 778 | + padding: EdgeInsets.symmetric( | ||
| 779 | + horizontal: w(24)), | ||
| 780 | + height: ScreenUtil().setWidth(48), | ||
| 781 | + child: Text( | ||
| 782 | + '请选择取消原因', | ||
| 783 | + style: TextStyle( | ||
| 784 | + fontSize: ScreenUtil().setSp(32), | ||
| 785 | + fontWeight: FontWeight.bold, | ||
| 786 | + decoration: TextDecoration.none, | ||
| 787 | + color: MyColours.color_E5000000), | ||
| 788 | + ), | ||
| 704 | ), | 789 | ), |
| 705 | - value['title'] == '其他原因' && isShowTF | ||
| 706 | - ? Material( | ||
| 707 | - child: Container( | ||
| 708 | - color: Colors.white, | ||
| 709 | - padding: EdgeInsets.only( | ||
| 710 | - left: | ||
| 711 | - ScreenUtil().setWidth(76)), | ||
| 712 | - child: TextField( | ||
| 713 | - maxLines: 1, | ||
| 714 | - controller: _cancelController, | ||
| 715 | - focusNode: _cancelNode, | ||
| 716 | - textAlignVertical: | ||
| 717 | - TextAlignVertical.bottom, | ||
| 718 | - decoration: InputDecoration( | ||
| 719 | - hintText: "请填写原因", | ||
| 720 | - hintStyle: TextStyle( | ||
| 721 | - color: MyColours.color_999999, | ||
| 722 | - fontSize: | ||
| 723 | - ScreenUtil().setSp(30), | ||
| 724 | - ), | ||
| 725 | - enabledBorder: | ||
| 726 | - UnderlineInputBorder( | ||
| 727 | - borderSide: BorderSide( | ||
| 728 | - color: MyColours | ||
| 729 | - .color_d8d8d8), | ||
| 730 | - ), | ||
| 731 | - // border: InputBorder.none, | ||
| 732 | - ), | ||
| 733 | - onChanged: (_) { | ||
| 734 | - setState(() {}); | ||
| 735 | - }, | ||
| 736 | - onEditingComplete: () { | ||
| 737 | - print('fff'); | ||
| 738 | - _cancelNode.unfocus(); | 790 | + VEmptyView(40), |
| 791 | + Container( | ||
| 792 | + padding: EdgeInsets.symmetric( | ||
| 793 | + horizontal: w(24)), | ||
| 794 | + child: Wrap( | ||
| 795 | + runSpacing: w(20), | ||
| 796 | + // mainAxisSize: MainAxisSize.min, | ||
| 797 | + children: | ||
| 798 | + cancelReasonList.map((value) { | ||
| 799 | + return GestureDetector( | ||
| 800 | + onTap: () { | ||
| 801 | + FocusScope.of(context) | ||
| 802 | + .requestFocus( | ||
| 803 | + new FocusNode()); | ||
| 804 | + for (var item | ||
| 805 | + in cancelReasonList) { | ||
| 806 | + item['select'] = false; | ||
| 807 | + isShowTF = false; | ||
| 808 | + | ||
| 809 | + if (item['title'] == | ||
| 810 | + value['title']) { | ||
| 811 | + item['select'] = true; | ||
| 812 | + if (item['title'] == | ||
| 813 | + '其他原因') { | ||
| 814 | + isShowTF = true; | ||
| 815 | + } | ||
| 816 | + } | ||
| 817 | + } | ||
| 818 | + state(() {}); | ||
| 739 | }, | 819 | }, |
| 740 | - // keyboardType: TextInputType.numberWithOptions(decimal: true), | ||
| 741 | - ), | ||
| 742 | - )) | ||
| 743 | - : Container(), | ||
| 744 | - VEmptyView(40) | ||
| 745 | - ]), | ||
| 746 | - ); | ||
| 747 | - }).toList(), | ||
| 748 | - ), | ||
| 749 | - ), | ||
| 750 | - VEmptyView(15), | ||
| 751 | - Material( | ||
| 752 | - child: RoundButton( | ||
| 753 | - onPressed: () { | ||
| 754 | - String desc = ''; | ||
| 755 | - for (var value in cancelReasonList) { | ||
| 756 | - if (value['select'] == true) { | ||
| 757 | - desc = value['title']; | ||
| 758 | - if (value['title'] == '其他原因') { | ||
| 759 | - desc = _cancelController.text.trim(); | ||
| 760 | - if (desc.isEmpty) { | ||
| 761 | - Utils.showToast("请填写原因"); | ||
| 762 | - return; | 820 | + child: Row( |
| 821 | + mainAxisSize: MainAxisSize.min, | ||
| 822 | + children: [ | ||
| 823 | + Image.asset( | ||
| 824 | + value['select'] | ||
| 825 | + ? 'assets/select.png' | ||
| 826 | + : 'assets/unselect.png', | ||
| 827 | + width: ScreenUtil() | ||
| 828 | + .setWidth(48)), | ||
| 829 | + HEmptyView(16), | ||
| 830 | + value['title'] == '其他原因' | ||
| 831 | + ? Expanded( | ||
| 832 | + child: Container( | ||
| 833 | + // height: w(42), | ||
| 834 | + | ||
| 835 | + decoration: BoxDecoration( | ||
| 836 | + color: MyColours | ||
| 837 | + .color_f3f3f3, | ||
| 838 | + borderRadius: | ||
| 839 | + BorderRadius | ||
| 840 | + .circular( | ||
| 841 | + r(4))), | ||
| 842 | + padding: | ||
| 843 | + EdgeInsets.only( | ||
| 844 | + left: w(8), | ||
| 845 | + top: w(10), | ||
| 846 | + bottom: | ||
| 847 | + w(10)), | ||
| 848 | + child: TextField( | ||
| 849 | + maxLines: 1, | ||
| 850 | + controller: | ||
| 851 | + _cancelController, | ||
| 852 | + focusNode: | ||
| 853 | + _cancelNode, | ||
| 854 | + | ||
| 855 | + // textAlignVertical: | ||
| 856 | + // TextAlignVertical | ||
| 857 | + // .bottom, | ||
| 858 | + | ||
| 859 | + decoration: | ||
| 860 | + InputDecoration( | ||
| 861 | + isCollapsed: true, | ||
| 862 | + contentPadding: | ||
| 863 | + EdgeInsets | ||
| 864 | + .zero, | ||
| 865 | + hintText: "其他", | ||
| 866 | + hintStyle: | ||
| 867 | + TextStyle( | ||
| 868 | + color: MyColours | ||
| 869 | + .color_999999, | ||
| 870 | + fontSize: | ||
| 871 | + ScreenUtil() | ||
| 872 | + .setSp( | ||
| 873 | + 30), | ||
| 874 | + ), | ||
| 875 | + border: | ||
| 876 | + InputBorder | ||
| 877 | + .none, | ||
| 878 | + ), | ||
| 879 | + onChanged: (_) {}, | ||
| 880 | + onEditingComplete: | ||
| 881 | + () { | ||
| 882 | + print('fff'); | ||
| 883 | + _cancelNode | ||
| 884 | + .unfocus(); | ||
| 885 | + }, | ||
| 886 | + // keyboardType: TextInputType.numberWithOptions(decimal: true), | ||
| 887 | + ), | ||
| 888 | + )) | ||
| 889 | + : Container( | ||
| 890 | + width: w(100), | ||
| 891 | + child: Text( | ||
| 892 | + value['title'], | ||
| 893 | + style: TextStyle( | ||
| 894 | + overflow: | ||
| 895 | + TextOverflow | ||
| 896 | + .ellipsis, | ||
| 897 | + fontSize: | ||
| 898 | + ScreenUtil() | ||
| 899 | + .setSp( | ||
| 900 | + 32), | ||
| 901 | + fontWeight: | ||
| 902 | + FontWeight | ||
| 903 | + .normal, | ||
| 904 | + decoration: | ||
| 905 | + TextDecoration | ||
| 906 | + .none, | ||
| 907 | + color: MyColours | ||
| 908 | + .color_E5000000))) | ||
| 909 | + ], | ||
| 910 | + ), | ||
| 911 | + ); | ||
| 912 | + }).toList(), | ||
| 913 | + )), | ||
| 914 | + VEmptyView(34), | ||
| 915 | + _depositWidget(), | ||
| 916 | + MyDivider(double.infinity, w(1), | ||
| 917 | + color: MyColours.color_E7E7E7) | ||
| 918 | + ], | ||
| 919 | + )), | ||
| 920 | + // VEmptyView(15), | ||
| 921 | + | ||
| 922 | + Row( | ||
| 923 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 924 | + children: [ | ||
| 925 | + RoundButton( | ||
| 926 | + text: '取消', | ||
| 927 | + width: (ScreenUtil().screenWidth - | ||
| 928 | + ScreenUtil().setWidth(62) * 2) / | ||
| 929 | + 2, | ||
| 930 | + height: ScreenUtil().setWidth(112), | ||
| 931 | + // radius: ScreenUtil().setWidth(10), | ||
| 932 | + gradientStart: Colors.transparent, | ||
| 933 | + gradientEnd: Colors.transparent, | ||
| 934 | + textColor: MyColours.color_E6000000, | ||
| 935 | + isBold: false, | ||
| 936 | + fontSize: 34, | ||
| 937 | + onPressed: () { | ||
| 938 | + _initCancel(); | ||
| 939 | + _initdDeposit(); | ||
| 940 | + Navigator.of(context).pop(); | ||
| 941 | + }), | ||
| 942 | + MyDivider(ScreenUtil().setWidth(2), | ||
| 943 | + ScreenUtil().setWidth(112), | ||
| 944 | + color: MyColours.color_DBDBDB), | ||
| 945 | + RoundButton( | ||
| 946 | + text: '确定', | ||
| 947 | + width: (ScreenUtil().screenWidth - | ||
| 948 | + ScreenUtil().setWidth(62) * 2) / | ||
| 949 | + 2, | ||
| 950 | + height: ScreenUtil().setWidth(112), | ||
| 951 | + // radius: ScreenUtil().setWidth(10), | ||
| 952 | + gradientStart: Colors.transparent, | ||
| 953 | + gradientEnd: Colors.transparent, | ||
| 954 | + textColor: MyColours.color_438E93, | ||
| 955 | + fontSize: 34, | ||
| 956 | + onPressed: () { | ||
| 957 | + String desc = ''; | ||
| 958 | + for (var value in cancelReasonList) { | ||
| 959 | + if (value['select'] == true) { | ||
| 960 | + desc = value['title']; | ||
| 961 | + if (value['title'] == '其他原因') { | ||
| 962 | + desc = | ||
| 963 | + _cancelController.text.trim(); | ||
| 964 | + if (desc.isEmpty) { | ||
| 965 | + Utils.showToast("请填写原因"); | ||
| 966 | + return; | ||
| 967 | + } | ||
| 968 | + } | ||
| 969 | + } | ||
| 763 | } | 970 | } |
| 764 | - } | ||
| 765 | - } | ||
| 766 | - } | ||
| 767 | 971 | ||
| 768 | - if (desc == '') { | ||
| 769 | - Utils.showToast('请选择原因'); | ||
| 770 | - return; | ||
| 771 | - } | 972 | + if (desc == '') { |
| 973 | + Utils.showToast('请选择原因'); | ||
| 974 | + return; | ||
| 975 | + } | ||
| 772 | 976 | ||
| 773 | - Navigator.of(context).pop(); | ||
| 774 | - Loading.showLoading(context); | 977 | + Navigator.of(context).pop(); |
| 978 | + Loading.showLoading(context); | ||
| 775 | 979 | ||
| 776 | - setReserveStatus('4', desc: desc, phone: phone); | ||
| 777 | - }, | ||
| 778 | - text: '确认', | ||
| 779 | - height: ScreenUtil().setWidth(80), | ||
| 780 | - width: ScreenUtil().setWidth(300), | ||
| 781 | - radius: ScreenUtil().setWidth(10), | 980 | + setReserveStatus('4', |
| 981 | + desc: desc, phone: phone); | ||
| 982 | + }), | ||
| 983 | + ], | ||
| 782 | ), | 984 | ), |
| 783 | - ) | ||
| 784 | - ], | 985 | + ], |
| 986 | + ), | ||
| 785 | ), | 987 | ), |
| 786 | )), | 988 | )), |
| 787 | - ), | ||
| 788 | - ); | 989 | + ), |
| 990 | + )); | ||
| 789 | }); | 991 | }); |
| 790 | }); | 992 | }); |
| 791 | } | 993 | } |
-
Please register or login to post a comment