From 4119782100d752e94bb24e47f4df2b6f20aca5eb Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Wed, 28 Jun 2023 18:08:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BB=93=E7=AE=97=E9=A1=B5=EF=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BC=9A=E5=91=98=E6=9D=83=E7=9B=8A=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=E4=BC=98=E6=83=A0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=9B=20=E6=96=B0=E5=A2=9E=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=97=A5=E4=BC=98=E6=83=A0=EF=BC=9B=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=88=91=E7=9A=84=E7=89=A9=E6=B5=81=E9=A1=B5=EF=BC=9B=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=89=A9=E6=B5=81=E8=B8=AA=E8=BF=B9=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8F=BD=E6=94=B6=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=9B=20=E7=81=AB=E9=94=85=E5=BA=97=E6=80=BB?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E6=9B=B4=E6=94=B9=EF=BC=9A=EF=BC=88=E6=80=BB?= =?UTF-8?q?=E4=BC=98=E6=83=A0+=E4=BC=98=E6=83=A0=E5=88=B8=E4=BC=98?= =?UTF-8?q?=E6=83=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/vip_day_logo.webp | Bin 0 -> 1342 bytes assets/image/2x/vip_equity_logo.webp | Bin 0 -> 882 bytes assets/image/2x/vip_level_logo.webp | Bin 0 -> 996 bytes assets/image/3x/vip_day_logo.webp | Bin 0 -> 3530 bytes assets/image/3x/vip_equity_logo.webp | Bin 0 -> 1194 bytes assets/image/3x/vip_level_logo.webp | Bin 0 -> 1370 bytes assets/image/vip_day_logo.webp | Bin 0 -> 790 bytes assets/image/vip_equity_logo.webp | Bin 0 -> 700 bytes assets/image/vip_level_logo.webp | Bin 0 -> 696 bytes lib/order/logistics_information_page.dart | 63 +++- lib/retrofit/data/settleOrderInfo.dart | 7 +- lib/settlement/settlement.dart | 192 ++++++++--- .../activity_coupon_remarks.dart | 297 +++++++++--------- .../settlement_order_commodity.dart | 22 +- .../settlement_view/vip_discounts_select.dart | 195 ++++++++++++ 15 files changed, 575 insertions(+), 201 deletions(-) create mode 100644 assets/image/2x/vip_day_logo.webp create mode 100644 assets/image/2x/vip_equity_logo.webp create mode 100644 assets/image/2x/vip_level_logo.webp create mode 100644 assets/image/3x/vip_day_logo.webp create mode 100644 assets/image/3x/vip_equity_logo.webp create mode 100644 assets/image/3x/vip_level_logo.webp create mode 100644 assets/image/vip_day_logo.webp create mode 100644 assets/image/vip_equity_logo.webp create mode 100644 assets/image/vip_level_logo.webp create mode 100644 lib/settlement/settlement_view/vip_discounts_select.dart diff --git a/assets/image/2x/vip_day_logo.webp b/assets/image/2x/vip_day_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..2b4f3d8d48dfa8bb156f2a3f36a347cf6e51bf47 GIT binary patch literal 1342 zcmWIYbaOLfWnc(*bqWXzu!!JdU|=u+Vs$X`baoCn!3g9sFrEOBEI_H;ypp0IcPE92 z$S4K&2Mmlr2nLDC#RU)+RuZV{+ck*V%eq)q;1}dfNi9wWD)|7!Dn&rcfo>83vPIG% zYz+`Q3BtAkvCB&eN`PttK=2?(*InG6iuTNxN6ZXv`}7BDdI zw=ghlJC6`Ugh@eSQ6ktl79h!#md3#FX*mM}ZzKbQ@C612u4u3vkig+K1)!7+&|UdJ zn9h*HkjkLI;K`83kj$V5WElY?)sVpq7{fju%nS_r>IXOl?z38M%Ds9j>iWKeAJiSE zsdzE@#J;;3A@G^sa*|4TXzAjIEy6cCCr2pyKRT`1mV3L+cc#~N7VkUOyNe4;OJ6@Z zc=_r=cYSsD)5m9rUf!;5zpVM?@%Gfq>-|sfvOhfkP~vv}|GVnX?)TSbzjJN<&+S{& zY9zUTZ(0&4WKqC;+fDh4DC_kpTRc@wlcOgzt)IC~>c%pUpvhe!K@(fF6j>7eDuuL` zh)nkC;@tayfB!P>_`{-_hc0+}DKb%YakSB}1&z zOL1wy1P)0Sg%rUF0*sB!6Am&cDsVNlC`ed&a4<1!WKdvXaL{R(z{J53Aja0g%9zCX z!2U`8?Xo>*Wq-fTxjJ`x>b`25%sq6F_v9+qyo+<=ND)+R`H9RJf++%ob z)pIi;R=c^DHC0cV*;YtYSNu4!_+8oXUh($AX5x;XQmvAtj}Lqd+C)bGI6TOD`D zFHHCmqaGV_b&SNkbH7wkM)yI^u?Vd*aC{r#Uk&S(nDu8YvMHGenj?bFwFyI-zWDU!bL zI_I+I+l1-wR_e%qeDhOI=~T4NnTsplF$1vS4+kws^-q{Q_L{8d*`*%D2mlA*+mrwR literal 0 HcmV?d00001 diff --git a/assets/image/2x/vip_equity_logo.webp b/assets/image/2x/vip_equity_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..7f16c0cc9a1ddb5f39d8bf97bd32fe97c52952d8 GIT binary patch literal 882 zcmWIYbaTsMW?%?+bqWXzu!!JdU|=u+Vs$X`baoCn!3g9sFrEOBEI_H;ypp0IcPE92 z$S4K&2Mmlr2nLDC#RU)+RuZV{+ck*V%eq)q;1}dfNi9wWD)|7!Dn&rcfo>83vPIG% zYz+`Q3BtAkvCB&eN`PttK=2?(*InG6iuTNxN6ZXv`}7BDdI zw=ghlJC6`Ugh@eSQ6ktl79h!#md3#FX*mM}ZzKbQ@C612u4u3vkig+K1)!7+&|UdJ zn9h*HkjkLI;K`83kj$V5WElY?)sVpq7{fj_j0_C=>IXOljxXGid)s4E_51%XpY`1G zD7tcWbLIEa&J!PxoAuoG2nxBn`}mwEPyeSHcByz4T1$=XKUY|IhFI{OiP@ z7y1W!BTjI8sCc%Y5c24(xPP$2(E4rf#pni?iBX-$-Y`T-zvb1HDU`TWxK8v^wV6Ud z)682VC&>`szAHxQf+hJGlJlE-X-OGKh^Yy&{7cTtv3#xJd z65n{+%&Tu^bv=h-%bpd|;2>yNruRueY~z|Y3=UOp%g>0dW6F?Txk*uveD2bgGIrgHS8_2~GcVru zU!8V*?{?97(PdvgDP$T=e7A4gIa>*p{oDWl-uL&*QUCRSzMS{>zx(B;|9jd0{M-L) GFaQ83z7M(p literal 0 HcmV?d00001 diff --git a/assets/image/2x/vip_level_logo.webp b/assets/image/2x/vip_level_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..e26a13cfbc8164758330738161f3477d192036e9 GIT binary patch literal 996 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 O^|NxhXDAj*^}hf}CmU7( literal 0 HcmV?d00001 diff --git a/assets/image/3x/vip_equity_logo.webp b/assets/image/3x/vip_equity_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..1a8681731a32d6de09376f9c7176610f77aa4ded GIT binary patch literal 1194 zcmWIYbaPw8!oU#j>J$(bU=hK^z`$St#MWTs>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9z}R45N=sv4__UmXfj5$YLHGg#16MRy4oKi|n*vZu2I#JQ zAWUb-VMt|AVDMzfV@PJu1G0>Ok!r|b28>~!Eldmy`ql^d1o|H@n5g3T^49L^1N#+f z6xudFTrp9_ebt#)k<|2Ai3TUNcxR zIULw|Z&D=t@sffye-|3arYW{^9JiadOq=ofN5Px7gH;$NZnZt5!?*dwnMVvVf{VCc z%+ND>&2eIu@}x5|*|HN~Dz$QGx^Oi#C@^^_3VAefv#8gI zbDtcOy#D|GY1{J|#*6;*+%XH9lKO1-O#K!CCl1S(o8bG9jERGbc0d zgyyaVu3y+(EqA6)I5q9*vv{klD~_ML73b>ed7iu~?=UBQ;uS`?U2w*dJ3ChLdQMV- zp(VX5S8rB}y}vG2Rx_OIH hVpOEbTAn#!-~6;bFTZL!>6L|N>FOs|u|cs$3;@QpowWb} literal 0 HcmV?d00001 diff --git a/assets/image/3x/vip_level_logo.webp b/assets/image/3x/vip_level_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..378aa4399c19b2ce520520ab807a9081df755ed4 GIT binary patch literal 1370 zcmWIYbaM-0Wnc(*bqWXzu!!JdU|=u+Vrww+baoCn!3g9sFrEOBEI_H;ypp0IcPE92 z$S4K&2Mmlr2nLDC#RU)+RuZV{+ck*V%eq)q;1}dfNi9wWD)|7!Dn&rcfo>83vPIG% zYz+`Q3BtAkvCB&eN`PttK=2?(*InG6iuTNxN6ZXv`}7BDdI zw=ghlJC6`Ugh@eSQ6ktl79h!#md3#FX*mM}ZzKbQ@C612u4u3vkig+K1)!7+&|UdJ zn9h*HkjkLI;K`83kj$V5WElY?)sVpq7{flv%nS_r)(7|m?4K;iRq^cFo$e@e`*01z zKW4-KJW4mYKE0FUh&cW)_YLE1w@D)DuP@lm_1F8O%_6`cm|-IH{iJz(#gErfv$stD zec8e5-S;Vuet9YnTjjj+yqtuXlsFt1_AU9}WV*0{LxAbx#syntxVidxS?Xmu7R2)~ zh_oJv*5BBcd%NsY?~QHcyXDXAW0&oCVbAOtbR{65aFcp>jU$I*%ZCbQ z<;9O+K?SB2^t6nwycTrocwijv;o`%@z>t=wa>S)&he~m~>v86WlaqhEFeu;9dYq}@ z<>VU$+1A6XRBL-8V5*&x@U7(;KkLt&cpqb$x!+XTJU8q7^ZjQ| zT;Fr)@gjMbv@g{YwcI1*No3p-WAR- z{UM_%n?>)y?q_p&mwOkK{i74cn6PR@6ih_Tn@tLNz&oqTs zep#NcxU}`9=c5NIUu{mF{&d65>Xm0z1o-DXJ}*>#%$O%!$?;-V$@AtH$?01hmiJubWO>S)oXq<) us$_e#^3Anp-&|`c%MRRay5a7v+gWGxw_o3I>v6=}wQIhYgjIVoG5`QY1J?rp literal 0 HcmV?d00001 diff --git a/assets/image/vip_day_logo.webp b/assets/image/vip_day_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..937a3e536b70f8a07c3c4529b6d5aad112bb0ec5 GIT binary patch literal 790 zcmWIYbaUflW?%?+bqWXzu!!JdU|=u+Vqq}ybaoCn!3g9sFrEOBEI_H;ypp0IcPE92 z$S4K&2Mmlr2nLDC#RU)+RuZV{+ck*V%eq)q;1}dfNi9wWD)|7!Dn&rcfo>83vPIG% zYz+`Q3BtAkvCB&eN`PttK=2?(*InG6iuTNxN6ZXv`}7BDdI zw=ghlJC6`Ugh@eSQ6ktl79h!#md3#FX*mM}ZzM1xE-)}~MT6yl1P-?;0HtJr?#c(k zbcP&;R0ahGPlh~(WClGT%Lo{$h74xF81_+MWMI%2KENVy|KN^XW%pS#_s;pXLu>uh z-)g&if2Ip;$d$hNmha6(nd$k)Ik%4$o>SfR`yXS8ZIKmk)s3C8^K@<4o_iCGdcmb-Lk!2^Soh zPkTABB{Vy^vNLe;v~SFveeUP~! zzr9=28Ja!!uWQn!72?OzzF)C*_Q*PDu-l}QY4emXHf2}MEz1;tl!!Ji(A93p{xSQx a=bep5Sag?ji|TIFxB1Wd{_oT1dOZMhOwX18 literal 0 HcmV?d00001 diff --git a/assets/image/vip_equity_logo.webp b/assets/image/vip_equity_logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..3284bab3d02eec75eeeef4ab825e695031c0c479 GIT binary patch literal 700 zcmWIYbaUIn#J~{l>J$(bU=hK^z`$St#KK_Y>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({cs|-bi3XTwq|}iU!L82^?-y07}UK-IWi7 z=?pmxsSFAXo(y>m$qafxmJu*g4H?XUG3;{`s8C<{0E@u(1saoJ$(bU=hK^z`$St#KK_Y>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({cs|-bi3XTwq|}iU!L82^?-y07}UK-IWi7 z=?pmxsSFAXo(y>m$qafxmJu*g4H?XUG3;{?s8C<{0E@u<1=}VrdA9dx%N4(+En5u# zcS(5$m3^P_{&afdA8RW?u3Os@@5qWh=Fg5`YWV&3^Z#aHw#PAMq8z?gH!5z?)hiHu z7$YLoAi#LoW6~5Go_Bwq%-8ue$!gLH#rHnErpo#3 f%IizU?%KXuXVv<*_HSg@+AzH` { .shippingTrace(shipperCode, logisticCode) .catchError((error) { _refreshController.refreshFailed(); + _refreshController.loadFailed(); }); if (baseData != null && baseData.isSuccess) { Logistics lgs = baseData.data; logistics.clear(); - logistics.addAll(lgs.traces.reversed); + //lgs.traces.reversed:列表倒叙 + logistics.addAll(lgs.traces); setState(() { shipStatus = logisticsStatus(lgs.state); if (logistics.length > 0) logistics[0].acceptStation += shipStatus; _refreshController.refreshCompleted(); + _refreshController.loadComplete(); }); } else { _refreshController.refreshFailed(); + _refreshController.loadFailed(); } } queryAppShippingTrace(orderId) async { BaseData baseData = await apiService.getAppShippingTrace(orderId).catchError((error) { - _refreshController.refreshFailed(); + _refreshController.refreshFailed(); + _refreshController.loadFailed(); }); if (baseData != null && baseData.isSuccess) { Logistics lgs = baseData.data; logistics.clear(); - logistics.addAll(lgs.traces.reversed); + //lgs.traces.reversed:列表倒叙 + logistics.addAll(lgs.traces); setState(() { shipStatus = logisticsStatus(lgs.state); widget.arguments["logisticsName"] = lgs.shipperCode; widget.arguments["logisticsNum"] = lgs.logisticCode; if (logistics.length > 0) logistics[0].acceptStation += shipStatus; _refreshController.refreshCompleted(); + _refreshController.loadComplete(); }); } else { _refreshController.refreshFailed(); + _refreshController.loadFailed(); } } + _onRefresh(){ + if((widget.arguments["shipperCode"]??"") != "" && + (widget.arguments["logisticsNum"]??"") != "") + getShippingTrace(widget.arguments["shipperCode"] ?? "", + widget.arguments["logisticsNum"] ?? ""); + else + queryAppShippingTrace(widget.arguments["orderId"]); + } + + @override + void dispose() { + super.dispose(); + _refreshController.dispose(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -98,7 +124,22 @@ class _LogisticsInformationPage extends State { titleColor: Colors.black, leadingColor: Colors.black, ), - body: Container( + body: SmartRefresher( + controller: _refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader( + ), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh: () { + _onRefresh(); + }, + physics: BouncingScrollPhysics(), + scrollController: ScrollController(), child: SingleChildScrollView( physics: BouncingScrollPhysics(), child: Column( @@ -337,8 +378,6 @@ class _LogisticsInformationPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Column( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( logistics.acceptTime.split(" ")[0], @@ -372,7 +411,7 @@ class _LogisticsInformationPage extends State { if (position != size - 1) Container( width: 1.w, - height: 75.h, + height: logistics.acceptStation.length > 100 ? 118.h :75.h, decoration: new BoxDecoration( color: Color(0xffE1E1E1), ), @@ -433,9 +472,11 @@ class _LogisticsInformationPage extends State { String tripStatus = "assets/image/icon_sign.webp"; if (type.contains("已签收")) { tripStatus = "assets/image/icon_sign.webp"; - } else if (type.contains("派送中") || type.contains("派件中")) { + } else if (type.contains("派送中") || type.contains("派件")) { + tripStatus = "assets/image/icon_delivery.webp"; + }else if (type.contains("揽收") || type.contains("揽收")) { tripStatus = "assets/image/icon_delivery.webp"; - } else if (type.contains("运输中") || type.contains("发往")) { + } else if (type.contains("运输中") || type.contains("发往")) { tripStatus = "assets/image/icon_transport.webp"; } else if (type.contains("已发货") || type.contains("分配")) { tripStatus = "assets/image/icon_deliver_goods.webp"; @@ -449,7 +490,9 @@ class _LogisticsInformationPage extends State { String logisticsTripStatus = ""; if (state.contains("已签收")) { logisticsTripStatus = "已签收"; - } else if (state.contains("派送中") || state.contains("派件中")) { + } else if (state.contains("揽收")) { + logisticsTripStatus = "已揽件"; + }else if (state.contains("派送中") || state.contains("派件")) { logisticsTripStatus = "派送中"; } else if (state.contains("运输中") || state.contains("发往")) { logisticsTripStatus = "运输中"; diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart index 4b7d6ccf..817e3b08 100644 --- a/lib/retrofit/data/settleOrderInfo.dart +++ b/lib/retrofit/data/settleOrderInfo.dart @@ -20,10 +20,12 @@ class SettleOrderInfo { String memberCouponId; bool usePlateMoney; bool isRaise; + bool isVipDay; int selectDiscount; bool useVipPriceSelect = false; String vipDiscountAmount; String totalDiscountAmount; + String vipDayDiscountAmount; String discountType; String totalPackagingFee; @@ -55,9 +57,11 @@ class SettleOrderInfo { settleOrderInfoBean.memberCouponId = map['memberCouponId']; settleOrderInfoBean.usePlateMoney = map['usePlateMoney']; settleOrderInfoBean.isRaise = map['isRaise']; + settleOrderInfoBean.isVipDay = map['isVipDay']; settleOrderInfoBean.selectDiscount = map['selectDiscount']; settleOrderInfoBean.vipDiscountAmount = map['vipDiscountAmount']; settleOrderInfoBean.totalDiscountAmount = map['totalDiscountAmount']; + settleOrderInfoBean.vipDayDiscountAmount = map['vipDayDiscountAmount']; settleOrderInfoBean.discountType = map['discountType']; settleOrderInfoBean.totalPackagingFee = map['totalPackagingFee']; return settleOrderInfoBean; @@ -81,10 +85,11 @@ class SettleOrderInfo { "promotionId": promotionId, "memberCouponId": memberCouponId, "usePlateMoney":usePlateMoney, - "isRaise":isRaise, + "isVipDay":isVipDay, "selectDiscount":selectDiscount, "vipDiscountAmount":vipDiscountAmount, "totalDiscountAmount": totalDiscountAmount, + "vipDayDiscountAmount": vipDayDiscountAmount, "discountType":discountType, "packagingFee" : totalPackagingFee, }; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 59e87869..f5d0a966 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -31,6 +31,7 @@ import 'package:huixiang/settlement/settlement_view/pay_method.dart'; import 'package:huixiang/settlement/settlement_view/settlement_activity.dart'; import 'package:huixiang/settlement/settlement_view/settlement_coupon.dart'; import 'package:huixiang/settlement/settlement_view/settlement_order_commodity.dart'; +import 'package:huixiang/settlement/settlement_view/vip_discounts_select.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -96,6 +97,7 @@ class _Settlement extends State { int storesIndex = 0; String discountType; int diningStatus = 4; + int vipSelect = 0; @override void initState() { @@ -141,7 +143,10 @@ class _Settlement extends State { if (promotions != null && promotions != "" && tableId <= 0) { queryOrderInfo( address != null ? address.id : null, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, 0, @@ -159,7 +164,10 @@ class _Settlement extends State { } else if (coupons != null && coupons != "" && tableId <= 0) { queryOrderInfo( address != null ? address.id : null, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, widget.arguments["cid"], @@ -177,7 +185,10 @@ class _Settlement extends State { } else queryOrderInfo( null, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, 0, @@ -186,9 +197,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (!placeOrder) - ? "NONE" - : "AUTO", + (!placeOrder) ? "NONE" : "AUTO", // useVipPriceSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, count1, @@ -272,7 +281,10 @@ class _Settlement extends State { isRaiseChannel = true; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, couponListBean?.id, @@ -366,7 +378,10 @@ class _Settlement extends State { if (address != null) { queryOrderInfo( address.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, null, @@ -422,7 +437,10 @@ class _Settlement extends State { } await queryOrderInfo( address.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, null, @@ -454,7 +472,10 @@ class _Settlement extends State { queryOrderInfo( address.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, 0, @@ -554,7 +575,10 @@ class _Settlement extends State { ? true : false; //是否预约 placeOrderFirst.isTakeOut = - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn; placeOrderFirst.notes = remakers + @@ -846,7 +870,16 @@ class _Settlement extends State { }); queryOrderInfo( addressId, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType + ?.dineInTakeStatus ?? + false) == + true && + (subscribeParam + ?.isEnableSubscribe ?? + false) == + false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, memberCouponId, @@ -909,6 +942,16 @@ class _Settlement extends State { useBenefitSelect, placeOrder), + ///会员优惠选择 + if ((settleOrderInfo != null || + minOrderInfo != null) && (placeOrder && tableId <= 0 && + !(settleOrderInfo?.isRaise ?? false))) + VipDiscountsSelect( + vipSelectCheck, + settleOrderInfo, + minOrderInfo, + payChannel,), + ///优惠券/备注/会员优惠金额 if (settleOrderInfo != null || minOrderInfo != null) @@ -1096,7 +1139,12 @@ class _Settlement extends State { diningStatus = 4; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == + true && + (subscribeParam?.isEnableSubscribe ?? false) == + false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, (settleOrderInfo.isRaise || payChannel == 5) @@ -1109,7 +1157,11 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"), + ((promotion?.id ?? productId ?? "") != "") + ? "ACTIVITY" + : ((couponListBean?.id ?? "") != "" + ? "COUPON" + : "AUTO"), // useVipPriceSelect, // useBenefitSelect, count1, @@ -1182,7 +1234,12 @@ class _Settlement extends State { diningStatus = 3; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == + true && + (subscribeParam?.isEnableSubscribe ?? false) == + false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, (settleOrderInfo.isRaise || payChannel == 5) @@ -1195,7 +1252,11 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"), + ((promotion?.id ?? productId ?? "") != "") + ? "ACTIVITY" + : ((couponListBean?.id ?? "") != "" + ? "COUPON" + : "AUTO"), // useVipPriceSelect, // useBenefitSelect, count1, @@ -1264,6 +1325,44 @@ class _Settlement extends State { ); } + ///会员优惠选择 + vipSelectCheck(int vipSelect) { + this.vipSelect = vipSelect; + if (tableId > 0) { + queryOrderDetails(parentId); + } else { + queryOrderInfo( + address?.id, + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) + ? diningStatus + : selectedBtn, + 0, + 0, + productId ?? 0, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + vipSelectType(), + count1, + payChannel, + tableId); + } + } + + String vipSelectType() { + if (vipSelect == 1) return "MEMBER_RANK"; + if (vipSelect == 2) { + return "SURPRISE"; + } else if (vipSelect == 3) { + return "VIP"; + } else { + return "AUTO"; + } + } + payChannelCheck(int payChannel) { this.payChannel = payChannel; if (tableId > 0) { @@ -1271,7 +1370,10 @@ class _Settlement extends State { } else { queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, (settleOrderInfo.isRaise || payChannel == 5) @@ -1302,20 +1404,22 @@ class _Settlement extends State { } } - String preferentialType(){ - if(settleOrderInfo.isRaise || payChannel == 5) - return "NONE"; - if(settleOrderInfo.discountType == "ACTIVITY"){ - return "ACTIVITY"; - }else if(settleOrderInfo.discountType == "COUPON"){ - return "COUPON"; - }else if(settleOrderInfo.discountType == "MEMBER_RANK" || settleOrderInfo.discountType == "SURPRISE"){ - return "MEMBER_RANK"; - }else if(settleOrderInfo.discountType == "VIP"){ + String preferentialType() { + if (settleOrderInfo.isRaise || payChannel == 5) return "NONE"; + if (settleOrderInfo.discountType == "ACTIVITY") { + return "ACTIVITY"; + } else if (settleOrderInfo.discountType == "COUPON") { + return "COUPON"; + } else if (settleOrderInfo.discountType == "SURPRISE") { + return "SURPRISE"; + } else if (settleOrderInfo.discountType == "MEMBER_RANK" || + settleOrderInfo.discountType == "SURPRISE") { + return "MEMBER_RANK"; + } else if (settleOrderInfo.discountType == "VIP") { return "VIP"; - }else { - return "AUTO"; - } + } else { + return "AUTO"; + } } vipPriceSelect(bool useVipPriceSelect) { @@ -1325,7 +1429,10 @@ class _Settlement extends State { } else { queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, 0, @@ -1351,7 +1458,10 @@ class _Settlement extends State { } else { queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, null, @@ -1411,7 +1521,10 @@ class _Settlement extends State { } else { queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, couponBean?.id, @@ -1420,9 +1533,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (couponBean?.id ?? 0) == 0 - ? "AUTO" - : "COUPON", + (couponBean?.id ?? 0) == 0 ? "AUTO" : "COUPON", // useVipPriceSelect, // useBenefitSelect, count1, @@ -1450,7 +1561,10 @@ class _Settlement extends State { // this.couponListBean = null; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) ? diningStatus : selectedBtn, 0, @@ -1459,9 +1573,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - ((pro?.id ?? 0) ?? productId) == 0 - ?"AUTO" - : "ACTIVITY", + ((pro?.id ?? 0) ?? productId) == 0 ? "AUTO" : "ACTIVITY", // useVipPriceSelect, // useBenefitSelect, count1, diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index fd510c3b..db8522c9 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; @@ -86,7 +84,6 @@ class _ActivityCouponRemarks extends State { ], borderRadius: BorderRadius.circular(8), ), - // height: 122.h / (!widget.placeOrder ? 2 : 1), margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 14.h, bottom: 14.h), padding: EdgeInsets.only( left: 16.w, @@ -98,100 +95,101 @@ class _ActivityCouponRemarks extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ - if ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) && - (widget?.settleOrderInfo?.memberVO?.isVip ?? false) && - widget.placeOrder) - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "VIP权益", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF353535), - ), - ), - ), - Platform.isAndroid - ? Switch.adaptive( - value: - (widget.coupons != null && widget.coupons != "" || - widget.promotions != null && - widget.promotions != "" || - widget.payChannell == 5 || widget.payChannell == 7 || ((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") ) - ? false - : vipSelect, - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - activeColor: Color(0xff32A060), - onChanged: (bool value) { - setState(() { - if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动", - )); - return; - } - if ((widget?.settleOrderInfo?.memberVO?.isVip ?? - false)) { - vipSelect = !vipSelect; - widget.vipPriceSelect(vipSelect); - } else { - widget.showVipTips(); - return; - } - }); - }, - ) - : GestureDetector( - onTap: () { - setState(() { - if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动", - )); - return; - } - if ((widget?.settleOrderInfo?.memberVO?.isVip ?? - false)) { - vipSelect = !vipSelect; - widget.vipPriceSelect(vipSelect); - } else { - widget.showVipTips(); - return; - } - }); - }, - child: Container( - padding: EdgeInsets.only(bottom: 18.w), - alignment: Alignment.center, - child: Image.asset( - ((widget.coupons != null && widget.coupons != "" || - widget.promotions != null && - widget.promotions != "" || - widget.payChannell == 5 || - widget.payChannell == 7 ||((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") - || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0)) - ? false - : vipSelect) - ? "assets/image/vip_price.webp" - : "assets/image/vip_unprice.webp", - width: 38.w, - height: 20.h, - ), - ), - ) - ], - ), + // if ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) && + // (widget?.settleOrderInfo?.memberVO?.isVip ?? false) && + // widget.placeOrder) + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Expanded( + // flex: 1, + // child: Text( + // "VIP权益", + // style: TextStyle( + // fontWeight: MyFontWeight.regular, + // fontSize: 14.sp, + // color: Color(0xFF353535), + // ), + // ), + // ), + // Platform.isAndroid + // ? Switch.adaptive( + // value: + // (widget.coupons != null && widget.coupons != "" || + // widget.promotions != null && + // widget.promotions != "" || + // widget.payChannell == 5 || widget.payChannell == 7 || ((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") ) + // ? false + // : vipSelect, + // materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + // activeColor: Color(0xff32A060), + // onChanged: (bool value) { + // setState(() { + // if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){ + // SmartDialog.show( + // widget: SettlementTips( + // () { + // }, + // text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动", + // )); + // return; + // } + // if ((widget?.settleOrderInfo?.memberVO?.isVip ?? + // false)) { + // vipSelect = !vipSelect; + // widget.vipPriceSelect(vipSelect); + // } else { + // widget.showVipTips(); + // return; + // } + // }); + // }, + // ) + // : GestureDetector( + // onTap: () { + // setState(() { + // if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){ + // SmartDialog.show( + // widget: SettlementTips( + // () { + // }, + // text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动", + // )); + // return; + // } + // if ((widget?.settleOrderInfo?.memberVO?.isVip ?? + // false)) { + // vipSelect = !vipSelect; + // widget.vipPriceSelect(vipSelect); + // } else { + // widget.showVipTips(); + // return; + // } + // }); + // }, + // child: Container( + // padding: EdgeInsets.only(bottom: 18.w), + // alignment: Alignment.center, + // child: Image.asset( + // ((widget.coupons != null && widget.coupons != "" || + // widget.promotions != null && + // widget.promotions != "" || + // widget.payChannell == 5 || + // widget.payChannell == 7 ||((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") + // || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0)) + // ? false + // : vipSelect) + // ? "assets/image/vip_price.webp" + // : "assets/image/vip_unprice.webp", + // width: 38.w, + // height: 20.h, + // ), + // ), + // ) + // ], + // ), + // if (widget.placeOrder && !(widget?.settleOrderInfo?.isRaise ?? false)) // Container( // margin: EdgeInsets.only( @@ -278,50 +276,52 @@ class _ActivityCouponRemarks extends State { // ], // ), // ), + + // if (widget.placeOrder && + // ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") && widget?.settleOrderInfo?.benefitDiscountAmount != null && + // widget?.settleOrderInfo?.benefitDiscountAmount != "0")) + // Container( + // margin: EdgeInsets.only(bottom: 13), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Expanded( + // flex: 1, + // child: Text( + // "会员优惠金额", + // style: TextStyle( + // fontWeight: MyFontWeight.regular, + // fontSize: 14.sp, + // color: Color(0xFF353535), + // ), + // ), + // ), + // Text( + // widget.settleOrderInfo.benefitDiscountAmount, + // textAlign: TextAlign.end, + // style: TextStyle( + // fontSize: 14.sp, + // color: Color(0xFF32A060), + // fontWeight: MyFontWeight.semi_bold, + // ), + // ), + // ], + // ), + // ), if (widget.placeOrder && - ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") && widget?.settleOrderInfo?.benefitDiscountAmount != null && - widget?.settleOrderInfo?.benefitDiscountAmount != "0")) - Container( - margin: EdgeInsets.only(bottom: 13), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "会员优惠金额", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF353535), - ), - ), - ), - Text( - widget.settleOrderInfo.benefitDiscountAmount, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF32A060), - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], - ), - ), - if (widget.placeOrder && widget.tableId <= 0 && !(widget?.settleOrderInfo?.isRaise ?? false)) + widget.tableId <= 0 && + !(widget?.settleOrderInfo?.isRaise ?? false)) InkWell( onTap: () { - if(widget.payChannell == 5){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: "该支付余额为特殊活动充值, 不可参与任何活动", - )); - return; - } + if (widget.payChannell == 5) { + SmartDialog.show( + widget: SettlementTips( + () {}, + text: "该支付余额为特殊活动充值, 不可参与任何活动", + )); + return; + } widget.activityCart(); }, child: Row( @@ -357,18 +357,20 @@ class _ActivityCouponRemarks extends State { ), if (widget.placeOrder && !(widget?.settleOrderInfo?.isRaise ?? false)) SizedBox( - height: 13, + height: 13.h, ), - if (widget.placeOrder && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) + if (widget.placeOrder && + (widget.tableId > 0 + ? !(widget?.minOrderInfo?.isRaise ?? false) + : !(widget?.settleOrderInfo?.isRaise ?? false))) InkWell( onTap: () { - if(widget.payChannell == 5){ + if (widget.payChannell == 5) { SmartDialog.show( widget: SettlementTips( - () { - }, - text: "该支付余额为特殊活动充值, 不可参与任何活动", - )); + () {}, + text: "该支付余额为特殊活动充值, 不可参与任何活动", + )); return; } widget.couponCart(); @@ -404,7 +406,10 @@ class _ActivityCouponRemarks extends State { ], ), ), - if (widget.placeOrder && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) + if (widget.placeOrder && + (widget.tableId > 0 + ? !(widget?.minOrderInfo?.isRaise ?? false) + : !(widget?.settleOrderInfo?.isRaise ?? false))) SizedBox( height: 13, ), diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index e4fab047..0844707c 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity_details.dart'; import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/order_product_vo.dart'; import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; @@ -150,8 +149,23 @@ class _SettlementOrderCommodity extends State { } if (widget.useBenefitSelect && - ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || - widget?.settleOrderInfo?.discountType == "SURPRISE") && + (widget?.settleOrderInfo?.discountType == "SURPRISE" && + widget?.settleOrderInfo?.vipDayDiscountAmount != "0") && + ((widget.tableId > 0 + ? !(widget?.minOrderInfo?.isRaise ?? false) + : !(widget?.settleOrderInfo?.isRaise ?? false)))) { + widgets.add(vipItem( + Color(0xFFFF7A1A), + "会员日优惠金额", + AppUtils.calculateDouble(double.tryParse( + (widget.minOrderInfo != null && + widget.minOrderInfo.orderProductVOList != null) + ? (widget.minOrderInfo?.discountAmount ?? "") + : (widget?.settleOrderInfo?.vipDayDiscountAmount ?? ""))))); + } + + if (widget.useBenefitSelect && + ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK") && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) @@ -619,7 +633,7 @@ class _SettlementOrderCommodity extends State { String discountPrice() { if (widget.minOrderInfo != null) { return AppUtils.calculateDouble( - double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")); + double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")+double.tryParse(widget.minOrderInfo?.couponSubPrice ?? "0")); } else if (widget.tableId < 0) { return "0"; } else { diff --git a/lib/settlement/settlement_view/vip_discounts_select.dart b/lib/settlement/settlement_view/vip_discounts_select.dart new file mode 100644 index 00000000..1148fc90 --- /dev/null +++ b/lib/settlement/settlement_view/vip_discounts_select.dart @@ -0,0 +1,195 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/utils/font_weight.dart'; + +import '../../retrofit/data/min_order_info.dart'; +import '../../retrofit/data/settleOrderInfo.dart'; +import '../../view_widget/settlement_tips_dialog.dart'; + +class VipDiscountsSelect extends StatefulWidget { + final Function(int vipSelect) vipSelectCheck; + final SettleOrderInfo settleOrderInfo; + final MinOrderInfo minOrderInfo; + final int payChannel; + + VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel); + + @override + State createState() { + return _VipDiscountsSelect(); + } +} + +class _VipDiscountsSelect extends State { + var selectVip = 0; + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x0D000000), + offset: Offset(0, 1), + blurRadius: 8, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 14.h, bottom: 14.h), + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 14.h, + bottom: 14.h, + ), + child: Column( + children: [ + Padding(padding:EdgeInsets.only(bottom: 14.h), + child: GestureDetector( + onTap: (){ + setState(() { + if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + SmartDialog.show( + widget: SettlementTips( + () {}, + text: widget.payChannel == 5 + ? "该支付余额为特殊活动充值, 不可参与任何活动" + : "该用户平台余额为特殊活动充值, 不可参与任何活动", + )); + return; + } else { + selectVip = 1; + widget.vipSelectCheck(1); + } + });}, + child: Row( + children: [ + Image.asset( + "assets/image/vip_level_logo.webp", + fit: BoxFit.fill, + width: 20, + height: 20, + ), + SizedBox( + width: 8.w, + ), + Expanded(child:Text( + "会员等级优惠", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(0xFF868686), + ), + )), + vipCheckView(1) + ], + ), + ),), + if((widget?.settleOrderInfo?.isVipDay?? false) == true) + Padding(padding:EdgeInsets.only(bottom: 14.h), + child: GestureDetector( + onTap: (){ + setState(() { + if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + SmartDialog.show( + widget: SettlementTips( + () {}, + text: widget.payChannel == 5 + ? "该支付余额为特殊活动充值, 不可参与任何活动" + : "该用户平台余额为特殊活动充值, 不可参与任何活动", + )); + return; + } else { + selectVip = 2; + widget.vipSelectCheck(2); + } + });}, + child: Row( + children: [ + Image.asset( + "assets/image/vip_day_logo.webp", + fit: BoxFit.fill, + width: 20, + height: 20, + ), + SizedBox( + width: 8.w, + ), + Expanded(child:Text( + "会员日", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(0xFF868686), + ), + )), + vipCheckView(2) + ], + ), + ),), + GestureDetector( + onTap: (){ + setState(() { + if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + SmartDialog.show( + widget: SettlementTips( + () {}, + text: widget.payChannel == 5 + ? "该支付余额为特殊活动充值, 不可参与任何活动" + : "该用户平台余额为特殊活动充值, 不可参与任何活动", + )); + return; + } else { + selectVip = 3; + widget.vipSelectCheck(3); + } + });}, + child: Row( + children: [ + Image.asset( + "assets/image/vip_equity_logo.webp", + fit: BoxFit.fill, + width: 20, + height: 20, + ), + SizedBox( + width: 8.w, + ), + Expanded(child:Text( + "会员卡优惠", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(0xFF868686), + ), + )), + vipCheckView(3) + ], + ), + ), + ], + ), + ); + } + + Widget vipCheckView(var index) { + return Image.asset( + ((widget?.settleOrderInfo?.discountType??"") == "MEMBER_RANK" + ? 1 + : ((widget?.settleOrderInfo?.discountType??"") == "SURPRISE" + ? 2 + : ((widget?.settleOrderInfo?.discountType??"") == "VIP" + ? 3 + : 0))) != + index + ? "assets/image/icon_radio_unselected.webp" + : "assets/image/icon_radio_selected.webp", + width: 15.w, + height: 15.h, + ); + } +} From 1bfe6fc475379c050235ba953480e5015ecbcf4c Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 29 Jun 2023 15:11:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AE=B5=EF=BC=88usePlatformVip=20=20=20=20?= =?UTF-8?q?=20usePlatformPay=EF=BC=89=EF=BC=9B=20=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E9=80=89=E6=8B=A9=EF=BC=8C=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=97=A5=EF=BC=8C=E4=BC=9A=E5=91=98=E5=8D=A1=E9=83=BD=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEusePlatformVip=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=AF=A5=E4=BC=98=E6=83=A0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/data/store_info.dart | 6 ++++++ lib/settlement/settlement.dart | 3 ++- lib/settlement/settlement_view/vip_discounts_select.dart | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/retrofit/data/store_info.dart b/lib/retrofit/data/store_info.dart index e0db90d5..ed58193d 100644 --- a/lib/retrofit/data/store_info.dart +++ b/lib/retrofit/data/store_info.dart @@ -47,6 +47,8 @@ class StoreInfo { String businessService; Mini mini; bool useErp; + bool usePlatformVip; + bool usePlatformPay; String expireTime; String vipFee; MemberSource memberSource; @@ -107,6 +109,8 @@ class StoreInfo { ..businessService = json['businessService'] as String ..mini = json['mini'] == null ? null : Mini.fromJson(json['mini']) ..useErp = json['useErp'] as bool + ..usePlatformVip = json['usePlatformVip'] as bool + ..usePlatformPay = json['usePlatformPay'] as bool ..expireTime = json['expireTime'] as String ..vipFee = json['vipFee'] as String ..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null @@ -153,6 +157,8 @@ class StoreInfo { 'businessService': this.businessService, 'mini': this.mini.toJson(), 'useErp': this.useErp, + 'usePlatformVip': this.usePlatformVip, + 'usePlatformPay': this.usePlatformPay, 'expireTime': this.expireTime, 'vipFee': this.vipFee, 'memberSource': this.memberSource.toJson(), diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index f5d0a966..d2bc5d6c 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -950,7 +950,8 @@ class _Settlement extends State { vipSelectCheck, settleOrderInfo, minOrderInfo, - payChannel,), + payChannel, + storeInfo), ///优惠券/备注/会员优惠金额 if (settleOrderInfo != null || diff --git a/lib/settlement/settlement_view/vip_discounts_select.dart b/lib/settlement/settlement_view/vip_discounts_select.dart index 1148fc90..6a017e50 100644 --- a/lib/settlement/settlement_view/vip_discounts_select.dart +++ b/lib/settlement/settlement_view/vip_discounts_select.dart @@ -5,6 +5,7 @@ import 'package:huixiang/utils/font_weight.dart'; import '../../retrofit/data/min_order_info.dart'; import '../../retrofit/data/settleOrderInfo.dart'; +import '../../retrofit/data/store_info.dart'; import '../../view_widget/settlement_tips_dialog.dart'; class VipDiscountsSelect extends StatefulWidget { @@ -12,8 +13,9 @@ class VipDiscountsSelect extends StatefulWidget { final SettleOrderInfo settleOrderInfo; final MinOrderInfo minOrderInfo; final int payChannel; + final StoreInfo storeInfo; - VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel); + VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel,this.storeInfo); @override State createState() { @@ -48,7 +50,7 @@ class _VipDiscountsSelect extends State { ), child: Column( children: [ - Padding(padding:EdgeInsets.only(bottom: 14.h), + Padding(padding:EdgeInsets.only(bottom: (widget?.storeInfo?.usePlatformVip ?? false) == true ? 14.h :0), child: GestureDetector( onTap: (){ setState(() { @@ -89,7 +91,7 @@ class _VipDiscountsSelect extends State { ], ), ),), - if((widget?.settleOrderInfo?.isVipDay?? false) == true) + if((widget?.settleOrderInfo?.isVipDay?? false) == true || (widget?.storeInfo?.usePlatformVip ?? false) == true) Padding(padding:EdgeInsets.only(bottom: 14.h), child: GestureDetector( onTap: (){ @@ -131,6 +133,7 @@ class _VipDiscountsSelect extends State { ], ), ),), + if((widget?.storeInfo?.usePlatformVip ?? false) == true) GestureDetector( onTap: (){ setState(() {