Browse Source

Merge remote-tracking branch 'origin/remove_uniapp' into remove_uniapp

remove_uniapp
fmk 3 years ago
parent
commit
73372dd8db
  1. 2
      lib/home/home_page.dart
  2. 15
      lib/order/order_history_page.dart
  3. 15
      lib/order/order_view/order_commodity.dart
  4. 10
      lib/settlement/settlement_view/distribution.dart
  5. 22
      lib/settlement/settlement_view/settlement_order_commodity.dart

2
lib/home/home_page.dart

@ -480,7 +480,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
FeaturedActivity(), FeaturedActivity(),
/// ///
HomeIntegralStore(gooods), // HomeIntegralStore(gooods),
///Tab ///Tab
PointsGoodsTitle( PointsGoodsTitle(

15
lib/order/order_history_page.dart

@ -220,6 +220,16 @@ class _OrderHistoryList extends State<OrderHistoryList>
}); });
} }
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) { Widget orderItem(OrderInfo orderInfo) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
@ -378,10 +388,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
), ),
), ),
TextSpan( TextSpan(
text: (orderInfo != null && text:orderAllGoods(orderInfo),
orderInfo.productList != null)
? "${orderInfo.productList.length}"
: "0",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

15
lib/order/order_view/order_commodity.dart

@ -389,6 +389,16 @@ class _OrderCommodity extends State<OrderCommodity> {
); );
} }
String buyNumAllGoods(){
int count = 0;
if(widget.orderInfo != null){
widget.orderInfo.productList.forEach((element) {
count += element.buyNum;
});
}
return count.toString();
}
Widget buildTotalPrice() { Widget buildTotalPrice() {
return Container( return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h), margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
@ -399,10 +409,7 @@ class _OrderCommodity extends State<OrderCommodity> {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
S.of(context).gongjijianshangpin((widget.orderInfo != null && S.of(context).gongjijianshangpin(buyNumAllGoods()),
widget.orderInfo.productList != null)
? widget.orderInfo.productList.length
: "0"),
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),

10
lib/settlement/settlement_view/distribution.dart

@ -153,10 +153,12 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1, flex: 1,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { // setState(() {
selectedBtn = 1; // selectedBtn = 1;
widget.queryAddress(selectedBtn); // widget.queryAddress(selectedBtn);
}); // });
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
}, },
child: Container( child: Container(
height: 50.h, height: 50.h,

22
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -316,6 +316,20 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
); );
} }
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() { Widget buildTotalPrice() {
return Container( return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h), margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
@ -326,13 +340,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
S.of(context).gongjijianshangpin((widget.minOrderInfo != null) S.of(context).gongjijianshangpin(countAllGoods()),
? ((widget.minOrderInfo != null)
? widget.minOrderInfo.orderProductVOList.length
: "0")
: (widget.settleOrderInfo != null)
? widget.settleOrderInfo.orderProductList.length
: "0"),
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),

Loading…
Cancel
Save