|
|
@ -20,9 +20,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class Settlement extends StatefulWidget { |
|
|
|
class Settlement extends StatefulWidget { |
|
|
|
final arguments; |
|
|
|
final arguments; |
|
|
|
final OrderInfo orderInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Settlement({this.arguments,this.orderInfo}); |
|
|
|
Settlement({this.arguments}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
State<StatefulWidget> createState() { |
|
|
|
State<StatefulWidget> createState() { |
|
|
@ -31,9 +30,9 @@ class Settlement extends StatefulWidget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class _Settlement extends State<Settlement> { |
|
|
|
class _Settlement extends State<Settlement> { |
|
|
|
ApiService apiService; |
|
|
|
|
|
|
|
MinApiService minService; |
|
|
|
MinApiService minService; |
|
|
|
int selectedBtn = 0; |
|
|
|
int selectedBtn = 0; |
|
|
|
|
|
|
|
OrderInfo orderInfo; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
@ -45,11 +44,11 @@ class _Settlement extends State<Settlement> { |
|
|
|
context: context, |
|
|
|
context: context, |
|
|
|
token: value.getString("token"), |
|
|
|
token: value.getString("token"), |
|
|
|
); |
|
|
|
); |
|
|
|
queryOrderInfo(); |
|
|
|
// queryOrderInfo(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
storeInfo = widget.arguments["storeInfo"]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
OrderInfo orderInfo; |
|
|
|
|
|
|
|
StoreInfo storeInfo; |
|
|
|
StoreInfo storeInfo; |
|
|
|
int payStatus = 0; |
|
|
|
int payStatus = 0; |
|
|
|
int orderStatus = 0; |
|
|
|
int orderStatus = 0; |
|
|
@ -58,27 +57,27 @@ class _Settlement extends State<Settlement> { |
|
|
|
int refundStatus = 0; |
|
|
|
int refundStatus = 0; |
|
|
|
|
|
|
|
|
|
|
|
// String storeType = "NORMALSTORE"; //NORMALSTORE FASTSTORE RETAILSTORE |
|
|
|
// String storeType = "NORMALSTORE"; //NORMALSTORE FASTSTORE RETAILSTORE |
|
|
|
queryDetails() async { |
|
|
|
// queryDetails() async { |
|
|
|
BaseData<OrderInfo> baseData = await apiService.orderDetail(widget.arguments["id"]); |
|
|
|
// BaseData<OrderInfo> baseData = await minService.orderDetail(widget.arguments["id"]); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
// if (baseData != null && baseData.isSuccess) { |
|
|
|
orderInfo = baseData.data; |
|
|
|
// orderInfo = baseData.data; |
|
|
|
payStatus = orderInfo.payStatus; |
|
|
|
// payStatus = orderInfo.payStatus; |
|
|
|
orderStatus = orderInfo.orderStatus; |
|
|
|
// orderStatus = orderInfo.orderStatus; |
|
|
|
sendStatus = orderInfo.sendStatus; |
|
|
|
// sendStatus = orderInfo.sendStatus; |
|
|
|
isTakeOut = orderInfo.isTakeOut; |
|
|
|
// isTakeOut = orderInfo.isTakeOut; |
|
|
|
refundStatus = orderInfo.refundStatus; |
|
|
|
// refundStatus = orderInfo.refundStatus; |
|
|
|
// storeType = orderInfo.storeVO.posType.code; |
|
|
|
// // storeType = orderInfo.storeVO.posType.code; |
|
|
|
print("order refund_status: $refundStatus"); |
|
|
|
// print("order refund_status: $refundStatus"); |
|
|
|
print("order payStatus: $payStatus"); |
|
|
|
// print("order payStatus: $payStatus"); |
|
|
|
print("order orderStatus: $orderStatus"); |
|
|
|
// print("order orderStatus: $orderStatus"); |
|
|
|
print("order sendStatus: $sendStatus"); |
|
|
|
// print("order sendStatus: $sendStatus"); |
|
|
|
print("order isTakeOut: $isTakeOut"); |
|
|
|
// print("order isTakeOut: $isTakeOut"); |
|
|
|
if (mounted) |
|
|
|
// if (mounted) |
|
|
|
setState(() { |
|
|
|
// setState(() { |
|
|
|
statusTitle(); |
|
|
|
// statusTitle(); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
///订单结算信息 |
|
|
|
///订单结算信息 |
|
|
|
queryOrderInfo() async { |
|
|
|
queryOrderInfo() async { |
|
|
@ -841,7 +840,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String payChannel() { |
|
|
|
String payChannel() { |
|
|
|
switch (widget.orderInfo.payChannel) { |
|
|
|
switch (orderInfo.payChannel) { |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
|
return "现金支付"; |
|
|
|
return "现金支付"; |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|