diff --git a/assets/outdoor/ic_image.png b/assets/outdoor/ic_image.png new file mode 100644 index 0000000..c25f1af Binary files /dev/null and b/assets/outdoor/ic_image.png differ diff --git a/assets/outdoor/ic_phoneblue.png b/assets/outdoor/ic_phoneblue.png new file mode 100644 index 0000000..3a7bb1b Binary files /dev/null and b/assets/outdoor/ic_phoneblue.png differ diff --git a/assets/outdoor/ic_transport.png b/assets/outdoor/ic_transport.png new file mode 100644 index 0000000..2a74697 Binary files /dev/null and b/assets/outdoor/ic_transport.png differ diff --git a/assets/outdoor/ic_weight.png b/assets/outdoor/ic_weight.png new file mode 100644 index 0000000..cfa371d Binary files /dev/null and b/assets/outdoor/ic_weight.png differ diff --git a/lib/mock_models/outdoor_models/outdoor_model.dart b/lib/mock_models/outdoor_models/outdoor_model.dart index 7c806a5..052e500 100644 --- a/lib/mock_models/outdoor_models/outdoor_model.dart +++ b/lib/mock_models/outdoor_models/outdoor_model.dart @@ -79,7 +79,7 @@ DateTime datetime; identify: '业主', items: ItemDetails( itemname: '家具', - weight: 40, + weight: 60, way: '搬家公司', imagepath: [ R.ASSETS_OUTDOOR_ITME1_PNG, @@ -98,7 +98,7 @@ DateTime datetime; identify: '业主', items: ItemDetails( itemname: '家具', - weight: 40, + weight: 80, way: '搬家公司', imagepath: [ R.ASSETS_OUTDOOR_ITME1_PNG, @@ -117,7 +117,7 @@ DateTime datetime; identify: '业主', items: ItemDetails( itemname: '家具', - weight: 40, + weight: 120, way: '搬家公司', imagepath: [ R.ASSETS_OUTDOOR_ITME1_PNG, diff --git a/lib/style/app_style.dart b/lib/style/app_style.dart index abf1225..ba177a6 100644 --- a/lib/style/app_style.dart +++ b/lib/style/app_style.dart @@ -30,4 +30,8 @@ class AppStyle { color: primaryTextColor, fontSize: 28.sp, fontWeight: FontWeight.bold); final minorStyle = TextStyle( color: minorTextColor, fontSize: 24.sp, fontWeight: FontWeight.normal); + final secondaryTextStyle = TextStyle( + color: AppStyle.minorTextColor, + fontSize: 28.sp, + fontWeight: FontWeight.normal); } diff --git a/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart b/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart index fbb98f1..5017653 100644 --- a/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart +++ b/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart @@ -1,17 +1,21 @@ import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/tools/widget_tool.dart'; +import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart'; import 'package:aku_ui/common_widgets/aku_common_widgets.dart'; import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:aku_community_manager/const/resource.dart'; +import 'package:get/get.dart'; class ItemsOutdoorCard extends StatefulWidget { final ItemsOutdoorModel cardModel; + final bool isdetail; ItemsOutdoorCard({ Key key, @required this.cardModel, + this.isdetail = false, }) : super(key: key); @override @@ -34,166 +38,250 @@ class _ItemsOutdoorCardState extends State { Widget build(BuildContext context) { TextStyle _textStyle = TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp); - return AkuButton( - child: Container( - color: Color(0xFFFFFFFF), - margin: EdgeInsets.only(top: 16.w), - padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 24.w), - child: Column(children: [ - Container( - alignment: Alignment.centerLeft, - height: 88.w, - width: double.infinity, - child: Row( - children: [ - Container( + return Container( + color: Color(0xFFFFFFFF), + margin: EdgeInsets.only(top: 16.w), + padding: EdgeInsets.only(left: 24.w, right: 24.w), + child: Column(children: [ + widget.isdetail + ? Container( + alignment: Alignment.centerLeft, + height: 90.w, + width: double.infinity, + child: Row( + children: [ + Text( + '出户信息', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 36.sp, + fontWeight: FontWeight.bold), + ), + Spacer(), + Text( + ItemsOutdoorModel.outdoorStatusMap[_cardModel.status], + style: TextStyle( + color: _cardModel.status == OUTDOORSTATUS.CANCELLATION + ? Color(0xFF999999) + : Color(0xFFFF4501), + fontSize: 24.sp, + fontWeight: FontWeight.bold), + ), + ], + ), + ) + : Container( + alignment: Alignment.centerLeft, + height: 88.w, + width: double.infinity, + child: Row( + children: [ + Container( + alignment: Alignment.center, + width: 112.w, + height: 40.w, + decoration: BoxDecoration( + border: + Border.all(color: Color(0xFF3F8FFE), width: 2.w), + ), + child: Text( + '物品出户', + style: TextStyle( + color: Color(0xFF3F8FFE), + fontSize: 20.sp, + fontWeight: FontWeight.bold), + ), + ), + AkuBox.w(16), + Text( + _datetime, + style: TextStyle( + color: AppStyle.minorTextColor, + fontSize: 22.sp, + ), + ), + Spacer(), + Text( + ItemsOutdoorModel.outdoorStatusMap[_cardModel.status], + style: TextStyle( + color: _cardModel.status == OUTDOORSTATUS.CANCELLATION + ? Color(0xFF999999) + : Color(0xFFFF4501), + fontSize: 24.sp, + fontWeight: FontWeight.bold), + ), + ], + ), + ), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_HOME_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '小区名称', + style: _textStyle, + ), + Spacer(), + Text( + _cardModel.communityname, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(12), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text('详细地址', style: _textStyle), + Spacer(), + Text( + _cardModel.adress, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(12), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_GOOUT_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '出户人', + style: _textStyle, + ), + Spacer(), + Text( + _cardModel.name, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(12), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_PEOPLE_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '身份', + style: _textStyle, + ), + Spacer(), + Text( + _cardModel.identify, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(12), + Row( + children: [ + Image.asset(R.ASSETS_OUTDOOR_IC_CHUHU_PNG,width: 40.w,height: 40.w,), + Text( + '出户物品', + style: _textStyle, + ), + Spacer(), + Text( + _cardModel.items.itemname, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(12), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '出户时间', + style: _textStyle, + ), + Spacer(), + Text( + _cardModel.outtime, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(24), + Divider( + height: 1.w, + ), + widget.isdetail + ? AkuButton( + onPressed: () {}, + child: Container( alignment: Alignment.center, - width: 112.w, - height: 40.w, - decoration: BoxDecoration( - border: Border.all(color: Color(0xFF3F8FFE), width: 2.w), - ), - child: Text( - '物品出户', - style: TextStyle( - color: Color(0xFF3F8FFE), - fontSize: 20.sp, - fontWeight: FontWeight.bold), + height: 96.w, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_PHONEBLUE_PNG, + width: 38.w, + height: 39.w, + ), + AkuBox.w(16), + Text('联系业主', + style: TextStyle( + color: Color(0xFF3F8FFE), + fontSize: 28.sp, + fontWeight: FontWeight.bold)), + ], ), ), - AkuBox.w(16), - Text( - _datetime, - style: TextStyle( - color: AppStyle.minorTextColor, - fontSize: 22.sp, + ) + : Container( + height: 112.w, + alignment: Alignment.centerRight, + child: AkuButton( + onPressed: () { + Get.to(ItemsOutdoorDetailsPage( + cardMedel: _cardModel, + )); + }, + child: Container( + alignment: Alignment.center, + width: 160.w, + height: 64.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + AppStyle.primaryColor, + AppStyle.minorColor + ])), + child: Text( + '查看详情', + style: AppStyle().primaryStyle, + ), ), ), - Spacer(), - Text( - ItemsOutdoorModel.outdoorStatusMap[_cardModel.status], - style: TextStyle( - color: _cardModel.status == OUTDOORSTATUS.CANCELLATION - ? Color(0xFF999999) - : Color(0xFFFF4501), - fontSize: 24.sp, - fontWeight: FontWeight.bold), - ), - ], - ), - ), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_HOME_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text( - '小区名称', - style: _textStyle, - ), - Spacer(), - Text( - _cardModel.communityname, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(12), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text('详细地址', style: _textStyle), - Spacer(), - Text( - _cardModel.adress, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(12), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_GOOUT_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text( - '出户人', - style: _textStyle, - ), - Spacer(), - Text( - _cardModel.name, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(12), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_PEOPLE_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text( - '身份', - style: _textStyle, - ), - Spacer(), - Text( - _cardModel.identify, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(12), - Row( - children: [ - Text( - '出户物品', - style: _textStyle, - ), - Spacer(), - Text( - _cardModel.items.itemname, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(12), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_TIME_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text( - '出户时间', - style: _textStyle, - ), - Spacer(), - Text( - _cardModel.outtime, - style: AppStyle().primaryStyle, ), - ], - ), - ]), - ), + ]), ); } } diff --git a/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart b/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart new file mode 100644 index 0000000..a233a0f --- /dev/null +++ b/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart @@ -0,0 +1,142 @@ +import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/widget_tool.dart'; +import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_card.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_community_manager/const/resource.dart'; + +class ItemsOutdoorDetailsPage extends StatefulWidget { + final ItemsOutdoorModel cardMedel; + ItemsOutdoorDetailsPage({Key key, @required this.cardMedel}) + : super(key: key); + + @override + _ItemsOutdoorDetailsPageState createState() => + _ItemsOutdoorDetailsPageState(); +} + +class _ItemsOutdoorDetailsPageState extends State { + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '出户详情', + body: ListView( + children: [ + ItemsOutdoorCard( + cardModel: widget.cardMedel, + isdetail: true, + ), + Container( + color: Color(0xFFFFFFFF), + margin: EdgeInsets.only(top: 16.w), + padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '物品信息', + style: AppStyle().barTitleStyle, + ), + AkuBox.h(16), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_CHUHU_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '出户物品', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.items.itemname, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(16), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_WEIGHT_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '物品重量', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.items.weight < 50.0 + ? '<50kg' + : '${widget.cardMedel.items.weight}kg', + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(16), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_TRANSPORT_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '搬运方式', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.items.way, + style: AppStyle().primaryStyle, + ) + ], + ), + AkuBox.h(16), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_IMAGE_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '图片信息', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + ], + ), + AkuBox.h(16), + Wrap( + spacing: 16.w, + children: widget.cardMedel.items.imagepath + .map( + (e) => ClipRRect( + borderRadius: BorderRadius.circular(4.w), + child: Image.asset( + e, + width: 218.w, + height: 218.w, + )), + ) + .toList(), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/ui/sub_pages/items_outdoor/items_outdoor_page.dart b/lib/ui/sub_pages/items_outdoor/items_outdoor_page.dart index cd5c3c4..f3bfb6e 100644 --- a/lib/ui/sub_pages/items_outdoor/items_outdoor_page.dart +++ b/lib/ui/sub_pages/items_outdoor/items_outdoor_page.dart @@ -45,7 +45,7 @@ void dispose() { List _selectModels = _outdoorModels.getOutdoorModels(index); return ListView( padding: EdgeInsets.only(left: 32.w,right: 32.w), - children: _selectModels.map((e) => ItemsOutdoorCard(cardModel:e)).toList(), + children: _selectModels.map((e) => ItemsOutdoorCard(cardModel:e,isdetail: false,)).toList(), ); } }