Browse Source

订单详情,订单列表:orderStatus增加-1(未付款 清桌)状态;

修改订单详情,订单列表orderStatus == -1时显示状态;
new_revision_app
wurong 2 years ago
parent
commit
056a493365
  1. 8
      lib/order/order_detail_page.dart
  2. 7
      lib/order/order_history_page.dart
  3. 2
      lib/order/order_view/order_status.dart
  4. 8
      lib/utils/status_utils.dart

8
lib/order/order_detail_page.dart

@ -237,11 +237,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
statusTitle() { statusTitle() {
if (isTakeOut == 0) { if (isTakeOut == 0) {
if (payStatus == 0) { if (payStatus == 0 && orderStatus != -1) {
title = S.of(context).dingdandaizhifu; title = S.of(context).dingdandaizhifu;
} else { } else {
title = S.of(context).dingdanyizhifu; title = S.of(context).dingdanyizhifu;
switch (orderStatus) { switch (orderStatus) {
case -1:
title = S.of(context).yiquxiao;
center = S.of(context).yiquxiao;
break;
case 2: case 2:
title = S.of(context).shangjiazhengzaipeican; title = S.of(context).shangjiazhengzaipeican;
break; break;
@ -312,7 +316,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
} }
} }
if (orderStatus == 5) { if (orderStatus == 5 || orderStatus == -1) {
title = S.of(context).yiquxiao; title = S.of(context).yiquxiao;
center = S.of(context).yiquxiao; center = S.of(context).yiquxiao;
} }

7
lib/order/order_history_page.dart

@ -314,13 +314,10 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ), // ),
// ), // ),
// ), // ),
Container(
margin: EdgeInsets.only(left: 5.w, top: 12.h),
),
Expanded( Expanded(
child: Container( child: Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 6.w, top: 12.h), margin: EdgeInsets.only(left:12.w, top: 12.h),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Text(
(orderInfo != null) ? orderInfo.storeName : "", (orderInfo != null) ? orderInfo.storeName : "",
@ -353,7 +350,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
color: (orderInfo == null) color: (orderInfo == null)
? Color(0xFF32A060) ? Color(0xFF32A060)
: (orderInfo.refundStatus == 1 || : (orderInfo.refundStatus == 1 ||
orderInfo.orderStatus >= 5) orderInfo.orderStatus == -1 || orderInfo.orderStatus >= 5)
? Colors.grey ? Colors.grey
: (orderInfo.orderStatus == 4) : (orderInfo.orderStatus == 4)
? Color(0xFF32A060) ? Color(0xFF32A060)

2
lib/order/order_view/order_status.dart

@ -142,7 +142,7 @@ class _OrderStatus extends State<OrderStatus> {
children: timeWidget(), children: timeWidget(),
), ),
), ),
visible: (widget.orderStatus >= 4 || widget.isTakeOut == 2) visible: (widget.orderStatus == -1 || widget.orderStatus >= 4 || widget.isTakeOut == 2)
? false ? false
: (widget.isTakeOut == 0) : (widget.isTakeOut == 0)
? !(widget.payStatus == 1) ? !(widget.payStatus == 1)

8
lib/utils/status_utils.dart

@ -9,7 +9,7 @@ class StatusUtils {
context, refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) { context, refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) {
String statusText = ""; String statusText = "";
if (isTakeOut == 0) { if (isTakeOut == 0) {
if (payStatus == 0) { if (payStatus == 0 && orderStatus != -1) {
statusText = S.of(context).daizhifu; statusText = S.of(context).daizhifu;
} else { } else {
statusText = S.of(context).yizhifu; statusText = S.of(context).yizhifu;
@ -79,7 +79,7 @@ class StatusUtils {
if (refundStatus == 1) { if (refundStatus == 1) {
statusText = S.of(context).yituikuan; statusText = S.of(context).yituikuan;
} }
if (orderStatus == 5) { if (orderStatus == 5 || orderStatus == -1) {
statusText = S.of(context).yiquxiao; statusText = S.of(context).yiquxiao;
} }
return statusText; return statusText;
@ -110,7 +110,7 @@ class StatusUtils {
), ),
]; ];
} }
if (orderStatus > 4) { if (orderStatus > 4 || orderStatus == -1) {
return [ return [
RoundButton( RoundButton(
text: S.of(context).zailaiyidan, text: S.of(context).zailaiyidan,
@ -125,7 +125,7 @@ class StatusUtils {
), ),
]; ];
} else { } else {
if (payStatus == 0) { if (payStatus == 0 && orderStatus != -1) {
return [ return [
RoundButton( RoundButton(
text: S.of(context).quzhifu, text: S.of(context).quzhifu,

Loading…
Cancel
Save