From 0b13cfdf5c5bcc74d6091bfbec5c1dab3127c18c Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Thu, 20 May 2021 10:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=A4=A7=E7=89=A9=E5=93=81=E5=87=BA?= =?UTF-8?q?=E6=88=B7card=E7=82=B9=E5=87=BB=E5=8C=BA=E5=9F=9F=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8C=85=E8=A3=B9=E4=BB=A3=E6=94=B6=E6=8F=90=E9=86=92?= =?UTF-8?q?=E4=BB=A3=E6=94=B6=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/home/business/todo_outdoor_card.dart | 392 +++++++++--------- .../packages_manage/packages_manage_card.dart | 2 + .../items_outdoor/items_outdoor_card.dart | 375 +++++++++-------- 3 files changed, 397 insertions(+), 372 deletions(-) diff --git a/lib/ui/home/business/todo_outdoor_card.dart b/lib/ui/home/business/todo_outdoor_card.dart index b5e1f16..8d8fb2e 100644 --- a/lib/ui/home/business/todo_outdoor_card.dart +++ b/lib/ui/home/business/todo_outdoor_card.dart @@ -29,209 +29,221 @@ class _ToDoOutDoorCardState extends State { Widget build(BuildContext context) { TextStyle _textStyle = TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp); - return Container( - color: Color(0xFFFFFFFF), - margin: widget.homeDisplay ? EdgeInsets.zero : EdgeInsets.only(top: 16.w), - padding: EdgeInsets.only(left: 24.w, right: 24.w), - child: Column( - children: [ - 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), + return GestureDetector( + onTap: () async { + await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); + if (widget.callRefresh != null) { + widget.callRefresh(); + } + }, + child: Container( + color: Color(0xFFFFFFFF), + margin: + widget.homeDisplay ? EdgeInsets.zero : EdgeInsets.only(top: 16.w), + padding: EdgeInsets.only(left: 24.w, right: 24.w), + child: Column( + children: [ + 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), + ), ), - child: Text( - '物品出户', + 16.w.widthBox, + //TODO 创建时间 + // Text( + // widget.model.create, + // style: TextStyle( + // color: AppStyle.minorTextColor, + // fontSize: 22.sp, + // ), + // ), + Spacer(), + Text( + widget.model.statusValue, style: TextStyle( - color: Color(0xFF3F8FFE), - fontSize: 20.sp, - fontWeight: FontWeight.bold), + color: widget.model.statusColor, + fontSize: 24.sp, + fontWeight: FontWeight.bold, + ), ), + ], + ), + ), + ...widget.homeDisplay + ? [] + : [ + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_HOME_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '小区名称', + style: _textStyle, + ), + Spacer(), + Text( + '五象新区人才公寓', + style: AppStyle().primaryStyle, + ), + ], + ), + ], + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, + width: 40.w, + height: 40.w, ), - 16.w.widthBox, - //TODO 创建时间 - // Text( - // widget.model.create, - // style: TextStyle( - // color: AppStyle.minorTextColor, - // fontSize: 22.sp, - // ), - // ), + 4.w.widthBox, + Text('详细地址', style: _textStyle), Spacer(), Text( - widget.model.statusValue, - style: TextStyle( - color: widget.model.statusColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold, - ), + widget.model.roomName, + style: AppStyle().primaryStyle, ), ], ), - ), - ...widget.homeDisplay - ? [] - : [ - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_HOME_PNG, - width: 40.w, - height: 40.w, - ), - 4.w.widthBox, - Text( - '小区名称', - style: _textStyle, - ), - Spacer(), - Text( - '五象新区人才公寓', - style: AppStyle().primaryStyle, - ), - ], - ), - ], - 12.w.heightBox, - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, - width: 40.w, - height: 40.w, - ), - 4.w.widthBox, - Text('详细地址', style: _textStyle), - Spacer(), - Text( - widget.model.roomName, - style: AppStyle().primaryStyle, - ), - ], - ), - 12.w.heightBox, - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_GOOUT_PNG, - width: 40.w, - height: 40.w, - ), - 4.w.widthBox, - Text( - '出户人', - style: _textStyle, - ), - Spacer(), - Text( - widget.model.applicantName, - style: AppStyle().primaryStyle, - ), - ], - ), - ...widget.homeDisplay - ? [] - : [ - 12.w.heightBox, - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_PEOPLE_PNG, - width: 40.w, - height: 40.w, - ), - 4.w.widthBox, - Text( - '身份', - style: _textStyle, - ), - Spacer(), - Text( - widget.model.identityValue, - style: AppStyle().primaryStyle, - ), - ], - ), - ], - 12.w.heightBox, - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_CHUHU_PNG, - width: 40.w, - height: 40.w, - ), - Text( - '出户物品', - style: _textStyle, - ), - Spacer(), - Text( - widget.model.articleOutName, - style: AppStyle().primaryStyle, - ), - ], - ), - 12.w.heightBox, - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_TIME_PNG, - width: 40.w, - height: 40.w, - ), - 4.w.widthBox, - Text( - '出户时间', - style: _textStyle, - ), - Spacer(), - Text( - widget.model.expectedTime, - style: AppStyle().primaryStyle, - ), - ], - ), - 24.w.heightBox, - Divider( - height: 1.w, - ), - Container( - height: 112.w, - alignment: Alignment.centerRight, - child: AkuButton( - onPressed: () async { - await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); - if (widget.callRefresh != null) { - widget.callRefresh(); - } - }, - 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( - '查看详情', + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_GOOUT_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '出户人', + style: _textStyle, + ), + Spacer(), + Text( + widget.model.applicantName, + style: AppStyle().primaryStyle, + ), + ], + ), + ...widget.homeDisplay + ? [] + : [ + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_PEOPLE_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '身份', + style: _textStyle, + ), + Spacer(), + Text( + widget.model.identityValue, + style: AppStyle().primaryStyle, + ), + ], + ), + ], + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_CHUHU_PNG, + width: 40.w, + height: 40.w, + ), + Text( + '出户物品', + style: _textStyle, + ), + Spacer(), + Text( + widget.model.articleOutName, + style: AppStyle().primaryStyle, + ), + ], + ), + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '出户时间', + style: _textStyle, + ), + Spacer(), + Text( + widget.model.expectedTime, style: AppStyle().primaryStyle, ), + ], + ), + 24.w.heightBox, + Divider( + height: 1.w, + ), + Container( + height: 112.w, + alignment: Alignment.centerRight, + child: AkuButton( + onPressed: () async { + await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); + if (widget.callRefresh != null) { + widget.callRefresh(); + } + }, + 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, + ), + ), ), ), - ), - ], + ], + ), ), ); } diff --git a/lib/ui/manage_pages/packages_manage/packages_manage_card.dart b/lib/ui/manage_pages/packages_manage/packages_manage_card.dart index 6d5a89d..bb9a751 100644 --- a/lib/ui/manage_pages/packages_manage/packages_manage_card.dart +++ b/lib/ui/manage_pages/packages_manage/packages_manage_card.dart @@ -132,6 +132,8 @@ class _PackageManageCardState extends State { params: {"packageCollectionId": packageCollectionId}); if (!baseModel.status) { BotToast.showText(text: baseModel.message); + } else { + BotToast.showText(text: '已成功提醒领取'); } } 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 bbb15dc..66d0f82 100644 --- a/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart +++ b/lib/ui/sub_pages/items_outdoor/items_outdoor_card.dart @@ -28,201 +28,212 @@ class _ItemsOutdoorCardState extends State { Widget build(BuildContext context) { TextStyle _textStyle = TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp); - return Container( - color: Color(0xFFFFFFFF), - margin: EdgeInsets.only(top: 16.w), - padding: EdgeInsets.only(left: 24.w, right: 24.w), - child: Column( - children: [ - 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), + return GestureDetector( + onTap: () async { + await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); + if (widget.callRefresh != null) { + widget.callRefresh(); + } + }, + child: Container( + color: Color(0xFFFFFFFF), + margin: EdgeInsets.only(top: 16.w), + padding: EdgeInsets.only(left: 24.w, right: 24.w), + child: Column( + children: [ + 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), + ), ), - child: Text( - '物品出户', + AkuBox.w(16), + //TODO 创建时间 + // Text( + // widget.model.create, + // style: TextStyle( + // color: AppStyle.minorTextColor, + // fontSize: 22.sp, + // ), + // ), + Spacer(), + Text( + widget.model.statusValue, style: TextStyle( - color: Color(0xFF3F8FFE), - fontSize: 20.sp, - fontWeight: FontWeight.bold), + color: widget.model.statusColor, + 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, ), - AkuBox.w(16), - //TODO 创建时间 - // Text( - // widget.model.create, - // style: TextStyle( - // color: AppStyle.minorTextColor, - // fontSize: 22.sp, - // ), - // ), Spacer(), Text( - widget.model.statusValue, - style: TextStyle( - color: widget.model.statusColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold, - ), + '五象新区人才公寓', + style: AppStyle().primaryStyle, ), ], ), - ), - Row( - children: [ - Image.asset( - R.ASSETS_OUTDOOR_IC_HOME_PNG, - width: 40.w, - height: 40.w, - ), - AkuBox.w(4), - Text( - '小区名称', - style: _textStyle, - ), - Spacer(), - Text( - '五象新区人才公寓', - 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( - widget.model.roomName, - 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( - widget.model.applicantName, - 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( - widget.model.identityValue, - 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( - widget.model.articleOutName, - 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( - widget.model.expectedTime, - style: AppStyle().primaryStyle, - ), - ], - ), - AkuBox.h(24), - Divider( - height: 1.w, - ), - Container( - height: 112.w, - alignment: Alignment.centerRight, - child: AkuButton( - onPressed: () async { - await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); - if (widget.callRefresh != null) { - widget.callRefresh(); - } - }, - 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( - '查看详情', + 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( + widget.model.roomName, 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( + widget.model.applicantName, + 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( + widget.model.identityValue, + 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( + widget.model.articleOutName, + 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( + widget.model.expectedTime, + style: AppStyle().primaryStyle, + ), + ], + ), + AkuBox.h(24), + Divider( + height: 1.w, + ), + Container( + height: 112.w, + alignment: Alignment.centerRight, + child: AkuButton( + onPressed: () async { + await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); + if (widget.callRefresh != null) { + widget.callRefresh(); + } + }, + 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, + ), + ), ), ), - ), - ], + ], + ), ), ); }