Browse Source

更改

ff_new
w-R 3 years ago
parent
commit
e3351fedc5
  1. 4
      lib/order/order_detail_page.dart
  2. 7
      lib/order/order_view/order_info.dart
  3. 35
      lib/order/order_view/order_status.dart

4
lib/order/order_detail_page.dart

@ -40,6 +40,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
apiService = ApiService( apiService = ApiService(
Dio(), Dio(),
showLoading: true,
context: context, context: context,
token: value.getString("token"), token: value.getString("token"),
); );
@ -66,6 +67,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
); );
minService = MinApiService( minService = MinApiService(
Dio(), Dio(),
showLoading:true,
context: context, context: context,
token: minToken, token: minToken,
tenant: tenant, tenant: tenant,
@ -173,7 +175,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
OrderCommodity(orderInfo), OrderCommodity(orderInfo),
/// ///
OrderInfoView(orderInfo), OrderInfoView(orderInfo,isTakeOut),
Container( Container(
height: 42.h, height: 42.h,

7
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'; import 'package:huixiang/utils/font_weight.dart';
class OrderInfoView extends StatefulWidget { class OrderInfoView extends StatefulWidget {
final OrderInfo orderInfo; final OrderInfo orderInfo;
final int isTakeOut;
OrderInfoView(this.orderInfo); OrderInfoView(this.orderInfo,this.isTakeOut);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -45,7 +45,8 @@ class _OrderInfoView extends State<OrderInfoView> {
S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""), S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""),
orderInfoItem(S.of(context).xiadanshijian, orderInfoItem(S.of(context).xiadanshijian,
widget.orderInfo != null ? widget.orderInfo.createTime : ""), 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).peisongfangshi,"美团配送"),
orderInfoItem( orderInfoItem(
S.of(context).beizhuxinxi, S.of(context).beizhuxinxi,

35
lib/order/order_view/order_status.dart

@ -33,7 +33,7 @@ class _OrderStatus extends State<OrderStatus> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( 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), padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h),
child: Column( child: Column(
children: [ children: [
@ -80,7 +80,11 @@ class _OrderStatus extends State<OrderStatus> {
), ),
Row( Row(
mainAxisAlignment:MainAxisAlignment.spaceBetween, mainAxisAlignment:MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment:MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
widget.title, widget.title,
@ -90,6 +94,33 @@ class _OrderStatus extends State<OrderStatus> {
fontSize: 15.sp, 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) if(widget.payStatus != 0)
Image.asset( Image.asset(
statusPicture(widget.title), statusPicture(widget.title),

Loading…
Cancel
Save