From 416e9c96fb445545eed6c16a3a4ef36896116c03 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 8 Feb 2021 14:58:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=90=AC=E5=AE=B6=E5=85=AC=E5=8F=B8=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E8=87=AA=E5=B7=B1=E6=90=AC=E8=BF=90=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=82=B9=E5=87=BB=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deto_create_page/deto_create_page.dart | 2 +- .../select_move_company_page.dart | 7 +- lib/pages/life_pay/widget/my_house_page.dart | 68 +++++++++---------- 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart index c2c9218a..25527269 100644 --- a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart +++ b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart @@ -54,7 +54,7 @@ class _DetoCreatePageState extends State { '50kg-100kg', '> 100kg', ]; - int _selectApproach; + int _selectApproach=0; List _listMode = [ '自己搬运', '搬家公司', diff --git a/lib/pages/goods_deto_page/select_move_company_page.dart b/lib/pages/goods_deto_page/select_move_company_page.dart index ff8c1821..4a346e7f 100644 --- a/lib/pages/goods_deto_page/select_move_company_page.dart +++ b/lib/pages/goods_deto_page/select_move_company_page.dart @@ -31,7 +31,7 @@ class _SelectMoveCompanyPageState extends State { bool _onloading = true; String get result { if (_selected == _companyModel.appMovingCompanyVoList.length) { - return null; + return '已选择自己联系'; } else { return _companyModel.appMovingCompanyVoList[_selected].tel; } @@ -92,7 +92,7 @@ class _SelectMoveCompanyPageState extends State { ], ).expand(), ], - ), + ).material(color: Colors.transparent), ), ); } @@ -104,6 +104,7 @@ class _SelectMoveCompanyPageState extends State { setState(() {}); }, child: Container( + width: double.infinity, padding: EdgeInsets.symmetric(vertical: 28.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -119,7 +120,7 @@ class _SelectMoveCompanyPageState extends State { '自己联系'.text.color(ktextPrimary).size(28.sp).bold.make() ], ), - ), + ).material(color: Colors.transparent), ); } diff --git a/lib/pages/life_pay/widget/my_house_page.dart b/lib/pages/life_pay/widget/my_house_page.dart index 46202211..1f4b040a 100644 --- a/lib/pages/life_pay/widget/my_house_page.dart +++ b/lib/pages/life_pay/widget/my_house_page.dart @@ -49,8 +49,9 @@ Widget _unPaidTag() { class _MyHousePageState extends State { int _select; - List _list; - List get _unPaidList => _list.where((element) => element.status == 1).toList(); + List _list = []; + List get _unPaidList => + _list.where((element) => element.status == 1).toList(); @override void initState() { super.initState(); @@ -59,7 +60,6 @@ class _MyHousePageState extends State { _list = value.data; return _list; }); - } } @@ -67,41 +67,41 @@ class _MyHousePageState extends State { {bool paid = false}) { return Container( padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), - child: Row( - children: [ - GestureDetector( - onTap: () { - _select = index; - setState(() {}); - }, - child: CommonRadio( + child: GestureDetector( + onTap: () { + _select = index; + setState(() {}); + }, + child: Row( + children: [ + CommonRadio( value: index, groupValue: _select, size: 32.w, ), - ), - 24.w.widthBox, - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(), - 16.w.heightBox, - BeeParse.getEstateName(estateName) - .text - .color(ktextPrimary) - .size(28.sp) - .bold - .make(), - ], - ), - Spacer(), - currentHouse == estateName - ? _currentHouseTag() - : paid - ? _unPaidTag() - : SizedBox() - ], + 24.w.widthBox, + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(), + 16.w.heightBox, + BeeParse.getEstateName(estateName) + .text + .color(ktextPrimary) + .size(28.sp) + .bold + .make(), + ], + ), + Spacer(), + currentHouse == estateName + ? _currentHouseTag() + : paid + ? _unPaidTag() + : SizedBox() + ], + ).material(color: Colors.transparent), ), ); } From 6590c166e9f6b22f6c5833e7703d4e7d82ea4e68 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 8 Feb 2021 15:22:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E8=B0=83=E6=9F=A5=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods_deto_page/goods_deto_page.dart | 2 +- .../questionnaire/questionnaire_page.dart | 186 ++++++++++-------- 2 files changed, 101 insertions(+), 87 deletions(-) diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index 7743fed5..5b51a505 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -104,7 +104,7 @@ class _GoodsDetoPageState extends State { vertical: 50.w, horizontal: 32.w), alignment: Alignment.topLeft, constraints: BoxConstraints( - minHeight: 631.w + 96.w, minWidth: 686.w), + minHeight: 650.w + 96.w, minWidth: 686.w), child: BeeRadio( value: items[index].id, groupValues: _select), ), diff --git a/lib/ui/manager/questionnaire/questionnaire_page.dart b/lib/ui/manager/questionnaire/questionnaire_page.dart index c2533e74..b2caebea 100644 --- a/lib/ui/manager/questionnaire/questionnaire_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_page.dart @@ -5,6 +5,7 @@ import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/others/stack_avatar.dart'; +import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:akuCommunity/utils/headers.dart'; @@ -38,94 +39,107 @@ class _QuestionnairePageState extends State { } Widget _buildCard(QuestionnaireModel model) { - return Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8.w), - color: kForeGroundColor, - ), - width: double.infinity, - // height: 236.w, - padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - Container( - decoration: - BoxDecoration(borderRadius: BorderRadius.circular(8.w)), - width: 160.w, - height: 120.w, - child: ClipRRect( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_LOGO_PNG, - image: API.image(model.imgUrls.first.url)), + return GestureDetector( + onTap: () { + QuestionnaireDetailPage( + id: model.id, + ).to(); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + color: kForeGroundColor, + ), + width: double.infinity, + // height: 236.w, + padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + Container( + decoration: + BoxDecoration(borderRadius: BorderRadius.circular(8.w)), + width: 160.w, + height: 120.w, + child: ClipRRect( + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_IMAGES_LOGO_PNG, + image: API.image(model.imgUrls.first.url)), + ), ), - ), - 20.w.widthBox, - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - model.title.text.black.size(28.sp).make(), - 6.w.heightBox, - model.description.text - .color(ktextSubColor) - .size(28.sp) - .maxLines(1) - .overflow(TextOverflow.ellipsis) - .make(), - 6.w.heightBox, - RichText( - text: TextSpan( - text: '参与时间:', - style: TextStyle( - color: ktextSubColor, - fontSize: 24.sp, - ), - children: [ - TextSpan( - style: TextStyle( - color: ktextPrimary, - fontSize: 24.sp, + 20.w.widthBox, + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.title.text.black.size(28.sp).make(), + 6.w.heightBox, + model.description.text + .color(ktextSubColor) + .size(28.sp) + .maxLines(1) + .overflow(TextOverflow.ellipsis) + .make(), + 6.w.heightBox, + RichText( + text: TextSpan( + text: '参与时间:', + style: TextStyle( + color: ktextSubColor, + fontSize: 24.sp, + ), + children: [ + TextSpan( + style: TextStyle( + color: ktextPrimary, + fontSize: 24.sp, + ), + text: DateUtil.formatDateStr(model.beginDate, + format: "MM月dd日 HH:mm") + + '至' + + DateUtil.formatDateStr(model.endDate, + format: "MM月dd日 HH:mm"), ), - text: model.beginDate + '至' + model.endDate, - ), - ])), - ], - ).expand() - ], - ), - 40.w.heightBox, - Row( - children: [ - StackAvatar( - avatars: model.headImgURls.map((e) => e.url).toList()), - 26.w.widthBox, - '${model.answerNum}人已参加'.text.black.size(20.sp).make(), - Spacer(), - MaterialButton( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(22.w)), - color: model.status == 3 ? kDarkSubColor : kPrimaryColor, - minWidth: 120.w, - height: 44.w, - // padding: - // EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w), - elevation: 0, - onPressed: () { - QuestionnaireDetailPage(id: model.id,).to(); - }, - child: (_getButtonText(model.status)) - .text - .black - .size(20.sp) - .bold - .make(), - ), - ], - ) - ], - ), + ])), + ], + ).expand() + ], + ), + 40.w.heightBox, + Row( + children: [ + StackAvatar( + avatars: model.headImgURls.map((e) => e.url).toList()), + 26.w.widthBox, + '${model.answerNum}人已参加'.text.black.size(20.sp).make(), + Spacer(), + MaterialButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(22.w)), + color: model.status == 3 ? kDarkSubColor : kPrimaryColor, + minWidth: 120.w, + height: 44.w, + // padding: + // EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w), + elevation: 0, + onPressed: () { + QuestionnaireDetailPage( + id: model.id, + ).to(); + }, + child: (_getButtonText(model.status)) + .text + .black + .size(20.sp) + .bold + .make(), + ), + ], + ) + ], + ), + ).material(color: Colors.transparent), ); } From 6029ef6977bc081770df1b841e2ef4c54992a18d Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 8 Feb 2021 15:36:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BF=E5=AE=A2?= =?UTF-8?q?=E9=80=9A=E8=A1=8C=E6=88=BF=E5=B1=8B=E4=BF=A1=E6=81=AF=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=89=A9=E5=93=81=E5=87=BA?= =?UTF-8?q?=E6=88=B7=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=98=BE=E7=A4=BA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/model/manager/article_QR_code_model.dart | 21 +- .../deto_code_page/deto_code_page.dart | 7 +- .../visitor_access_page.dart | 184 ++++++++++++------ 3 files changed, 136 insertions(+), 76 deletions(-) diff --git a/lib/model/manager/article_QR_code_model.dart b/lib/model/manager/article_QR_code_model.dart index 33421476..c38f285a 100644 --- a/lib/model/manager/article_QR_code_model.dart +++ b/lib/model/manager/article_QR_code_model.dart @@ -26,25 +26,32 @@ class ArticleQRModel { class AppArticleOutQRCodeVo { int id; - int residentId; - String residentName; + String roomName; + int applicantId; + String applicantName; String effectiveTime; AppArticleOutQRCodeVo( - {this.id, this.residentId, this.residentName, this.effectiveTime}); + {this.id, + this.roomName, + this.applicantId, + this.applicantName, + this.effectiveTime}); AppArticleOutQRCodeVo.fromJson(Map json) { id = json['id']; - residentId = json['residentId']; - residentName = json['residentName']; + roomName = json['roomName']; + applicantId = json['applicantId']; + applicantName = json['applicantName']; effectiveTime = json['effectiveTime']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; - data['residentId'] = this.residentId; - data['residentName'] = this.residentName; + data['roomName'] = this.roomName; + data['applicantId'] = this.applicantId; + data['applicantName'] = this.applicantName; data['effectiveTime'] = this.effectiveTime; return data; } diff --git a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart index 1d4893f1..8307b0c6 100644 --- a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart +++ b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart @@ -11,7 +11,6 @@ import 'package:qr_flutter/qr_flutter.dart'; import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/model/manager/article_QR_code_model.dart'; import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/utils/bee_parse.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/dotted_line.dart'; @@ -146,7 +145,6 @@ class DetoCodePage extends StatelessWidget { @override Widget build(BuildContext context) { - UserProvider userProvider = Provider.of(context); return BeeScaffold( title: '出户二维码', body: Container( @@ -156,10 +154,9 @@ class DetoCodePage extends StatelessWidget { Column( children: [ SizedBox(height: 192.w - kToolbarHeight), - _header(BeeParse.getEstateName( - userProvider.userDetailModel.estateNames[0])), + _header(model.appArticleOutQRCodeVo.roomName), SizedBox(height: 32.w), - _card(model.appArticleOutQRCodeVo.residentName, + _card(model.appArticleOutQRCodeVo.applicantName, model.appArticleOutQRCodeVo.effectiveTime), ], ), diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index 6846c64a..0033d5e3 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -1,4 +1,8 @@ // Flutter imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart'; +import 'package:akuCommunity/utils/bee_parse.dart'; +import 'package:akuCommunity/widget/bee_divider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -30,79 +34,126 @@ class _VisitorAccessPageState extends State { TextEditingController _userCarNum = new TextEditingController(); DateTime dateTime; int _selectSex; - Widget _house() { - return Container( - padding: EdgeInsets.only( - left: 36.w, - right: 36.w, - top: 32.w, - ), + // Widget _house() { + // return Container( + // padding: EdgeInsets.only( + // left: 36.w, + // right: 36.w, + // top: 32.w, + // ), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // '来访房屋', + // style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), + // ), + // SizedBox(height: 32.w), + // Container( + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Image.asset( + // AssetsImage.HOUSE, + // height: 60.w, + // width: 60.w, + // ), + // SizedBox(width: 40.w), + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // '宁波华茂悦峰', + // style: TextStyle( + // fontWeight: FontWeight.w600, + // fontSize: 34.sp, + // color: Color(0xff333333)), + // ), + // SizedBox(height: 10.w), + // Text( + // '1幢-1单元-702室', + // style: TextStyle( + // fontWeight: FontWeight.w600, + // fontSize: 34.sp, + // color: Color(0xff333333)), + // ) + // ], + // ), + // ], + // ), + // Container( + // alignment: Alignment.center, + // padding: EdgeInsets.symmetric( + // vertical: 14.w, + // horizontal: 21.w, + // ), + // decoration: BoxDecoration( + // color: Color(0xffFEC200), + // borderRadius: BorderRadius.all(Radius.circular(4)), + // ), + // child: Text( + // '邀请客户填写', + // style: TextStyle( + // fontWeight: FontWeight.w600, + // fontSize: 28.sp, + // color: Color(0xff333333)), + // ), + // ), + // ], + // ), + // ), + // SizedBox(height: 26.w), + // Divider(), + // ], + // ), + // ); + // } + + Widget _buildHouseCard( + String title, + String detail, + ) { + return Padding( + padding: EdgeInsets.all(32.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - '来访房屋', - style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), - ), - SizedBox(height: 32.w), - Container( + '报修房屋'.text.black.size(28.sp).make(), + 32.w.heightBox, + GestureDetector( + onTap: () { + MyHousePage().to(); + }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Image.asset( - AssetsImage.HOUSE, - height: 60.w, - width: 60.w, - ), - SizedBox(width: 40.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '宁波华茂悦峰', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 34.sp, - color: Color(0xff333333)), - ), - SizedBox(height: 10.w), - Text( - '1幢-1单元-702室', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 34.sp, - color: Color(0xff333333)), - ) - ], - ), - ], + Image.asset( + R.ASSETS_ICONS_HOUSE_PNG, + width: 60.w, + height: 60.w, ), - Container( - alignment: Alignment.center, - padding: EdgeInsets.symmetric( - vertical: 14.w, - horizontal: 21.w, - ), - decoration: BoxDecoration( - color: Color(0xffFEC200), - borderRadius: BorderRadius.all(Radius.circular(4)), - ), - child: Text( - '邀请客户填写', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 28.sp, - color: Color(0xff333333)), + 40.w.widthBox, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + title.text.black.size(32.sp).bold.make(), + 10.w.heightBox, + detail.text.black.size(32.sp).bold.make() + ], ), ), + Icon( + CupertinoIcons.chevron_forward, + size: 40.w, + ), ], - ), + ).material(color: Colors.transparent), ), - SizedBox(height: 26.w), - Divider(), + 24.w.heightBox, + BeeDivider.horizontal(), ], ), ); @@ -336,7 +387,12 @@ class _VisitorAccessPageState extends State { }, child: Column( children: [ - _house(), + _buildHouseCard( + kEstateName, + userProvider.userDetailModel.estateNames.isEmpty + ? '' + : BeeParse.getEstateName( + userProvider.userDetailModel.estateNames[0])), _input('访客姓名', '请输入访客姓名', _userName), _sexSelect(), _input('是否驾车', '请输入,例如浙A88888(没有驾车可不填)', _userCarNum),