Merge commit '6029ef6977bc081770df1b841e2ef4c54992a18d'

* commit '6029ef6977bc081770df1b841e2ef4c54992a18d':
  修改访客通行房屋信息界面,修改物品出户二维码显示字段
  优化问卷调查界面
  修复房屋选择问题,修复选择搬家公司默认为自己搬运,优化点击区域

# Conflicts:
#	lib/ui/manager/questionnaire/questionnaire_page.dart
hmxc
小赖 4 years ago
commit 243151b462

@ -26,25 +26,32 @@ class ArticleQRModel {
class AppArticleOutQRCodeVo { class AppArticleOutQRCodeVo {
int id; int id;
int residentId; String roomName;
String residentName; int applicantId;
String applicantName;
String effectiveTime; String effectiveTime;
AppArticleOutQRCodeVo( AppArticleOutQRCodeVo(
{this.id, this.residentId, this.residentName, this.effectiveTime}); {this.id,
this.roomName,
this.applicantId,
this.applicantName,
this.effectiveTime});
AppArticleOutQRCodeVo.fromJson(Map<String, dynamic> json) { AppArticleOutQRCodeVo.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
residentId = json['residentId']; roomName = json['roomName'];
residentName = json['residentName']; applicantId = json['applicantId'];
applicantName = json['applicantName'];
effectiveTime = json['effectiveTime']; effectiveTime = json['effectiveTime'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id; data['id'] = this.id;
data['residentId'] = this.residentId; data['roomName'] = this.roomName;
data['residentName'] = this.residentName; data['applicantId'] = this.applicantId;
data['applicantName'] = this.applicantName;
data['effectiveTime'] = this.effectiveTime; data['effectiveTime'] = this.effectiveTime;
return data; return data;
} }

@ -11,7 +11,6 @@ import 'package:qr_flutter/qr_flutter.dart';
import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/manager/article_QR_code_model.dart'; import 'package:akuCommunity/model/manager/article_QR_code_model.dart';
import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/bee_parse.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/dotted_line.dart'; import 'package:akuCommunity/widget/dotted_line.dart';
@ -146,7 +145,6 @@ class DetoCodePage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context);
return BeeScaffold( return BeeScaffold(
title: '出户二维码', title: '出户二维码',
body: Container( body: Container(
@ -156,10 +154,9 @@ class DetoCodePage extends StatelessWidget {
Column( Column(
children: [ children: [
SizedBox(height: 192.w - kToolbarHeight), SizedBox(height: 192.w - kToolbarHeight),
_header(BeeParse.getEstateName( _header(model.appArticleOutQRCodeVo.roomName),
userProvider.userDetailModel.estateNames[0])),
SizedBox(height: 32.w), SizedBox(height: 32.w),
_card(model.appArticleOutQRCodeVo.residentName, _card(model.appArticleOutQRCodeVo.applicantName,
model.appArticleOutQRCodeVo.effectiveTime), model.appArticleOutQRCodeVo.effectiveTime),
], ],
), ),

@ -54,7 +54,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
'50kg-100kg', '50kg-100kg',
'> 100kg', '> 100kg',
]; ];
int _selectApproach; int _selectApproach=0;
List<String> _listMode = [ List<String> _listMode = [
'自己搬运', '自己搬运',
'搬家公司', '搬家公司',

@ -104,7 +104,7 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
vertical: 50.w, horizontal: 32.w), vertical: 50.w, horizontal: 32.w),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: 631.w + 96.w, minWidth: 686.w), minHeight: 650.w + 96.w, minWidth: 686.w),
child: BeeRadio( child: BeeRadio(
value: items[index].id, groupValues: _select), value: items[index].id, groupValues: _select),
), ),

@ -31,7 +31,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
bool _onloading = true; bool _onloading = true;
String get result { String get result {
if (_selected == _companyModel.appMovingCompanyVoList.length) { if (_selected == _companyModel.appMovingCompanyVoList.length) {
return null; return '已选择自己联系';
} else { } else {
return _companyModel.appMovingCompanyVoList[_selected].tel; return _companyModel.appMovingCompanyVoList[_selected].tel;
} }
@ -92,7 +92,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
], ],
).expand(), ).expand(),
], ],
), ).material(color: Colors.transparent),
), ),
); );
} }
@ -104,6 +104,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
setState(() {}); setState(() {});
}, },
child: Container( child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 28.w), padding: EdgeInsets.symmetric(vertical: 28.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -119,7 +120,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
'自己联系'.text.color(ktextPrimary).size(28.sp).bold.make() '自己联系'.text.color(ktextPrimary).size(28.sp).bold.make()
], ],
), ),
), ).material(color: Colors.transparent),
); );
} }

@ -49,8 +49,9 @@ Widget _unPaidTag() {
class _MyHousePageState extends State<MyHousePage> { class _MyHousePageState extends State<MyHousePage> {
int _select; int _select;
List<EstatePaymentModel> _list; List<EstatePaymentModel> _list = [];
List<EstatePaymentModel> get _unPaidList => _list.where((element) => element.status == 1).toList(); List<EstatePaymentModel> get _unPaidList =>
_list.where((element) => element.status == 1).toList();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -59,7 +60,6 @@ class _MyHousePageState extends State<MyHousePage> {
_list = value.data; _list = value.data;
return _list; return _list;
}); });
} }
} }
@ -67,41 +67,41 @@ class _MyHousePageState extends State<MyHousePage> {
{bool paid = false}) { {bool paid = false}) {
return Container( return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: Row( child: GestureDetector(
children: [ onTap: () {
GestureDetector( _select = index;
onTap: () { setState(() {});
_select = index; },
setState(() {}); child: Row(
}, children: [
child: CommonRadio( CommonRadio(
value: index, value: index,
groupValue: _select, groupValue: _select,
size: 32.w, size: 32.w,
), ),
), 24.w.widthBox,
24.w.widthBox, Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: [
children: [ kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(),
kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(), 16.w.heightBox,
16.w.heightBox, BeeParse.getEstateName(estateName)
BeeParse.getEstateName(estateName) .text
.text .color(ktextPrimary)
.color(ktextPrimary) .size(28.sp)
.size(28.sp) .bold
.bold .make(),
.make(), ],
], ),
), Spacer(),
Spacer(), currentHouse == estateName
currentHouse == estateName ? _currentHouseTag()
? _currentHouseTag() : paid
: paid ? _unPaidTag()
? _unPaidTag() : SizedBox()
: SizedBox() ],
], ).material(color: Colors.transparent),
), ),
); );
} }

@ -1,4 +1,8 @@
// Flutter imports: // 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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -31,79 +35,126 @@ class _VisitorAccessPageState extends State<VisitorAccessPage> {
TextEditingController _userCarNum = new TextEditingController(); TextEditingController _userCarNum = new TextEditingController();
DateTime dateTime; DateTime dateTime;
int _selectSex; int _selectSex;
Widget _house() { // Widget _house() {
return Container( // return Container(
padding: EdgeInsets.only( // padding: EdgeInsets.only(
left: 36.w, // left: 36.w,
right: 36.w, // right: 36.w,
top: 32.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( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( '报修房屋'.text.black.size(28.sp).make(),
'来访房屋', 32.w.heightBox,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), GestureDetector(
), onTap: () {
SizedBox(height: 32.w), MyHousePage().to();
Container( },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Image.asset(
mainAxisAlignment: MainAxisAlignment.start, R.ASSETS_ICONS_HOUSE_PNG,
children: [ width: 60.w,
Image.asset( height: 60.w,
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( 40.w.widthBox,
alignment: Alignment.center, Expanded(
padding: EdgeInsets.symmetric( child: Column(
vertical: 14.w, crossAxisAlignment: CrossAxisAlignment.start,
horizontal: 21.w, children: [
), title.text.black.size(32.sp).bold.make(),
decoration: BoxDecoration( 10.w.heightBox,
color: Color(0xffFEC200), detail.text.black.size(32.sp).bold.make()
borderRadius: BorderRadius.all(Radius.circular(4)), ],
),
child: Text(
'邀请客户填写',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 28.sp,
color: Color(0xff333333)),
), ),
), ),
Icon(
CupertinoIcons.chevron_forward,
size: 40.w,
),
], ],
), ).material(color: Colors.transparent),
), ),
SizedBox(height: 26.w), 24.w.heightBox,
Divider(), BeeDivider.horizontal(),
], ],
), ),
); );
@ -339,7 +390,12 @@ class _VisitorAccessPageState extends State<VisitorAccessPage> {
}, },
child: Column( child: Column(
children: [ children: [
_house(), _buildHouseCard(
kEstateName,
userProvider.userDetailModel.estateNames.isEmpty
? ''
: BeeParse.getEstateName(
userProvider.userDetailModel.estateNames[0])),
_input('访客姓名', '请输入访客姓名', _userName), _input('访客姓名', '请输入访客姓名', _userName),
_sexSelect(), _sexSelect(),
_input('是否驾车', '请输入,例如浙A88888(没有驾车可不填)', _userCarNum), _input('是否驾车', '请输入,例如浙A88888(没有驾车可不填)', _userCarNum),

@ -13,6 +13,7 @@ import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.dart'; import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart'; import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:common_utils/common_utils.dart';
class QuestionnairePage extends StatefulWidget { class QuestionnairePage extends StatefulWidget {
QuestionnairePage({Key key}) : super(key: key); QuestionnairePage({Key key}) : super(key: key);
@ -43,94 +44,107 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
} }
Widget _buildCard(QuestionnaireModel model) { Widget _buildCard(QuestionnaireModel model) {
return Container( return GestureDetector(
decoration: BoxDecoration( onTap: () {
borderRadius: BorderRadius.circular(8.w), QuestionnaireDetailPage(
color: kForeGroundColor, id: model.id,
), ).to();
width: double.infinity, },
// height: 236.w, child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w), decoration: BoxDecoration(
child: Column( borderRadius: BorderRadius.circular(8.w),
mainAxisSize: MainAxisSize.min, color: kForeGroundColor,
children: [ ),
Row( width: double.infinity,
children: [ // height: 236.w,
Container( padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w),
decoration: child: Column(
BoxDecoration(borderRadius: BorderRadius.circular(8.w)), mainAxisSize: MainAxisSize.min,
width: 160.w, children: [
height: 120.w, Row(
child: ClipRRect( children: [
child: FadeInImage.assetNetwork( Container(
placeholder: R.ASSETS_IMAGES_LOGO_PNG, decoration:
image: API.image(model.imgUrls.first.url)), 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,
20.w.widthBox, Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ model.title.text.black.size(28.sp).make(),
model.title.text.black.size(28.sp).make(), 6.w.heightBox,
6.w.heightBox, model.description.text
model.description.text .color(ktextSubColor)
.color(ktextSubColor) .size(28.sp)
.size(28.sp) .maxLines(1)
.maxLines(1) .overflow(TextOverflow.ellipsis)
.overflow(TextOverflow.ellipsis) .make(),
.make(), 6.w.heightBox,
6.w.heightBox, RichText(
RichText( text: TextSpan(
text: TextSpan( text: '参与时间:',
text: '参与时间:', style: TextStyle(
style: TextStyle( color: ktextSubColor,
color: ktextSubColor, fontSize: 24.sp,
fontSize: 24.sp, ),
), children: [
children: [ TextSpan(
TextSpan( style: TextStyle(
style: TextStyle( color: ktextPrimary,
color: ktextPrimary, fontSize: 24.sp,
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()
], ],
).expand() ),
], 40.w.heightBox,
), Row(
40.w.heightBox, children: [
Row( StackAvatar(
children: [ avatars: model.headImgURls.map((e) => e.url).toList()),
StackAvatar( 26.w.widthBox,
avatars: model.headImgURls.map((e) => e.url).toList()), '${model.answerNum}人已参加'.text.black.size(20.sp).make(),
26.w.widthBox, Spacer(),
'${model.answerNum}人已参加'.text.black.size(20.sp).make(), MaterialButton(
Spacer(), shape: RoundedRectangleBorder(
MaterialButton( borderRadius: BorderRadius.circular(22.w)),
shape: RoundedRectangleBorder( color: model.status == 3 ? kDarkSubColor : kPrimaryColor,
borderRadius: BorderRadius.circular(22.w)), minWidth: 120.w,
color: model.status == 3 ? kDarkSubColor : kPrimaryColor, height: 44.w,
minWidth: 120.w, // padding:
height: 44.w, // EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
// padding: elevation: 0,
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w), onPressed: () {
elevation: 0, QuestionnaireDetailPage(
onPressed: () { id: model.id,
QuestionnaireDetailPage(id: model.id,).to(); ).to();
}, },
child: (_getButtonText(model.status)) child: (_getButtonText(model.status))
.text .text
.black .black
.size(20.sp) .size(20.sp)
.bold .bold
.make(), .make(),
), ),
], ],
) )
], ],
), ),
).material(color: Colors.transparent),
); );
} }

Loading…
Cancel
Save