diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 149dc7be..807fcdfa 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -40,6 +40,7 @@ class _OrderDetailPage extends State { SharedPreferences.getInstance().then((value) { apiService = ApiService( Dio(), + showLoading: true, context: context, token: value.getString("token"), ); @@ -66,6 +67,7 @@ class _OrderDetailPage extends State { ); minService = MinApiService( Dio(), + showLoading:true, context: context, token: minToken, tenant: tenant, @@ -173,7 +175,7 @@ class _OrderDetailPage extends State { OrderCommodity(orderInfo), ///显示订单信息 - OrderInfoView(orderInfo), + OrderInfoView(orderInfo,isTakeOut), Container( height: 42.h, diff --git a/lib/order/order_view/order_info.dart b/lib/order/order_view/order_info.dart index 945ead9a..388ec949 100644 --- a/lib/order/order_view/order_info.dart +++ b/lib/order/order_view/order_info.dart @@ -7,10 +7,10 @@ import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/utils/font_weight.dart'; class OrderInfoView extends StatefulWidget { - final OrderInfo orderInfo; + final int isTakeOut; - OrderInfoView(this.orderInfo); + OrderInfoView(this.orderInfo,this.isTakeOut); @override State createState() { @@ -45,7 +45,8 @@ class _OrderInfoView extends State { S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""), orderInfoItem(S.of(context).xiadanshijian, widget.orderInfo != null ? widget.orderInfo.createTime : ""), - orderInfoItem(S.of(context).peisongfangshi,(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"), + orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0 + ? S.of(context).ziqu :(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"), // orderInfoItem(S.of(context).peisongfangshi,"美团配送"), orderInfoItem( S.of(context).beizhuxinxi, diff --git a/lib/order/order_view/order_status.dart b/lib/order/order_view/order_status.dart index 598ede2f..8cc5e8e7 100644 --- a/lib/order/order_view/order_status.dart +++ b/lib/order/order_view/order_status.dart @@ -33,7 +33,7 @@ class _OrderStatus extends State { @override Widget build(BuildContext context) { return Container( - height: widget.orderStatus >= 4 ? 118.h : 118.h, + height: widget.orderStatus >= 4 ? 120.h : 120.h, padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h), child: Column( children: [ @@ -80,15 +80,46 @@ class _OrderStatus extends State { ), Row( mainAxisAlignment:MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - widget.title, - style: TextStyle( - color: Colors.white, - fontWeight: MyFontWeight.regular, - fontSize: 15.sp, - ), + Column( + mainAxisAlignment:MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.title, + style: TextStyle( + color: Colors.white, + fontWeight: MyFontWeight.regular, + fontSize: 15.sp, + ), + ), + if(widget.title == S.of(context).shangjiazhengzaipeican) + Container( + margin: EdgeInsets.only(top:5), + padding: EdgeInsets.only(top:2,left:4,right:4,bottom:2), + decoration: BoxDecoration( + color: Color(0xFF32A060), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(15), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(15), + ), + child: Text( + S.of(context).qudanhao(":" + widget.orderInfo.dayFlowCode), + style: TextStyle( + color:Colors.white, + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + ), + ), + ), + ], ), if(widget.payStatus != 0) Image.asset(