|
|
@ -124,7 +124,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} else if (coupons != null && coupons != "" && tableId <= 0) { |
|
|
|
} else if (coupons != null && coupons != "" && tableId <= 0) { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address != null ? address.id : null, |
|
|
|
address != null ? address.id : null, |
|
|
@ -136,7 +137,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} else |
|
|
|
} else |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
null, |
|
|
|
null, |
|
|
@ -148,7 +150,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
weChatResponseEventHandler.listen((event) async { |
|
|
|
weChatResponseEventHandler.listen((event) async { |
|
|
@ -159,7 +162,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
|
|
|
|
|
|
|
|
///订单结算信息 |
|
|
|
///订单结算信息 |
|
|
|
queryOrderInfo(addressId, isTake, memberCouponId, orderId, promotionId, |
|
|
|
queryOrderInfo(addressId, isTake, memberCouponId, orderId, promotionId, |
|
|
|
productSkuId, actProductId, actProductSkuId, buyNum, payChannel) async { |
|
|
|
productSkuId, actProductId, actProductSkuId, buyNum, payChannel,tableId) async { |
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
"addressId": addressId, |
|
|
|
"addressId": addressId, |
|
|
|
"isTake": isTake, |
|
|
|
"isTake": isTake, |
|
|
@ -170,7 +173,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
"actProductId": actProductId, |
|
|
|
"actProductId": actProductId, |
|
|
|
"actProductSkuId": actProductSkuId, |
|
|
|
"actProductSkuId": actProductSkuId, |
|
|
|
"buyNum": buyNum, |
|
|
|
"buyNum": buyNum, |
|
|
|
"payChannel": payChannel |
|
|
|
"payChannel": payChannel, |
|
|
|
|
|
|
|
"tableId":tableId |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
|
this.promotion = null; |
|
|
|
this.promotion = null; |
|
|
|
promotions = ""; |
|
|
|
promotions = ""; |
|
|
@ -209,7 +213,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
queryOrderDetails(id) async { |
|
|
|
queryOrderDetails(id) async { |
|
|
|
print("ididididididid: $id"); |
|
|
|
print("ididididididid: $id"); |
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
"id": widget.arguments["orderId"], |
|
|
|
"id": widget.arguments["orderId"] ?? parentId, |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -235,7 +239,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
BaseData<List<Address>> baseDate = |
|
|
|
BaseData<List<Address>> baseDate = |
|
|
@ -289,7 +294,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -315,7 +321,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -461,7 +468,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
} |
|
|
|
} |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
placeOrder = true; |
|
|
|
placeOrder = true; |
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
this.downOrder = baseData.data; |
|
|
|
queryOrderDetails( |
|
|
|
queryOrderDetails( |
|
|
|
(parentId == null || parentId == "") ? baseData.data.id : parentId); |
|
|
|
(parentId == null || parentId == "") ? baseData.data.id : parentId); |
|
|
|
setState(() {}); |
|
|
|
setState(() {}); |
|
|
@ -515,6 +522,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
print(error); |
|
|
|
print(error); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
|
|
|
SmartDialog.showToast(baseData?.msg == "ok" ? "订单支付成功":"", alignment: Alignment.center); |
|
|
|
toOrderDetails(placeOrderFirst.id); |
|
|
|
toOrderDetails(placeOrderFirst.id); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
SmartDialog.show( |
|
|
|
SmartDialog.show( |
|
|
@ -660,7 +668,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId ?? 0); |
|
|
|
}, queryAddress, storeInfo, address, |
|
|
|
}, queryAddress, storeInfo, address, |
|
|
|
selectedAddress, pageType), |
|
|
|
selectedAddress, pageType), |
|
|
|
|
|
|
|
|
|
|
@ -805,7 +814,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mobileChange(String mobile) { |
|
|
|
mobileChange(String mobile) { |
|
|
@ -853,7 +863,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -882,7 +893,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel); |
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
} |
|
|
|
} |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|