|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'dart:io'; |
|
|
|
|
|
|
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
@ -72,8 +74,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
parentId = widget.arguments["parentId"] ?? ""; |
|
|
|
|
storeInfo = widget.arguments["storeInfo"]; |
|
|
|
|
numberOfPeople = widget.arguments["numberOfPeople"] ?? 0; |
|
|
|
|
promotions=widget.arguments["pid"]??""; |
|
|
|
|
coupons=widget.arguments["cid"]??""; |
|
|
|
|
promotions=widget.arguments["pName"]??""; |
|
|
|
|
coupons=widget.arguments["cName"]??""; |
|
|
|
|
if (tableId == 0) { |
|
|
|
|
placeOrder = true; |
|
|
|
|
} |
|
|
|
@ -89,7 +91,25 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
tenant: tenant, |
|
|
|
|
storeId: storeId, |
|
|
|
|
); |
|
|
|
|
queryOrderInfo(null, selectedBtn, null, 0, null); |
|
|
|
|
if(promotions != null && promotions != ""){ |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address != null ? address.id : null, |
|
|
|
|
selectedBtn, |
|
|
|
|
null, |
|
|
|
|
0, |
|
|
|
|
widget.arguments["pid"], |
|
|
|
|
); |
|
|
|
|
}else if(coupons != null && coupons != ""){ |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address != null ? address.id : null, |
|
|
|
|
selectedBtn, |
|
|
|
|
widget.arguments["cid"], |
|
|
|
|
0, |
|
|
|
|
null, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
queryOrderInfo(null, selectedBtn, null, 0, null); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -209,9 +229,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
placeOrderFirst.payChannel = payChannel; |
|
|
|
|
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
|
placeOrderFirst.promotionInfoDTO.promotionId = |
|
|
|
|
promotion != null ? promotion.id : ""; |
|
|
|
|
promotion != null ? promotion.id : widget.arguments["pid"]??""; |
|
|
|
|
placeOrderFirst.promotionInfoDTO.couponId = |
|
|
|
|
couponListBean != null ? couponListBean.id : ""; |
|
|
|
|
couponListBean != null ? couponListBean.id : widget.arguments["cid"]??""; |
|
|
|
|
placeOrderFirst.recMobile = |
|
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; |
|
|
|
|