w-R 3 years ago
parent
commit
a9fd2c4dec
  1. 69
      lib/settlement/settlement.dart

69
lib/settlement/settlement.dart

@ -124,8 +124,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
} else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
@ -137,8 +136,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
} else
queryOrderInfo(
null,
@ -150,8 +148,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
});
weChatResponseEventHandler.listen((event) async {
@ -161,18 +158,8 @@ class _Settlement extends State<Settlement> {
}
///
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId,
productSkuId,
actProductId,
actProductSkuId,
buyNum,
payChannel
) async {
queryOrderInfo(addressId, isTake, memberCouponId, orderId, promotionId,
productSkuId, actProductId, actProductSkuId, buyNum, payChannel) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
@ -228,8 +215,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
return;
}
BaseData<List<Address>> baseDate =
@ -283,8 +269,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}
}
@ -310,8 +295,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}
}
@ -404,14 +388,10 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.payChannel = payChannel;
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0)
? promotion.id
: "";
(promotion != null && tableId <= 0) ? promotion.id : "";
// : widget.arguments["pid"] ?? "";
placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0)
? couponListBean.id
: "";
(couponListBean != null && tableId <= 0) ? couponListBean.id : "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
@ -442,8 +422,7 @@ class _Settlement extends State<Settlement> {
if (placeOrder) {
//
querySettlement();
}
else{
} else {
if (parentId == "") {
//
baseData = await minService
@ -466,8 +445,7 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(
(parentId == null || parentId == "") ? baseData.data.id : parentId);
setState(() {});
}
else {
} else {
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
}
}
@ -647,8 +625,8 @@ class _Settlement extends State<Settlement> {
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake,
memberCouponId, orderId, promotionId) {
DistributionMode((addressId, isTake, memberCouponId,
orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
@ -662,8 +640,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
@ -709,8 +686,7 @@ class _Settlement extends State<Settlement> {
tableId,
),
if (placeOrder &&
joinA != JoinActivity.BargainBug)
if (placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
@ -783,7 +759,9 @@ class _Settlement extends State<Settlement> {
: queryPlaceOrderFirst();
},
),
SizedBox(width: 17,)
SizedBox(
width: 17,
)
],
),
),
@ -807,8 +785,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}
mobileChange(String mobile) {
@ -856,8 +833,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}
}
@ -886,8 +862,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
payChannel);
}
}
}

Loading…
Cancel
Save