diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 5d187b72..832384b3 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -480,7 +480,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { FeaturedActivity(), ///积分商城 - HomeIntegralStore(gooods), + // HomeIntegralStore(gooods), ///积分商品头Tab PointsGoodsTitle( diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 9943d460..64206dae 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -220,6 +220,16 @@ class _OrderHistoryList extends State }); } + String orderAllGoods(OrderInfo orderInfo){ + int count = 0; + if(orderInfo.productList != null){ + orderInfo.productList.forEach((element) { + count += element.buyNum; + }); + } + return count.toString(); + } + Widget orderItem(OrderInfo orderInfo) { return Container( margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), @@ -378,10 +388,7 @@ class _OrderHistoryList extends State ), ), TextSpan( - text: (orderInfo != null && - orderInfo.productList != null) - ? "${orderInfo.productList.length}" - : "0", + text:orderAllGoods(orderInfo), style: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, diff --git a/lib/order/order_view/order_commodity.dart b/lib/order/order_view/order_commodity.dart index ec16f24b..283488c6 100644 --- a/lib/order/order_view/order_commodity.dart +++ b/lib/order/order_view/order_commodity.dart @@ -389,6 +389,16 @@ class _OrderCommodity extends State { ); } + String buyNumAllGoods(){ + int count = 0; + if(widget.orderInfo != null){ + widget.orderInfo.productList.forEach((element) { + count += element.buyNum; + }); + } + return count.toString(); + } + Widget buildTotalPrice() { return Container( margin: EdgeInsets.only(top: 7.h, bottom: 11.h), @@ -399,10 +409,7 @@ class _OrderCommodity extends State { children: [ Expanded( child: Text( - S.of(context).gongjijianshangpin((widget.orderInfo != null && - widget.orderInfo.productList != null) - ? widget.orderInfo.productList.length - : "0"), + S.of(context).gongjijianshangpin(buyNumAllGoods()), style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), diff --git a/lib/settlement/settlement_view/distribution.dart b/lib/settlement/settlement_view/distribution.dart index 48b9a07d..81124e74 100644 --- a/lib/settlement/settlement_view/distribution.dart +++ b/lib/settlement/settlement_view/distribution.dart @@ -153,10 +153,12 @@ class _DistributionMode extends State { flex: 1, child: GestureDetector( onTap: () { - setState(() { - selectedBtn = 1; - widget.queryAddress(selectedBtn); - }); + // setState(() { + // selectedBtn = 1; + // widget.queryAddress(selectedBtn); + // }); + SmartDialog.showToast("该功能暂未开放!", + alignment: Alignment.center); }, child: Container( height: 50.h, diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index d5c05e1e..0f68a674 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -316,6 +316,20 @@ class _SettlementOrderCommodity extends State { ); } + String countAllGoods(){ + int count = 0; + if(widget.minOrderInfo != null){ + widget.minOrderInfo.orderProductVOList.forEach((element) { + count += element.buyNum; + }); + }else if(widget.settleOrderInfo != null){ + widget.settleOrderInfo.orderProductList.forEach((element) { + count += element.buyNum; + }); + } + return count.toString(); + } + Widget buildTotalPrice() { return Container( margin: EdgeInsets.only(top: 7.h, bottom: 11.h), @@ -326,13 +340,7 @@ class _SettlementOrderCommodity extends State { children: [ Expanded( child: Text( - S.of(context).gongjijianshangpin((widget.minOrderInfo != null) - ? ((widget.minOrderInfo != null) - ? widget.minOrderInfo.orderProductVOList.length - : "0") - : (widget.settleOrderInfo != null) - ? widget.settleOrderInfo.orderProductList.length - : "0"), + S.of(context).gongjijianshangpin(countAllGoods()), style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E),