Showing
9 changed files
with
791 additions
and
698 deletions
| @@ -817,8 +817,7 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | @@ -817,8 +817,7 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | ||
| 817 | child: Row( | 817 | child: Row( |
| 818 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 818 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 819 | children: [ | 819 | children: [ |
| 820 | - if (couponProvider.couponSunModel.liteQrcode != null && | ||
| 821 | - (couponProvider.couponSunModel.isType == '4')) | 820 | + if (couponProvider.couponSunModel.liteQrcode != null) |
| 822 | RoundButton( | 821 | RoundButton( |
| 823 | text: '生成海报', | 822 | text: '生成海报', |
| 824 | width: w(100), | 823 | width: w(100), |
| @@ -836,21 +835,29 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | @@ -836,21 +835,29 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | ||
| 836 | return; | 835 | return; |
| 837 | } | 836 | } |
| 838 | 837 | ||
| 839 | - // 谁可以发放 | ||
| 840 | - // 可以发放的才能分享 | ||
| 841 | - if (couponProvider.couponSunModel.uidList | ||
| 842 | - .split(',') | ||
| 843 | - .contains(Provider.of<UserModel>(context, | ||
| 844 | - listen: false) | ||
| 845 | - .user | ||
| 846 | - .openid)) { | 838 | + if (couponProvider.couponSunModel.isType == '3') { |
| 847 | NavigatorUtil.goCouponPosterPage( | 839 | NavigatorUtil.goCouponPosterPage( |
| 848 | context, | 840 | context, |
| 849 | widget.idstr, | 841 | widget.idstr, |
| 850 | couponProvider.couponSunModel.use, | 842 | couponProvider.couponSunModel.use, |
| 851 | couponProvider.couponSunModel); | 843 | couponProvider.couponSunModel); |
| 852 | } else { | 844 | } else { |
| 853 | - Utils.showToast('您没有此权限'); | 845 | + // 谁可以发放 |
| 846 | + // 可以发放的才能分享 | ||
| 847 | + if (couponProvider.couponSunModel.uidList | ||
| 848 | + .split(',') | ||
| 849 | + .contains(Provider.of<UserModel>(context, | ||
| 850 | + listen: false) | ||
| 851 | + .user | ||
| 852 | + .openid)) { | ||
| 853 | + NavigatorUtil.goCouponPosterPage( | ||
| 854 | + context, | ||
| 855 | + widget.idstr, | ||
| 856 | + couponProvider.couponSunModel.use, | ||
| 857 | + couponProvider.couponSunModel); | ||
| 858 | + } else { | ||
| 859 | + Utils.showToast('您没有此权限'); | ||
| 860 | + } | ||
| 854 | } | 861 | } |
| 855 | }, | 862 | }, |
| 856 | ), | 863 | ), |
| @@ -888,27 +895,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | @@ -888,27 +895,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | ||
| 888 | }, | 895 | }, |
| 889 | ), | 896 | ), |
| 890 | HEmptyView(30), | 897 | HEmptyView(30), |
| 891 | - if (couponProvider.couponSunModel.isType == '3' || | ||
| 892 | - couponProvider.couponSunModel.isType == '4') | ||
| 893 | - Expanded( | ||
| 894 | - child: RoundButton( | ||
| 895 | - text: '分享给客户', | ||
| 896 | - height: ScreenUtil().setWidth(80), | ||
| 897 | - radius: ScreenUtil().setWidth(14), | ||
| 898 | - isBold: false, | ||
| 899 | - fontSize: 28, | ||
| 900 | - onPressed: () { | ||
| 901 | - if (couponProvider.couponSunModel.status != '1') { | ||
| 902 | - Utils.showToast('请先启用优惠券后再进行操作!'); | ||
| 903 | - return; | ||
| 904 | - } | ||
| 905 | - if ((couponProvider.couponSunModel.isType == | ||
| 906 | - '3' || | ||
| 907 | - couponProvider.couponSunModel.isType == | ||
| 908 | - '4') && | ||
| 909 | - couponProvider.couponSunModel.status == '1') { | ||
| 910 | - //店铺券 | ||
| 911 | - | 898 | + Expanded( |
| 899 | + child: RoundButton( | ||
| 900 | + text: '分享给客户', | ||
| 901 | + height: ScreenUtil().setWidth(80), | ||
| 902 | + radius: ScreenUtil().setWidth(14), | ||
| 903 | + isBold: false, | ||
| 904 | + fontSize: 28, | ||
| 905 | + onPressed: () { | ||
| 906 | + if (couponProvider.couponSunModel.status != '1') { | ||
| 907 | + Utils.showToast('请先启用优惠券后再进行操作!'); | ||
| 908 | + return; | ||
| 909 | + } | ||
| 910 | + if (couponProvider.couponSunModel.status == '1') { | ||
| 911 | + if (couponProvider.couponSunModel.isType == '3') { | ||
| 912 | + Utils.goShareBuyCouponToWeChat( | ||
| 913 | + context, | ||
| 914 | + widget.idstr, | ||
| 915 | + couponProvider.couponSunModel.isType, | ||
| 916 | + couponProvider.couponSunModel.use, | ||
| 917 | + couponProvider.couponSunModel); | ||
| 918 | + } else { | ||
| 912 | // 谁可以发放 | 919 | // 谁可以发放 |
| 913 | // 可以发放的才能分享 | 920 | // 可以发放的才能分享 |
| 914 | if (couponProvider.couponSunModel.uidList | 921 | if (couponProvider.couponSunModel.uidList |
| @@ -921,25 +928,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | @@ -921,25 +928,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> { | ||
| 921 | Utils.goShareBuyCouponToWeChat( | 928 | Utils.goShareBuyCouponToWeChat( |
| 922 | context, | 929 | context, |
| 923 | widget.idstr, | 930 | widget.idstr, |
| 931 | + couponProvider.couponSunModel.isType, | ||
| 924 | couponProvider.couponSunModel.use, | 932 | couponProvider.couponSunModel.use, |
| 925 | couponProvider.couponSunModel); | 933 | couponProvider.couponSunModel); |
| 926 | } else { | 934 | } else { |
| 927 | Utils.showToast('您没有此权限'); | 935 | Utils.showToast('您没有此权限'); |
| 928 | } | 936 | } |
| 929 | } | 937 | } |
| 930 | - // else if (couponProvider.couponSunModel.isType == | ||
| 931 | - // '2' && | ||
| 932 | - // couponProvider.couponSunModel.status == '1') { | ||
| 933 | - // // 我的优惠券 | ||
| 934 | - // Utils.goShareBuyCouponToWeChatMy( | ||
| 935 | - // context, | ||
| 936 | - // widget.idstr, | ||
| 937 | - // managerName, | ||
| 938 | - // couponProvider.couponSunModel); | ||
| 939 | - // } | ||
| 940 | - }, | ||
| 941 | - ), | ||
| 942 | - ) | 938 | + } |
| 939 | + // else if (couponProvider.couponSunModel.isType == | ||
| 940 | + // '2' && | ||
| 941 | + // couponProvider.couponSunModel.status == '1') { | ||
| 942 | + // // 我的优惠券 | ||
| 943 | + // Utils.goShareBuyCouponToWeChatMy( | ||
| 944 | + // context, | ||
| 945 | + // widget.idstr, | ||
| 946 | + // managerName, | ||
| 947 | + // couponProvider.couponSunModel); | ||
| 948 | + // } | ||
| 949 | + }, | ||
| 950 | + ), | ||
| 951 | + ) | ||
| 943 | ], | 952 | ], |
| 944 | )) | 953 | )) |
| 945 | ]); | 954 | ]); |
| @@ -1606,7 +1606,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | @@ -1606,7 +1606,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> { | ||
| 1606 | } | 1606 | } |
| 1607 | 1607 | ||
| 1608 | if (isCommission && | 1608 | if (isCommission && |
| 1609 | - _commissionControl.text.trim().length == 0) { | 1609 | + (_commissionControl.text.trim().length == 0 || |
| 1610 | + _commissionControl.text == '0')) { | ||
| 1610 | Utils.showToast('请填写分享佣金的比例'); | 1611 | Utils.showToast('请填写分享佣金的比例'); |
| 1611 | return; | 1612 | return; |
| 1612 | } | 1613 | } |
| @@ -60,499 +60,526 @@ class _CouponItemFState extends State<CouponItemF> { | @@ -60,499 +60,526 @@ class _CouponItemFState extends State<CouponItemF> { | ||
| 60 | 5, | 60 | 5, |
| 61 | context); | 61 | context); |
| 62 | } | 62 | } |
| 63 | - return Column(children: [ | ||
| 64 | - Stack( | ||
| 65 | - alignment: widget.from == 'select' | ||
| 66 | - ? Alignment.centerLeft | ||
| 67 | - : AlignmentDirectional.topStart, | ||
| 68 | - children: [ | ||
| 69 | - Row( | 63 | + return InkWell( |
| 64 | + onTap: widget.onPressed, | ||
| 65 | + child: Column(children: [ | ||
| 66 | + Stack( | ||
| 67 | + alignment: widget.from == 'select' | ||
| 68 | + ? Alignment.centerLeft | ||
| 69 | + : AlignmentDirectional.topStart, | ||
| 70 | children: [ | 70 | children: [ |
| 71 | - HEmptyView(20), | ||
| 72 | - widget.from == 'select' | ||
| 73 | - ? InkWell( | ||
| 74 | - onTap: widget.onPressed, | ||
| 75 | - child: Image.asset( | ||
| 76 | - Utils.getImgPath(sunModel.isCheck | ||
| 77 | - ? widget.radio | ||
| 78 | - ? 'c_mul_select' | ||
| 79 | - : 'select_f' | ||
| 80 | - : widget.radio | ||
| 81 | - ? 'c_not_edit' | ||
| 82 | - : 'show_select_f'), | ||
| 83 | - width: w(20), | ||
| 84 | - )) | ||
| 85 | - : Container(), | ||
| 86 | - Expanded( | ||
| 87 | - child: Container( | ||
| 88 | - // width: ScreenUtil().setWidth(610), | ||
| 89 | - margin: EdgeInsets.fromLTRB( | ||
| 90 | - ScreenUtil().setWidth(20), | ||
| 91 | - ScreenUtil().setWidth(0), | ||
| 92 | - ScreenUtil().setWidth(40), | ||
| 93 | - ScreenUtil().setWidth(0)), | ||
| 94 | - decoration: BoxDecoration( | ||
| 95 | - color: MyColours.color_ffffff, | ||
| 96 | - boxShadow: [ | ||
| 97 | - BoxShadow( | ||
| 98 | - spreadRadius: ScreenUtil().setWidth(2), | ||
| 99 | - color: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 100 | - offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 101 | - blurRadius: ScreenUtil().setWidth(8)) | ||
| 102 | - ], | ||
| 103 | - borderRadius: BorderRadius.all( | ||
| 104 | - Radius.circular(ScreenUtil().setWidth(16)), | ||
| 105 | - ), | ||
| 106 | - ), | ||
| 107 | - child: Column( | ||
| 108 | - mainAxisSize: MainAxisSize.min, | ||
| 109 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 110 | - children: [ | ||
| 111 | - Container( | ||
| 112 | - height: ScreenUtil().setWidth(40), | ||
| 113 | - padding: EdgeInsets.symmetric( | ||
| 114 | - horizontal: ScreenUtil().setWidth(24)), | ||
| 115 | - decoration: BoxDecoration( | ||
| 116 | - color: widget.from == 'history' | ||
| 117 | - ? MyColours.color_BFC4D4 | ||
| 118 | - : widget.from == 'setting' | ||
| 119 | - ? MyColours.color_00A870 | ||
| 120 | - : notSelect | ||
| 121 | - ? sunModel.isType == '1' || | ||
| 122 | - sunModel.isType == '3' || | ||
| 123 | - sunModel.isType == '4' | ||
| 124 | - ? sunModel.isMarking | ||
| 125 | - ? MyColours.color_00A870 | ||
| 126 | - : MyColours.color_438E93 | ||
| 127 | - : MyColours.color_ED7B2F | ||
| 128 | - : MyColours.color_999999, | ||
| 129 | - borderRadius: BorderRadius.only( | ||
| 130 | - topLeft: | ||
| 131 | - Radius.circular(ScreenUtil().setWidth(16)), | ||
| 132 | - topRight: Radius.circular( | ||
| 133 | - ScreenUtil().setWidth(16)))), | ||
| 134 | - child: Row( | ||
| 135 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 136 | - children: [ | ||
| 137 | - Text( | ||
| 138 | - sunModel.isType == '1' | ||
| 139 | - ? sunModel.isExamine == '1' | ||
| 140 | - ? '店铺优惠券(核销)' | ||
| 141 | - : '店铺优惠券' | ||
| 142 | - : sunModel.isType == '2' | ||
| 143 | - ? '我的优惠券' | ||
| 144 | - : sunModel.isType == '3' | ||
| 145 | - ? '免费代金券' | ||
| 146 | - : '付费优惠券', | ||
| 147 | - style: TextStyle( | ||
| 148 | - color: MyColours.color_ffffff, | ||
| 149 | - fontSize: ScreenUtil().setSp(24)), | ||
| 150 | - ), | ||
| 151 | - InkWell( | ||
| 152 | - onTap: widget.onPressedSwich, | ||
| 153 | - child: Text( | 71 | + Row( |
| 72 | + children: [ | ||
| 73 | + HEmptyView(20), | ||
| 74 | + widget.from == 'select' | ||
| 75 | + ? Image.asset( | ||
| 76 | + Utils.getImgPath(sunModel.isCheck | ||
| 77 | + ? widget.radio | ||
| 78 | + ? 'c_mul_select' | ||
| 79 | + : 'select_f' | ||
| 80 | + : widget.radio | ||
| 81 | + ? 'c_not_edit' | ||
| 82 | + : 'show_select_f'), | ||
| 83 | + width: w(20), | ||
| 84 | + ) | ||
| 85 | + : Container(), | ||
| 86 | + Expanded( | ||
| 87 | + child: Container( | ||
| 88 | + // width: ScreenUtil().setWidth(610), | ||
| 89 | + margin: EdgeInsets.fromLTRB( | ||
| 90 | + ScreenUtil().setWidth(20), | ||
| 91 | + ScreenUtil().setWidth(0), | ||
| 92 | + ScreenUtil().setWidth(40), | ||
| 93 | + ScreenUtil().setWidth(0)), | ||
| 94 | + decoration: BoxDecoration( | ||
| 95 | + color: MyColours.color_ffffff, | ||
| 96 | + boxShadow: [ | ||
| 97 | + BoxShadow( | ||
| 98 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 99 | + color: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 100 | + offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 101 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 102 | + ], | ||
| 103 | + borderRadius: BorderRadius.all( | ||
| 104 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 105 | + ), | ||
| 106 | + ), | ||
| 107 | + child: Column( | ||
| 108 | + mainAxisSize: MainAxisSize.min, | ||
| 109 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 110 | + children: [ | ||
| 111 | + Container( | ||
| 112 | + height: ScreenUtil().setWidth(40), | ||
| 113 | + padding: EdgeInsets.symmetric( | ||
| 114 | + horizontal: ScreenUtil().setWidth(24)), | ||
| 115 | + decoration: BoxDecoration( | ||
| 116 | + color: widget.from == 'history' | ||
| 117 | + ? MyColours.color_BFC4D4 | ||
| 118 | + : widget.from == 'setting' | ||
| 119 | + ? MyColours.color_00A870 | ||
| 120 | + : notSelect | ||
| 121 | + ? sunModel.isType == '1' || | ||
| 122 | + sunModel.isType == '3' || | ||
| 123 | + sunModel.isType == '4' | ||
| 124 | + ? sunModel.isMarking | ||
| 125 | + ? MyColours.color_00A870 | ||
| 126 | + : MyColours.color_438E93 | ||
| 127 | + : MyColours.color_ED7B2F | ||
| 128 | + : MyColours.color_999999, | ||
| 129 | + borderRadius: BorderRadius.only( | ||
| 130 | + topLeft: Radius.circular( | ||
| 131 | + ScreenUtil().setWidth(16)), | ||
| 132 | + topRight: Radius.circular( | ||
| 133 | + ScreenUtil().setWidth(16)))), | ||
| 134 | + child: Row( | ||
| 135 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 136 | + children: [ | ||
| 137 | + Text( | ||
| 154 | sunModel.isType == '1' | 138 | sunModel.isType == '1' |
| 155 | - ? sunModel.isExamine == '1' | ||
| 156 | - ? '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张' | ||
| 157 | - : '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张' | 139 | + ? '付费优惠券' |
| 158 | : sunModel.isType == '2' | 140 | : sunModel.isType == '2' |
| 159 | - ? '被领取:${sunModel.receiveNum}张' | ||
| 160 | - : sunModel.receiveNum == null | ||
| 161 | - ? '' | ||
| 162 | - : '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张', | ||
| 163 | - maxLines: 1, | ||
| 164 | - overflow: TextOverflow.ellipsis, | 141 | + ? '我的优惠券' |
| 142 | + : sunModel.isType == '3' | ||
| 143 | + ? '免费代金券' | ||
| 144 | + : '付费优惠券', | ||
| 165 | style: TextStyle( | 145 | style: TextStyle( |
| 166 | color: MyColours.color_ffffff, | 146 | color: MyColours.color_ffffff, |
| 167 | - fontSize: ScreenUtil().setSp(20))), | 147 | + fontSize: ScreenUtil().setSp(24)), |
| 148 | + ), | ||
| 149 | + InkWell( | ||
| 150 | + onTap: widget.onPressedSwich, | ||
| 151 | + child: Text( | ||
| 152 | + sunModel.isType == '1' | ||
| 153 | + ? sunModel.isExamine == '1' | ||
| 154 | + ? sunModel.receiveNum == null | ||
| 155 | + ? '' | ||
| 156 | + : '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张' | ||
| 157 | + : '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张' | ||
| 158 | + : sunModel.isType == '2' | ||
| 159 | + ? '被领取:${sunModel.receiveNum}张' | ||
| 160 | + : sunModel.receiveNum == null | ||
| 161 | + ? '' | ||
| 162 | + : '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张', | ||
| 163 | + maxLines: 1, | ||
| 164 | + overflow: TextOverflow.ellipsis, | ||
| 165 | + style: TextStyle( | ||
| 166 | + color: MyColours.color_ffffff, | ||
| 167 | + fontSize: ScreenUtil().setSp(20))), | ||
| 168 | + ), | ||
| 169 | + ], | ||
| 168 | ), | 170 | ), |
| 169 | - ], | ||
| 170 | - ), | ||
| 171 | - ), | ||
| 172 | - Container( | ||
| 173 | - padding: EdgeInsets.fromLTRB( | ||
| 174 | - ScreenUtil().setWidth(24 * 2), | ||
| 175 | - ScreenUtil().setWidth(9 * 2), | ||
| 176 | - ScreenUtil().setWidth(10), | ||
| 177 | - ScreenUtil().setWidth(20)), | ||
| 178 | - child: Column( | ||
| 179 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 180 | - children: [ | ||
| 181 | - Row( | 171 | + ), |
| 172 | + Container( | ||
| 173 | + padding: EdgeInsets.fromLTRB( | ||
| 174 | + ScreenUtil().setWidth(24 * 2), | ||
| 175 | + ScreenUtil().setWidth(9 * 2), | ||
| 176 | + ScreenUtil().setWidth(10), | ||
| 177 | + ScreenUtil().setWidth(20)), | ||
| 178 | + child: Column( | ||
| 179 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 182 | children: [ | 180 | children: [ |
| 183 | - Expanded( | ||
| 184 | - child: Column( | ||
| 185 | - crossAxisAlignment: CrossAxisAlignment.start, | 181 | + Row( |
| 186 | children: [ | 182 | children: [ |
| 187 | - Container( | ||
| 188 | - // width: ScreenUtil() | ||
| 189 | - // .setWidth(232 * 2), | ||
| 190 | - child: Container( | ||
| 191 | - height: ScreenUtil().setWidth(25 * 2), | ||
| 192 | - constraints: BoxConstraints( | ||
| 193 | - maxWidth: ScreenUtil().setWidth(190)), | ||
| 194 | - child: Text( | ||
| 195 | - sunModel.aname, | ||
| 196 | - maxLines: 2, | ||
| 197 | - overflow: TextOverflow.ellipsis, | ||
| 198 | - style: TextStyle( | ||
| 199 | - color: widget.from == 'history' | ||
| 200 | - ? MyColours.color_BFC4D4 | ||
| 201 | - : notSelect | ||
| 202 | - ? MyColours.color_515151 | ||
| 203 | - : MyColours.color_999999, | ||
| 204 | - fontSize: ScreenUtil().setSp(36), | ||
| 205 | - fontWeight: FontWeight.bold), | ||
| 206 | - ), | ||
| 207 | - )), | ||
| 208 | - Container( | ||
| 209 | - height: ScreenUtil().setWidth(14 * 2), | ||
| 210 | - width: ScreenUtil().setWidth(232 * 2), | ||
| 211 | - child: Text( | ||
| 212 | - sunModel.isType == '1' || | ||
| 213 | - sunModel.isType == '2' | ||
| 214 | - ? '${sunModel.desc}' | ||
| 215 | - : sunModel.desc == '0' | ||
| 216 | - ? '' | ||
| 217 | - : '消费满${sunModel.desc}元可用', | ||
| 218 | - maxLines: 1, | ||
| 219 | - overflow: TextOverflow.ellipsis, | ||
| 220 | - style: TextStyle( | ||
| 221 | - color: widget.from == 'history' | ||
| 222 | - ? MyColours.color_BFC4D4 | ||
| 223 | - : notSelect | ||
| 224 | - ? MyColours.color_515151 | ||
| 225 | - : MyColours.color_999999, | ||
| 226 | - fontSize: ScreenUtil().setSp(20), | ||
| 227 | - )), | ||
| 228 | - ), | ||
| 229 | - ], | ||
| 230 | - )), | ||
| 231 | - if (widget.from == 'select' && | ||
| 232 | - sunModel.isType == '3' && | ||
| 233 | - widget.radio) | ||
| 234 | - Row( | ||
| 235 | - children: [ | ||
| 236 | - InkWell( | ||
| 237 | - onTap: () { | ||
| 238 | - if (sunModel.number == 0) { | ||
| 239 | - return; | ||
| 240 | - } | ||
| 241 | - sunModel.number--; | ||
| 242 | - sunModel.numberC.text = | ||
| 243 | - '${sunModel.number}'; | ||
| 244 | - }, | ||
| 245 | - child: Container( | ||
| 246 | - height: w(40), | ||
| 247 | - padding: EdgeInsets.symmetric( | ||
| 248 | - horizontal: w(10)), | ||
| 249 | - child: Image.asset( | ||
| 250 | - Utils.getImgPath('plan_dish_minus'), | ||
| 251 | - width: w(8), | 183 | + Expanded( |
| 184 | + child: Column( | ||
| 185 | + crossAxisAlignment: | ||
| 186 | + CrossAxisAlignment.start, | ||
| 187 | + children: [ | ||
| 188 | + Container( | ||
| 189 | + // width: ScreenUtil() | ||
| 190 | + // .setWidth(232 * 2), | ||
| 191 | + child: Container( | ||
| 192 | + height: ScreenUtil().setWidth(25 * 2), | ||
| 193 | + constraints: BoxConstraints( | ||
| 194 | + maxWidth: | ||
| 195 | + ScreenUtil().setWidth(190)), | ||
| 196 | + child: Text( | ||
| 197 | + sunModel.aname, | ||
| 198 | + maxLines: 2, | ||
| 199 | + overflow: TextOverflow.ellipsis, | ||
| 200 | + style: TextStyle( | ||
| 201 | + color: widget.from == 'history' | ||
| 202 | + ? MyColours.color_BFC4D4 | ||
| 203 | + : notSelect | ||
| 204 | + ? MyColours.color_515151 | ||
| 205 | + : MyColours | ||
| 206 | + .color_999999, | ||
| 207 | + fontSize: | ||
| 208 | + ScreenUtil().setSp(36), | ||
| 209 | + fontWeight: FontWeight.bold), | ||
| 252 | ), | 210 | ), |
| 211 | + )), | ||
| 212 | + Container( | ||
| 213 | + height: ScreenUtil().setWidth(14 * 2), | ||
| 214 | + width: ScreenUtil().setWidth(232 * 2), | ||
| 215 | + child: Text( | ||
| 216 | + sunModel.isType == '1' || | ||
| 217 | + sunModel.isType == '2' | ||
| 218 | + ? '${sunModel.desc}' | ||
| 219 | + : sunModel.desc == '0' | ||
| 220 | + ? '' | ||
| 221 | + : '消费满${sunModel.desc}元可用', | ||
| 222 | + maxLines: 1, | ||
| 223 | + overflow: TextOverflow.ellipsis, | ||
| 224 | + style: TextStyle( | ||
| 225 | + color: widget.from == 'history' | ||
| 226 | + ? MyColours.color_BFC4D4 | ||
| 227 | + : notSelect | ||
| 228 | + ? MyColours.color_515151 | ||
| 229 | + : MyColours | ||
| 230 | + .color_999999, | ||
| 231 | + fontSize: | ||
| 232 | + ScreenUtil().setSp(20), | ||
| 233 | + )), | ||
| 253 | ), | 234 | ), |
| 254 | - ), | ||
| 255 | - Container( | ||
| 256 | - // constraints: BoxConstraints( | ||
| 257 | - // minWidth: w(34), | ||
| 258 | - // ), | ||
| 259 | - width: w(30), | ||
| 260 | - decoration: BoxDecoration( | ||
| 261 | - borderRadius: | ||
| 262 | - BorderRadius.circular(r(5)), | ||
| 263 | - border: Border.all( | ||
| 264 | - width: w(1), | ||
| 265 | - color: | ||
| 266 | - MyColours.color_438E93)), | ||
| 267 | - // constraints: BoxConstraints(minWidth: w(20)), | ||
| 268 | - child: TextField( | ||
| 269 | - maxLines: 1, | ||
| 270 | - controller: sunModel.numberC, | ||
| 271 | - // focusNode: _focusNode, | ||
| 272 | - // autofocus: true, | ||
| 273 | - | ||
| 274 | - inputFormatters: [ | ||
| 275 | - FilteringTextInputFormatter.allow( | ||
| 276 | - RegExp(r'[0-9]')), | ||
| 277 | - ], | ||
| 278 | - | ||
| 279 | - style: TextStyle( | ||
| 280 | - color: MyColours.color_438E93, | ||
| 281 | - fontSize: font(11)), | ||
| 282 | - textAlign: TextAlign.center, | ||
| 283 | - // textAlignVertical: TextAlignVertical.center, | ||
| 284 | - decoration: InputDecoration( | ||
| 285 | - hintText: "数量", | ||
| 286 | - isCollapsed: true, | ||
| 287 | - hintStyle: TextStyle( | ||
| 288 | - color: MyColours.color_999999, | ||
| 289 | - fontSize: font(11), | 235 | + ], |
| 236 | + )), | ||
| 237 | + if (widget.from == 'select' && | ||
| 238 | + sunModel.isType == '3' && | ||
| 239 | + widget.radio) | ||
| 240 | + Row( | ||
| 241 | + children: [ | ||
| 242 | + InkWell( | ||
| 243 | + onTap: () { | ||
| 244 | + if (sunModel.number == 0) { | ||
| 245 | + return; | ||
| 246 | + } | ||
| 247 | + sunModel.number--; | ||
| 248 | + sunModel.numberC.text = | ||
| 249 | + '${sunModel.number}'; | ||
| 250 | + }, | ||
| 251 | + child: Container( | ||
| 252 | + height: w(40), | ||
| 253 | + padding: EdgeInsets.symmetric( | ||
| 254 | + horizontal: w(10)), | ||
| 255 | + child: Image.asset( | ||
| 256 | + Utils.getImgPath( | ||
| 257 | + 'plan_dish_minus'), | ||
| 258 | + width: w(8), | ||
| 290 | ), | 259 | ), |
| 291 | - // isCollapsed: | ||
| 292 | - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 293 | - border: OutlineInputBorder( | ||
| 294 | - borderSide: BorderSide.none), | ||
| 295 | - contentPadding: EdgeInsets.only( | ||
| 296 | - top: w(2), bottom: w(2)), | ||
| 297 | ), | 260 | ), |
| 298 | - keyboardType: | ||
| 299 | - TextInputType.numberWithOptions( | ||
| 300 | - decimal: true), | ||
| 301 | - textInputAction: | ||
| 302 | - TextInputAction.done, | 261 | + ), |
| 262 | + Container( | ||
| 263 | + // constraints: BoxConstraints( | ||
| 264 | + // minWidth: w(34), | ||
| 265 | + // ), | ||
| 266 | + width: w(30), | ||
| 267 | + decoration: BoxDecoration( | ||
| 268 | + borderRadius: | ||
| 269 | + BorderRadius.circular( | ||
| 270 | + r(5)), | ||
| 271 | + border: Border.all( | ||
| 272 | + width: w(1), | ||
| 273 | + color: MyColours | ||
| 274 | + .color_438E93)), | ||
| 275 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 276 | + child: TextField( | ||
| 277 | + maxLines: 1, | ||
| 278 | + controller: sunModel.numberC, | ||
| 279 | + // focusNode: _focusNode, | ||
| 280 | + // autofocus: true, | ||
| 303 | 281 | ||
| 304 | - onChanged: (value) { | ||
| 305 | - // bool isNumber = Utils.isNumeric( | ||
| 306 | - // value); //判断输入的内容是否是数字 | ||
| 307 | - // if (!isNumber) { | ||
| 308 | - // Utils.showToast('请输入数字'); | ||
| 309 | - // pNumC.text = ''; | ||
| 310 | - // return; | ||
| 311 | - // } else { | ||
| 312 | - if (value != null && | ||
| 313 | - value != '') { | ||
| 314 | - if (int.parse(value) > | ||
| 315 | - int.parse( | ||
| 316 | - sunModel.grantNum)) { | ||
| 317 | - Utils.showToast( | ||
| 318 | - '最大数量限制为${sunModel.grantNum}'); | ||
| 319 | - sunModel.numberC.text = | ||
| 320 | - sunModel.grantNum; | ||
| 321 | - sunModel.number = int.parse( | ||
| 322 | - sunModel.grantNum); | 282 | + inputFormatters: [ |
| 283 | + FilteringTextInputFormatter | ||
| 284 | + .allow(RegExp(r'[0-9]')), | ||
| 285 | + ], | ||
| 323 | 286 | ||
| 324 | - return; | ||
| 325 | - } | ||
| 326 | - sunModel.number = | ||
| 327 | - int.parse(value); | ||
| 328 | - } | 287 | + style: TextStyle( |
| 288 | + color: | ||
| 289 | + MyColours.color_438E93, | ||
| 290 | + fontSize: font(11)), | ||
| 291 | + textAlign: TextAlign.center, | ||
| 292 | + // textAlignVertical: TextAlignVertical.center, | ||
| 293 | + decoration: InputDecoration( | ||
| 294 | + hintText: "数量", | ||
| 295 | + isCollapsed: true, | ||
| 296 | + hintStyle: TextStyle( | ||
| 297 | + color: | ||
| 298 | + MyColours.color_999999, | ||
| 299 | + fontSize: font(11), | ||
| 300 | + ), | ||
| 301 | + // isCollapsed: | ||
| 302 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 303 | + border: OutlineInputBorder( | ||
| 304 | + borderSide: | ||
| 305 | + BorderSide.none), | ||
| 306 | + contentPadding: | ||
| 307 | + EdgeInsets.only( | ||
| 308 | + top: w(2), | ||
| 309 | + bottom: w(2)), | ||
| 310 | + ), | ||
| 311 | + keyboardType: TextInputType | ||
| 312 | + .numberWithOptions( | ||
| 313 | + decimal: true), | ||
| 314 | + textInputAction: | ||
| 315 | + TextInputAction.done, | ||
| 329 | 316 | ||
| 330 | - // } | ||
| 331 | - // setState(() {}); | ||
| 332 | - // _searchSellerLocation(); | ||
| 333 | - // customerProvider.searchData(value); | ||
| 334 | - }, | ||
| 335 | - onEditingComplete: () { | ||
| 336 | - FocusScope.of(context) | ||
| 337 | - .requestFocus( | ||
| 338 | - FocusNode()); //点击空白处隐藏键盘 | ||
| 339 | - // contantShowModel.searchData( | ||
| 340 | - // contantShowModel.controller.text); | ||
| 341 | - // _searchSellerLocation(); | ||
| 342 | - // _focusNode.unfocus(); | 317 | + onChanged: (value) { |
| 318 | + // bool isNumber = Utils.isNumeric( | ||
| 319 | + // value); //判断输入的内容是否是数字 | ||
| 320 | + // if (!isNumber) { | ||
| 321 | + // Utils.showToast('请输入数字'); | ||
| 322 | + // pNumC.text = ''; | ||
| 323 | + // return; | ||
| 324 | + // } else { | ||
| 325 | + if (value != null && | ||
| 326 | + value != '') { | ||
| 327 | + if (int.parse(value) > | ||
| 328 | + int.parse(sunModel | ||
| 329 | + .grantNum)) { | ||
| 330 | + Utils.showToast( | ||
| 331 | + '最大数量限制为${sunModel.grantNum}'); | ||
| 332 | + sunModel.numberC.text = | ||
| 333 | + sunModel.grantNum; | ||
| 334 | + sunModel.number = | ||
| 335 | + int.parse(sunModel | ||
| 336 | + .grantNum); | ||
| 337 | + | ||
| 338 | + return; | ||
| 339 | + } | ||
| 340 | + sunModel.number = | ||
| 341 | + int.parse(value); | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + // } | ||
| 345 | + // setState(() {}); | ||
| 346 | + // _searchSellerLocation(); | ||
| 347 | + // customerProvider.searchData(value); | ||
| 348 | + }, | ||
| 349 | + onEditingComplete: () { | ||
| 350 | + FocusScope.of(context) | ||
| 351 | + .requestFocus( | ||
| 352 | + FocusNode()); //点击空白处隐藏键盘 | ||
| 353 | + // contantShowModel.searchData( | ||
| 354 | + // contantShowModel.controller.text); | ||
| 355 | + // _searchSellerLocation(); | ||
| 356 | + // _focusNode.unfocus(); | ||
| 357 | + }, | ||
| 358 | + )), | ||
| 359 | + InkWell( | ||
| 360 | + onTap: () { | ||
| 361 | + if (sunModel.number == | ||
| 362 | + int.parse( | ||
| 363 | + sunModel.grantNum)) { | ||
| 364 | + Utils.showToast('已达到最大数量限制'); | ||
| 365 | + return; | ||
| 366 | + } | ||
| 367 | + sunModel.number++; | ||
| 368 | + sunModel.numberC.text = | ||
| 369 | + '${sunModel.number}'; | ||
| 343 | }, | 370 | }, |
| 344 | - )), | ||
| 345 | - InkWell( | ||
| 346 | - onTap: () { | ||
| 347 | - if (sunModel.number == | ||
| 348 | - int.parse(sunModel.grantNum)) { | ||
| 349 | - Utils.showToast('已达到最大数量限制'); | ||
| 350 | - return; | ||
| 351 | - } | ||
| 352 | - sunModel.number++; | ||
| 353 | - sunModel.numberC.text = | ||
| 354 | - '${sunModel.number}'; | ||
| 355 | - }, | ||
| 356 | - child: Container( | ||
| 357 | - height: w(40), | ||
| 358 | - padding: EdgeInsets.only( | ||
| 359 | - left: w(10), right: w(10)), | ||
| 360 | - child: Image.asset( | ||
| 361 | - Utils.getImgPath('plan_dish_add'), | ||
| 362 | - width: w(8), | 371 | + child: Container( |
| 372 | + height: w(40), | ||
| 373 | + padding: EdgeInsets.only( | ||
| 374 | + left: w(10), right: w(10)), | ||
| 375 | + child: Image.asset( | ||
| 376 | + Utils.getImgPath( | ||
| 377 | + 'plan_dish_add'), | ||
| 378 | + width: w(8), | ||
| 379 | + ), | ||
| 380 | + ), | ||
| 363 | ), | 381 | ), |
| 364 | - ), | 382 | + ], |
| 365 | ), | 383 | ), |
| 366 | - ], | ||
| 367 | - ), | ||
| 368 | - if (widget.from == 'setting' && | ||
| 369 | - sunModel.isType == '3') | ||
| 370 | - Padding( | ||
| 371 | - padding: EdgeInsets.only(right: w(20)), | ||
| 372 | - child: Text( | ||
| 373 | - '${sunModel.number}张', | ||
| 374 | - style: TextStyle( | ||
| 375 | - fontSize: font(12), | ||
| 376 | - fontWeight: FontWeight.bold, | ||
| 377 | - color: MyColours.color_438E93), | ||
| 378 | - )) | 384 | + if (widget.from == 'setting' && |
| 385 | + sunModel.isType == '3') | ||
| 386 | + Padding( | ||
| 387 | + padding: | ||
| 388 | + EdgeInsets.only(right: w(20)), | ||
| 389 | + child: Text( | ||
| 390 | + '${sunModel.number}张', | ||
| 391 | + style: TextStyle( | ||
| 392 | + fontSize: font(12), | ||
| 393 | + fontWeight: FontWeight.bold, | ||
| 394 | + color: MyColours.color_438E93), | ||
| 395 | + )) | ||
| 396 | + ], | ||
| 397 | + ), | ||
| 398 | + VEmptyView(16), | ||
| 399 | + (ObjectUtil.isNotEmpty(sunModel.stime) && | ||
| 400 | + sunModel.stime != '0') || | ||
| 401 | + (ObjectUtil.isNotEmpty( | ||
| 402 | + sunModel.etime) && | ||
| 403 | + sunModel.etime != '0') | ||
| 404 | + ? Container( | ||
| 405 | + child: Text( | ||
| 406 | + '使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}', | ||
| 407 | + style: TextStyle( | ||
| 408 | + color: widget.from == 'history' | ||
| 409 | + ? MyColours.color_BFC4D4 | ||
| 410 | + : MyColours.color_999999, | ||
| 411 | + fontSize: | ||
| 412 | + ScreenUtil().setSp(20))), | ||
| 413 | + ) | ||
| 414 | + : Container(), | ||
| 379 | ], | 415 | ], |
| 380 | ), | 416 | ), |
| 381 | - VEmptyView(16), | ||
| 382 | - (ObjectUtil.isNotEmpty(sunModel.stime) && | ||
| 383 | - sunModel.stime != '0') || | ||
| 384 | - (ObjectUtil.isNotEmpty(sunModel.etime) && | ||
| 385 | - sunModel.etime != '0') | ||
| 386 | - ? Container( | ||
| 387 | - child: Text( | ||
| 388 | - '使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}', | ||
| 389 | - style: TextStyle( | ||
| 390 | - color: widget.from == 'history' | ||
| 391 | - ? MyColours.color_BFC4D4 | ||
| 392 | - : MyColours.color_999999, | ||
| 393 | - fontSize: ScreenUtil().setSp(20))), | ||
| 394 | - ) | ||
| 395 | - : Container(), | ||
| 396 | - ], | ||
| 397 | - ), | ||
| 398 | - // widget.from == 'select' | ||
| 399 | - // ? widget.showCheck | ||
| 400 | - // ? Positioned( | ||
| 401 | - // right: 0, | ||
| 402 | - // top: ScreenUtil().setWidth(20), | ||
| 403 | - // child: Image.asset( | ||
| 404 | - // Utils.getImgPath(widget.couponSonModel.isCheck | ||
| 405 | - // ? 'check_r' | ||
| 406 | - // : 'check_un'), | ||
| 407 | - // width: ScreenUtil().setWidth(40), | ||
| 408 | - // height: ScreenUtil().setWidth(40), | ||
| 409 | - // )) | ||
| 410 | - // : Container() | ||
| 411 | - // : | ||
| 412 | - ), | ||
| 413 | - ObjectUtil.isNotEmpty(sunModel.explain) | ||
| 414 | - ? const MySeparator( | ||
| 415 | - width: 3, color: MyColours.color_f3f3f3) | ||
| 416 | - : SizedBox(), | ||
| 417 | - ObjectUtil.isNotEmpty(sunModel.explain) | ||
| 418 | - ? InkWell( | ||
| 419 | - onTap: () { | ||
| 420 | - if (explainH > 19) { | ||
| 421 | - setState(() { | ||
| 422 | - widget.couponSonModel.showText = | ||
| 423 | - !widget.couponSonModel.showText; | ||
| 424 | - }); | ||
| 425 | - } | ||
| 426 | - }, | ||
| 427 | - child: Container( | ||
| 428 | - width: double.infinity, | ||
| 429 | - decoration: BoxDecoration( | ||
| 430 | - color: widget.from == 'history' | ||
| 431 | - ? MyColours.color_ffffff | ||
| 432 | - : notSelect | 417 | + // widget.from == 'select' |
| 418 | + // ? widget.showCheck | ||
| 419 | + // ? Positioned( | ||
| 420 | + // right: 0, | ||
| 421 | + // top: ScreenUtil().setWidth(20), | ||
| 422 | + // child: Image.asset( | ||
| 423 | + // Utils.getImgPath(widget.couponSonModel.isCheck | ||
| 424 | + // ? 'check_r' | ||
| 425 | + // : 'check_un'), | ||
| 426 | + // width: ScreenUtil().setWidth(40), | ||
| 427 | + // height: ScreenUtil().setWidth(40), | ||
| 428 | + // )) | ||
| 429 | + // : Container() | ||
| 430 | + // : | ||
| 431 | + ), | ||
| 432 | + ObjectUtil.isNotEmpty(sunModel.explain) | ||
| 433 | + ? const MySeparator( | ||
| 434 | + width: 3, color: MyColours.color_f3f3f3) | ||
| 435 | + : SizedBox(), | ||
| 436 | + ObjectUtil.isNotEmpty(sunModel.explain) | ||
| 437 | + ? InkWell( | ||
| 438 | + onTap: () { | ||
| 439 | + if (explainH > 19) { | ||
| 440 | + setState(() { | ||
| 441 | + widget.couponSonModel.showText = | ||
| 442 | + !widget.couponSonModel.showText; | ||
| 443 | + }); | ||
| 444 | + } | ||
| 445 | + }, | ||
| 446 | + child: Container( | ||
| 447 | + width: double.infinity, | ||
| 448 | + decoration: BoxDecoration( | ||
| 449 | + color: widget.from == 'history' | ||
| 433 | ? MyColours.color_ffffff | 450 | ? MyColours.color_ffffff |
| 434 | - : MyColours.color_FAFAFA, | ||
| 435 | - borderRadius: BorderRadius.only( | ||
| 436 | - bottomLeft: Radius.circular( | ||
| 437 | - ScreenUtil().setWidth(20)), | ||
| 438 | - bottomRight: Radius.circular( | ||
| 439 | - ScreenUtil().setWidth(20)))), | ||
| 440 | - child: Row( | ||
| 441 | - crossAxisAlignment: | ||
| 442 | - CrossAxisAlignment.start, | ||
| 443 | - children: [ | ||
| 444 | - widget.couponSonModel.showText | ||
| 445 | - ? Container( | ||
| 446 | - padding: EdgeInsets.fromLTRB( | ||
| 447 | - ScreenUtil().setWidth(24 * 2), | ||
| 448 | - ScreenUtil().setWidth(14), | ||
| 449 | - ScreenUtil().setWidth(0), | ||
| 450 | - ScreenUtil().setWidth(14)), | ||
| 451 | - width: ScreenUtil().screenWidth - | ||
| 452 | - ScreenUtil().setWidth(92 * 2), | ||
| 453 | - child: Text( | ||
| 454 | - '说明:${sunModel.explain}', | ||
| 455 | - maxLines: 5, | ||
| 456 | - style: TextStyle( | ||
| 457 | - color: widget.from == | ||
| 458 | - 'history' | ||
| 459 | - ? MyColours | ||
| 460 | - .color_BFC4D4 | ||
| 461 | - : MyColours | ||
| 462 | - .color_999999, | ||
| 463 | - fontSize: ScreenUtil() | ||
| 464 | - .setSp(20))), | ||
| 465 | - ) | ||
| 466 | - : Container( | ||
| 467 | - padding: EdgeInsets.fromLTRB( | ||
| 468 | - ScreenUtil().setWidth(24 * 2), | ||
| 469 | - ScreenUtil().setWidth(14), | ||
| 470 | - ScreenUtil().setWidth(0), | ||
| 471 | - ScreenUtil().setWidth(14)), | ||
| 472 | - width: ScreenUtil().screenWidth - | ||
| 473 | - ScreenUtil() | ||
| 474 | - .setWidth(92 * 2) + | ||
| 475 | - ScreenUtil().setWidth(20), | ||
| 476 | - child: Text( | ||
| 477 | - '说明:${sunModel.explain}', | ||
| 478 | - maxLines: 1, | ||
| 479 | - overflow: TextOverflow.fade, | ||
| 480 | - softWrap: false, | ||
| 481 | - style: TextStyle( | ||
| 482 | - color: widget.from == | ||
| 483 | - 'history' | ||
| 484 | - ? MyColours | ||
| 485 | - .color_BFC4D4 | ||
| 486 | - : MyColours | ||
| 487 | - .color_999999, | ||
| 488 | - fontSize: ScreenUtil() | ||
| 489 | - .setSp(20))), | ||
| 490 | - ), | ||
| 491 | - Spacer(), | ||
| 492 | - explainH > 19 | ||
| 493 | - ? Container( | ||
| 494 | - margin: EdgeInsets.only( | ||
| 495 | - top: | ||
| 496 | - ScreenUtil().setWidth(10), | ||
| 497 | - right: ScreenUtil() | ||
| 498 | - .setWidth(16)), | ||
| 499 | - child: Image.asset( | ||
| 500 | - !widget.couponSonModel | ||
| 501 | - .showText | ||
| 502 | - ? Utils.getImgPath( | ||
| 503 | - 'quan_down_f') | ||
| 504 | - : Utils.getImgPath( | ||
| 505 | - 'quan_up_f'), | 451 | + : notSelect |
| 452 | + ? MyColours.color_ffffff | ||
| 453 | + : MyColours.color_FAFAFA, | ||
| 454 | + borderRadius: BorderRadius.only( | ||
| 455 | + bottomLeft: Radius.circular( | ||
| 456 | + ScreenUtil().setWidth(20)), | ||
| 457 | + bottomRight: Radius.circular( | ||
| 458 | + ScreenUtil().setWidth(20)))), | ||
| 459 | + child: Row( | ||
| 460 | + crossAxisAlignment: | ||
| 461 | + CrossAxisAlignment.start, | ||
| 462 | + children: [ | ||
| 463 | + widget.couponSonModel.showText | ||
| 464 | + ? Container( | ||
| 465 | + padding: EdgeInsets.fromLTRB( | ||
| 466 | + ScreenUtil() | ||
| 467 | + .setWidth(24 * 2), | ||
| 468 | + ScreenUtil().setWidth(14), | ||
| 469 | + ScreenUtil().setWidth(0), | ||
| 470 | + ScreenUtil() | ||
| 471 | + .setWidth(14)), | ||
| 506 | width: | 472 | width: |
| 507 | - ScreenUtil().setWidth(28), | ||
| 508 | - height: ScreenUtil() | ||
| 509 | - .setWidth(28)), | ||
| 510 | - ) | ||
| 511 | - : Container(), | ||
| 512 | - HEmptyView(14) | ||
| 513 | - ], | ||
| 514 | - )), | ||
| 515 | - ) | ||
| 516 | - : Container(), | ||
| 517 | - VEmptyView(32), | ||
| 518 | - ], | ||
| 519 | - ), | ||
| 520 | - )), | ||
| 521 | - ], | ||
| 522 | - ), | ||
| 523 | - Positioned( | ||
| 524 | - right: ScreenUtil().setWidth(100), | ||
| 525 | - top: ScreenUtil().setWidth(37 * 2), | ||
| 526 | - child: widget.showBtn | ||
| 527 | - ? RoundButton( | ||
| 528 | - width: widget.from == 'history' | ||
| 529 | - ? ScreenUtil().setWidth(44 * 2) | ||
| 530 | - : ScreenUtil().setWidth(32 * 2), | ||
| 531 | - height: ScreenUtil().setWidth(21 * 2), | ||
| 532 | - radius: ScreenUtil().setWidth(10), | ||
| 533 | - text: widget.from == 'history' | ||
| 534 | - ? '已过期' | ||
| 535 | - : notSelect | ||
| 536 | - ? '停用' | ||
| 537 | - : '启用', | ||
| 538 | - fontSize: 24, | ||
| 539 | - textColor: widget.from == 'history' | ||
| 540 | - ? MyColours.color_BFC4D4 | ||
| 541 | - : notSelect | ||
| 542 | - ? MyColours.color_438E93 | ||
| 543 | - : MyColours.color_999999, | ||
| 544 | - gradientStart: MyColours.color_ffffff, | ||
| 545 | - gradientEnd: MyColours.color_ffffff, | ||
| 546 | - borderColor: widget.from == 'history' | ||
| 547 | - ? MyColours.color_BFC4D4 | ||
| 548 | - : notSelect | ||
| 549 | - ? MyColours.color_438E93 | ||
| 550 | - : MyColours.color_999999, | ||
| 551 | - onPressed: widget.onPressedSwich, | ||
| 552 | - ) | ||
| 553 | - : Container()) | ||
| 554 | - ]), | ||
| 555 | - VEmptyView(32) | ||
| 556 | - ]); | 473 | + ScreenUtil().screenWidth - |
| 474 | + ScreenUtil() | ||
| 475 | + .setWidth(92 * 2), | ||
| 476 | + child: Text( | ||
| 477 | + '说明:${sunModel.explain}', | ||
| 478 | + maxLines: 5, | ||
| 479 | + style: TextStyle( | ||
| 480 | + color: widget.from == | ||
| 481 | + 'history' | ||
| 482 | + ? MyColours | ||
| 483 | + .color_BFC4D4 | ||
| 484 | + : MyColours | ||
| 485 | + .color_999999, | ||
| 486 | + fontSize: ScreenUtil() | ||
| 487 | + .setSp(20))), | ||
| 488 | + ) | ||
| 489 | + : Container( | ||
| 490 | + padding: EdgeInsets.fromLTRB( | ||
| 491 | + ScreenUtil() | ||
| 492 | + .setWidth(24 * 2), | ||
| 493 | + ScreenUtil().setWidth(14), | ||
| 494 | + ScreenUtil().setWidth(0), | ||
| 495 | + ScreenUtil() | ||
| 496 | + .setWidth(14)), | ||
| 497 | + width: ScreenUtil() | ||
| 498 | + .screenWidth - | ||
| 499 | + ScreenUtil() | ||
| 500 | + .setWidth(92 * 2) + | ||
| 501 | + ScreenUtil().setWidth(20), | ||
| 502 | + child: Text( | ||
| 503 | + '说明:${sunModel.explain}', | ||
| 504 | + maxLines: 1, | ||
| 505 | + overflow: | ||
| 506 | + TextOverflow.fade, | ||
| 507 | + softWrap: false, | ||
| 508 | + style: TextStyle( | ||
| 509 | + color: widget.from == | ||
| 510 | + 'history' | ||
| 511 | + ? MyColours | ||
| 512 | + .color_BFC4D4 | ||
| 513 | + : MyColours | ||
| 514 | + .color_999999, | ||
| 515 | + fontSize: ScreenUtil() | ||
| 516 | + .setSp(20))), | ||
| 517 | + ), | ||
| 518 | + Spacer(), | ||
| 519 | + explainH > 19 | ||
| 520 | + ? Container( | ||
| 521 | + margin: EdgeInsets.only( | ||
| 522 | + top: ScreenUtil() | ||
| 523 | + .setWidth(10), | ||
| 524 | + right: ScreenUtil() | ||
| 525 | + .setWidth(16)), | ||
| 526 | + child: Image.asset( | ||
| 527 | + !widget.couponSonModel | ||
| 528 | + .showText | ||
| 529 | + ? Utils.getImgPath( | ||
| 530 | + 'quan_down_f') | ||
| 531 | + : Utils.getImgPath( | ||
| 532 | + 'quan_up_f'), | ||
| 533 | + width: ScreenUtil() | ||
| 534 | + .setWidth(28), | ||
| 535 | + height: ScreenUtil() | ||
| 536 | + .setWidth(28)), | ||
| 537 | + ) | ||
| 538 | + : Container(), | ||
| 539 | + HEmptyView(14) | ||
| 540 | + ], | ||
| 541 | + )), | ||
| 542 | + ) | ||
| 543 | + : Container(), | ||
| 544 | + VEmptyView(32), | ||
| 545 | + ], | ||
| 546 | + ), | ||
| 547 | + )), | ||
| 548 | + ], | ||
| 549 | + ), | ||
| 550 | + Positioned( | ||
| 551 | + right: ScreenUtil().setWidth(100), | ||
| 552 | + top: ScreenUtil().setWidth(37 * 2), | ||
| 553 | + child: widget.showBtn | ||
| 554 | + ? RoundButton( | ||
| 555 | + width: widget.from == 'history' | ||
| 556 | + ? ScreenUtil().setWidth(44 * 2) | ||
| 557 | + : ScreenUtil().setWidth(32 * 2), | ||
| 558 | + height: ScreenUtil().setWidth(21 * 2), | ||
| 559 | + radius: ScreenUtil().setWidth(10), | ||
| 560 | + text: widget.from == 'history' | ||
| 561 | + ? '已过期' | ||
| 562 | + : notSelect | ||
| 563 | + ? '停用' | ||
| 564 | + : '启用', | ||
| 565 | + fontSize: 24, | ||
| 566 | + textColor: widget.from == 'history' | ||
| 567 | + ? MyColours.color_BFC4D4 | ||
| 568 | + : notSelect | ||
| 569 | + ? MyColours.color_438E93 | ||
| 570 | + : MyColours.color_999999, | ||
| 571 | + gradientStart: MyColours.color_ffffff, | ||
| 572 | + gradientEnd: MyColours.color_ffffff, | ||
| 573 | + borderColor: widget.from == 'history' | ||
| 574 | + ? MyColours.color_BFC4D4 | ||
| 575 | + : notSelect | ||
| 576 | + ? MyColours.color_438E93 | ||
| 577 | + : MyColours.color_999999, | ||
| 578 | + onPressed: widget.onPressedSwich, | ||
| 579 | + ) | ||
| 580 | + : Container()) | ||
| 581 | + ]), | ||
| 582 | + VEmptyView(32) | ||
| 583 | + ])); | ||
| 557 | } | 584 | } |
| 558 | } | 585 | } |
| @@ -306,11 +306,26 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | @@ -306,11 +306,26 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | ||
| 306 | Expanded( | 306 | Expanded( |
| 307 | child: RoundButton( | 307 | child: RoundButton( |
| 308 | onPressed: () async { | 308 | onPressed: () async { |
| 309 | - Map temp = { | ||
| 310 | - 'coupon': selectDataList, | ||
| 311 | - }; | ||
| 312 | - if (Navigator.canPop(context)) { | ||
| 313 | - Navigator.pop(context, temp); | 309 | + //如果是免费的优惠券,有个数的,数量为0的时候提示 |
| 310 | + bool can = true; | ||
| 311 | + for (int i = 0; i < selectDataList.length; i++) { | ||
| 312 | + CouponSunModel element = selectDataList[i]; | ||
| 313 | + if (element.isType == '3' && | ||
| 314 | + element.isCheck && | ||
| 315 | + element.number == 0) { | ||
| 316 | + Utils.showToast( | ||
| 317 | + '请输入【${element.aname}】的数量'); | ||
| 318 | + can = false; | ||
| 319 | + break; | ||
| 320 | + } | ||
| 321 | + } | ||
| 322 | + if (can) { | ||
| 323 | + Map temp = { | ||
| 324 | + 'coupon': selectDataList, | ||
| 325 | + }; | ||
| 326 | + if (Navigator.canPop(context)) { | ||
| 327 | + Navigator.pop(context, temp); | ||
| 328 | + } | ||
| 314 | } | 329 | } |
| 315 | }, | 330 | }, |
| 316 | text: '确定选择${selectDataList.length}个优惠券', | 331 | text: '确定选择${selectDataList.length}个优惠券', |
| @@ -223,6 +223,17 @@ class CouponProvider with ChangeNotifier { | @@ -223,6 +223,17 @@ class CouponProvider with ChangeNotifier { | ||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | couponList = CouponModel.fromJson(baseResp.responseData).data; | 225 | couponList = CouponModel.fromJson(baseResp.responseData).data; |
| 226 | + | ||
| 227 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 228 | + List<CouponSunModel> temp = []; | ||
| 229 | + for (int i = 0; i < couponList.length; i++) { | ||
| 230 | + if (couponList[i].isType == '2' || | ||
| 231 | + (couponList[i].isType == '1' && couponList[i].isExamine != '1')) { | ||
| 232 | + } else { | ||
| 233 | + temp.add(couponList[i]); | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + couponList = temp; | ||
| 226 | } else { | 237 | } else { |
| 227 | if (isShowLoading) { | 238 | if (isShowLoading) { |
| 228 | state = PageState.ConnectivityError; | 239 | state = PageState.ConnectivityError; |
| @@ -322,6 +333,17 @@ class CouponProvider with ChangeNotifier { | @@ -322,6 +333,17 @@ class CouponProvider with ChangeNotifier { | ||
| 322 | pageStateHistory = PageState.Success; | 333 | pageStateHistory = PageState.Success; |
| 323 | } | 334 | } |
| 324 | couponListHistory = CouponModel.fromJson(baseResp.responseData).data; | 335 | couponListHistory = CouponModel.fromJson(baseResp.responseData).data; |
| 336 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 337 | + List<CouponSunModel> temp = []; | ||
| 338 | + for (int i = 0; i < couponListHistory.length; i++) { | ||
| 339 | + if (couponListHistory[i].isType == '2' || | ||
| 340 | + (couponListHistory[i].isType == '1' && | ||
| 341 | + couponListHistory[i].isExamine != '1')) { | ||
| 342 | + } else { | ||
| 343 | + temp.add(couponListHistory[i]); | ||
| 344 | + } | ||
| 345 | + } | ||
| 346 | + couponListHistory = temp; | ||
| 325 | notifyListeners(); | 347 | notifyListeners(); |
| 326 | } else { | 348 | } else { |
| 327 | pageStateHistory = PageState.ConnectivityError; | 349 | pageStateHistory = PageState.ConnectivityError; |
| @@ -367,6 +389,18 @@ class CouponProvider with ChangeNotifier { | @@ -367,6 +389,18 @@ class CouponProvider with ChangeNotifier { | ||
| 367 | pageStateSelect = PageState.Success; | 389 | pageStateSelect = PageState.Success; |
| 368 | } | 390 | } |
| 369 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; | 391 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; |
| 392 | + | ||
| 393 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 394 | + List<CouponSunModel> temp = []; | ||
| 395 | + for (int i = 0; i < couponListSelect.length; i++) { | ||
| 396 | + if (couponListSelect[i].isType == '2' || | ||
| 397 | + (couponListSelect[i].isType == '1' && | ||
| 398 | + couponListSelect[i].isExamine != '1')) { | ||
| 399 | + } else { | ||
| 400 | + temp.add(couponListSelect[i]); | ||
| 401 | + } | ||
| 402 | + } | ||
| 403 | + couponListSelect = temp; | ||
| 370 | // if (hasModify) { | 404 | // if (hasModify) { |
| 371 | // //已经绑定 | 405 | // //已经绑定 |
| 372 | // List<CouponSunModel> temp = []; | 406 | // List<CouponSunModel> temp = []; |
| @@ -434,6 +468,17 @@ class CouponProvider with ChangeNotifier { | @@ -434,6 +468,17 @@ class CouponProvider with ChangeNotifier { | ||
| 434 | pageStateSelect = PageState.Success; | 468 | pageStateSelect = PageState.Success; |
| 435 | } | 469 | } |
| 436 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; | 470 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; |
| 471 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 472 | + List<CouponSunModel> temp = []; | ||
| 473 | + for (int i = 0; i < couponListSelect.length; i++) { | ||
| 474 | + if (couponListSelect[i].isType == '2' || | ||
| 475 | + (couponListSelect[i].isType == '1' && | ||
| 476 | + couponListSelect[i].isExamine != '1')) { | ||
| 477 | + } else { | ||
| 478 | + temp.add(couponListSelect[i]); | ||
| 479 | + } | ||
| 480 | + } | ||
| 481 | + couponListSelect = temp; | ||
| 437 | 482 | ||
| 438 | // List<CouponSunModel> temp = []; | 483 | // List<CouponSunModel> temp = []; |
| 439 | // for (int i = 0; i < couponListSelect.length; i++) { | 484 | // for (int i = 0; i < couponListSelect.length; i++) { |
| @@ -490,14 +535,23 @@ class CouponProvider with ChangeNotifier { | @@ -490,14 +535,23 @@ class CouponProvider with ChangeNotifier { | ||
| 490 | pageStateSelect = PageState.Success; | 535 | pageStateSelect = PageState.Success; |
| 491 | } | 536 | } |
| 492 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; | 537 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; |
| 538 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 539 | + List<CouponSunModel> temp1 = []; | ||
| 540 | + for (int i = 0; i < couponListSelect.length; i++) { | ||
| 541 | + if (couponListSelect[i].isType == '2' || | ||
| 542 | + (couponListSelect[i].isType == '1' && | ||
| 543 | + couponListSelect[i].isExamine != '1')) { | ||
| 544 | + } else { | ||
| 545 | + temp1.add(couponListSelect[i]); | ||
| 546 | + } | ||
| 547 | + } | ||
| 548 | + couponListSelect = temp1; | ||
| 493 | // if (hasModify) { | 549 | // if (hasModify) { |
| 494 | // //已经绑定 | 550 | // //已经绑定 |
| 495 | List<CouponSunModel> temp = []; | 551 | List<CouponSunModel> temp = []; |
| 496 | for (int i = 0; i < couponListSelect.length; i++) { | 552 | for (int i = 0; i < couponListSelect.length; i++) { |
| 497 | - if (couponListSelect[i].isType == '1' && | ||
| 498 | - couponListSelect[i].isExamine == '1' && | ||
| 499 | - couponListSelect[i].status == '1') { | ||
| 500 | - //istype == 1 店铺券 isExamine == '1 可核销券 | 553 | + if (couponListSelect[i].status == '1') { |
| 554 | + //免费券、可核销店铺券、付费券 | ||
| 501 | temp.add(couponListSelect[i]); | 555 | temp.add(couponListSelect[i]); |
| 502 | } | 556 | } |
| 503 | } | 557 | } |
| @@ -558,6 +612,17 @@ class CouponProvider with ChangeNotifier { | @@ -558,6 +612,17 @@ class CouponProvider with ChangeNotifier { | ||
| 558 | pageStateSelect = PageState.Success; | 612 | pageStateSelect = PageState.Success; |
| 559 | } | 613 | } |
| 560 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; | 614 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; |
| 615 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 616 | + List<CouponSunModel> temp = []; | ||
| 617 | + for (int i = 0; i < couponListSelect.length; i++) { | ||
| 618 | + if (couponListSelect[i].isType == '2' || | ||
| 619 | + (couponListSelect[i].isType == '1' && | ||
| 620 | + couponListSelect[i].isExamine != '1')) { | ||
| 621 | + } else { | ||
| 622 | + temp.add(couponListSelect[i]); | ||
| 623 | + } | ||
| 624 | + } | ||
| 625 | + couponListSelect = temp; | ||
| 561 | if (hasModify) { | 626 | if (hasModify) { |
| 562 | //已经绑定 | 627 | //已经绑定 |
| 563 | List<CouponSunModel> temp = []; | 628 | List<CouponSunModel> temp = []; |
| @@ -123,7 +123,7 @@ class CustomerProvider extends ChangeNotifier { | @@ -123,7 +123,7 @@ class CustomerProvider extends ChangeNotifier { | ||
| 123 | 123 | ||
| 124 | PageState pageStateMonth = PageState.Loading; | 124 | PageState pageStateMonth = PageState.Loading; |
| 125 | PageState pageStateDay = PageState.Loading; | 125 | PageState pageStateDay = PageState.Loading; |
| 126 | - PageState pageStateBirthday = PageState.Loading; | 126 | + PageState pageStateBirthday = PageState.Loading; |
| 127 | 127 | ||
| 128 | bool isrepair = false; | 128 | bool isrepair = false; |
| 129 | bool isselfphone = false; | 129 | bool isselfphone = false; |
| @@ -144,8 +144,8 @@ class CustomerProvider extends ChangeNotifier { | @@ -144,8 +144,8 @@ class CustomerProvider extends ChangeNotifier { | ||
| 144 | GetExportInfoSunModel exportInfoSunModel; //预订导出数据 | 144 | GetExportInfoSunModel exportInfoSunModel; //预订导出数据 |
| 145 | 145 | ||
| 146 | SellerGuestSunModel sellerGuestData; | 146 | SellerGuestSunModel sellerGuestData; |
| 147 | - PageState pageStateBirthdaySetting = PageState.Loading; | ||
| 148 | - List<SaiYouYunBirthdaySunModel> saiYouYunBirData = []; | 147 | + PageState pageStateBirthdaySetting = PageState.Loading; |
| 148 | + List<SaiYouYunBirthdaySunModel> saiYouYunBirData = []; | ||
| 149 | 149 | ||
| 150 | /// 获取全店日订单统计数据 | 150 | /// 获取全店日订单统计数据 |
| 151 | Future<DayStaticsSunModel> getSellerCountsListByDay( | 151 | Future<DayStaticsSunModel> getSellerCountsListByDay( |
| @@ -178,13 +178,14 @@ class CustomerProvider extends ChangeNotifier { | @@ -178,13 +178,14 @@ class CustomerProvider extends ChangeNotifier { | ||
| 178 | return dayStaticsData; | 178 | return dayStaticsData; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | - | ||
| 182 | - ///客户生日提醒短信模板 | 181 | + ///客户生日提醒短信模板 |
| 183 | 182 | ||
| 184 | - Future<bool> setSaiYouYunBirthday(BuildContext context, Map<String, String> params, | 183 | + Future<bool> setSaiYouYunBirthday( |
| 184 | + BuildContext context, Map<String, String> params, | ||
| 185 | {isShowLoading = true}) async { | 185 | {isShowLoading = true}) async { |
| 186 | BaseResp<dynamic> baseResp = await DioUtil() | 186 | BaseResp<dynamic> baseResp = await DioUtil() |
| 187 | - .request<dynamic>(context, Method.post, HttpUrl.set_sai_you_yun_birthday, | 187 | + .request<dynamic>( |
| 188 | + context, Method.post, HttpUrl.set_sai_you_yun_birthday, | ||
| 188 | data: params, showLoading: false) | 189 | data: params, showLoading: false) |
| 189 | .catchError((error) { | 190 | .catchError((error) { |
| 190 | print(error.toString()); | 191 | print(error.toString()); |
| @@ -204,13 +205,8 @@ class CustomerProvider extends ChangeNotifier { | @@ -204,13 +205,8 @@ class CustomerProvider extends ChangeNotifier { | ||
| 204 | return false; | 205 | return false; |
| 205 | } | 206 | } |
| 206 | 207 | ||
| 207 | - | ||
| 208 | - | ||
| 209 | - | ||
| 210 | - | ||
| 211 | - /// 获取客户生日提醒短信模板配置内容 | ||
| 212 | - getSaiYouYunBirthdayTemp( | ||
| 213 | - BuildContext context, Map<String, String> params, | 208 | + /// 获取客户生日提醒短信模板配置内容 |
| 209 | + getSaiYouYunBirthdayTemp(BuildContext context, Map<String, String> params, | ||
| 214 | {isShowLoading = true}) async { | 210 | {isShowLoading = true}) async { |
| 215 | BaseResp<dynamic> baseResp = await DioUtil() | 211 | BaseResp<dynamic> baseResp = await DioUtil() |
| 216 | .request<dynamic>( | 212 | .request<dynamic>( |
| @@ -227,7 +223,8 @@ class CustomerProvider extends ChangeNotifier { | @@ -227,7 +223,8 @@ class CustomerProvider extends ChangeNotifier { | ||
| 227 | }); | 223 | }); |
| 228 | if (baseResp == null) return null; | 224 | if (baseResp == null) return null; |
| 229 | if (baseResp.code == Constant.status_success) { | 225 | if (baseResp.code == Constant.status_success) { |
| 230 | - saiYouYunBirData = SaiYouYunBirthdayModel.fromJson(baseResp.responseData).data; | 226 | + saiYouYunBirData = |
| 227 | + SaiYouYunBirthdayModel.fromJson(baseResp.responseData).data; | ||
| 231 | pageStateBirthday = PageState.Success; | 228 | pageStateBirthday = PageState.Success; |
| 232 | } else { | 229 | } else { |
| 233 | if (baseResp != null) { | 230 | if (baseResp != null) { |
| @@ -562,6 +559,17 @@ class CustomerProvider extends ChangeNotifier { | @@ -562,6 +559,17 @@ class CustomerProvider extends ChangeNotifier { | ||
| 562 | if (baseResp == null) return []; | 559 | if (baseResp == null) return []; |
| 563 | if (baseResp.code == Constant.status_success) { | 560 | if (baseResp.code == Constant.status_success) { |
| 564 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; | 561 | couponListSelect = CouponModel.fromJson(baseResp.responseData).data; |
| 562 | + // 屏蔽type==2 的券 我的优惠券 | ||
| 563 | + List<CouponSunModel> temp = []; | ||
| 564 | + for (int i = 0; i < couponListSelect.length; i++) { | ||
| 565 | + if (couponListSelect[i].isType == '2' || | ||
| 566 | + (couponListSelect[i].isType == '1' && | ||
| 567 | + couponListSelect[i].isExamine != '1')) { | ||
| 568 | + } else { | ||
| 569 | + temp.add(couponListSelect[i]); | ||
| 570 | + } | ||
| 571 | + } | ||
| 572 | + couponListSelect = temp; | ||
| 565 | notifyListeners(); | 573 | notifyListeners(); |
| 566 | } else { | 574 | } else { |
| 567 | if (baseResp != null) { | 575 | if (baseResp != null) { |
| @@ -174,6 +174,7 @@ class NavigatorUtil { | @@ -174,6 +174,7 @@ class NavigatorUtil { | ||
| 174 | return _navigateTo(context, | 174 | return _navigateTo(context, |
| 175 | "${Routes.photo_manager_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose"); | 175 | "${Routes.photo_manager_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose"); |
| 176 | } | 176 | } |
| 177 | + | ||
| 177 | /// 选择桌位——一次性接口获取 | 178 | /// 选择桌位——一次性接口获取 |
| 178 | static Future goSelectTableFPageOrRerserve( | 179 | static Future goSelectTableFPageOrRerserve( |
| 179 | BuildContext context, String rid, int dateTime, String ddate_slot, | 180 | BuildContext context, String rid, int dateTime, String ddate_slot, |
| @@ -193,6 +194,7 @@ class NavigatorUtil { | @@ -193,6 +194,7 @@ class NavigatorUtil { | ||
| 193 | return _navigateTo(context, | 194 | return _navigateTo(context, |
| 194 | "${Routes.select_table_f_or_reserve}?rid=$rid&ridFeast=$ridFeast&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&hmS=$hmS&hmE=$hmE&source=$source"); | 195 | "${Routes.select_table_f_or_reserve}?rid=$rid&ridFeast=$ridFeast&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&hmS=$hmS&hmE=$hmE&source=$source"); |
| 195 | } | 196 | } |
| 197 | + | ||
| 196 | /// 选择桌位——方硕新修改的选择桌位页面 | 198 | /// 选择桌位——方硕新修改的选择桌位页面 |
| 197 | static Future goSelectTableFPage( | 199 | static Future goSelectTableFPage( |
| 198 | BuildContext context, String rid, int dateTime, String ddate_slot, | 200 | BuildContext context, String rid, int dateTime, String ddate_slot, |
| @@ -274,11 +276,10 @@ class NavigatorUtil { | @@ -274,11 +276,10 @@ class NavigatorUtil { | ||
| 274 | "${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid&back=${back}", | 276 | "${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid&back=${back}", |
| 275 | replace: replace); | 277 | replace: replace); |
| 276 | } | 278 | } |
| 277 | - | ||
| 278 | - /// 变更预订——方硕新修改页面 | 279 | + |
| 280 | + /// 变更预订——方硕新修改页面 | ||
| 279 | static void goNoteBookChangeFPageOnly( | 281 | static void goNoteBookChangeFPageOnly( |
| 280 | BuildContext context, | 282 | BuildContext context, |
| 281 | - | ||
| 282 | String rid, { | 283 | String rid, { |
| 283 | replace = false, | 284 | replace = false, |
| 284 | bool back = false, | 285 | bool back = false, |
| @@ -287,8 +288,7 @@ class NavigatorUtil { | @@ -287,8 +288,7 @@ class NavigatorUtil { | ||
| 287 | // //内部预订 | 288 | // //内部预订 |
| 288 | // detailEntity.isSetDdate = "1"; | 289 | // detailEntity.isSetDdate = "1"; |
| 289 | // } | 290 | // } |
| 290 | - _navigateTo(context, | ||
| 291 | - "${Routes.change_detail_f_only}?rid=$rid&back=${back}", | 291 | + _navigateTo(context, "${Routes.change_detail_f_only}?rid=$rid&back=${back}", |
| 292 | replace: replace); | 292 | replace: replace); |
| 293 | } | 293 | } |
| 294 | 294 | ||
| @@ -418,8 +418,6 @@ class NavigatorUtil { | @@ -418,8 +418,6 @@ class NavigatorUtil { | ||
| 418 | String position, { | 418 | String position, { |
| 419 | replace = false, | 419 | replace = false, |
| 420 | }) { | 420 | }) { |
| 421 | - | ||
| 422 | - | ||
| 423 | return _navigateTo(context, | 421 | return _navigateTo(context, |
| 424 | "${Routes.base_info_personnal_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}&position=${Uri.encodeComponent(position)}", | 422 | "${Routes.base_info_personnal_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}&position=${Uri.encodeComponent(position)}", |
| 425 | replace: replace); | 423 | replace: replace); |
| @@ -567,9 +565,7 @@ class NavigatorUtil { | @@ -567,9 +565,7 @@ class NavigatorUtil { | ||
| 567 | replace: replace); | 565 | replace: replace); |
| 568 | } | 566 | } |
| 569 | 567 | ||
| 570 | - | ||
| 571 | - | ||
| 572 | - /// 包间类型置满 | 568 | + /// 包间类型置满 |
| 573 | static Future<dynamic> goStoreTypeFillManagePageSim(BuildContext context, | 569 | static Future<dynamic> goStoreTypeFillManagePageSim(BuildContext context, |
| 574 | {replace = false}) { | 570 | {replace = false}) { |
| 575 | return _navigateTo(context, "${Routes.store_type_fill_manage_page_sim}", | 571 | return _navigateTo(context, "${Routes.store_type_fill_manage_page_sim}", |
| @@ -579,9 +575,7 @@ class NavigatorUtil { | @@ -579,9 +575,7 @@ class NavigatorUtil { | ||
| 579 | /// 短信余额显示 | 575 | /// 短信余额显示 |
| 580 | static Future<dynamic> goSmsManagePage(BuildContext context, | 576 | static Future<dynamic> goSmsManagePage(BuildContext context, |
| 581 | {replace = false}) { | 577 | {replace = false}) { |
| 582 | - return _navigateTo(context, | ||
| 583 | - "${Routes.sms_manager_page}", | ||
| 584 | - replace: replace); | 578 | + return _navigateTo(context, "${Routes.sms_manager_page}", replace: replace); |
| 585 | } | 579 | } |
| 586 | 580 | ||
| 587 | /// 短信充值 | 581 | /// 短信充值 |
| @@ -889,8 +883,10 @@ class NavigatorUtil { | @@ -889,8 +883,10 @@ class NavigatorUtil { | ||
| 889 | /// 我的客情列表 | 883 | /// 我的客情列表 |
| 890 | static Future<dynamic> goMyCustomerListPage( | 884 | static Future<dynamic> goMyCustomerListPage( |
| 891 | BuildContext context, FromPage fromPage, String uid, | 885 | BuildContext context, FromPage fromPage, String uid, |
| 892 | - {replace = false, bool needBtn = false, String index = '0',String labels = ''}) { | ||
| 893 | - | 886 | + {replace = false, |
| 887 | + bool needBtn = false, | ||
| 888 | + String index = '0', | ||
| 889 | + String labels = ''}) { | ||
| 894 | return _navigateTo(context, | 890 | return _navigateTo(context, |
| 895 | "${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}&labels=${Uri.encodeComponent(labels)}", | 891 | "${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}&labels=${Uri.encodeComponent(labels)}", |
| 896 | replace: replace); | 892 | replace: replace); |
| @@ -931,15 +927,12 @@ class NavigatorUtil { | @@ -931,15 +927,12 @@ class NavigatorUtil { | ||
| 931 | } | 927 | } |
| 932 | 928 | ||
| 933 | /// 我的创建营销 | 929 | /// 我的创建营销 |
| 934 | - static Future<dynamic> goMyMakeMarkingPage( | ||
| 935 | - BuildContext context, | ||
| 936 | - String uid, { | ||
| 937 | - replace = false, | ||
| 938 | - SelfList selfList, | ||
| 939 | - FromPage fromPage, | ||
| 940 | - String homeGid = '', | ||
| 941 | - String labels = '' | ||
| 942 | - }) { | 930 | + static Future<dynamic> goMyMakeMarkingPage(BuildContext context, String uid, |
| 931 | + {replace = false, | ||
| 932 | + SelfList selfList, | ||
| 933 | + FromPage fromPage, | ||
| 934 | + String homeGid = '', | ||
| 935 | + String labels = ''}) { | ||
| 943 | return _navigateTo(context, | 936 | return _navigateTo(context, |
| 944 | "${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid&labels=${Uri.encodeComponent(labels)}", | 937 | "${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid&labels=${Uri.encodeComponent(labels)}", |
| 945 | replace: replace); | 938 | replace: replace); |
| @@ -1439,7 +1432,7 @@ class NavigatorUtil { | @@ -1439,7 +1432,7 @@ class NavigatorUtil { | ||
| 1439 | replace: replace); | 1432 | replace: replace); |
| 1440 | } | 1433 | } |
| 1441 | 1434 | ||
| 1442 | - ///经理排菜-首页 | 1435 | + ///经理排菜-首页 |
| 1443 | /// | 1436 | /// |
| 1444 | 1437 | ||
| 1445 | static Future<dynamic> goOrderAdvanceHomePage( | 1438 | static Future<dynamic> goOrderAdvanceHomePage( |
| @@ -1723,7 +1716,7 @@ class NavigatorUtil { | @@ -1723,7 +1716,7 @@ class NavigatorUtil { | ||
| 1723 | 1716 | ||
| 1724 | ///预订安排通知定制------优惠券选择 | 1717 | ///预订安排通知定制------优惠券选择 |
| 1725 | static Future<dynamic> goMarkingCouponSelectPage( | 1718 | static Future<dynamic> goMarkingCouponSelectPage( |
| 1726 | - BuildContext context,String type, Map object, | 1719 | + BuildContext context, String type, Map object, |
| 1727 | {replace = false, bool mulSelect = true}) { | 1720 | {replace = false, bool mulSelect = true}) { |
| 1728 | return _navigateTo(context, | 1721 | return _navigateTo(context, |
| 1729 | "${Routes.marking_coupon_select_page}?object=${FluroConvertUtils.object2string(object)}&type=$type&mulSelect=${mulSelect}", | 1722 | "${Routes.marking_coupon_select_page}?object=${FluroConvertUtils.object2string(object)}&type=$type&mulSelect=${mulSelect}", |
| @@ -1758,14 +1751,13 @@ class NavigatorUtil { | @@ -1758,14 +1751,13 @@ class NavigatorUtil { | ||
| 1758 | } | 1751 | } |
| 1759 | 1752 | ||
| 1760 | ///我的------存酒详情 | 1753 | ///我的------存酒详情 |
| 1761 | - static Future<dynamic> goWineDetailPage( | ||
| 1762 | - BuildContext context, String idstr, | ||
| 1763 | - {bool isStoreWine,replace = false, bool onlyShow = false}) { | ||
| 1764 | - if(isStoreWine == null){ | ||
| 1765 | - return _navigateTo(context, | ||
| 1766 | - "${Routes.wine_detail_page}?idstr=$idstr&onlyShow=${onlyShow}", | ||
| 1767 | - replace: replace); | ||
| 1768 | - } | 1754 | + static Future<dynamic> goWineDetailPage(BuildContext context, String idstr, |
| 1755 | + {bool isStoreWine, replace = false, bool onlyShow = false}) { | ||
| 1756 | + if (isStoreWine == null) { | ||
| 1757 | + return _navigateTo(context, | ||
| 1758 | + "${Routes.wine_detail_page}?idstr=$idstr&onlyShow=${onlyShow}", | ||
| 1759 | + replace: replace); | ||
| 1760 | + } | ||
| 1769 | return _navigateTo(context, | 1761 | return _navigateTo(context, |
| 1770 | "${Routes.wine_detail_page}?idstr=$idstr&isStoreWine=${isStoreWine}&onlyShow=${onlyShow}", | 1762 | "${Routes.wine_detail_page}?idstr=$idstr&isStoreWine=${isStoreWine}&onlyShow=${onlyShow}", |
| 1771 | replace: replace); | 1763 | replace: replace); |
| @@ -1774,17 +1766,20 @@ class NavigatorUtil { | @@ -1774,17 +1766,20 @@ class NavigatorUtil { | ||
| 1774 | ///我的------存酒记录 | 1766 | ///我的------存酒记录 |
| 1775 | static Future<dynamic> goOutStoreRecordPage( | 1767 | static Future<dynamic> goOutStoreRecordPage( |
| 1776 | BuildContext context, | 1768 | BuildContext context, |
| 1777 | - String idstr, bool isStoreWine,{ | 1769 | + String idstr, |
| 1770 | + bool isStoreWine, { | ||
| 1778 | replace = false, | 1771 | replace = false, |
| 1779 | }) { | 1772 | }) { |
| 1780 | - return _navigateTo(context, "${Routes.out_store_record_page}?idstr=$idstr&isStoreWine=${isStoreWine}", | 1773 | + return _navigateTo(context, |
| 1774 | + "${Routes.out_store_record_page}?idstr=$idstr&isStoreWine=${isStoreWine}", | ||
| 1781 | replace: replace); | 1775 | replace: replace); |
| 1782 | } | 1776 | } |
| 1783 | 1777 | ||
| 1784 | ///我的------申请出库 | 1778 | ///我的------申请出库 |
| 1785 | static Future<dynamic> goApplyOutStorePage( | 1779 | static Future<dynamic> goApplyOutStorePage( |
| 1786 | BuildContext context, | 1780 | BuildContext context, |
| 1787 | - WineManageModel wineManageDetail,bool isStoreWine, { | 1781 | + WineManageModel wineManageDetail, |
| 1782 | + bool isStoreWine, { | ||
| 1788 | Map object, | 1783 | Map object, |
| 1789 | replace = false, | 1784 | replace = false, |
| 1790 | }) { | 1785 | }) { |
| @@ -1810,7 +1805,8 @@ class NavigatorUtil { | @@ -1810,7 +1805,8 @@ class NavigatorUtil { | ||
| 1810 | ///我的------出库记录列表详情页 | 1805 | ///我的------出库记录列表详情页 |
| 1811 | static Future<dynamic> goOutStoreRecordDetailPage( | 1806 | static Future<dynamic> goOutStoreRecordDetailPage( |
| 1812 | BuildContext context, | 1807 | BuildContext context, |
| 1813 | - OutWineRecordSunModel outWineRecordSunModel,bool isStoreWine, { | 1808 | + OutWineRecordSunModel outWineRecordSunModel, |
| 1809 | + bool isStoreWine, { | ||
| 1814 | replace = false, | 1810 | replace = false, |
| 1815 | }) { | 1811 | }) { |
| 1816 | return _navigateTo(context, | 1812 | return _navigateTo(context, |
| @@ -2110,7 +2106,6 @@ class NavigatorUtil { | @@ -2110,7 +2106,6 @@ class NavigatorUtil { | ||
| 2110 | replace: replace); | 2106 | replace: replace); |
| 2111 | } | 2107 | } |
| 2112 | 2108 | ||
| 2113 | - | ||
| 2114 | /// 邀请函主题选择 | 2109 | /// 邀请函主题选择 |
| 2115 | static Future<dynamic> goInvitationThemeHomePageSim( | 2110 | static Future<dynamic> goInvitationThemeHomePageSim( |
| 2116 | BuildContext context, { | 2111 | BuildContext context, { |
| @@ -2130,8 +2125,8 @@ class NavigatorUtil { | @@ -2130,8 +2125,8 @@ class NavigatorUtil { | ||
| 2130 | "${Routes.invitation_theme_home_preview_page}?themeSunModel=${FluroConvertUtils.object2string(themeSunModel)}", | 2125 | "${Routes.invitation_theme_home_preview_page}?themeSunModel=${FluroConvertUtils.object2string(themeSunModel)}", |
| 2131 | replace: replace); | 2126 | replace: replace); |
| 2132 | } | 2127 | } |
| 2133 | - | ||
| 2134 | - /// 邀请函主题选择预览 | 2128 | + |
| 2129 | + /// 邀请函主题选择预览 | ||
| 2135 | static Future<dynamic> goInvitationThemeHomePreviewPageSim( | 2130 | static Future<dynamic> goInvitationThemeHomePreviewPageSim( |
| 2136 | BuildContext context, | 2131 | BuildContext context, |
| 2137 | SellerTemplateColorListSunModel themeSunModel, { | 2132 | SellerTemplateColorListSunModel themeSunModel, { |
| @@ -2145,7 +2140,6 @@ class NavigatorUtil { | @@ -2145,7 +2140,6 @@ class NavigatorUtil { | ||
| 2145 | ///预订----添加订金 | 2140 | ///预订----添加订金 |
| 2146 | static Future<dynamic> goBookDepositPage(BuildContext context, String rid, | 2141 | static Future<dynamic> goBookDepositPage(BuildContext context, String rid, |
| 2147 | {replace = false, | 2142 | {replace = false, |
| 2148 | - | ||
| 2149 | bool isNew = true, | 2143 | bool isNew = true, |
| 2150 | BookDepositSunModel bookDepositModel}) { | 2144 | BookDepositSunModel bookDepositModel}) { |
| 2151 | return _navigateTo(context, | 2145 | return _navigateTo(context, |
| @@ -2216,6 +2210,11 @@ class NavigatorUtil { | @@ -2216,6 +2210,11 @@ class NavigatorUtil { | ||
| 2216 | CouponSunModel couponSunModel, { | 2210 | CouponSunModel couponSunModel, { |
| 2217 | replace = false, | 2211 | replace = false, |
| 2218 | }) { | 2212 | }) { |
| 2213 | + if (use == null) { | ||
| 2214 | + return _navigateTo(context, | ||
| 2215 | + "${Routes.coupon_poster_page}?id=$id&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}", | ||
| 2216 | + replace: replace); | ||
| 2217 | + } | ||
| 2219 | return _navigateTo(context, | 2218 | return _navigateTo(context, |
| 2220 | "${Routes.coupon_poster_page}?id=$id&use=${FluroConvertUtils.object2string(use)}&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}", | 2219 | "${Routes.coupon_poster_page}?id=$id&use=${FluroConvertUtils.object2string(use)}&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}", |
| 2221 | replace: replace); | 2220 | replace: replace); |
| @@ -2249,105 +2248,82 @@ class NavigatorUtil { | @@ -2249,105 +2248,82 @@ class NavigatorUtil { | ||
| 2249 | replace: replace); | 2248 | replace: replace); |
| 2250 | } | 2249 | } |
| 2251 | 2250 | ||
| 2252 | - //预订信息模块设置-自定义图文默认 | 2251 | + //预订信息模块设置-自定义图文默认 |
| 2253 | static Future<dynamic> goPaymentSettingPage( | 2252 | static Future<dynamic> goPaymentSettingPage( |
| 2254 | BuildContext context, { | 2253 | BuildContext context, { |
| 2255 | - | ||
| 2256 | replace = false, | 2254 | replace = false, |
| 2257 | }) { | 2255 | }) { |
| 2258 | return _navigateTo(context, "${Routes.payment_setting_page}", | 2256 | return _navigateTo(context, "${Routes.payment_setting_page}", |
| 2259 | replace: replace); | 2257 | replace: replace); |
| 2260 | } | 2258 | } |
| 2261 | 2259 | ||
| 2262 | - | ||
| 2263 | - | ||
| 2264 | - //小程序通知卡片样式 | 2260 | + //小程序通知卡片样式 |
| 2265 | static Future<dynamic> goMiniprogramSettingPage( | 2261 | static Future<dynamic> goMiniprogramSettingPage( |
| 2266 | BuildContext context, { | 2262 | BuildContext context, { |
| 2267 | - | ||
| 2268 | replace = false, | 2263 | replace = false, |
| 2269 | }) { | 2264 | }) { |
| 2270 | return _navigateTo(context, "${Routes.mini_program_setting_page}", | 2265 | return _navigateTo(context, "${Routes.mini_program_setting_page}", |
| 2271 | replace: replace); | 2266 | replace: replace); |
| 2272 | } | 2267 | } |
| 2273 | 2268 | ||
| 2274 | - //存酒设置模版 | 2269 | + //存酒设置模版 |
| 2275 | static Future<dynamic> goWineSettingMsgPage( | 2270 | static Future<dynamic> goWineSettingMsgPage( |
| 2276 | BuildContext context, { | 2271 | BuildContext context, { |
| 2277 | - | ||
| 2278 | replace = false, | 2272 | replace = false, |
| 2279 | }) { | 2273 | }) { |
| 2280 | return _navigateTo(context, "${Routes.wine_setting_msg_page}", | 2274 | return _navigateTo(context, "${Routes.wine_setting_msg_page}", |
| 2281 | replace: replace); | 2275 | replace: replace); |
| 2282 | } | 2276 | } |
| 2283 | 2277 | ||
| 2284 | - | ||
| 2285 | - | ||
| 2286 | -///多时段预订设置列表 | ||
| 2287 | - static Future<dynamic> goBookTimeSettingListPage( | 2278 | + ///多时段预订设置列表 |
| 2279 | + static Future<dynamic> goBookTimeSettingListPage( | ||
| 2288 | BuildContext context, { | 2280 | BuildContext context, { |
| 2289 | - | ||
| 2290 | replace = false, | 2281 | replace = false, |
| 2291 | }) { | 2282 | }) { |
| 2292 | return _navigateTo(context, "${Routes.book_time_setting_list_page}", | 2283 | return _navigateTo(context, "${Routes.book_time_setting_list_page}", |
| 2293 | replace: replace); | 2284 | replace: replace); |
| 2294 | } | 2285 | } |
| 2295 | 2286 | ||
| 2296 | - | ||
| 2297 | - | ||
| 2298 | - | ||
| 2299 | -///多时段预订设置列表编辑页面 | ||
| 2300 | - static Future<dynamic> goBookTimeSettingEditPage( | ||
| 2301 | - BuildContext context, { | ||
| 2302 | - MealListSunModel sunModel, | ||
| 2303 | - | 2287 | + ///多时段预订设置列表编辑页面 |
| 2288 | + static Future<dynamic> goBookTimeSettingEditPage( | ||
| 2289 | + BuildContext context, { | ||
| 2290 | + MealListSunModel sunModel, | ||
| 2304 | replace = false, | 2291 | replace = false, |
| 2305 | }) { | 2292 | }) { |
| 2306 | - if(sunModel != null){ | ||
| 2307 | -return _navigateTo(context, "${Routes.book_time_setting_edit_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}", | ||
| 2308 | - replace: replace); | 2293 | + if (sunModel != null) { |
| 2294 | + return _navigateTo(context, | ||
| 2295 | + "${Routes.book_time_setting_edit_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}", | ||
| 2296 | + replace: replace); | ||
| 2309 | } | 2297 | } |
| 2310 | return _navigateTo(context, "${Routes.book_time_setting_edit_page}", | 2298 | return _navigateTo(context, "${Routes.book_time_setting_edit_page}", |
| 2311 | replace: replace); | 2299 | replace: replace); |
| 2312 | - | ||
| 2313 | } | 2300 | } |
| 2314 | 2301 | ||
| 2315 | - | ||
| 2316 | ///停车指引 | 2302 | ///停车指引 |
| 2317 | - static Future<dynamic> goParkInfoPage( | 2303 | + static Future<dynamic> goParkInfoPage( |
| 2318 | BuildContext context, { | 2304 | BuildContext context, { |
| 2319 | - | ||
| 2320 | replace = false, | 2305 | replace = false, |
| 2321 | }) { | 2306 | }) { |
| 2322 | - return _navigateTo(context, "${Routes.park_info_page}", | ||
| 2323 | - replace: replace); | 2307 | + return _navigateTo(context, "${Routes.park_info_page}", replace: replace); |
| 2324 | } | 2308 | } |
| 2325 | 2309 | ||
| 2326 | - | ||
| 2327 | - | ||
| 2328 | - | ||
| 2329 | - | ||
| 2330 | - ///设置纪念日营销 | ||
| 2331 | - static Future<dynamic> goBirthdaySettingPage( | 2310 | + ///设置纪念日营销 |
| 2311 | + static Future<dynamic> goBirthdaySettingPage( | ||
| 2332 | BuildContext context, { | 2312 | BuildContext context, { |
| 2333 | - | ||
| 2334 | replace = false, | 2313 | replace = false, |
| 2335 | }) { | 2314 | }) { |
| 2336 | return _navigateTo(context, "${Routes.birthday_setting_page}", | 2315 | return _navigateTo(context, "${Routes.birthday_setting_page}", |
| 2337 | replace: replace); | 2316 | replace: replace); |
| 2338 | } | 2317 | } |
| 2339 | 2318 | ||
| 2340 | - | ||
| 2341 | - | ||
| 2342 | - | ||
| 2343 | - ///生日短信模版 | ||
| 2344 | - static Future<dynamic> goBirthdaySmsModuleSettingPage( | ||
| 2345 | - BuildContext context, String type, { | ||
| 2346 | - | 2319 | + ///生日短信模版 |
| 2320 | + static Future<dynamic> goBirthdaySmsModuleSettingPage( | ||
| 2321 | + BuildContext context, | ||
| 2322 | + String type, { | ||
| 2347 | replace = false, | 2323 | replace = false, |
| 2348 | }) { | 2324 | }) { |
| 2349 | - return _navigateTo(context, "${Routes.birthday_sms_module_setting_page}?type=$type", | 2325 | + return _navigateTo( |
| 2326 | + context, "${Routes.birthday_sms_module_setting_page}?type=$type", | ||
| 2350 | replace: replace); | 2327 | replace: replace); |
| 2351 | } | 2328 | } |
| 2352 | - | ||
| 2353 | } | 2329 | } |
| @@ -757,15 +757,12 @@ var noteBookChangeFPageOnlyHandle = new Handler( | @@ -757,15 +757,12 @@ var noteBookChangeFPageOnlyHandle = new Handler( | ||
| 757 | create: (_) => MarketingCenterProvider(), | 757 | create: (_) => MarketingCenterProvider(), |
| 758 | child: ChangeNotifierProvider<NotebookDetailModel>( | 758 | child: ChangeNotifierProvider<NotebookDetailModel>( |
| 759 | create: (_) => NotebookDetailModel(), | 759 | create: (_) => NotebookDetailModel(), |
| 760 | - child: ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 761 | - create: (_) => StoreBaseIndoProvider(), | ||
| 762 | - child:NoteBookChangeFPageOnly( | ||
| 763 | - rid: rid, | ||
| 764 | - back: back, | ||
| 765 | - ))))))); | ||
| 766 | - | ||
| 767 | - | ||
| 768 | - | 760 | + child: ChangeNotifierProvider<StoreBaseIndoProvider>( |
| 761 | + create: (_) => StoreBaseIndoProvider(), | ||
| 762 | + child: NoteBookChangeFPageOnly( | ||
| 763 | + rid: rid, | ||
| 764 | + back: back, | ||
| 765 | + ))))))); | ||
| 769 | }); | 766 | }); |
| 770 | 767 | ||
| 771 | // 跳转可订时段管理页面 | 768 | // 跳转可订时段管理页面 |
| @@ -1193,8 +1190,6 @@ var storeTypeFillManagePageHandler = new Handler( | @@ -1193,8 +1190,6 @@ var storeTypeFillManagePageHandler = new Handler( | ||
| 1193 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | 1190 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); |
| 1194 | }); | 1191 | }); |
| 1195 | 1192 | ||
| 1196 | - | ||
| 1197 | - | ||
| 1198 | ///包间置满管理 | 1193 | ///包间置满管理 |
| 1199 | var storeTypeFillManagePageSimHandler = new Handler( | 1194 | var storeTypeFillManagePageSimHandler = new Handler( |
| 1200 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 1195 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| @@ -1540,10 +1535,11 @@ var customerSettingPageHandle = new Handler( | @@ -1540,10 +1535,11 @@ var customerSettingPageHandle = new Handler( | ||
| 1540 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 1535 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| 1541 | // String idstr = params["idstr"].first; | 1536 | // String idstr = params["idstr"].first; |
| 1542 | 1537 | ||
| 1543 | - | ||
| 1544 | return ChangeNotifierProvider<CustomerProvider>( | 1538 | return ChangeNotifierProvider<CustomerProvider>( |
| 1545 | - create: (_) => CustomerProvider(), child: ChangeNotifierProvider<MarketingCenterProvider>( | ||
| 1546 | - create: (_) => MarketingCenterProvider(), child: CustomerSettingPage())); | 1539 | + create: (_) => CustomerProvider(), |
| 1540 | + child: ChangeNotifierProvider<MarketingCenterProvider>( | ||
| 1541 | + create: (_) => MarketingCenterProvider(), | ||
| 1542 | + child: CustomerSettingPage())); | ||
| 1547 | }); | 1543 | }); |
| 1548 | 1544 | ||
| 1549 | ///全店营销记录 | 1545 | ///全店营销记录 |
| @@ -2064,19 +2060,21 @@ var feastCreatePageHandle = new Handler( | @@ -2064,19 +2060,21 @@ var feastCreatePageHandle = new Handler( | ||
| 2064 | create: (_) => FeastModel(), | 2060 | create: (_) => FeastModel(), |
| 2065 | child: ChangeNotifierProvider<ChooseTableModel>( | 2061 | child: ChangeNotifierProvider<ChooseTableModel>( |
| 2066 | create: (_) => ChooseTableModel(), | 2062 | create: (_) => ChooseTableModel(), |
| 2067 | - child:ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 2068 | - create: (_) => StoreBaseIndoProvider(), | ||
| 2069 | - child: FeastCreatePage( | ||
| 2070 | - banquetDetail: banquetDetail, isCreate: isCreate, rid: rid)))); | 2063 | + child: ChangeNotifierProvider<StoreBaseIndoProvider>( |
| 2064 | + create: (_) => StoreBaseIndoProvider(), | ||
| 2065 | + child: FeastCreatePage( | ||
| 2066 | + banquetDetail: banquetDetail, | ||
| 2067 | + isCreate: isCreate, | ||
| 2068 | + rid: rid)))); | ||
| 2071 | } | 2069 | } |
| 2072 | return ChangeNotifierProvider<FeastModel>( | 2070 | return ChangeNotifierProvider<FeastModel>( |
| 2073 | create: (_) => FeastModel(), | 2071 | create: (_) => FeastModel(), |
| 2074 | child: ChangeNotifierProvider<ChooseTableModel>( | 2072 | child: ChangeNotifierProvider<ChooseTableModel>( |
| 2075 | create: (_) => ChooseTableModel(), | 2073 | create: (_) => ChooseTableModel(), |
| 2076 | - child:ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 2077 | - create: (_) => StoreBaseIndoProvider(), | ||
| 2078 | - child: FeastCreatePage( | ||
| 2079 | - banquetDetail: banquetDetail, isCreate: isCreate)))); | 2074 | + child: ChangeNotifierProvider<StoreBaseIndoProvider>( |
| 2075 | + create: (_) => StoreBaseIndoProvider(), | ||
| 2076 | + child: FeastCreatePage( | ||
| 2077 | + banquetDetail: banquetDetail, isCreate: isCreate)))); | ||
| 2080 | }); | 2078 | }); |
| 2081 | 2079 | ||
| 2082 | ///宴会----添加订金 | 2080 | ///宴会----添加订金 |
| @@ -3108,7 +3106,8 @@ var markingCouponSelectPageHandle = new Handler( | @@ -3108,7 +3106,8 @@ var markingCouponSelectPageHandle = new Handler( | ||
| 3108 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); | 3106 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); |
| 3109 | return ChangeNotifierProvider<MarketingCenterProvider>( | 3107 | return ChangeNotifierProvider<MarketingCenterProvider>( |
| 3110 | create: (_) => MarketingCenterProvider(), | 3108 | create: (_) => MarketingCenterProvider(), |
| 3111 | - child: MarkingCouponSelectPage(type:type,couponList: res, mulSelect: mulSelect)); | 3109 | + child: MarkingCouponSelectPage( |
| 3110 | + type: type, couponList: res, mulSelect: mulSelect)); | ||
| 3112 | }); | 3111 | }); |
| 3113 | 3112 | ||
| 3114 | //我的----营销中心-预订安排预览页 | 3113 | //我的----营销中心-预订安排预览页 |
| @@ -3674,8 +3673,9 @@ var collectStoreInfoPageHandle = new Handler( | @@ -3674,8 +3673,9 @@ var collectStoreInfoPageHandle = new Handler( | ||
| 3674 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first))); | 3673 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first))); |
| 3675 | 3674 | ||
| 3676 | return ChangeNotifierProvider<CollectStoreProvider>( | 3675 | return ChangeNotifierProvider<CollectStoreProvider>( |
| 3677 | - create: (_) => CollectStoreProvider(), child:ChangeNotifierProvider<OtherLoginProvider>( | ||
| 3678 | - create: (_) => OtherLoginProvider(), child: CollectStoreInfoPage())); | 3676 | + create: (_) => CollectStoreProvider(), |
| 3677 | + child: ChangeNotifierProvider<OtherLoginProvider>( | ||
| 3678 | + create: (_) => OtherLoginProvider(), child: CollectStoreInfoPage())); | ||
| 3679 | }); | 3679 | }); |
| 3680 | 3680 | ||
| 3681 | //邀请函主题选择 | 3681 | //邀请函主题选择 |
| @@ -3833,8 +3833,12 @@ var couponPosterPageHandle = new Handler( | @@ -3833,8 +3833,12 @@ var couponPosterPageHandle = new Handler( | ||
| 3833 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 3833 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 3834 | String id = params["id"].first; | 3834 | String id = params["id"].first; |
| 3835 | // String smsTemplate = params["smsTemplate"].first; | 3835 | // String smsTemplate = params["smsTemplate"].first; |
| 3836 | - CouponUse use = CouponUse.fromJson( | ||
| 3837 | - json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); | 3836 | + CouponUse use; |
| 3837 | + if (params.keys.contains('use')) { | ||
| 3838 | + use = CouponUse.fromJson(json | ||
| 3839 | + .decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); | ||
| 3840 | + } | ||
| 3841 | + | ||
| 3838 | CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( | 3842 | CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( |
| 3839 | FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); | 3843 | FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); |
| 3840 | return ChangeNotifierProvider<BaseIndoProvider>( | 3844 | return ChangeNotifierProvider<BaseIndoProvider>( |
| @@ -3931,10 +3935,6 @@ var wineSettingMsgPageHandle = new Handler( | @@ -3931,10 +3935,6 @@ var wineSettingMsgPageHandle = new Handler( | ||
| 3931 | create: (_) => CustomerProvider(), child: WineSettingMsgPage())); | 3935 | create: (_) => CustomerProvider(), child: WineSettingMsgPage())); |
| 3932 | }); | 3936 | }); |
| 3933 | 3937 | ||
| 3934 | - | ||
| 3935 | - | ||
| 3936 | - | ||
| 3937 | - | ||
| 3938 | ///多时段预订设置列表 | 3938 | ///多时段预订设置列表 |
| 3939 | var bookTimeSettingListPageHandle = new Handler( | 3939 | var bookTimeSettingListPageHandle = new Handler( |
| 3940 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 3940 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| @@ -3944,13 +3944,10 @@ var bookTimeSettingListPageHandle = new Handler( | @@ -3944,13 +3944,10 @@ var bookTimeSettingListPageHandle = new Handler( | ||
| 3944 | // json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); | 3944 | // json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); |
| 3945 | // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( | 3945 | // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( |
| 3946 | // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); | 3946 | // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); |
| 3947 | - return ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 3948 | - create: (_) => StoreBaseIndoProvider(), | ||
| 3949 | - child: BookTimeSettingListPage()); | 3947 | + return ChangeNotifierProvider<StoreBaseIndoProvider>( |
| 3948 | + create: (_) => StoreBaseIndoProvider(), child: BookTimeSettingListPage()); | ||
| 3950 | }); | 3949 | }); |
| 3951 | 3950 | ||
| 3952 | - | ||
| 3953 | - | ||
| 3954 | ///多时段预订设置编辑页面 | 3951 | ///多时段预订设置编辑页面 |
| 3955 | var bookTimeSettingEditPageHandle = new Handler( | 3952 | var bookTimeSettingEditPageHandle = new Handler( |
| 3956 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 3953 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| @@ -3959,23 +3956,20 @@ var bookTimeSettingEditPageHandle = new Handler( | @@ -3959,23 +3956,20 @@ var bookTimeSettingEditPageHandle = new Handler( | ||
| 3959 | // CouponUse use = CouponUse.fromJson( | 3956 | // CouponUse use = CouponUse.fromJson( |
| 3960 | // json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); | 3957 | // json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first))); |
| 3961 | 3958 | ||
| 3962 | - if (params.keys.contains('sunModel')) { | ||
| 3963 | - MealListSunModel sunModel = MealListSunModel.fromJson(json.decode( | ||
| 3964 | - FluroConvertUtils.fluroCnParamsDecode(params["sunModel"].first))); | ||
| 3965 | - return ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 3966 | - create: (_) => StoreBaseIndoProvider(), | ||
| 3967 | - child: BookTimeSettingEditPage(sunModel)); | ||
| 3968 | - } | ||
| 3969 | - return ChangeNotifierProvider<StoreBaseIndoProvider>( | 3959 | + if (params.keys.contains('sunModel')) { |
| 3960 | + MealListSunModel sunModel = MealListSunModel.fromJson(json.decode( | ||
| 3961 | + FluroConvertUtils.fluroCnParamsDecode(params["sunModel"].first))); | ||
| 3962 | + return ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 3963 | + create: (_) => StoreBaseIndoProvider(), | ||
| 3964 | + child: BookTimeSettingEditPage(sunModel)); | ||
| 3965 | + } | ||
| 3966 | + return ChangeNotifierProvider<StoreBaseIndoProvider>( | ||
| 3970 | create: (_) => StoreBaseIndoProvider(), | 3967 | create: (_) => StoreBaseIndoProvider(), |
| 3971 | - child: BookTimeSettingEditPage(null)); | ||
| 3972 | - | 3968 | + child: BookTimeSettingEditPage(null)); |
| 3973 | }); | 3969 | }); |
| 3974 | 3970 | ||
| 3975 | - | ||
| 3976 | //停车指引介绍 | 3971 | //停车指引介绍 |
| 3977 | 3972 | ||
| 3978 | - | ||
| 3979 | var parkInfoPageHandle = new Handler( | 3973 | var parkInfoPageHandle = new Handler( |
| 3980 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 3974 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| 3981 | // String idstr = params["idstr"].first; | 3975 | // String idstr = params["idstr"].first; |
| @@ -3985,35 +3979,23 @@ var parkInfoPageHandle = new Handler( | @@ -3985,35 +3979,23 @@ var parkInfoPageHandle = new Handler( | ||
| 3985 | create: (_) => MarketingCenterProvider(), child: ParkInfoPage()); | 3979 | create: (_) => MarketingCenterProvider(), child: ParkInfoPage()); |
| 3986 | }); | 3980 | }); |
| 3987 | 3981 | ||
| 3988 | - | ||
| 3989 | - | ||
| 3990 | var birthdaySettingPageHandle = new Handler( | 3982 | var birthdaySettingPageHandle = new Handler( |
| 3991 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 3983 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| 3992 | // String idstr = params["idstr"].first; | 3984 | // String idstr = params["idstr"].first; |
| 3993 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json | 3985 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json |
| 3994 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); | 3986 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); |
| 3995 | 3987 | ||
| 3996 | - | ||
| 3997 | - return ChangeNotifierProvider<CustomerProvider>( | 3988 | + return ChangeNotifierProvider<CustomerProvider>( |
| 3998 | create: (_) => CustomerProvider(), child: BirthdaySettingPage()); | 3989 | create: (_) => CustomerProvider(), child: BirthdaySettingPage()); |
| 3999 | }); | 3990 | }); |
| 4000 | 3991 | ||
| 4001 | - | ||
| 4002 | - | ||
| 4003 | - | ||
| 4004 | - | ||
| 4005 | - var birthdaySmsModuleSettingPageHandle = new Handler( | 3992 | +var birthdaySmsModuleSettingPageHandle = new Handler( |
| 4006 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 3993 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| 4007 | String type = params["type"].first; | 3994 | String type = params["type"].first; |
| 4008 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json | 3995 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json |
| 4009 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); | 3996 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); |
| 4010 | 3997 | ||
| 4011 | - | ||
| 4012 | - return ChangeNotifierProvider<CustomerProvider>( | ||
| 4013 | - create: (_) => CustomerProvider(), child: BirthdaySmsModuleSettingPage(type:type)); | 3998 | + return ChangeNotifierProvider<CustomerProvider>( |
| 3999 | + create: (_) => CustomerProvider(), | ||
| 4000 | + child: BirthdaySmsModuleSettingPage(type: type)); | ||
| 4014 | }); | 4001 | }); |
| 4015 | - | ||
| 4016 | - | ||
| 4017 | - | ||
| 4018 | - | ||
| 4019 | - |
| @@ -2057,7 +2057,7 @@ class Utils { | @@ -2057,7 +2057,7 @@ class Utils { | ||
| 2057 | 2057 | ||
| 2058 | //跳转到优惠券购买页面 | 2058 | //跳转到优惠券购买页面 |
| 2059 | static goShareBuyCouponToWeChat(BuildContext context, String couponid, | 2059 | static goShareBuyCouponToWeChat(BuildContext context, String couponid, |
| 2060 | - CouponUse use, CouponSunModel couponSunModel) async { | 2060 | + String type, CouponUse use, CouponSunModel couponSunModel) async { |
| 2061 | String _webPageUrl = "http://colorcun.com/"; | 2061 | String _webPageUrl = "http://colorcun.com/"; |
| 2062 | // String _thumbnail = | 2062 | // String _thumbnail = |
| 2063 | // "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1"; | 2063 | // "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1"; |
| @@ -2104,8 +2104,18 @@ class Utils { | @@ -2104,8 +2104,18 @@ class Utils { | ||
| 2104 | } | 2104 | } |
| 2105 | 2105 | ||
| 2106 | String _userName = "gh_487873d353b3"; | 2106 | String _userName = "gh_487873d353b3"; |
| 2107 | - String _path = | ||
| 2108 | - "pack-activity/pack/buyCoupon?id=$couponid&name=${Provider.of<UserModel>(context, listen: false).user.sellername}&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3"; | 2107 | + String _path; |
| 2108 | + if (type == '3') { | ||
| 2109 | + _thumbnail = 'https://nosqn.colorcun.com/share_money.png'; | ||
| 2110 | + _title = | ||
| 2111 | + '免费获取${Provider.of<UserModel>(context, listen: false).user.sellername}${couponSunModel.price}元代金券,点击查看详情。'; | ||
| 2112 | + _path = | ||
| 2113 | + "pack-activity/pack/receiveCoupon?id=$couponid&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3"; | ||
| 2114 | + } else { | ||
| 2115 | + _path = | ||
| 2116 | + "pack-activity/pack/buyCoupon?id=$couponid&name=${Provider.of<UserModel>(context, listen: false).user.sellername}&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3"; | ||
| 2117 | + } | ||
| 2118 | + | ||
| 2109 | // if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') { | 2119 | // if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') { |
| 2110 | // //京厨九跳转新的邀请函地址 | 2120 | // //京厨九跳转新的邀请函地址 |
| 2111 | // _path = | 2121 | // _path = |
-
Please register or login to post a comment