|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'dart:convert'; |
|
|
|
|
import 'dart:io'; |
|
|
|
|
|
|
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
@ -213,17 +214,16 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
|
|
|
|
|
///查看订单详情 |
|
|
|
|
queryOrderDetails(id) async { |
|
|
|
|
print("ididididididid: $id"); |
|
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
|
"id":pageType != null ? widget.arguments["orderId"] : parentId, |
|
|
|
|
}).catchError((error) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
minOrderInfo = baseData.data; |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
|
"id": pageType != null ? widget.arguments["orderId"] : id??parentId, |
|
|
|
|
}).catchError((error) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
minOrderInfo = baseData.data; |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
queryAddress(int selectedBtn) async { |
|
|
|
@ -452,6 +452,7 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
if (placeOrder) { |
|
|
|
|
// 结算 |
|
|
|
|
querySettlement(); |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
if (parentId == "") { |
|
|
|
|
// 下单 |
|
|
|
@ -473,8 +474,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
placeOrder = true; |
|
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
|
queryOrderDetails( |
|
|
|
|
(parentId == null || parentId == "") ? baseData.data.id : parentId); |
|
|
|
|
parentId = this.downOrder.id??this.downOrder.parentId; |
|
|
|
|
queryOrderDetails(parentId); |
|
|
|
|
setState(() {}); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); |
|
|
|
|