Browse Source

Merge branch 'dev' into wr_2023_business

# Conflicts:
#	lib/settlement/settlement.dart
wr_2023_business
wurong 1 year ago
parent
commit
32cb5cce40
  1. 60
      lib/settlement/settlement.dart

60
lib/settlement/settlement.dart

@ -140,9 +140,7 @@ 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 &&
@ -163,9 +161,7 @@ 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 &&
@ -232,9 +228,7 @@ 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,
@ -335,8 +329,7 @@ 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) {});
@ -565,8 +558,7 @@ 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) {
@ -595,7 +587,9 @@ class _Settlement extends State<Settlement> {
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;
@ -645,8 +639,7 @@ class _Settlement extends State<Settlement> {
print("error: $error");
});
if (baseData != null && baseData.isSuccess) {
// EasyLoading.show(
// status: S.current.zhengzaijiazai,
// EasyLoading.show(status: S.current.zhengzaijiazai,
// maskType: EasyLoadingMaskType.black);
placeOrder = true;
this.downOrder = DownOrder.fromJson(baseData.data);
@ -692,13 +685,12 @@ class _Settlement extends State<Settlement> {
}
}
}finally{
// EasyLoading.dismiss();
EasyLoading.dismiss();
}
}
///
querySettlement() async {
try{
placeOrderFirst.id = ((parentId != "") ? parentId : downOrder.id);
placeOrderFirst.orderProductVOList = ((downOrder == null)
? minOrderInfo.orderProductVOList
@ -762,8 +754,6 @@ class _Settlement extends State<Settlement> {
text: "${baseData?.msg}",
));
}
}}finally{
EasyLoading.dismiss();
}
}
@ -971,9 +961,7 @@ class _Settlement extends State<Settlement> {
///
if ((settleOrderInfo != null ||
minOrderInfo != null) &&
(placeOrder &&
tableId <= 0 &&
minOrderInfo != null) && (placeOrder && tableId <= 0 &&
!(settleOrderInfo?.isRaise ?? false)))
VipDiscountsSelect(
vipSelectCheck,
@ -1557,19 +1545,13 @@ 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,
@ -1603,21 +1585,13 @@ 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,

Loading…
Cancel
Save