Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

new_revision_app
fmk 2 years ago
parent
commit
c39c133160
  1. 3
      lib/message/system_details.dart
  2. 8
      lib/order/order_detail_page.dart
  3. 7
      lib/order/order_history_page.dart
  4. 2
      lib/order/order_view/order_status.dart
  5. 8
      lib/utils/status_utils.dart

3
lib/message/system_details.dart

@ -51,8 +51,7 @@ class _SystemDetails extends State<SystemDetails> {
msgType = widget.arguments["msgType"];
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), token: value.getString("token"), context: context);
apiService = ApiService(Dio(), token: value.getString("token"),showLoading: true, context: context);
queryMessage();
});
}

8
lib/order/order_detail_page.dart

@ -237,11 +237,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
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<OrderDetailPage> {
}
}
}
if (orderStatus == 5) {
if (orderStatus == 5 || orderStatus == -1) {
title = 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(
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<OrderHistoryList>
color: (orderInfo == null)
? Color(0xFF32A060)
: (orderInfo.refundStatus == 1 ||
orderInfo.orderStatus >= 5)
orderInfo.orderStatus == -1 || orderInfo.orderStatus >= 5)
? Colors.grey
: (orderInfo.orderStatus == 4)
? Color(0xFF32A060)

2
lib/order/order_view/order_status.dart

@ -142,7 +142,7 @@ class _OrderStatus extends State<OrderStatus> {
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)

8
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,

Loading…
Cancel
Save