diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index b12aefda..3b672481 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -237,11 +237,15 @@ class _OrderDetailPage extends State { statusTitle() { if (isTakeOut == 0) { - if (payStatus == 0) { + if (payStatus == 0 && orderStatus != -1) { title = S.of(context).dingdandaizhifu; } else { title = S.of(context).dingdanyizhifu; switch (orderStatus) { + case -1: + title = S.of(context).yiquxiao; + center = S.of(context).yiquxiao; + break; case 2: title = S.of(context).shangjiazhengzaipeican; break; @@ -312,7 +316,7 @@ class _OrderDetailPage extends State { } } } - if (orderStatus == 5) { + if (orderStatus == 5 || orderStatus == -1) { title = S.of(context).yiquxiao; center = S.of(context).yiquxiao; } diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index c65f5708..ae78e3d5 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -314,13 +314,10 @@ class _OrderHistoryList extends State // ), // ), // ), - Container( - margin: EdgeInsets.only(left: 5.w, top: 12.h), - ), Expanded( child: Container( width: double.infinity, - margin: EdgeInsets.only(left: 6.w, top: 12.h), + margin: EdgeInsets.only(left:12.w, top: 12.h), alignment: Alignment.centerLeft, child: Text( (orderInfo != null) ? orderInfo.storeName : "", @@ -353,7 +350,7 @@ class _OrderHistoryList extends State color: (orderInfo == null) ? Color(0xFF32A060) : (orderInfo.refundStatus == 1 || - orderInfo.orderStatus >= 5) + orderInfo.orderStatus == -1 || orderInfo.orderStatus >= 5) ? Colors.grey : (orderInfo.orderStatus == 4) ? Color(0xFF32A060) diff --git a/lib/order/order_view/order_status.dart b/lib/order/order_view/order_status.dart index 3d320c1f..595d6b23 100644 --- a/lib/order/order_view/order_status.dart +++ b/lib/order/order_view/order_status.dart @@ -142,7 +142,7 @@ class _OrderStatus extends State { children: timeWidget(), ), ), - visible: (widget.orderStatus >= 4 || widget.isTakeOut == 2) + visible: (widget.orderStatus == -1 || widget.orderStatus >= 4 || widget.isTakeOut == 2) ? false : (widget.isTakeOut == 0) ? !(widget.payStatus == 1) diff --git a/lib/utils/status_utils.dart b/lib/utils/status_utils.dart index 13b8c46f..fe58f78c 100644 --- a/lib/utils/status_utils.dart +++ b/lib/utils/status_utils.dart @@ -9,7 +9,7 @@ class StatusUtils { context, refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) { String statusText = ""; if (isTakeOut == 0) { - if (payStatus == 0) { + if (payStatus == 0 && orderStatus != -1) { statusText = S.of(context).daizhifu; } else { statusText = S.of(context).yizhifu; @@ -79,7 +79,7 @@ class StatusUtils { if (refundStatus == 1) { statusText = S.of(context).yituikuan; } - if (orderStatus == 5) { + if (orderStatus == 5 || orderStatus == -1) { statusText = S.of(context).yiquxiao; } return statusText; @@ -110,7 +110,7 @@ class StatusUtils { ), ]; } - if (orderStatus > 4) { + if (orderStatus > 4 || orderStatus == -1) { return [ RoundButton( text: S.of(context).zailaiyidan, @@ -125,7 +125,7 @@ class StatusUtils { ), ]; } else { - if (payStatus == 0) { + if (payStatus == 0 && orderStatus != -1) { return [ RoundButton( text: S.of(context).quzhifu,