Browse Source

1.动态详情列表评论,高于一条评论才显示“以显示全部”;

2.动态列表,新增点击置顶;
3.积分兑换,集换卡创建订单部分修改;
4.会员中心会员卡部分更改优化;
5.套餐修改,套餐内数据,可能需要新增buyNumber数量传过去;(我这边暂时没加)
6.选规格,会员价修改;
7.订单结算页部分调整;
8.结算页多规格显示修改;
9.库存不足的判断暂时去掉;
10.购物车套餐显示修改;
11.集换卡新增下拉刷新;
new_revision_app
wurong 2 years ago
parent
commit
97088781d1
  1. 55
      lib/community/community_child_page.dart
  2. 6
      lib/home/trading_card_page.dart
  3. 1
      lib/main_page.dart
  4. 89
      lib/mine/mine_vip/mine_vip_core.dart
  5. 4
      lib/order/exchange_order_page.dart
  6. 33
      lib/settlement/settlement.dart
  7. 78
      lib/settlement/settlement_view/settlement_order_commodity.dart
  8. 3
      lib/store/store_view/product_meals_sku.dart
  9. 2
      lib/store/store_view/product_sku.dart
  10. 39
      lib/store/store_view/shop_goods.dart
  11. 21
      lib/store/store_view/shop_goods_car.dart
  12. 2
      lib/view_widget/mine_vip_entry.dart
  13. 2
      lib/web/web_view/comment_list.dart

55
lib/community/community_child_page.dart

@ -17,6 +17,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart'; import '../utils/flutter_utils.dart';
import '../utils/font_weight.dart';
class CommunityChildPage extends StatefulWidget { class CommunityChildPage extends StatefulWidget {
final String typeStr; final String typeStr;
@ -43,12 +44,18 @@ class CommunityChildPageState extends State<CommunityChildPage>
bool isLoadingData = false; bool isLoadingData = false;
ScrollController sc = ScrollController(); ScrollController sc = ScrollController();
List<Article> articles = []; List<Article> articles = [];
int _currentIndex = 0;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
sc.addListener(() { sc.addListener(() {
widget.onScroll(); widget.onScroll();
if (sc.offset >= 500) {
_currentIndex =1;
}else if(sc.offset <= 500){
_currentIndex = 0;
}
}); });
onRefresh(); onRefresh();
} }
@ -196,9 +203,11 @@ class CommunityChildPageState extends State<CommunityChildPage>
userId: userId, userId: userId,
isList: true, isList: true,
exitFull: () { exitFull: () {
setState(() { // setState(() {
onRefresh(); // onRefresh();
}); // });
queryCommunity(articles[position].id);
}, },
), ),
onTap: () { onTap: () {
@ -209,10 +218,11 @@ class CommunityChildPageState extends State<CommunityChildPage>
"userId": userId, "userId": userId,
}, },
).then((value) { ).then((value) {
onRefresh(); // onRefresh();
setState(() {}); // setState(() {});
queryCommunity(articles[position].id);
}); });
setState(() {}); // setState(() {});
}, },
); );
@ -232,7 +242,38 @@ class CommunityChildPageState extends State<CommunityChildPage>
height: 55, height: 55,
), ),
), ),
) ),
if(_currentIndex == 1)
GestureDetector(
onTap: () {
sc.jumpTo(0);
setState(() {});
},
child: Container(
margin: EdgeInsets.only(bottom:120.h, right: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Colors.white,
),
height:48,
width: 48,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(Icons.arrow_upward,size: 16,color: Color(0xFF808080),),
Text(
"顶部",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFF808080),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
),
),
], ],
); );
}, },

6
lib/home/trading_card_page.dart

@ -37,6 +37,12 @@ class _TradingCardPage extends State<TradingCardPage> {
}); });
} }
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
/// ///
queryUserBalance() async { queryUserBalance() async {
BaseData<UserInfo> baseData = BaseData<UserInfo> baseData =

1
lib/main_page.dart

@ -374,6 +374,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
).queryInfo().catchError((onError) {}); ).queryInfo().catchError((onError) {});
sharedPreferences.setString('user', jsonEncode(baseDate.data)); sharedPreferences.setString('user', jsonEncode(baseDate.data));
//
String mobile = baseDate.data.phone; String mobile = baseDate.data.phone;
if (mobile != null && mobile != "") { if (mobile != null && mobile != "") {
xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER); xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER);

89
lib/mine/mine_vip/mine_vip_core.dart

@ -23,9 +23,12 @@ import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/vip_dialog.dart'; import 'package:huixiang/view_widget/vip_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../../retrofit/data/user_info.dart'; import '../../retrofit/data/user_info.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart';
class MineVipCore extends StatefulWidget { class MineVipCore extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -46,6 +49,7 @@ class _MineVipCore extends State<MineVipCore> {
int checkIndex = 0; int checkIndex = 0;
UserInfo userInfo; UserInfo userInfo;
int rankNameIndex; int rankNameIndex;
final RefreshController refreshController = RefreshController();
final SwiperController controller = SwiperController(); final SwiperController controller = SwiperController();
@ -104,7 +108,9 @@ class _MineVipCore extends State<MineVipCore> {
/// ///
queryVipLevel() async { queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {}); BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (rankData != null && rankData.isSuccess) { if (rankData != null && rankData.isSuccess) {
ranks.clear(); ranks.clear();
ranks.addAll(rankData.data); ranks.addAll(rankData.data);
@ -114,21 +120,29 @@ class _MineVipCore extends State<MineVipCore> {
setState(() { setState(() {
controller.move((widget.arguments["rankLevel"] - 1), animation: false); controller.move((widget.arguments["rankLevel"] - 1), animation: false);
}); });
refreshController.refreshCompleted();
refreshController.loadComplete();
} else { } else {
SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center); SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
} }
} }
/// ///
queryBenefitList() async { queryBenefitList() async {
BaseData<List<VipBenefitList>> baseData = BaseData<List<VipBenefitList>> baseData =
await apiService.benefitList().catchError((onError) {}); await apiService.benefitList().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
vipBenefitList.clear(); vipBenefitList.clear();
vipBenefitList.addAll(baseData.data); vipBenefitList.addAll(baseData.data);
vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort)); vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort));
}); });
refreshController.refreshCompleted();
refreshController.loadComplete();
} }
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
@ -136,11 +150,15 @@ class _MineVipCore extends State<MineVipCore> {
////// //////
queryRuleDetails() async { queryRuleDetails() async {
BaseData<VipRuleDetails> baseData = BaseData<VipRuleDetails> baseData =
await apiService.vipBenefit().catchError((onError) {}); await apiService.vipBenefit().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
vipRuleDetails = baseData.data; vipRuleDetails = baseData.data;
}); });
refreshController.refreshCompleted();
refreshController.loadComplete();
} }
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
@ -180,6 +198,13 @@ class _MineVipCore extends State<MineVipCore> {
} }
} }
_onRefresh() async {
await queryVipLevel();
await queryBenefitList();
await queryRuleDetails();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -259,7 +284,24 @@ class _MineVipCore extends State<MineVipCore> {
), ),
), ),
Expanded(child: Expanded(child:
SingleChildScrollView( SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Colors.white,
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_onRefresh();
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
children: [ children: [
@ -564,6 +606,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
], ],
), ),
),
)), )),
], ],
), ),
@ -618,8 +661,8 @@ class _MineVipCore extends State<MineVipCore> {
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
AppUtils.getLighterColor(ranks[position]?.color ?? ""), AppUtils.getLighterColor(ranks[position]?.color ?? "#85C9DD"),
Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)), Color(int.parse((ranks[position]?.color ?? "#85C9DD").replaceAll("#", "FF"), radix: 16)),
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
@ -698,14 +741,12 @@ class _MineVipCore extends State<MineVipCore> {
), ),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))? MainAxisAlignment.spaceAround,
MainAxisAlignment.spaceAround:
MainAxisAlignment.end,
children: [ children: [
if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员")) if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))
Align(alignment: Alignment.centerRight, Align(alignment: Alignment.centerRight,
child: Text( child: Text(
(ranks[position].rankName == "共创会员") ? "${AppUtils.calculateDouble(double.tryParse(ranks[position].price??""))}/永久" : (ranks[position]?.originScore ?? 0).toString(), (ranks[position].rankName == "共创会员") ? "永久VIP" : (ranks[position]?.originScore ?? 0).toString(),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
@ -734,7 +775,7 @@ class _MineVipCore extends State<MineVipCore> {
TextSpan( TextSpan(
text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}", text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}",
style: TextStyle( style: TextStyle(
fontSize: 26.sp, fontSize: 24.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
), ),
@ -752,19 +793,19 @@ class _MineVipCore extends State<MineVipCore> {
), ),
], ],
),), ),),
// if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员"))
// Container( Container(
// height: 8.h, height: 8.h,
// child: ClipRRect( child: ClipRRect(
// borderRadius: BorderRadius.circular(6.5), borderRadius: BorderRadius.circular(6.5),
// child: LinearProgressIndicator( child: LinearProgressIndicator(
// value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ? value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ?
// (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0, (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0,
// backgroundColor: Colors.white, backgroundColor: Colors.white,
// color: AppUtils.getLighterColor(ranks[position]?.color ?? ""), color: AppUtils.getLighterColor(ranks[position]?.color ?? ""),
// ), ),
// ), ),
// ), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

4
lib/order/exchange_order_page.dart

@ -1213,8 +1213,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
"price": realPay.contains(S.of(context).jifen) "price": realPay.contains(S.of(context).jifen)
? realPay.substring(0, realPay.indexOf(S.of(context).jifen)) ? realPay.substring(0, realPay.indexOf(S.of(context).jifen))
: "0", : "0",
"happyBeanPrice":realPay.contains(S.of(context).xiaofeijihuanka) "happyBeanPrice":realPay.contains(S.of(context).jihuanka)
? realPay.substring(0, realPay.indexOf(S.of(context).xiaofeijihuanka)) ? realPay.substring(0, realPay.indexOf(S.of(context).jihuanka))
: "0", : "0",
"realPay": realPay, "realPay": realPay,
"points": points, "points": points,

33
lib/settlement/settlement.dart

@ -874,6 +874,7 @@ class _Settlement extends State<Settlement> {
height: 16.h, height: 16.h,
), ),
////
if ((storeInfo?.pickupType?.dineInTakeStatus ?? if ((storeInfo?.pickupType?.dineInTakeStatus ??
false) == false) ==
true && true &&
@ -1098,13 +1099,17 @@ class _Settlement extends State<Settlement> {
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus ? diningStatus
: selectedBtn, : selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0, 0,
0, (settleOrderInfo.isRaise || payChannel == 5)
productId ?? 0, ? ""
: promotion?.id ?? productId,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
"AUTO", ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"),
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
@ -1180,13 +1185,17 @@ class _Settlement extends State<Settlement> {
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus ? diningStatus
: selectedBtn, : selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0, 0,
0, (settleOrderInfo.isRaise || payChannel == 5)
productId ?? 0, ? ""
: promotion?.id ?? productId,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
"AUTO", ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"),
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
@ -1296,13 +1305,13 @@ class _Settlement extends State<Settlement> {
String preferentialType(){ String preferentialType(){
if(settleOrderInfo.isRaise || payChannel == 5) if(settleOrderInfo.isRaise || payChannel == 5)
return "NONE"; return "NONE";
if((((promotion?.id ?? productId) ?? "") != "")){ if((((promotion?.id ?? productId) ?? "") != "") && (couponListBean?.id ?? "") == ""){
return "ACTIVITY"; return "ACTIVITY";
}else if((couponListBean?.id ?? "") != ""){ }else if((couponListBean?.id ?? "") != "" && (((promotion?.id ?? productId) ?? "") == "")){
return "COUPON"; return "COUPON";
}else if(useVipPriceSelect == true && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){ }else if(useVipPriceSelect == true && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ??"") == "")){
return "VIP"; return "VIP";
}if(useVipPriceSelect == false && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){ }if(useVipPriceSelect == false && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ?? "") == "")){
return "MEMBER_RANK"; return "MEMBER_RANK";
}else { }else {
return "AUTO"; return "AUTO";
@ -1412,7 +1421,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0 (couponBean?.id ?? 0) == 0
? ((isVips == false && vipLevelName == "黄金会员") ? ((isVips == false)
? "MEMBER_RANK" ? "MEMBER_RANK"
: "AUTO") : "AUTO")
: "COUPON", : "COUPON",
@ -1453,7 +1462,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0 ((pro?.id ?? 0) ?? productId) == 0
? ((isVips == false && vipLevelName == "黄金会员") ? ((isVips == false)
? "MEMBER_RANK" ? "MEMBER_RANK"
: "AUTO") : "AUTO")
: "ACTIVITY", : "ACTIVITY",

78
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -134,19 +134,36 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
if (widget.useVipPriceSelect && if (widget.useVipPriceSelect &&
widget.settleOrderInfo.memberVO.isVip && widget.settleOrderInfo.memberVO.isVip &&
(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) && (widget.tableId > 0
(widget?.settleOrderInfo?.discountType == "VIP" && widget?.settleOrderInfo?.vipDiscountAmount != "0")) { ? !(widget?.minOrderInfo?.isRaise ?? false)
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠", : !(widget?.settleOrderInfo?.isRaise ?? false)) &&
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.discountAmount ?? ""):(widget?.settleOrderInfo?.vipDiscountAmount ?? ""))); (widget?.settleOrderInfo?.discountType == "VIP" &&
widget?.settleOrderInfo?.vipDiscountAmount != "0")) {
widgets.add(vipItem(
Color(0xFFFF7A1A),
"VIP优惠",
AppUtils.calculateDouble(double.tryParse(
(widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null)
? (widget.minOrderInfo?.discountAmount ?? "")
: (widget?.settleOrderInfo?.vipDiscountAmount ?? "")))));
} }
if (widget.useBenefitSelect && if (widget.useBenefitSelect &&
((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" ||
&& widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 widget?.settleOrderInfo?.discountType == "SURPRISE") &&
? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) { widget?.settleOrderInfo?.benefitDiscountAmount != "0") &&
widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额", ((widget.tableId > 0
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") ? !(widget?.minOrderInfo?.isRaise ?? false)
:(widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))); : !(widget?.settleOrderInfo?.isRaise ?? false)))) {
widgets.add(vipItem(
Color(0xFFFF7A1A),
"会员优惠金额",
AppUtils.calculateDouble(double.tryParse(
(widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null)
? (widget.minOrderInfo?.benefitDiscountAmount ?? "")
: (widget?.settleOrderInfo?.benefitDiscountAmount ?? "")))));
} }
if (widget.showVipTips) { if (widget.showVipTips) {
@ -266,15 +283,23 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
children: [ children: [
Text( Text(
productList.buyNum > 1 productList.buyNum > 1
? S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - AppUtils.stringAsFixedDouble2((double.tryParse(productList.discountAmount ?? "0") / productList.buyNum)))) ? S.of(context).yuan_(AppUtils.calculateDouble(
: S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))), double.tryParse(productList.sellPrice ?? "0") -
AppUtils.stringAsFixedDouble2((double.tryParse(
productList.discountAmount ?? "0") /
productList.buyNum))))
: S.of(context).yuan_(AppUtils.calculateDouble(
double.tryParse(productList.sellPrice ?? "0") -
double.tryParse(
productList.discountAmount ?? "0"))),
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF4C4C4C), color: Color(0xFF4C4C4C),
), ),
), ),
if (productList.discountAmount != null && productList.discountAmount != "0") if (productList.discountAmount != null &&
productList.discountAmount != "0")
Text( Text(
S.of(context).yuan_(productList.sellPrice), S.of(context).yuan_(productList.sellPrice),
style: TextStyle( style: TextStyle(
@ -306,14 +331,17 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
} }
Widget orderMealsItem(SetMealDataList setMealDataList) { Widget orderMealsItem(SetMealDataList setMealDataList) {
return Column(children: setMealDataList.productInfoList.map((e) {
return Container( return Container(
margin: EdgeInsets.symmetric(vertical:10.h,), margin: EdgeInsets.symmetric(
vertical: 10.h,
),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
flex: 2, flex: 2,
child: Text( child: Text(
setMealDataList.productInfoList[0].productName, e.productName,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -323,9 +351,10 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
), ),
), ),
), ),
Expanded(flex:3, Expanded(
flex: 3,
child: Text( child: Text(
"${(setMealDataList.productInfoList[0].skuName == "") ? "": setMealDataList.productInfoList[0].skuName}", "${(e.skuName == "") ? "" : e.skuName}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -336,7 +365,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
), ),
), ),
Text( Text(
"x${setMealDataList.productInfoList[0].buyNumber.toString()}", "x${e.buyNumber.toString()}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -348,6 +377,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
], ],
), ),
); );
}).toList(),);
} }
Widget discountItem(Color color, textName, condition, amount) { Widget discountItem(Color color, textName, condition, amount) {
@ -588,20 +618,24 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
/// ///
String discountPrice() { String discountPrice() {
if (widget.minOrderInfo != null) { if (widget.minOrderInfo != null) {
return AppUtils.calculateDouble(double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")); return AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0"));
} else if (widget.tableId < 0) { } else if (widget.tableId < 0) {
return "0"; return "0";
} else { } else {
return AppUtils.calculateDouble(double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0")); return AppUtils.calculateDouble(
double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0"));
} }
} }
String totalPrice() { String totalPrice() {
if (widget.minOrderInfo != null && if (widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null) { widget.minOrderInfo.orderProductVOList != null) {
return "${widget.minOrderInfo.finalPayPrice}"; return "${AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo.finalPayPrice))}";
} }
if (widget.settleOrderInfo.orderProductList == null) return ""; if (widget.settleOrderInfo.orderProductList == null) return "";
return "${widget.settleOrderInfo.price}"; return "${AppUtils.calculateDouble(
double.tryParse(widget.settleOrderInfo.price ?? ""))}";
} }
} }

3
lib/store/store_view/product_meals_sku.dart

@ -93,7 +93,8 @@ class _ProductMealsSku extends State<ProductMealsSku> {
"productId": ele.productId, "productId": ele.productId,
"skuId": ele.skuInfoList.length == 1 "skuId": ele.skuInfoList.length == 1
? ele.skuInfoList.first.id ? ele.skuInfoList.first.id
: ele.skuInfoList.firstWhere((e2) => e2.isSelected).id : ele.skuInfoList.firstWhere((e2) => e2.isSelected).id,
// "buyNumber":1,
}); });
} }
}); });

2
lib/store/store_view/product_sku.dart

@ -57,7 +57,7 @@ class _ProductSku extends State<ProductSku> {
return; return;
} }
if (productSku == null) return; if (productSku == null) return;
selectedPrice = productSku.vipPrice; selectedPrice = productSku.vipPrice ?? productSku.skuPrice ?? "";
String skuId = productSku.id; String skuId = productSku.id;
if (widget.shopCarGoods == null || if (widget.shopCarGoods == null ||
widget.shopCarGoods.shoppingCartSkuItemList == null) return; widget.shopCarGoods.shoppingCartSkuItemList == null) return;

39
lib/store/store_view/shop_goods.dart

@ -351,14 +351,15 @@ class _ShopGoods extends State<ShopGoods> {
widget.tableId == 0) { widget.tableId == 0) {
showDeleteDialog(); showDeleteDialog();
} else { } else {
if ((widget?.productListBean?.oversold ?? 0) == 0 && // if ((widget?.productListBean?.oversold ?? 0) == 0 &&
widget.count >= // widget.count >=
(widget?.shoppingCartSkuItemListBean // (widget?.shoppingCartSkuItemListBean
?.skuStock ?? // ?.skuStock ??
0)) { // 0)) {
SmartDialog.showToast("库存不足", // SmartDialog.showToast("库存不足",
alignment: Alignment.center); // alignment: Alignment.center);
} else if (_jumpType == -1) // } else
if (_jumpType == -1)
queryMiNiDetail(widget.productListBean.id); queryMiNiDetail(widget.productListBean.id);
else if (_jumpType == 0) else if (_jumpType == 0)
widget.add(widget.shoppingCartSkuItemListBean); widget.add(widget.shoppingCartSkuItemListBean);
@ -431,16 +432,18 @@ class _ShopGoods extends State<ShopGoods> {
"NORMALSTORE" && "NORMALSTORE" &&
widget.tableId == 0) { widget.tableId == 0) {
showDeleteDialog(); showDeleteDialog();
} else if ((widget?.productListBean?.oversold ?? }
0) == // else if ((widget?.productListBean?.oversold ??
0 && // 0) ==
widget.count >= // 0 &&
(widget?.shoppingCartSkuItemListBean // widget.count >=
?.skuStock ?? // (widget?.shoppingCartSkuItemListBean
0)) { // ?.skuStock ??
SmartDialog.showToast("库存不足", // 0)) {
alignment: Alignment.center); // SmartDialog.showToast("库存不足",
} else { // alignment: Alignment.center);
// }
else {
await Navigator.of(context).pushNamed( await Navigator.of(context).pushNamed(
'/router/product_meals_sku', '/router/product_meals_sku',
arguments: { arguments: {

21
lib/store/store_view/shop_goods_car.dart

@ -250,18 +250,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
(widget.productListBean?.attrStyle ?? 0) == 0) (widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector( GestureDetector(
onTap: () { onTap: () {
if ((widget?.productListBean?.oversold ?? 0) == widget.add(widget.shoppingCartSkuItemListBean);
0 &&
widget.count >=
(widget?.shoppingCartSkuItemListBean
?.skuStock ??
0)) {
SmartDialog.showToast("库存不足",
alignment: Alignment.center);
} else {
widget
.add(widget.shoppingCartSkuItemListBean);
}
}, },
child: Image.asset( child: Image.asset(
"assets/image/add.webp", "assets/image/add.webp",
@ -310,6 +299,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
} }
Widget shopCarMealsItem(SetMealDataList setMealDataList) { Widget shopCarMealsItem(SetMealDataList setMealDataList) {
return Column(children: setMealDataList.productInfoList.map((e) {
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w), margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w),
child: Row( child: Row(
@ -317,7 +307,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
Expanded( Expanded(
flex: 2, flex: 2,
child: Text( child: Text(
setMealDataList.productInfoList[0].productName, e.productName,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -330,7 +320,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
Expanded( Expanded(
flex: 3, flex: 3,
child: Text( child: Text(
"${(setMealDataList.productInfoList[0].skuName == "") ? "默认" : setMealDataList.productInfoList[0].skuName}", "${(e.skuName == "") ? "默认" : e.skuName}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -341,7 +331,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
), ),
), ),
Text( Text(
"x${setMealDataList.productInfoList[0].buyNumber.toString()}", "x${e.buyNumber.toString()}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@ -353,5 +343,6 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
], ],
), ),
); );
}).toList(),);
} }
} }

2
lib/view_widget/mine_vip_entry.dart

@ -31,7 +31,7 @@ class MineVipEntry extends StatelessWidget {
this.createTime = ""}); this.createTime = ""});
String topLeft = ""; String topLeft = "";
String levelText = "用户"; String levelText = "用户";
Color logoColor = Color(0xFFCACACA); Color logoColor = Color(0xFFCACACA);
Color levelTextColor = Color(0xFFCACACA); Color levelTextColor = Color(0xFFCACACA);
Color levelTextBackdrop = Color(0xFFFFF8EC); Color levelTextBackdrop = Color(0xFFFFF8EC);

2
lib/web/web_view/comment_list.dart

@ -128,7 +128,7 @@ class CommentListState extends State<CommentList> {
); );
}, },
), ),
// if (memberList != null && memberList.length > 10) if (memberList != null && memberList.length >= 1)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF2F2F2), color: Color(0xFFF2F2F2),

Loading…
Cancel
Save