From 32289267624b771f37cbf1a66204ad9e2d0bc897 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Tue, 17 Aug 2021 15:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E8=AE=BF=E5=AE=A2=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E6=89=8B=E6=9C=BA=E5=8F=B7=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E9=82=80=E8=AF=B7=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=88=BF=E9=97=B4=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visitor_access_page.dart | 66 ++++++++++++------- .../visitor/visitor_passport_page.dart | 5 +- 2 files changed, 46 insertions(+), 25 deletions(-) diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index 10c1632e..e0970d37 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -19,7 +19,7 @@ import 'package:aku_community/widget/bee_divider.dart'; import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/common_input.dart'; import 'package:aku_community/widget/picker/bee_date_picker.dart'; - +import 'package:aku_community/extensions/widget_list_ext.dart'; class VisitorAccessPage extends StatefulWidget { VisitorAccessPage({Key? key}) : super(key: key); @@ -30,10 +30,19 @@ class VisitorAccessPage extends StatefulWidget { class _VisitorAccessPageState extends State { TextEditingController _userName = new TextEditingController(); TextEditingController _userCarNum = new TextEditingController(); + TextEditingController _phoneNum = TextEditingController(); DateTime? dateTime; int _selectSex = 1; GlobalKey formKey = GlobalKey(); + @override + void dispose() { + _phoneNum.dispose(); + _userCarNum.dispose(); + _userName.dispose(); + super.dispose(); + } + Widget _buildHouseCard( String title, String detail, @@ -210,26 +219,30 @@ class _VisitorAccessPageState extends State { style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 32.w), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - dateTime == null - ? '请选择到访时间' - : '${DateUtil.formatDate(dateTime, format: 'yyyy-MM-dd')}', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 34.sp, - color: Color(0xff333333)), - ), - Icon( - AntDesign.right, - size: 36.sp, - color: Color(0xffd8d8d8), + Row( + children: [ + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + dateTime == null + ? '请选择到访时间' + : '${DateUtil.formatDate(dateTime, format: 'yyyy-MM-dd')}', + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 34.sp, + color: Color(0xff333333)), + ), + Icon( + AntDesign.right, + size: 36.sp, + color: Color(0xffd8d8d8), + ), + ], ), - ], - ), + ), + ], ), SizedBox(height: 26.w), Divider(), @@ -257,7 +270,7 @@ class _VisitorAccessPageState extends State { ); if (result != null) Share.share( - '${API.host}/static/dist/index.html#/visitor?code=$result'); + '请点击链接补充访客预约资料:\n${API.host}/static/dist/index.html#/visitor?code=$result'); }, minWidth: double.infinity, height: 96.w, @@ -329,6 +342,15 @@ class _VisitorAccessPageState extends State { return null; }, ), + _input( + '访客手机', + '请输入手机号', + _phoneNum, + (text) { + if (TextUtil.isEmpty(text)) return '手机号不能为空'; + return null; + }, + ), _sexSelect(), _input( '是否驾车', @@ -341,7 +363,7 @@ class _VisitorAccessPageState extends State { _create( appProvider.selectedHouse!.estateId, userProvider.userDetailModel!.type, - userProvider.userDetailModel!.tel, + _phoneNum.text, ), _tips(), ], diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart index 4243d4b0..04509409 100644 --- a/lib/ui/manager/visitor/visitor_passport_page.dart +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -18,7 +18,6 @@ import 'package:aku_community/model/manager/visitor_list_item_model.dart'; import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/widget/bee_back_button.dart'; import 'package:aku_community/widget/buttons/bottom_button.dart'; - // import 'package:qr_flutter/qr_flutter.dart'; class VisitorPassportPage extends StatefulWidget { @@ -52,8 +51,8 @@ class _VisitorPassportPageState extends State { child: ListView( children: [ 64.hb, - '宁波华茂悦峰'.text.size(40.sp).white.bold.make().centered(), - '1幢-1单元-702室'.text.size(30.sp).white.make().centered(), + '${S.of(context)!.tempPlotName}'.text.size(40.sp).white.bold.make().centered(), + '${widget.model.roomName}'.text.size(30.sp).white.make().centered(), 32.hb, Container( width: 600.w,