From 11059124ae408ccd15c0227d854f04a34744a5f6 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Sat, 16 Oct 2021 10:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/browse.png | Bin 0 -> 1003 bytes assets/image/2x/follow.png | Bin 0 -> 808 bytes assets/image/2x/leaving_message.png | Bin 0 -> 583 bytes assets/image/3x/browse.png | Bin 0 -> 1707 bytes assets/image/3x/follow.png | Bin 0 -> 1636 bytes assets/image/3x/leaving_message.png | Bin 0 -> 988 bytes assets/image/browse.png | Bin 0 -> 432 bytes assets/image/follow.png | Bin 0 -> 429 bytes assets/image/leaving_message.png | Bin 0 -> 317 bytes lib/mine/release_page.dart | 60 +- lib/retrofit/data/settleOrderInfo.dart | 1012 ++++++----------- .../settlement_order_commodity.dart | 361 ++++++ 12 files changed, 753 insertions(+), 680 deletions(-) create mode 100644 assets/image/2x/browse.png create mode 100644 assets/image/2x/follow.png create mode 100644 assets/image/2x/leaving_message.png create mode 100644 assets/image/3x/browse.png create mode 100644 assets/image/3x/follow.png create mode 100644 assets/image/3x/leaving_message.png create mode 100644 assets/image/browse.png create mode 100644 assets/image/follow.png create mode 100644 assets/image/leaving_message.png create mode 100644 lib/store/store_view/settlement_order_commodity.dart diff --git a/assets/image/2x/browse.png b/assets/image/2x/browse.png new file mode 100644 index 0000000000000000000000000000000000000000..26b5ca48c1afa9b7ac81868987ba539c55ee323b GIT binary patch literal 1003 zcmVPx&rAb6VR9HvVS3PVTMHK#K&SzaLfsEn6JF~W&0@4sc(f|brDM5gcNP-lKCSP0#Ohte^La z$%(0U-@bYC&G+7XZ&snrL$!H*{67Jd%jMo;v1rmXeL@)2T3@YJt5m5}rq|2pni;Ux zzQD};0lWg>$=fXS7l3i4)ECaVi)#UMM*v|MzMQ7%M*v=2OTdiJ1+DdmQ55~K+PvEW z2*Yp_GaqHIi=KSu~__kVqzj$ZASwG1Ep%U`VKRX0I=To^1{NxYqPVnv-!Cz z0QC3wKeDv6^gV!W-ucV<`S}BLb8|P>lLEhq&j9T6^R9GsbnKX%oNS7-0)R2*41irS ziJ1?_aV$G&8a+Kd4|jHUzN(aZ%KQDfxVZT3%*@O`dEX!iMwL>--hP&dc4vK>02pK5 zm7Ix#QfkaOHT}{jets>a?b6|fhZbdegyD5fSDvoHrLr|00@F$ zL@D*LFt3!_=A8Q_w~JwB9`&|yt@Th8MZd{=7=~NZG(F)pLf9K|&K=Ipe}B6=ObaxMi0W6akc#H}Pr!hB5_V@?6s17M1X z`WpbOwSw+vA8;2Doy!LA?d{#Gwf;(Mg+gKL)YR1P`C`j3@vA(iY5Ml`^z_NBpE2f5 z0B3!TJu58N7_in3GP6)9V(}OeEo3JKK`<;j0H8udb&+X>0mc{+tFq`o9LG&*FvfHN zxB;M~lp1o*jpYG|$UJ(V0bB>LDG#8%DG)9*MR zPs2S)u~O<2=iJe}6bC_YT#C*!a*&8>a^ECGb%QbHG=N&ec;L-Q7HxYw77!bBA(0jw zdS=&tA*rXLtyi+_@wtaf=}%hgLw9{C%?o|ouH~&dPFsFVTDHCoFy8UUWCPY%HALG1 Z{0CcfIX`+A?d|{o002ovPDHLkV1ij;+^GNn literal 0 HcmV?d00001 diff --git a/assets/image/2x/follow.png b/assets/image/2x/follow.png new file mode 100644 index 0000000000000000000000000000000000000000..c3a41e33a377e50a31f80474d90327ce80af9d37 GIT binary patch literal 808 zcmV+@1K0eCP)Px%;z>k7R9HvtmOE$^Q51&%v&qH>SjNpgv)cp_34$m#zB*qhL~KOFLM;>pEert* ztwaz}g0IG)Af&OAM1=@irLkBE1VM->=+3#jl1d1&n{|#{nZRb;*Gv}DmCi6VW7qX;rNdQNOAl0g#Od{!rC7MDz{78Y0@Js)qrrSJhucbXr6vq7eT9 zF!OEz??aKXYPC94DwTdl4t6v11ps%#{b3P#0-#zOm&s%{c6D`)05}EUx2o>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cy>T3u?2|TlurR1 zvKvebA+API)J%lp-GiK)&1N`1KW`cWE9=L{$A@NTXY*kgW`q#iwAPN9tF>-qG8qxa z@dPt}W8*zjN*zu_!1w*L%zPbyX=cR$6o5BL2>>upQv?34>$*Rd%VpE+K@bEdwbmDz zc_)C~R&7m03pS=_#0StIq6<>WpOO;T#mqAROlR(W^iUg)W-paWrH1eO_n7&M z|2Yst{tgkHky3VS>8uH?P$+!J%u_ayX|b$_h&ja_?bCD|=Ze<)3V^EszO@8G0Lw(A znK`nm)rsgn5lvRB)mPn!_5z3sg@Q?_5yx>_Nu6-ynE5*Z$1I6OBDw}(j+t-S95ea$ zz2i8M)_PHE9SI?7)oRrgj+O36A`2x1xz_a70cfp%1MsPxXiobfGaFK-@A_hBXz0k? z+}!J=aeGl9>7E_u2SMOzt?x7QM*tjK7>r#E0aGBpR7(AoG+5sV7+}R>aeov=)69I- zl4#>Kw)$F1d3#e6FhyW=bo5}e+5FvnZ&(F3X6DISt#)~{6KLVHx9mLt`&L!9UjUp_ zN|~l|&!evvT8+wfpQizs7QVsp2*4?&)W1EWUuRuUvj19h9nbTQ05H{Q1i%f~btl?4 zb+17Nra&8DKA+#7&1Me>A)X`!-?~G3Wx84Cr3418Osc@36?h9tCJawWYeYH#0000< KMNUMnLSTZ;ox*DX literal 0 HcmV?d00001 diff --git a/assets/image/browse.png b/assets/image/browse.png new file mode 100644 index 0000000000000000000000000000000000000000..44820e93766262512100aa58502c79089a1692eb GIT binary patch literal 432 zcmV;h0Z;ykP)Px$YDq*vR5(wqlQAy@KoEuB>|PXflCwA4XcPp6(1}F!8Wn|zjzlyP|A9m!3LPRr zrO}H-bVT7qqtWc%xz?O+~Wd2eTi(Bh+C>f4yPl;hs}3V_$2a=!se zrP8=kY6ZXqfcARP3xLy<(nh6HIco$p0t(E$MMQG|c0}YzDRrBZQ%e0rG!0;0ME1P* zO8{y)_6cC-eE?%ArO6P&4FJu|Lv;(+0HQHwP$_i+;M{vZ`w6ht&WOl%tyUYZR;%~M zm;tTzF@Wy6+=m$BR0yG5EEanTg~AmPEjZ^6-xVajo@c zR_C1S%Sx=Zt0FS*z3(GyZLf%wQ%W|3@W{*~M062j>scBBS2>OJhuz zQpyui{|DeUrNm7F91#sPTG(~Ytu<{SOZ?*}E;{E9{%4H!QMI;6AM4r5Du2C|za3Mv a*Zl@jm;C*{w9NAW0000 literal 0 HcmV?d00001 diff --git a/assets/image/follow.png b/assets/image/follow.png new file mode 100644 index 0000000000000000000000000000000000000000..a241b48e6ddc89d4d19a741d3c179c140fed9d2f GIT binary patch literal 429 zcmV;e0aE^nP)Px$XGugsR5(wq)3HkfF%$;y_a5{%amkQmRoomL6gxWlAGj$FBDgpR)x}9r(OnQh z!NJwZ)k(WJh_g7^yh3O}a46hypIq@utt}KZ<0bEx-1icuKMww5J^cWzweupf31FI; z6~Gk$7Lio|j+tKpoT=(lxp5D$)~<=j0TCSocm^;fBDG>+p65r*{Km|4L{tN?tE$(< zTo*9LxJsq+l4V&n#`s$5#+V6aMvU>Z@7qk0BoAqt&c+y-f% literal 0 HcmV?d00001 diff --git a/assets/image/leaving_message.png b/assets/image/leaving_message.png new file mode 100644 index 0000000000000000000000000000000000000000..6cabe1afb129a45b36574bbec6ae3f38f26c4053 GIT binary patch literal 317 zcmV-D0mA-?P)Px#_en%SR5(xV(=kfKKokbxe`d|@poIj4Oiw z5H@z6;qeqC2qNPK=1G<{WP>D%3~vZ~kq^)HNwXdOa$6_M*cz)#u(07YNm*IRxAQ?z;!Hhfab P00000NkvXXu0mjf-*<%^ literal 0 HcmV?d00001 diff --git a/lib/mine/release_page.dart b/lib/mine/release_page.dart index dd99cb28..e621ce45 100644 --- a/lib/mine/release_page.dart +++ b/lib/mine/release_page.dart @@ -192,17 +192,42 @@ class _ReleasePage extends State { height: 310.h, ), SizedBox(height: 17.h), - Row( + Padding(padding: EdgeInsets.only(bottom: 16), + child:Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ InkWell( onTap: () { }, - child: Icon( - Icons.close, - color: Colors.black, - size: 16, + child: Image.asset( + "assets/image/browse.png", + height: 16.h, + width: 16.w, + ), + ), + SizedBox(width:4), + Text( + "15", + style: TextStyle( + fontSize: 12.sp, + color:Color(0xFF1A1A1A), + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + }, + child: Image.asset( + "assets/image/leaving_message.png", + height: 16.h, + width: 16.w, ), ), SizedBox(width:4), @@ -216,9 +241,30 @@ class _ReleasePage extends State { ), ], ), + Row( + children: [ + InkWell( + onTap: () { + }, + child: Image.asset( + "assets/image/follow.png", + height: 16.h, + width: 16.w, + ), + ), + SizedBox(width:4), + Text( + "25", + style: TextStyle( + fontSize: 12.sp, + color:Color(0xFF1A1A1A), + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), ], - ), - SizedBox(height: 16.h), + ),), ], ), ); diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart index be4c82c1..7e62c6b7 100644 --- a/lib/retrofit/data/settleOrderInfo.dart +++ b/lib/retrofit/data/settleOrderInfo.dart @@ -1,787 +1,453 @@ -/// couponList : [{"allProduct":true,"bizId":"","bizType":0,"couponId":0,"discountAmount":0,"discountPercent":0,"fullAmount":0,"fullNumber":0,"id":0,"mid":0,"productList":[{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}],"promotionId":0,"promotionName":"","publishEndTime":"","publishStartTime":"","receiveTime":"","status":0,"storeId":0,"tenantCode":"","type":0,"usable":true,"useEndTime":"","useStartTime":"","useTime":""}] -/// discountAmount : 0 -/// freePostAge : 0 -/// memberVO : {"addressId":0,"age":0,"balance":0,"birth":"","createTime":"","headimg":"","isBind":true,"level":0,"memberRankVo":{"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true},"money":0,"nickname":"","phone":"","points":0,"remark":"","sex":"","userType":true,"vipNo":""} -/// mins : 0 -/// orderNum : 0 -/// orderProductList : [{"actInfo":{"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0},"applyPrice":0,"batch":0,"buyNum":0,"discountAmount":0,"discountPercent":0,"id":0,"isDelete":0,"orderId":0,"postPay":0,"productId":0,"productName":"","reason":"","refundNum":0,"sellPrice":0,"skuId":0,"skuImg":"","skuNameStr":"","status":true,"storeId":0,"tenantCode":"","type":0,"weight":0}] -/// orderSum : 0 -/// postAge : 0 -/// price : 0 -/// productNum : 0 -/// promotionInfoList : [{"activityEndTime":"","activityStartTime":"","applyEndTime":"","applyStartTime":"","canPartake":true,"channels":[],"description":"","doEndTime":{"hour":0,"minute":0,"nano":0,"second":0},"doStartTime":{"hour":0,"minute":0,"nano":0,"second":0},"id":0,"image":"","isDelete":0,"isNeedSecurityDeposit":0,"isVip":true,"name":"","promotionDetail":[{}],"promotionPlan":0,"promotionProuctList":[{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}],"promotionType":0,"securityDeposit":0,"status":0,"storeId":0,"tag":""}] -/// threshold : 0 class SettleOrderInfo { - List couponList; - int discountAmount; - int freePostAge; - MemberVOBean memberVO; - int mins; int orderNum; - List orderProductList; - int orderSum; - int postAge; - int price; int productNum; + int mins; + dynamic memberVO; + String postAge; + String price; + String orderSum; + String discountAmount; List promotionInfoList; - int threshold; + List couponList; + String threshold; + String freePostAge; + List orderProductList; static SettleOrderInfo fromJson(Map map) { if (map == null) return null; SettleOrderInfo settleOrderInfoBean = SettleOrderInfo(); - settleOrderInfoBean.couponList = List()..addAll( - (map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o)) - ); - settleOrderInfoBean.discountAmount = map['discountAmount']; - settleOrderInfoBean.freePostAge = map['freePostAge']; - settleOrderInfoBean.memberVO = MemberVOBean.fromJson(map['memberVO']); - settleOrderInfoBean.mins = map['mins']; settleOrderInfoBean.orderNum = map['orderNum']; - settleOrderInfoBean.orderProductList = List()..addAll( - (map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o)) - ); - settleOrderInfoBean.orderSum = map['orderSum']; + settleOrderInfoBean.productNum = map['productNum']; + settleOrderInfoBean.mins = map['mins']; + settleOrderInfoBean.memberVO = map['memberVO']; settleOrderInfoBean.postAge = map['postAge']; settleOrderInfoBean.price = map['price']; - settleOrderInfoBean.productNum = map['productNum']; + settleOrderInfoBean.orderSum = map['orderSum']; + settleOrderInfoBean.discountAmount = map['discountAmount']; settleOrderInfoBean.promotionInfoList = List()..addAll( (map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o)) ); + settleOrderInfoBean.couponList = List()..addAll( + (map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o)) + ); settleOrderInfoBean.threshold = map['threshold']; + settleOrderInfoBean.freePostAge = map['freePostAge']; + settleOrderInfoBean.orderProductList = List()..addAll( + (map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o)) + ); return settleOrderInfoBean; } Map toJson() => { - "couponList": couponList, - "discountAmount": discountAmount, - "freePostAge": freePostAge, - "memberVO": memberVO, - "mins": mins, "orderNum": orderNum, - "orderProductList": orderProductList, - "orderSum": orderSum, + "productNum": productNum, + "mins": mins, + "memberVO": memberVO, "postAge": postAge, "price": price, - "productNum": productNum, + "orderSum": orderSum, + "discountAmount": discountAmount, "promotionInfoList": promotionInfoList, + "couponList": couponList, "threshold": threshold, + "freePostAge": freePostAge, + "orderProductList": orderProductList, }; } -/// activityEndTime : "" -/// activityStartTime : "" -/// applyEndTime : "" -/// applyStartTime : "" -/// canPartake : true -/// channels : [] -/// description : "" -/// doEndTime : {"hour":0,"minute":0,"nano":0,"second":0} -/// doStartTime : {"hour":0,"minute":0,"nano":0,"second":0} -/// id : 0 -/// image : "" -/// isDelete : 0 -/// isNeedSecurityDeposit : 0 -/// isVip : true -/// name : "" -/// promotionDetail : [{}] -/// promotionPlan : 0 -/// promotionProuctList : [{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}] -/// promotionType : 0 -/// securityDeposit : 0 -/// status : 0 -/// storeId : 0 -/// tag : "" - -class PromotionInfoListBean { - String activityEndTime; - String activityStartTime; - String applyEndTime; - String applyStartTime; - bool canPartake; - List channels; - String description; - DoEndTimeBean doEndTime; - DoStartTimeBean doStartTime; - int id; - String image; - int isDelete; - int isNeedSecurityDeposit; - bool isVip; - String name; - List promotionDetail; - int promotionPlan; - List promotionProuctList; - int promotionType; - int securityDeposit; - int status; - int storeId; - String tag; - - static PromotionInfoListBean fromJson(Map map) { - if (map == null) return null; - PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean(); - promotionInfoListBean.activityEndTime = map['activityEndTime']; - promotionInfoListBean.activityStartTime = map['activityStartTime']; - promotionInfoListBean.applyEndTime = map['applyEndTime']; - promotionInfoListBean.applyStartTime = map['applyStartTime']; - promotionInfoListBean.canPartake = map['canPartake']; - promotionInfoListBean.channels = map['channels']; - promotionInfoListBean.description = map['description']; - promotionInfoListBean.doEndTime = DoEndTimeBean.fromJson(map['doEndTime']); - promotionInfoListBean.doStartTime = DoStartTimeBean.fromJson(map['doStartTime']); - promotionInfoListBean.id = map['id']; - promotionInfoListBean.image = map['image']; - promotionInfoListBean.isDelete = map['isDelete']; - promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; - promotionInfoListBean.isVip = map['isVip']; - promotionInfoListBean.name = map['name']; - promotionInfoListBean.promotionDetail = List()..addAll( - (map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) - ); - promotionInfoListBean.promotionPlan = map['promotionPlan']; - promotionInfoListBean.promotionProuctList = List()..addAll( - (map['promotionProuctList'] as List ?? []).map((o) => PromotionProuctListBean.fromJson(o)) - ); - promotionInfoListBean.promotionType = map['promotionType']; - promotionInfoListBean.securityDeposit = map['securityDeposit']; - promotionInfoListBean.status = map['status']; - promotionInfoListBean.storeId = map['storeId']; - promotionInfoListBean.tag = map['tag']; - return promotionInfoListBean; - } - - Map toJson() => { - "activityEndTime": activityEndTime, - "activityStartTime": activityStartTime, - "applyEndTime": applyEndTime, - "applyStartTime": applyStartTime, - "canPartake": canPartake, - "channels": channels, - "description": description, - "doEndTime": doEndTime, - "doStartTime": doStartTime, - "id": id, - "image": image, - "isDelete": isDelete, - "isNeedSecurityDeposit": isNeedSecurityDeposit, - "isVip": isVip, - "name": name, - "promotionDetail": promotionDetail, - "promotionPlan": promotionPlan, - "promotionProuctList": promotionProuctList, - "promotionType": promotionType, - "securityDeposit": securityDeposit, - "status": status, - "storeId": storeId, - "tag": tag, - }; -} - -/// id : 0 -/// isDelete : 0 -/// productId : 0 -/// promotionId : 0 -/// tenantCode : "" - -class PromotionProuctListBean { - int id; - int isDelete; - int productId; - int promotionId; - String tenantCode; - - static PromotionProuctListBean fromJson(Map map) { - if (map == null) return null; - PromotionProuctListBean promotionProuctListBean = PromotionProuctListBean(); - promotionProuctListBean.id = map['id']; - promotionProuctListBean.isDelete = map['isDelete']; - promotionProuctListBean.productId = map['productId']; - promotionProuctListBean.promotionId = map['promotionId']; - promotionProuctListBean.tenantCode = map['tenantCode']; - return promotionProuctListBean; - } - - Map toJson() => { - "id": id, - "isDelete": isDelete, - "productId": productId, - "promotionId": promotionId, - "tenantCode": tenantCode, - }; -} - - -class PromotionDetailBean { - - static PromotionDetailBean fromJson(Map map) { - if (map == null) return null; - PromotionDetailBean promotionDetailBean = PromotionDetailBean(); - return promotionDetailBean; - } - - Map toJson() => { - }; -} - -/// hour : 0 -/// minute : 0 -/// nano : 0 -/// second : 0 - -class DoStartTimeBean { - int hour; - int minute; - int nano; - int second; - - static DoStartTimeBean fromJson(Map map) { - if (map == null) return null; - DoStartTimeBean doStartTimeBean = DoStartTimeBean(); - doStartTimeBean.hour = map['hour']; - doStartTimeBean.minute = map['minute']; - doStartTimeBean.nano = map['nano']; - doStartTimeBean.second = map['second']; - return doStartTimeBean; - } - - Map toJson() => { - "hour": hour, - "minute": minute, - "nano": nano, - "second": second, - }; -} - -/// hour : 0 -/// minute : 0 -/// nano : 0 -/// second : 0 - -class DoEndTimeBean { - int hour; - int minute; - int nano; - int second; - - static DoEndTimeBean fromJson(Map map) { - if (map == null) return null; - DoEndTimeBean doEndTimeBean = DoEndTimeBean(); - doEndTimeBean.hour = map['hour']; - doEndTimeBean.minute = map['minute']; - doEndTimeBean.nano = map['nano']; - doEndTimeBean.second = map['second']; - return doEndTimeBean; - } - - Map toJson() => { - "hour": hour, - "minute": minute, - "nano": nano, - "second": second, - }; -} - -/// actInfo : {"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0} -/// applyPrice : 0 -/// batch : 0 -/// buyNum : 0 -/// discountAmount : 0 -/// discountPercent : 0 -/// id : 0 -/// isDelete : 0 -/// orderId : 0 -/// postPay : 0 -/// productId : 0 -/// productName : "" -/// reason : "" -/// refundNum : 0 -/// sellPrice : 0 -/// skuId : 0 -/// skuImg : "" -/// skuNameStr : "" -/// status : true -/// storeId : 0 -/// tenantCode : "" -/// type : 0 -/// weight : 0 +/// id : null +/// createTime : null +/// createUser : null +/// updateTime : null +/// updateUser : null +/// tenantCode : null +/// storeId : null +/// orderId : null +/// actInfo : null +/// productId : "1426095718614958080" +/// productName : "ɣ�������̸�" +/// skuId : "1426095718740787200" +/// skuNameStr : "ɳ�� ������ 700ml" +/// skuImg : null +/// buyNum : 1 +/// refundNum : null +/// type : null +/// reason : null +/// weight : 0.0 +/// applyPrice : "28.00" +/// sellPrice : "28.00" +/// postPay : null +/// isDelete : null +/// discountAmount : null +/// discountPercent : null +/// status : null +/// batch : null class OrderProductListBean { - ActInfoBean actInfo; - int applyPrice; - int batch; - int buyNum; - int discountAmount; - int discountPercent; - int id; - int isDelete; - int orderId; - int postPay; - int productId; + dynamic id; + dynamic createTime; + dynamic createUser; + dynamic updateTime; + dynamic updateUser; + dynamic tenantCode; + dynamic storeId; + dynamic orderId; + dynamic actInfo; + String productId; String productName; - String reason; - int refundNum; - int sellPrice; - int skuId; - String skuImg; + String skuId; String skuNameStr; - bool status; - int storeId; - String tenantCode; - int type; - int weight; + dynamic skuImg; + int buyNum; + dynamic refundNum; + dynamic type; + dynamic reason; + double weight; + String applyPrice; + String sellPrice; + dynamic postPay; + dynamic isDelete; + dynamic discountAmount; + dynamic discountPercent; + dynamic status; + dynamic batch; static OrderProductListBean fromJson(Map map) { if (map == null) return null; OrderProductListBean orderProductListBean = OrderProductListBean(); - orderProductListBean.actInfo = ActInfoBean.fromJson(map['actInfo']); - orderProductListBean.applyPrice = map['applyPrice']; - orderProductListBean.batch = map['batch']; - orderProductListBean.buyNum = map['buyNum']; - orderProductListBean.discountAmount = map['discountAmount']; - orderProductListBean.discountPercent = map['discountPercent']; orderProductListBean.id = map['id']; - orderProductListBean.isDelete = map['isDelete']; + orderProductListBean.createTime = map['createTime']; + orderProductListBean.createUser = map['createUser']; + orderProductListBean.updateTime = map['updateTime']; + orderProductListBean.updateUser = map['updateUser']; + orderProductListBean.tenantCode = map['tenantCode']; + orderProductListBean.storeId = map['storeId']; orderProductListBean.orderId = map['orderId']; - orderProductListBean.postPay = map['postPay']; + orderProductListBean.actInfo = map['actInfo']; orderProductListBean.productId = map['productId']; orderProductListBean.productName = map['productName']; - orderProductListBean.reason = map['reason']; - orderProductListBean.refundNum = map['refundNum']; - orderProductListBean.sellPrice = map['sellPrice']; orderProductListBean.skuId = map['skuId']; - orderProductListBean.skuImg = map['skuImg']; orderProductListBean.skuNameStr = map['skuNameStr']; - orderProductListBean.status = map['status']; - orderProductListBean.storeId = map['storeId']; - orderProductListBean.tenantCode = map['tenantCode']; + orderProductListBean.skuImg = map['skuImg']; + orderProductListBean.buyNum = map['buyNum']; + orderProductListBean.refundNum = map['refundNum']; orderProductListBean.type = map['type']; + orderProductListBean.reason = map['reason']; orderProductListBean.weight = map['weight']; + orderProductListBean.applyPrice = map['applyPrice']; + orderProductListBean.sellPrice = map['sellPrice']; + orderProductListBean.postPay = map['postPay']; + orderProductListBean.isDelete = map['isDelete']; + orderProductListBean.discountAmount = map['discountAmount']; + orderProductListBean.discountPercent = map['discountPercent']; + orderProductListBean.status = map['status']; + orderProductListBean.batch = map['batch']; return orderProductListBean; } Map toJson() => { - "actInfo": actInfo, - "applyPrice": applyPrice, - "batch": batch, - "buyNum": buyNum, - "discountAmount": discountAmount, - "discountPercent": discountPercent, "id": id, - "isDelete": isDelete, + "createTime": createTime, + "createUser": createUser, + "updateTime": updateTime, + "updateUser": updateUser, + "tenantCode": tenantCode, + "storeId": storeId, "orderId": orderId, - "postPay": postPay, + "actInfo": actInfo, "productId": productId, "productName": productName, - "reason": reason, - "refundNum": refundNum, - "sellPrice": sellPrice, "skuId": skuId, - "skuImg": skuImg, "skuNameStr": skuNameStr, - "status": status, - "storeId": storeId, - "tenantCode": tenantCode, + "skuImg": skuImg, + "buyNum": buyNum, + "refundNum": refundNum, "type": type, + "reason": reason, "weight": weight, - }; -} - -/// couponDiscountAmount : 0 -/// couponDiscountRate : 0 -/// couponId : 0 -/// couponType : 0 -/// discountAmount : 0 -/// discountRate : 0 -/// promotionId : 0 -/// promotionType : 0 - -class ActInfoBean { - int couponDiscountAmount; - int couponDiscountRate; - int couponId; - int couponType; - int discountAmount; - int discountRate; - int promotionId; - int promotionType; - - static ActInfoBean fromJson(Map map) { - if (map == null) return null; - ActInfoBean actInfoBean = ActInfoBean(); - actInfoBean.couponDiscountAmount = map['couponDiscountAmount']; - actInfoBean.couponDiscountRate = map['couponDiscountRate']; - actInfoBean.couponId = map['couponId']; - actInfoBean.couponType = map['couponType']; - actInfoBean.discountAmount = map['discountAmount']; - actInfoBean.discountRate = map['discountRate']; - actInfoBean.promotionId = map['promotionId']; - actInfoBean.promotionType = map['promotionType']; - return actInfoBean; - } - - Map toJson() => { - "couponDiscountAmount": couponDiscountAmount, - "couponDiscountRate": couponDiscountRate, - "couponId": couponId, - "couponType": couponType, + "applyPrice": applyPrice, + "sellPrice": sellPrice, + "postPay": postPay, + "isDelete": isDelete, "discountAmount": discountAmount, - "discountRate": discountRate, - "promotionId": promotionId, - "promotionType": promotionType, - }; -} - -/// addressId : 0 -/// age : 0 -/// balance : 0 -/// birth : "" -/// createTime : "" -/// headimg : "" -/// isBind : true -/// level : 0 -/// memberRankVo : {"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true} -/// money : 0 -/// nickname : "" -/// phone : "" -/// points : 0 -/// remark : "" -/// sex : "" -/// userType : true -/// vipNo : "" - -class MemberVOBean { - int addressId; - int age; - int balance; - String birth; - String createTime; - String headimg; - bool isBind; - int level; - MemberRankVoBean memberRankVo; - int money; - String nickname; - String phone; - int points; - String remark; - String sex; - bool userType; - String vipNo; - - static MemberVOBean fromJson(Map map) { - if (map == null) return null; - MemberVOBean memberVOBean = MemberVOBean(); - memberVOBean.addressId = map['addressId']; - memberVOBean.age = map['age']; - memberVOBean.balance = map['balance']; - memberVOBean.birth = map['birth']; - memberVOBean.createTime = map['createTime']; - memberVOBean.headimg = map['headimg']; - memberVOBean.isBind = map['isBind']; - memberVOBean.level = map['level']; - memberVOBean.memberRankVo = MemberRankVoBean.fromJson(map['memberRankVo']); - memberVOBean.money = map['money']; - memberVOBean.nickname = map['nickname']; - memberVOBean.phone = map['phone']; - memberVOBean.points = map['points']; - memberVOBean.remark = map['remark']; - memberVOBean.sex = map['sex']; - memberVOBean.userType = map['userType']; - memberVOBean.vipNo = map['vipNo']; - return memberVOBean; - } - - Map toJson() => { - "addressId": addressId, - "age": age, - "balance": balance, - "birth": birth, - "createTime": createTime, - "headimg": headimg, - "isBind": isBind, - "level": level, - "memberRankVo": memberRankVo, - "money": money, - "nickname": nickname, - "phone": phone, - "points": points, - "remark": remark, - "sex": sex, - "userType": userType, - "vipNo": vipNo, - }; -} - -/// id : 0 -/// nextId : 0 -/// nextName : "" -/// nextOrigin : 0 -/// rankContent : "" -/// rankImg : "" -/// rankName : "" -/// rankOrigin : 0 -/// status : true - -class MemberRankVoBean { - int id; - int nextId; - String nextName; - int nextOrigin; - String rankContent; - String rankImg; - String rankName; - int rankOrigin; - bool status; - - static MemberRankVoBean fromJson(Map map) { - if (map == null) return null; - MemberRankVoBean memberRankVoBean = MemberRankVoBean(); - memberRankVoBean.id = map['id']; - memberRankVoBean.nextId = map['nextId']; - memberRankVoBean.nextName = map['nextName']; - memberRankVoBean.nextOrigin = map['nextOrigin']; - memberRankVoBean.rankContent = map['rankContent']; - memberRankVoBean.rankImg = map['rankImg']; - memberRankVoBean.rankName = map['rankName']; - memberRankVoBean.rankOrigin = map['rankOrigin']; - memberRankVoBean.status = map['status']; - return memberRankVoBean; - } - - Map toJson() => { - "id": id, - "nextId": nextId, - "nextName": nextName, - "nextOrigin": nextOrigin, - "rankContent": rankContent, - "rankImg": rankImg, - "rankName": rankName, - "rankOrigin": rankOrigin, + "discountPercent": discountPercent, "status": status, + "batch": batch, }; } -/// allProduct : true +/// id : "1448907890034212864" +/// storeId : "1333246101343436800" +/// bizType : 1 +/// fullAmount : "10.00" +/// discountAmount : "8.00" +/// fullNumber : 1 +/// discountPercent : 100 /// bizId : "" -/// bizType : 0 -/// couponId : 0 -/// discountAmount : 0 -/// discountPercent : 0 -/// fullAmount : 0 -/// fullNumber : 0 -/// id : 0 -/// mid : 0 -/// productList : [{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}] -/// promotionId : 0 -/// promotionName : "" -/// publishEndTime : "" -/// publishStartTime : "" -/// receiveTime : "" -/// status : 0 -/// storeId : 0 -/// tenantCode : "" -/// type : 0 +/// publishStartTime : "2021-10-01" +/// publishEndTime : "2021-10-29" +/// useStartTime : "2021-10-02" +/// useEndTime : "2021-10-31" +/// promotionId : "0" +/// mid : "1438443365845696512" +/// couponId : "1448902034085380096" +/// receiveTime : "2021-10-15" +/// useTime : null +/// status : 1 +/// tenantCode : "1175" +/// type : 1 +/// promotionName : "��10-8" /// usable : true -/// useEndTime : "" -/// useStartTime : "" -/// useTime : "" +/// allProduct : true +/// productList : null class CouponListBean { - bool allProduct; - String bizId; + String id; + String storeId; int bizType; - int couponId; - int discountAmount; - int discountPercent; - int fullAmount; + String fullAmount; + String discountAmount; int fullNumber; - int id; - int mid; - List productList; - int promotionId; - String promotionName; - String publishEndTime; + int discountPercent; + String bizId; String publishStartTime; + String publishEndTime; + String useStartTime; + String useEndTime; + String promotionId; + String mid; + String couponId; String receiveTime; + dynamic useTime; int status; - int storeId; String tenantCode; int type; + String promotionName; bool usable; - String useEndTime; - String useStartTime; - String useTime; + bool allProduct; + dynamic productList; static CouponListBean fromJson(Map map) { if (map == null) return null; CouponListBean couponListBean = CouponListBean(); - couponListBean.allProduct = map['allProduct']; - couponListBean.bizId = map['bizId']; + couponListBean.id = map['id']; + couponListBean.storeId = map['storeId']; couponListBean.bizType = map['bizType']; - couponListBean.couponId = map['couponId']; - couponListBean.discountAmount = map['discountAmount']; - couponListBean.discountPercent = map['discountPercent']; couponListBean.fullAmount = map['fullAmount']; + couponListBean.discountAmount = map['discountAmount']; couponListBean.fullNumber = map['fullNumber']; - couponListBean.id = map['id']; - couponListBean.mid = map['mid']; - couponListBean.productList = List()..addAll( - (map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o)) - ); - couponListBean.promotionId = map['promotionId']; - couponListBean.promotionName = map['promotionName']; - couponListBean.publishEndTime = map['publishEndTime']; + couponListBean.discountPercent = map['discountPercent']; + couponListBean.bizId = map['bizId']; couponListBean.publishStartTime = map['publishStartTime']; + couponListBean.publishEndTime = map['publishEndTime']; + couponListBean.useStartTime = map['useStartTime']; + couponListBean.useEndTime = map['useEndTime']; + couponListBean.promotionId = map['promotionId']; + couponListBean.mid = map['mid']; + couponListBean.couponId = map['couponId']; couponListBean.receiveTime = map['receiveTime']; + couponListBean.useTime = map['useTime']; couponListBean.status = map['status']; - couponListBean.storeId = map['storeId']; couponListBean.tenantCode = map['tenantCode']; couponListBean.type = map['type']; + couponListBean.promotionName = map['promotionName']; couponListBean.usable = map['usable']; - couponListBean.useEndTime = map['useEndTime']; - couponListBean.useStartTime = map['useStartTime']; - couponListBean.useTime = map['useTime']; + couponListBean.allProduct = map['allProduct']; + couponListBean.productList = map['productList']; return couponListBean; } Map toJson() => { - "allProduct": allProduct, - "bizId": bizId, + "id": id, + "storeId": storeId, "bizType": bizType, - "couponId": couponId, - "discountAmount": discountAmount, - "discountPercent": discountPercent, "fullAmount": fullAmount, + "discountAmount": discountAmount, "fullNumber": fullNumber, - "id": id, - "mid": mid, - "productList": productList, - "promotionId": promotionId, - "promotionName": promotionName, - "publishEndTime": publishEndTime, + "discountPercent": discountPercent, + "bizId": bizId, "publishStartTime": publishStartTime, + "publishEndTime": publishEndTime, + "useStartTime": useStartTime, + "useEndTime": useEndTime, + "promotionId": promotionId, + "mid": mid, + "couponId": couponId, "receiveTime": receiveTime, + "useTime": useTime, "status": status, - "storeId": storeId, "tenantCode": tenantCode, "type": type, + "promotionName": promotionName, "usable": usable, - "useEndTime": useEndTime, - "useStartTime": useStartTime, - "useTime": useTime, + "allProduct": allProduct, + "productList": productList, }; } -/// applyPrice : 0 -/// attrStyle : 0 -/// categoryId : 0 -/// groupId : 0 -/// id : 0 +/// id : "1437254523520286720" +/// createTime : "2021-09-13 11:19:16" +/// createUser : "1333246101196636160" +/// updateTime : "2021-09-13 17:30:00" +/// updateUser : "0" +/// storeId : "1433719074906439680" +/// name : "�����ŵ�" +/// image : "https://pos.upload.gznl.top/1175/2021/09/44d60dab-0ae3-4d07-b624-50b8ab99d0fc.jpg" +/// description : "1" +/// status : 4 +/// applyStartTime : "2021-09-13 11:19:16" +/// applyEndTime : "2021-09-13 11:19:16" +/// activityStartTime : "2021-09-01 00:00:00" +/// activityEndTime : "2021-10-30 00:00:00" +/// doStartTime : null +/// doEndTime : null +/// isNeedSecurityDeposit : 0 +/// securityDeposit : "0" +/// tag : "11" +/// promotionType : 1 +/// promotionPlan : 0 +/// promotionDetail : [{"limitTime":"0","discountRate":"0","discountAmount":"0","fullAmount":"0","collageNumber":"0","fullNumber":"1"}] +/// channels : ["MINI","POS"] +/// isVip : false /// isDelete : 0 -/// materialId : 0 -/// needLogistics : 0 -/// oversold : 0 -/// posShow : true -/// price : 0 -/// printerFlag : "" -/// productCode : "" -/// productName : "" -/// productNumber : 0 -/// productType : 0 -/// sellCount : 0 -/// sellDesc : "" -/// setMeal : 0 -/// shortName : "" -/// status : 0 -/// stock : 0 -/// storeId : 0 -/// supplierName : "" -/// weight : 0 +/// tenantCode : "1175" +/// canPartake : true +/// promotionProuctList : null -class ProductListBean { - int applyPrice; - int attrStyle; - int categoryId; - int groupId; - int id; - int isDelete; - int materialId; - int needLogistics; - int oversold; - bool posShow; - int price; - String printerFlag; - String productCode; - String productName; - int productNumber; - int productType; - int sellCount; - String sellDesc; - int setMeal; - String shortName; +class PromotionInfoListBean { + String id; + String createTime; + String createUser; + String updateTime; + String updateUser; + String storeId; + String name; + String image; + String description; int status; - int stock; - int storeId; - String supplierName; - int weight; + String applyStartTime; + String applyEndTime; + String activityStartTime; + String activityEndTime; + dynamic doStartTime; + dynamic doEndTime; + int isNeedSecurityDeposit; + String securityDeposit; + String tag; + int promotionType; + int promotionPlan; + List promotionDetail; + List channels; + bool isVip; + int isDelete; + String tenantCode; + bool canPartake; + dynamic promotionProuctList; - static ProductListBean fromJson(Map map) { + static PromotionInfoListBean fromJson(Map map) { if (map == null) return null; - ProductListBean productListBean = ProductListBean(); - productListBean.applyPrice = map['applyPrice']; - productListBean.attrStyle = map['attrStyle']; - productListBean.categoryId = map['categoryId']; - productListBean.groupId = map['groupId']; - productListBean.id = map['id']; - productListBean.isDelete = map['isDelete']; - productListBean.materialId = map['materialId']; - productListBean.needLogistics = map['needLogistics']; - productListBean.oversold = map['oversold']; - productListBean.posShow = map['posShow']; - productListBean.price = map['price']; - productListBean.printerFlag = map['printerFlag']; - productListBean.productCode = map['productCode']; - productListBean.productName = map['productName']; - productListBean.productNumber = map['productNumber']; - productListBean.productType = map['productType']; - productListBean.sellCount = map['sellCount']; - productListBean.sellDesc = map['sellDesc']; - productListBean.setMeal = map['setMeal']; - productListBean.shortName = map['shortName']; - productListBean.status = map['status']; - productListBean.stock = map['stock']; - productListBean.storeId = map['storeId']; - productListBean.supplierName = map['supplierName']; - productListBean.weight = map['weight']; - return productListBean; + PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean(); + promotionInfoListBean.id = map['id']; + promotionInfoListBean.createTime = map['createTime']; + promotionInfoListBean.createUser = map['createUser']; + promotionInfoListBean.updateTime = map['updateTime']; + promotionInfoListBean.updateUser = map['updateUser']; + promotionInfoListBean.storeId = map['storeId']; + promotionInfoListBean.name = map['name']; + promotionInfoListBean.image = map['image']; + promotionInfoListBean.description = map['description']; + promotionInfoListBean.status = map['status']; + promotionInfoListBean.applyStartTime = map['applyStartTime']; + promotionInfoListBean.applyEndTime = map['applyEndTime']; + promotionInfoListBean.activityStartTime = map['activityStartTime']; + promotionInfoListBean.activityEndTime = map['activityEndTime']; + promotionInfoListBean.doStartTime = map['doStartTime']; + promotionInfoListBean.doEndTime = map['doEndTime']; + promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; + promotionInfoListBean.securityDeposit = map['securityDeposit']; + promotionInfoListBean.tag = map['tag']; + promotionInfoListBean.promotionType = map['promotionType']; + promotionInfoListBean.promotionPlan = map['promotionPlan']; + promotionInfoListBean.promotionDetail = List()..addAll( + (map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) + ); + promotionInfoListBean.channels = List()..addAll( + (map['channels'] as List ?? []).map((o) => o.toString()) + ); + promotionInfoListBean.isVip = map['isVip']; + promotionInfoListBean.isDelete = map['isDelete']; + promotionInfoListBean.tenantCode = map['tenantCode']; + promotionInfoListBean.canPartake = map['canPartake']; + promotionInfoListBean.promotionProuctList = map['promotionProuctList']; + return promotionInfoListBean; } Map toJson() => { - "applyPrice": applyPrice, - "attrStyle": attrStyle, - "categoryId": categoryId, - "groupId": groupId, "id": id, - "isDelete": isDelete, - "materialId": materialId, - "needLogistics": needLogistics, - "oversold": oversold, - "posShow": posShow, - "price": price, - "printerFlag": printerFlag, - "productCode": productCode, - "productName": productName, - "productNumber": productNumber, - "productType": productType, - "sellCount": sellCount, - "sellDesc": sellDesc, - "setMeal": setMeal, - "shortName": shortName, - "status": status, - "stock": stock, + "createTime": createTime, + "createUser": createUser, + "updateTime": updateTime, + "updateUser": updateUser, "storeId": storeId, - "supplierName": supplierName, - "weight": weight, + "name": name, + "image": image, + "description": description, + "status": status, + "applyStartTime": applyStartTime, + "applyEndTime": applyEndTime, + "activityStartTime": activityStartTime, + "activityEndTime": activityEndTime, + "doStartTime": doStartTime, + "doEndTime": doEndTime, + "isNeedSecurityDeposit": isNeedSecurityDeposit, + "securityDeposit": securityDeposit, + "tag": tag, + "promotionType": promotionType, + "promotionPlan": promotionPlan, + "promotionDetail": promotionDetail, + "channels": channels, + "isVip": isVip, + "isDelete": isDelete, + "tenantCode": tenantCode, + "canPartake": canPartake, + "promotionProuctList": promotionProuctList, + }; +} + +/// limitTime : "0" +/// discountRate : "0" +/// discountAmount : "0" +/// fullAmount : "0" +/// collageNumber : "0" +/// fullNumber : "1" + +class PromotionDetailBean { + String limitTime; + String discountRate; + String discountAmount; + String fullAmount; + String collageNumber; + String fullNumber; + + static PromotionDetailBean fromJson(Map map) { + if (map == null) return null; + PromotionDetailBean promotionDetailBean = PromotionDetailBean(); + promotionDetailBean.limitTime = map['limitTime']; + promotionDetailBean.discountRate = map['discountRate']; + promotionDetailBean.discountAmount = map['discountAmount']; + promotionDetailBean.fullAmount = map['fullAmount']; + promotionDetailBean.collageNumber = map['collageNumber']; + promotionDetailBean.fullNumber = map['fullNumber']; + return promotionDetailBean; + } + + Map toJson() => { + "limitTime": limitTime, + "discountRate": discountRate, + "discountAmount": discountAmount, + "fullAmount": fullAmount, + "collageNumber": collageNumber, + "fullNumber": fullNumber, }; } \ No newline at end of file diff --git a/lib/store/store_view/settlement_order_commodity.dart b/lib/store/store_view/settlement_order_commodity.dart new file mode 100644 index 00000000..fdd9bbc5 --- /dev/null +++ b/lib/store/store_view/settlement_order_commodity.dart @@ -0,0 +1,361 @@ + + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/custom_image.dart'; +import 'package:huixiang/view_widget/separator.dart'; + +class SettlementOrderCommodity extends StatefulWidget { + final int isTakeOut; + final SettleOrderInfo orderInfo; + + SettlementOrderCommodity(this.orderInfo,this.isTakeOut); + + @override + State createState() { + return _SettlementOrderCommodity(); + } + +} + +class _SettlementOrderCommodity extends State { + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.centerRight, + children: [ + Container( + margin: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 16.h, + bottom: 8.h, + ), + padding: EdgeInsets.only( + left: 20.w, + right: 20.w, + top: 12.h, + bottom: 12.h, + ), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: commodityList(), + ), + ), + Visibility( + child: buildQrCode(), + visible: false, + ), + ], + ); + } + + + List commodityList() { + if (widget.orderInfo == null) return []; + List widgets = []; + if (widget.orderInfo.orderProductList != null) { + widgets + .addAll(widget.orderInfo.orderProductList.map((e) => commodityItem(e)).toList()); + } + widgets.add(SizedBox(height: 20.h)); + + if (widget.isTakeOut != 0) { + // 配送费 + widgets.add(discountItem( + Color(0xFFFF7A1A), + widget.isTakeOut == 1 + ? S.of(context).peisongfei + : S.of(context).yunfei, + "", + "+${widget.orderInfo.postAge}")); + } + + widgets.add(Container( + margin: EdgeInsets.only( + top: 24.h, + bottom: 4.h, + ), + child: MySeparator( + height: 1, + width: 5.w, + color: Colors.grey, + ), + )); + widgets.add(buildTotalPrice()); + return widgets; + } + + Widget commodityItem(OrderProductListBean productList) { + return Container( + margin: EdgeInsets.only(top: 8.h, bottom: 8.h), + child: Row( + children: [ + MImage( + productList.skuImg, + width: 44.w, + height: 44, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.only( + left: 16.w, + ), + height: 44.h, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + productList.productName, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + Text( + "x${productList.buyNum}", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF727272), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + productList.weight != null + ? "${productList.weight}kg" + : "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFFA29E9E), + ), + ), + ), + Text( + S.of(context).yuan_(productList.sellPrice), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 12.sp, + color: Color(0xFF4C4C4C), + ), + ) + ], + ), + ], + ), + ), + ), + ], + ), + ); + } + + Widget discountItem(Color color, textName, condition, amount) { + return Container( + margin: EdgeInsets.only(top: 9.h, bottom: 9.h), + child: Row( + children: [ + Container( + padding: EdgeInsets.fromLTRB(4.w, 2.h, 4.w, 2.h), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(2)), + border: Border.all( + width: 1, + color: color, + style: BorderStyle.solid, + ), + ), + child: Text( + textName, + style: TextStyle( + fontSize: 10.sp, + color: color, + ), + ), + ), + SizedBox( + width: 27.w, + ), + Expanded( + child: Text( + condition ?? "", + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), + ), + flex: 1, + ), + Text( + S.of(context).yuan_("$amount"), + style: TextStyle( + fontSize: 12.sp, + color: color, + ), + ), + ], + ), + ); + } + + Widget buildQrCode() { + return Container( + margin: EdgeInsets.only(right: 16.w), + child: Stack( + children: [ + Container( + width: 94.w, + height: 33.h, + margin: EdgeInsets.only(left: 12.w), + padding: EdgeInsets.only(left: 16.w), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0, + ) + ], + borderRadius: BorderRadius.only( + topLeft: Radius.circular(2), + bottomLeft: Radius.circular(2), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).qujianma, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 12.sp, + color: Colors.black, + ), + ), + Icon( + Icons.keyboard_arrow_right, + color: Colors.black, + size: 16, + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 6.h, bottom: 6.h), + // padding: EdgeInsets.all(2), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0, + ) + ], + borderRadius: BorderRadius.circular(2), + ), + child: Icon( + Icons.qr_code, + size: 20, + color: Color(0xFF32A060), + ), + ), + ], + ), + ); + } + + Widget buildTotalPrice() { + return Container( + margin: EdgeInsets.only(top: 7.h, bottom: 11.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + children: [ + Expanded( + child: Text( + S.of(context).gongjijianshangpin( + (widget.orderInfo != null && widget.orderInfo.orderProductList != null) + ? widget.orderInfo.orderProductList.length + : "0"), + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + fontWeight: MyFontWeight.semi_bold + ), + ), + flex: 1, + ), + Container( + child: Text( + S.of(context).jiesuanjine, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF353535), + fontWeight:MyFontWeight.semi_bold + ), + ), + ), + SizedBox( + width: 5.w, + ), + Text( + totalPrice(), + textAlign: TextAlign.end, + style: TextStyle( + fontSize:14.sp, + color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold + ), + ) + ], + ), + ); + } + + String totalPrice() { + if (widget.orderInfo == null) return ""; + double totalPrice = (double.tryParse(widget.orderInfo.orderSum) + + double.tryParse(widget.orderInfo.postAge)); + return "$totalPrice"; + } + +} \ No newline at end of file