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(),
///
HomeIntegralStore(gooods),
// HomeIntegralStore(gooods),
///Tab
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) {
return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
@ -378,10 +388,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
),
),
TextSpan(
text: (orderInfo != null &&
orderInfo.productList != null)
? "${orderInfo.productList.length}"
: "0",
text:orderAllGoods(orderInfo),
style: TextStyle(
fontSize: 12.sp,
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() {
return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
@ -399,10 +409,7 @@ class _OrderCommodity extends State<OrderCommodity> {
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),

10
lib/settlement/settlement_view/distribution.dart

@ -153,10 +153,12 @@ class _DistributionMode extends State<DistributionMode> {
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,

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() {
return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
@ -326,13 +340,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
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),

Loading…
Cancel
Save