|
|
|
@ -4,11 +4,13 @@ import 'dart:io';
|
|
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:flutter_datetime_picker_plus/src/datetime_picker_theme.dart' as picker_theme; |
|
|
|
|
import 'package:flutter_datetime_picker_plus/src/datetime_picker_theme.dart' |
|
|
|
|
as picker_theme; |
|
|
|
|
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; |
|
|
|
|
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
|
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
|
import 'package:fluwx/fluwx.dart'; |
|
|
|
|
import 'package:geolocator/geolocator.dart'; |
|
|
|
|
import 'package:huixiang/data/settle_order_info.dart'; |
|
|
|
|
import 'package:huixiang/data/shopping_cart.dart'; |
|
|
|
|
import 'package:huixiang/data/subscribe_param.dart'; |
|
|
|
@ -72,13 +74,13 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
String? actProductId; |
|
|
|
|
String? actProductSkuId; |
|
|
|
|
ActivityDetails? activityDetails; |
|
|
|
|
BargainType bargainType = BargainType.BargainZBug; |
|
|
|
|
BargainType? bargainType = BargainType.BargainZBug; |
|
|
|
|
LaunchJoinAct? launchJoinAct; |
|
|
|
|
String? skuPrice1; |
|
|
|
|
JoinActivity joinA = JoinActivity.GoJoin; |
|
|
|
|
JoinActivity? joinA = JoinActivity.GoJoin; |
|
|
|
|
String? bargainOrderId; |
|
|
|
|
String? productSkuId; |
|
|
|
|
int count1 = 0; |
|
|
|
|
int? count1 = 0; |
|
|
|
|
String? productId; |
|
|
|
|
bool orderButton = false; |
|
|
|
|
bool useVipPriceSelect = true; |
|
|
|
@ -140,7 +142,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
storeId: storeId, |
|
|
|
|
showLoading: false); |
|
|
|
|
queryMemberInfo(); |
|
|
|
|
if (widget.arguments["pid"] != null && widget.arguments["pid"] != "" && tableId <= 0) { |
|
|
|
|
if (widget.arguments["pid"] != null && |
|
|
|
|
widget.arguments["pid"] != "" && |
|
|
|
|
tableId <= 0) { |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address != null ? address!.id : null, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
@ -161,7 +165,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
count1, |
|
|
|
|
payChannel, |
|
|
|
|
tableId); |
|
|
|
|
} else if ( widget.arguments["cid"] != null && widget.arguments["cid"] != "" && tableId <= 0) { |
|
|
|
|
} else if (widget.arguments["cid"] != null && |
|
|
|
|
widget.arguments["cid"] != "" && |
|
|
|
|
tableId <= 0) { |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address != null ? address!.id : null, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
@ -170,7 +176,7 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
widget.arguments["cid"]??0, |
|
|
|
|
widget.arguments["cid"] ?? 0, |
|
|
|
|
0, |
|
|
|
|
productId ?? 0, |
|
|
|
|
productSkuId ?? "", |
|
|
|
@ -228,7 +234,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
payChannel, |
|
|
|
|
tableId) async { |
|
|
|
|
try { |
|
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); |
|
|
|
|
EasyLoading.show( |
|
|
|
|
status: S.current.zhengzaijiazai, |
|
|
|
|
maskType: EasyLoadingMaskType.black); |
|
|
|
|
|
|
|
|
|
BaseData<SettleOrderInfo>? baseData = await minService?.getOrderInfo({ |
|
|
|
|
"addressId": addressId, |
|
|
|
@ -328,7 +336,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
|
|
|
|
|
///查看订单详情 |
|
|
|
|
queryOrderDetails(id) async { |
|
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); |
|
|
|
|
EasyLoading.show( |
|
|
|
|
status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); |
|
|
|
|
BaseData<MinOrderInfo>? baseData = await minService?.getOrderDetails({ |
|
|
|
|
"id": pageType != null ? widget.arguments["orderId"] : id ?? parentId, |
|
|
|
|
}).catchError((error) {}); |
|
|
|
@ -347,7 +356,7 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
///取消优惠券 |
|
|
|
|
queryCancelMemberCoupon(orderId) async { |
|
|
|
|
BaseData? baseData = |
|
|
|
|
await minService?.cancelMemberCoupon(orderId).catchError((error) {}); |
|
|
|
|
await minService?.cancelMemberCoupon(orderId).catchError((error) {}); |
|
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
|
queryOrderDetails(parentId); |
|
|
|
|
// SmartDialog.showToast(baseData.data, alignment: Alignment.center); |
|
|
|
@ -374,90 +383,112 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
setState(() { |
|
|
|
|
this.selectedBtn = selectedBtn; |
|
|
|
|
}); |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address?.id, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
null, |
|
|
|
|
0, |
|
|
|
|
productId ?? null, |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
"AUTO", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
|
payChannel, |
|
|
|
|
tableId); |
|
|
|
|
return; |
|
|
|
|
// BaseData<List<Address>> baseDate = |
|
|
|
|
// await minService?.queryAddress().catchError((error) {}); |
|
|
|
|
// |
|
|
|
|
// BMFCoordinate bmfCoordinate = BMFCoordinate( |
|
|
|
|
// double.tryParse(storeInfo.latitude), |
|
|
|
|
// double.tryParse(storeInfo.longitude), |
|
|
|
|
// ); |
|
|
|
|
// if (baseDate.isSuccess) { |
|
|
|
|
// setState(() { |
|
|
|
|
// address = baseDate.data[0]; |
|
|
|
|
// }); |
|
|
|
|
// for (int i = 1; i < baseDate.data.length; i++) { |
|
|
|
|
// Address address1 = baseDate.data[i]; |
|
|
|
|
// |
|
|
|
|
// BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert( |
|
|
|
|
// coordinate: BMFCoordinate( |
|
|
|
|
// double.tryParse(address.longitude), |
|
|
|
|
// double.tryParse(address.latitude), |
|
|
|
|
// ), |
|
|
|
|
// fromType: BMF_COORD_TYPE.COMMON, |
|
|
|
|
// toType: BMF_COORD_TYPE.BD09LL); |
|
|
|
|
// BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert( |
|
|
|
|
// coordinate: BMFCoordinate( |
|
|
|
|
// double.tryParse(address1.longitude), |
|
|
|
|
// double.tryParse(address1.latitude), |
|
|
|
|
// ), |
|
|
|
|
// fromType: BMF_COORD_TYPE.COMMON, |
|
|
|
|
// toType: BMF_COORD_TYPE.BD09LL); |
|
|
|
|
// |
|
|
|
|
// double mi = await BMFCalculateUtils.getLocationDistance( |
|
|
|
|
// bmfCoordinate, coordinate); |
|
|
|
|
// double mi1 = await BMFCalculateUtils.getLocationDistance( |
|
|
|
|
// bmfCoordinate, coordinate1); |
|
|
|
|
// if (mi1 < mi) { |
|
|
|
|
// address = address1; |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// await queryOrderInfo( |
|
|
|
|
// address.id, |
|
|
|
|
// ((storeInfo.pickupType.dineInTakeStatus ?? false) == true && |
|
|
|
|
// (subscribeParam.isEnableSubscribe ?? false) == false && |
|
|
|
|
// selectedBtn != 1 && |
|
|
|
|
// selectedBtn != 2) |
|
|
|
|
// ? diningStatus |
|
|
|
|
// : selectedBtn, |
|
|
|
|
// null, |
|
|
|
|
// 0, |
|
|
|
|
// productId ?? null, |
|
|
|
|
// productSkuId ?? "", |
|
|
|
|
// actProductId ?? "", |
|
|
|
|
// actProductSkuId ?? "", |
|
|
|
|
// "AUTO", |
|
|
|
|
// // useVipPriceSelect, |
|
|
|
|
// // useBenefitSelect, |
|
|
|
|
// count1, |
|
|
|
|
// payChannel, |
|
|
|
|
// tableId); |
|
|
|
|
// } |
|
|
|
|
if (address != null) { |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address?.id, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
null, |
|
|
|
|
0, |
|
|
|
|
productId ?? null, |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
"AUTO", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
|
payChannel, |
|
|
|
|
tableId); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BaseData<List<Address>>? baseDate = |
|
|
|
|
await minService?.queryAddress().catchError((error) {}); |
|
|
|
|
|
|
|
|
|
Position? bmfCoordinate = Position( |
|
|
|
|
latitude: double.tryParse(storeInfo?.latitude ?? "")!, |
|
|
|
|
longitude: double.tryParse(storeInfo?.longitude ?? "")!, |
|
|
|
|
timestamp: DateTime.now(), |
|
|
|
|
accuracy: 0, |
|
|
|
|
altitude: 0, |
|
|
|
|
heading: 0, |
|
|
|
|
speed: 0, |
|
|
|
|
speedAccuracy: 0); |
|
|
|
|
if (baseDate != null && |
|
|
|
|
(baseDate.isSuccess ?? false) && |
|
|
|
|
(baseDate.data ?? []).isNotEmpty) { |
|
|
|
|
setState(() { |
|
|
|
|
address = baseDate.data![0]; |
|
|
|
|
}); |
|
|
|
|
for (int i = 1; i < baseDate.data!.length; i++) { |
|
|
|
|
Address? address1 = baseDate.data![i]; |
|
|
|
|
Position? coordinate = Position( |
|
|
|
|
// COMMON->BD09LL |
|
|
|
|
longitude: double.tryParse(address?.longitude ?? "")!, |
|
|
|
|
latitude: double.tryParse(address?.latitude ?? "")!, |
|
|
|
|
timestamp: DateTime.now(), |
|
|
|
|
accuracy: 0, |
|
|
|
|
altitude: 0, |
|
|
|
|
heading: 0, |
|
|
|
|
speed: 0, |
|
|
|
|
speedAccuracy: 0); |
|
|
|
|
Position? coordinate1 = Position( |
|
|
|
|
// COMMON->BD09LL |
|
|
|
|
longitude: double.tryParse(address1.longitude ?? "")!, |
|
|
|
|
latitude: double.tryParse(address1.latitude ?? "")!, |
|
|
|
|
timestamp: DateTime.now(), |
|
|
|
|
accuracy: 0, |
|
|
|
|
altitude: 0, |
|
|
|
|
heading: 0, |
|
|
|
|
speed: 0, |
|
|
|
|
speedAccuracy: 0); |
|
|
|
|
double mi = Geolocator.distanceBetween( |
|
|
|
|
bmfCoordinate.latitude, |
|
|
|
|
bmfCoordinate.longitude, |
|
|
|
|
coordinate.latitude, |
|
|
|
|
coordinate.longitude, |
|
|
|
|
); |
|
|
|
|
double mi1 = Geolocator.distanceBetween( |
|
|
|
|
bmfCoordinate.latitude, |
|
|
|
|
bmfCoordinate.longitude, |
|
|
|
|
coordinate1.latitude, |
|
|
|
|
coordinate1.longitude, |
|
|
|
|
); |
|
|
|
|
if (mi1 < mi) { |
|
|
|
|
address = address1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
await queryOrderInfo( |
|
|
|
|
address?.id, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
null, |
|
|
|
|
0, |
|
|
|
|
productId ?? null, |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
"AUTO", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
|
payChannel, |
|
|
|
|
tableId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///选择收货地址 |
|
|
|
|
selectedAddress(String addId) async { |
|
|
|
|
BaseData<List<Address>>? baseDate = await minService?.queryAddress().catchError((error) {}); |
|
|
|
|
BaseData<List<Address>>? baseDate = |
|
|
|
|
await minService?.queryAddress().catchError((error) {}); |
|
|
|
|
if (baseDate?.isSuccess ?? false) { |
|
|
|
|
setState(() { |
|
|
|
|
baseDate!.data?.forEach((element) { |
|
|
|
@ -553,7 +584,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
///小程序下单 |
|
|
|
|
queryPlaceOrderFirst() async { |
|
|
|
|
try { |
|
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai, |
|
|
|
|
EasyLoading.show( |
|
|
|
|
status: S.current.zhengzaijiazai, |
|
|
|
|
maskType: EasyLoadingMaskType.black); |
|
|
|
|
// for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) { |
|
|
|
|
// settleOrderInfo.orderProductList.forEach((element1) { |
|
|
|
@ -573,21 +605,20 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
placeOrderFirst?.cartSum = settleOrderInfo?.price; |
|
|
|
|
placeOrderFirst?.addressId = address == null ? null : address!.id; |
|
|
|
|
placeOrderFirst?.isSubscribe = |
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
|
? true |
|
|
|
|
: false; //是否预约 |
|
|
|
|
placeOrderFirst?.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && |
|
|
|
|
!(subscribeParam?.isEnableSubscribe ?? false) && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn; |
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
|
? true |
|
|
|
|
: false; //是否预约 |
|
|
|
|
placeOrderFirst?.isTakeOut = |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) && |
|
|
|
|
!(subscribeParam?.isEnableSubscribe ?? false) && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn; |
|
|
|
|
placeOrderFirst?.notes = remakers + |
|
|
|
|
(reservationTime ?? "") + |
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
|
|
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 |
|
|
|
|
? (subscribeParam?.stores?[0]) |
|
|
|
|
: (subscribeStoresName ?? ""))}" |
|
|
|
|
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam?.stores?[0]) : (subscribeStoresName ?? ""))}" |
|
|
|
|
: ""); |
|
|
|
|
placeOrderFirst?.numberOfPeople = "$numberOfPeople"; |
|
|
|
|
placeOrderFirst?.orderSource = 2; |
|
|
|
@ -598,32 +629,41 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
placeOrderFirst?.payChannel = ((placeOrderFirst?.cartSum == "0.00") |
|
|
|
|
? payChannel = 0 |
|
|
|
|
: ((tableId > 0 |
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
? 7 |
|
|
|
|
: payChannel)); |
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
? 7 |
|
|
|
|
: payChannel)); |
|
|
|
|
placeOrderFirst?.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.promotionId = (tableId <= 0) ? (promotion?.id ?? "") : ""; |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.promotionId = |
|
|
|
|
(tableId <= 0) ? (promotion?.id ?? "") : ""; |
|
|
|
|
// : widget.arguments["pid"] ?? ""; |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.couponId = (tableId <= 0) ? (couponListBean?.id ?? "") : ""; |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.couponId = |
|
|
|
|
(tableId <= 0) ? (couponListBean?.id ?? "") : ""; |
|
|
|
|
// : widget.arguments["cid"] ?? ""; |
|
|
|
|
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; |
|
|
|
|
// placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.discountType = (!placeOrder) ? "AUTO" : settleOrderInfo?.discountType ?? ""; |
|
|
|
|
placeOrderFirst?.recMobile = (mobile?.isNotEmpty ?? false) ? mobile! : storeInfo!.headMobile; |
|
|
|
|
placeOrderFirst?.shoppingCartSkuItemList = settleOrderInfo!.orderProductList; |
|
|
|
|
placeOrderFirst?.promotionInfoDTO?.discountType = |
|
|
|
|
(!placeOrder) ? "AUTO" : settleOrderInfo?.discountType ?? ""; |
|
|
|
|
placeOrderFirst?.recMobile = |
|
|
|
|
(mobile?.isNotEmpty ?? false) ? mobile! : storeInfo!.headMobile; |
|
|
|
|
placeOrderFirst?.shoppingCartSkuItemList = |
|
|
|
|
settleOrderInfo!.orderProductList; |
|
|
|
|
placeOrderFirst?.skuItemDTOList = []; |
|
|
|
|
placeOrderFirst?.source = 1; |
|
|
|
|
placeOrderFirst?.storeId = storeInfo!.id; |
|
|
|
|
placeOrderFirst?.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
|
placeOrderFirst?.tableId = "$tableId"; |
|
|
|
|
for (int i = 0; i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); i++) { |
|
|
|
|
placeOrderFirst?.shoppingCartSkuItemList?[i].setMealDataList = shopCarGoods!.shoppingCartSkuItemList?[i].setMealDataList; |
|
|
|
|
for (int i = 0; |
|
|
|
|
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); |
|
|
|
|
i++) { |
|
|
|
|
placeOrderFirst?.shoppingCartSkuItemList?[i].setMealDataList = |
|
|
|
|
shopCarGoods!.shoppingCartSkuItemList?[i].setMealDataList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (tableId == 0) { |
|
|
|
|
///正常的商店下单 |
|
|
|
|
BaseData<dynamic>? baseData = await minService?.placeOrderFirst(placeOrderFirst!.toJson()) |
|
|
|
|
BaseData<dynamic>? baseData = await minService |
|
|
|
|
?.placeOrderFirst(placeOrderFirst!.toJson()) |
|
|
|
|
.catchError((error) { |
|
|
|
|
print("error: $error"); |
|
|
|
|
}); |
|
|
|
@ -633,7 +673,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
await querySettlement(); |
|
|
|
|
} else { |
|
|
|
|
// orderButton = false; |
|
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
///火锅店下单, 等待结算 |
|
|
|
@ -645,13 +686,15 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
} else { |
|
|
|
|
if (parentId == "") { |
|
|
|
|
// 下单 |
|
|
|
|
baseData = await minService?.placeOrderFirst(placeOrderFirst!.toJson()) |
|
|
|
|
baseData = await minService |
|
|
|
|
?.placeOrderFirst(placeOrderFirst!.toJson()) |
|
|
|
|
.catchError((error) { |
|
|
|
|
print("error: $error"); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
//加菜 |
|
|
|
|
baseData = await minService?.addOrder(placeOrderFirst!.toJson()) |
|
|
|
|
baseData = await minService |
|
|
|
|
?.addOrder(placeOrderFirst!.toJson()) |
|
|
|
|
.catchError((error) { |
|
|
|
|
print("error: $error"); |
|
|
|
|
}); |
|
|
|
@ -668,22 +711,25 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// orderButton = false; |
|
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}finally{ |
|
|
|
|
} finally { |
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///结算 |
|
|
|
|
querySettlement() async { |
|
|
|
|
if (placeOrderFirst == null || minOrderInfo == null || downOrder == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
placeOrderFirst?.id = ((parentId?.isNotEmpty ?? false) ? parentId : downOrder?.id); |
|
|
|
|
placeOrderFirst?.orderProductVOList = ((downOrder == null) ? minOrderInfo!.orderProductVOList : downOrder!.orderProductVOList); |
|
|
|
|
placeOrderFirst?.id = |
|
|
|
|
((parentId?.isNotEmpty ?? false) ? parentId : downOrder?.id); |
|
|
|
|
placeOrderFirst?.orderProductVOList = ((downOrder == null) |
|
|
|
|
? minOrderInfo!.orderProductVOList |
|
|
|
|
: downOrder!.orderProductVOList); |
|
|
|
|
|
|
|
|
|
if (placeOrderFirst?.payChannel == 1) { |
|
|
|
|
if (Platform.isAndroid) { |
|
|
|
@ -694,7 +740,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
await Min.initialize(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
BaseData<WxPay>? baseData = await minService?.settlementWx(placeOrderFirst!.toJson()) |
|
|
|
|
BaseData<WxPay>? baseData = await minService |
|
|
|
|
?.settlementWx(placeOrderFirst!.toJson()) |
|
|
|
|
.catchError((error) { |
|
|
|
|
print(error); |
|
|
|
|
}); |
|
|
|
@ -710,25 +757,25 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
universalLink: "https://hx.lotus-wallet.com/app/", |
|
|
|
|
); |
|
|
|
|
fluwx.pay( |
|
|
|
|
which: Payment( |
|
|
|
|
appId: wxPay.appId!, |
|
|
|
|
partnerId: wxPay.partnerId!, |
|
|
|
|
prepayId: wxPay.prepayId!, |
|
|
|
|
packageValue: wxPay.packageValue!, |
|
|
|
|
nonceStr: wxPay.nonceStr!, |
|
|
|
|
timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, |
|
|
|
|
sign: wxPay.sign!, |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
}else{ |
|
|
|
|
which: Payment( |
|
|
|
|
appId: wxPay.appId!, |
|
|
|
|
partnerId: wxPay.partnerId!, |
|
|
|
|
prepayId: wxPay.prepayId!, |
|
|
|
|
packageValue: wxPay.packageValue!, |
|
|
|
|
nonceStr: wxPay.nonceStr!, |
|
|
|
|
timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, |
|
|
|
|
sign: wxPay.sign!, |
|
|
|
|
)); |
|
|
|
|
} else { |
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
|
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); |
|
|
|
|
Future.delayed(Duration(seconds:2), () { |
|
|
|
|
Future.delayed(Duration(seconds: 2), () { |
|
|
|
|
toOrderDetails(placeOrderFirst!.id); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
BaseData? baseData = await minService?.settlementApi(placeOrderFirst!.toJson()) |
|
|
|
|
BaseData? baseData = await minService |
|
|
|
|
?.settlementApi(placeOrderFirst!.toJson()) |
|
|
|
|
.catchError((error) { |
|
|
|
|
print(error); |
|
|
|
|
}); |
|
|
|
@ -761,7 +808,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
BaseData<WxPay>? baseData = await minService?.actPay({ |
|
|
|
|
"orderId": bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId, |
|
|
|
|
"orderId": |
|
|
|
|
bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId, |
|
|
|
|
"payChannel": placeOrderFirst!.payChannel |
|
|
|
|
}).catchError((error) { |
|
|
|
|
print(error); |
|
|
|
@ -777,31 +825,34 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
universalLink: "https://hx.lotus-wallet.com/app/", |
|
|
|
|
); |
|
|
|
|
fluwx.pay( |
|
|
|
|
which: Payment( |
|
|
|
|
appId: wxPay.appId!, |
|
|
|
|
partnerId: wxPay.partnerId!, |
|
|
|
|
prepayId: wxPay.prepayId!, |
|
|
|
|
packageValue: wxPay.packageValue!, |
|
|
|
|
nonceStr: wxPay.nonceStr!, |
|
|
|
|
timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, |
|
|
|
|
sign: wxPay.sign!, |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
which: Payment( |
|
|
|
|
appId: wxPay.appId!, |
|
|
|
|
partnerId: wxPay.partnerId!, |
|
|
|
|
prepayId: wxPay.prepayId!, |
|
|
|
|
packageValue: wxPay.packageValue!, |
|
|
|
|
nonceStr: wxPay.nonceStr!, |
|
|
|
|
timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, |
|
|
|
|
sign: wxPay.sign!, |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
BaseData? baseData = await minService?.actPay({ |
|
|
|
|
"orderId": bargainOrderId != null ? bargainOrderId : launchJoinAct?.orderId, |
|
|
|
|
"orderId": |
|
|
|
|
bargainOrderId != null ? bargainOrderId : launchJoinAct?.orderId, |
|
|
|
|
"payChannel": payChannel |
|
|
|
|
}).catchError((error) { |
|
|
|
|
print(error); |
|
|
|
|
}); |
|
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
|
toOrderDetails(bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId); |
|
|
|
|
toOrderDetails( |
|
|
|
|
bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.show( |
|
|
|
|
widget: SettlementTips( |
|
|
|
|
() { |
|
|
|
|
toOrderDetails(bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId); |
|
|
|
|
toOrderDetails(bargainOrderId != null |
|
|
|
|
? bargainOrderId! |
|
|
|
|
: launchJoinAct?.orderId); |
|
|
|
|
}, |
|
|
|
|
text: "${baseData?.msg}", |
|
|
|
|
)); |
|
|
|
@ -875,14 +926,19 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
DistributionMode( |
|
|
|
|
(addressId, isTake, memberCouponId, orderId, String? promotionId) { |
|
|
|
|
(addressId, isTake, memberCouponId, orderId, |
|
|
|
|
String? promotionId) { |
|
|
|
|
setState(() { |
|
|
|
|
this.selectedBtn = 0; |
|
|
|
|
}); |
|
|
|
|
queryOrderInfo( |
|
|
|
|
addressId, |
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) && |
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) && |
|
|
|
|
((storeInfo?.pickupType |
|
|
|
|
?.dineInTakeStatus ?? |
|
|
|
|
false) && |
|
|
|
|
(subscribeParam |
|
|
|
|
?.isEnableSubscribe ?? |
|
|
|
|
false) && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
@ -913,8 +969,10 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///堂食/打包 |
|
|
|
|
if ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && |
|
|
|
|
!(subscribeParam?.isEnableSubscribe ?? false) && |
|
|
|
|
if ((storeInfo?.pickupType?.dineInTakeStatus ?? |
|
|
|
|
false) && |
|
|
|
|
!(subscribeParam?.isEnableSubscribe ?? |
|
|
|
|
false) && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2) |
|
|
|
|
takeStatus(), |
|
|
|
@ -944,8 +1002,10 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
|
|
|
|
|
///会员优惠选择 |
|
|
|
|
if ((settleOrderInfo != null || |
|
|
|
|
minOrderInfo != null) && (placeOrder && tableId <= 0 && |
|
|
|
|
!(settleOrderInfo?.isRaise ?? false))) |
|
|
|
|
minOrderInfo != null) && |
|
|
|
|
(placeOrder && |
|
|
|
|
tableId <= 0 && |
|
|
|
|
!(settleOrderInfo?.isRaise ?? false))) |
|
|
|
|
VipDiscountsSelect( |
|
|
|
|
vipSelectCheck, |
|
|
|
|
settleOrderInfo, |
|
|
|
@ -973,7 +1033,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
"remake": remakers |
|
|
|
|
}).then((value) => { |
|
|
|
|
setState(() { |
|
|
|
|
if (value != null) remakers = value as String; |
|
|
|
|
if (value != null) |
|
|
|
|
remakers = value as String; |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -1074,11 +1135,12 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
// return; |
|
|
|
|
// } else |
|
|
|
|
// orderButton = true; |
|
|
|
|
if (((subscribeParam?.isEnableSubscribe ?? false)) && |
|
|
|
|
if (((subscribeParam?.isEnableSubscribe ?? |
|
|
|
|
false)) && |
|
|
|
|
(((subscribeParam?.stores?.length == 1 |
|
|
|
|
? subscribeParam?.stores![0] |
|
|
|
|
: subscribeStoresName) == |
|
|
|
|
null))) { |
|
|
|
|
? subscribeParam?.stores![0] |
|
|
|
|
: subscribeStoresName) == |
|
|
|
|
null))) { |
|
|
|
|
SmartDialog.showToast( |
|
|
|
|
(reservationTime == null) |
|
|
|
|
? S.of(context).qingxuanzeyuyeushijian |
|
|
|
@ -1271,10 +1333,12 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
|
border: Border.all( |
|
|
|
|
width: diningStatus == 3 ? 2.w : 1.w, |
|
|
|
|
color: diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
|
style: BorderStyle.solid, |
|
|
|
|
), |
|
|
|
|
color: diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only(top: 11.h, bottom: 14.h), |
|
|
|
|
child: Row( |
|
|
|
@ -1489,8 +1553,7 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int couponCount() { |
|
|
|
|
if (settleOrderInfo?.couponList?.isEmpty ?? true) |
|
|
|
|
return 0; |
|
|
|
|
if (settleOrderInfo?.couponList?.isEmpty ?? true) return 0; |
|
|
|
|
int count = 0; |
|
|
|
|
settleOrderInfo!.couponList?.forEach((element) { |
|
|
|
|
if (element.tenantCode == "") { |
|
|
|
@ -1530,13 +1593,19 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
((couponBean.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean.id, |
|
|
|
|
((couponBean.id ?? 0) == 0 && (promotion?.id ?? productId ?? 0) != 0) |
|
|
|
|
? 0 |
|
|
|
|
: couponBean.id, |
|
|
|
|
0, |
|
|
|
|
((couponBean.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0, |
|
|
|
|
((couponBean.id ?? 0) == 0 && (promotion?.id ?? productId ?? 0) != 0) |
|
|
|
|
? promotion?.id ?? productId |
|
|
|
|
: 0, |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
(couponBean.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON", |
|
|
|
|
(couponBean.id ?? 0) == 0 |
|
|
|
|
? ((promotion?.id ?? productId ?? 0) != 0 ? "ACTIVITY" : "AUTO") |
|
|
|
|
: "COUPON", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
@ -1570,13 +1639,21 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
selectedBtn != 2) |
|
|
|
|
? diningStatus |
|
|
|
|
: selectedBtn, |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0, |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 && |
|
|
|
|
(couponListBean?.id ?? 0) != 0) |
|
|
|
|
? couponListBean?.id |
|
|
|
|
: 0, |
|
|
|
|
0, |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro.id ?? 0) ?? productId), |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 && |
|
|
|
|
(couponListBean?.id ?? 0) != 0) |
|
|
|
|
? 0 |
|
|
|
|
: ((pro.id ?? 0) ?? productId), |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"), |
|
|
|
|
(((pro.id ?? 0) ?? (productId ?? 0)) == 0 |
|
|
|
|
? ((couponListBean?.id ?? 0) != 0 ? "COUPON" : "AUTO") |
|
|
|
|
: "ACTIVITY"), |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
@ -1586,7 +1663,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
|
|
|
|
|
///立即预约时间选择 |
|
|
|
|
showDateSelector() { |
|
|
|
|
var minTime = DateTime.now().isAfter(DateTime.tryParse(subscribeParam?.subscribeStartTime ?? "") ?? DateTime.now()) |
|
|
|
|
var minTime = DateTime.now().isAfter( |
|
|
|
|
DateTime.tryParse(subscribeParam?.subscribeStartTime ?? "") ?? |
|
|
|
|
DateTime.now()) |
|
|
|
|
? DateTime.now() |
|
|
|
|
: DateTime.tryParse(subscribeParam?.subscribeStartTime ?? ""); |
|
|
|
|
DatePicker.showDateTimePicker(context, |
|
|
|
@ -1614,32 +1693,32 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
///预约店铺 |
|
|
|
|
showAlertDialog() { |
|
|
|
|
showModalBottomSheet( |
|
|
|
|
builder: (BuildContext context) { |
|
|
|
|
return StatefulBuilder(builder: (context, state) { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 300.h, |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
horizontal: 14.w, |
|
|
|
|
vertical: 16.h, |
|
|
|
|
), |
|
|
|
|
decoration: new BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
builder: (BuildContext context) { |
|
|
|
|
return StatefulBuilder(builder: (context, state) { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 300.h, |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
horizontal: 14.w, |
|
|
|
|
vertical: 16.h, |
|
|
|
|
), |
|
|
|
|
decoration: new BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
|
child: Text( |
|
|
|
@ -1650,72 +1729,74 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
GestureDetector( |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.clear, |
|
|
|
|
color: Colors.black, |
|
|
|
|
size: 18, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
// SizedBox(width:4.w), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: ListView.builder( |
|
|
|
|
itemCount: subscribeParam?.stores?.length ?? 0, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
state(() { |
|
|
|
|
storesIndex = position; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.clear, |
|
|
|
|
color: Colors.black, |
|
|
|
|
size: 18, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
// SizedBox(width:4.w), |
|
|
|
|
], |
|
|
|
|
child: storesNameItem(position), |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: ListView.builder( |
|
|
|
|
itemCount: subscribeParam?.stores?.length ?? 0, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
state(() { |
|
|
|
|
storesIndex = position; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: storesNameItem(position), |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
subscribeStoresName = |
|
|
|
|
subscribeParam?.stores?[storesIndex]; |
|
|
|
|
}); |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 40.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
subscribeStoresName = subscribeParam?.stores?[storesIndex]; |
|
|
|
|
}); |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 40.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
bottom: 10.h, |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).queding, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
bottom: 10.h, |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).queding, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
context: context, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
context: context, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|