添加终止合同无租赁房屋时的提示语

添加 公摊缴费模块
fix some issues
hmxc
张萌 3 years ago
parent 7987d41f41
commit 633946636f

@ -304,6 +304,13 @@ class _Manager {
///app ///app
String get houseKeepingEvaluation => '/user/housekeepingService/evaluation'; String get houseKeepingEvaluation => '/user/housekeepingService/evaluation';
///
String get sharePayList => '/user/meterReadingShareDetails/findAllUnPayList';
///app:
String get sharePayRecord =>
'/user/meterReadingShareDetails/findAllMeterShareOrderByTel';
} }
class _Community { class _Community {
@ -531,6 +538,14 @@ class _Pay {
///- ///-
String get houseKeepingServieceOrderCheck => String get houseKeepingServieceOrderCheck =>
'/user/alipay/housekeepingServiceOrderCheckAlipay'; '/user/alipay/housekeepingServiceOrderCheckAlipay';
///app - ( APP )
String get sharePayOrderCode =>
'/user/alipay/meterReadingShareDetailsOrderAlipay';
///-
String get sharePayOrderCodeCheck =>
'/user/alipay/meterReadingShareDetailsOrderCheckAlipay';
} }
class _House { class _House {

@ -1,7 +1,5 @@
// import 'package:aku_community/widget/bee_scaffold.dart'; // import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/community_introduce/community_introduce_page.dart'; import 'package:aku_community/pages/community_introduce/community_introduce_page.dart';
import 'package:aku_community/pages/convenient_phone/convenient_phone_page.dart'; import 'package:aku_community/pages/convenient_phone/convenient_phone_page.dart';
@ -11,7 +9,7 @@ import 'package:aku_community/pages/express_packages/express_package_page.dart';
import 'package:aku_community/pages/goods_deto_page/goods_deto_page.dart'; import 'package:aku_community/pages/goods_deto_page/goods_deto_page.dart';
import 'package:aku_community/pages/goods_manage_page/select_borrow_return_page.dart'; import 'package:aku_community/pages/goods_manage_page/select_borrow_return_page.dart';
import 'package:aku_community/pages/industry_committee/industry_committee_page.dart'; import 'package:aku_community/pages/industry_committee/industry_committee_page.dart';
import 'package:aku_community/pages/life_pay/life_pay_page.dart'; import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart';
import 'package:aku_community/pages/one_alarm/widget/alarm_page.dart'; import 'package:aku_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_community/pages/opening_code_page/opening_code_page.dart'; import 'package:aku_community/pages/opening_code_page/opening_code_page.dart';
import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_page.dart'; import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_page.dart';
@ -29,6 +27,7 @@ import 'package:aku_community/ui/profile/car/car_manage_page.dart';
import 'package:aku_community/ui/profile/car_parking/car_parking_page.dart'; import 'package:aku_community/ui/profile/car_parking/car_parking_page.dart';
import 'package:aku_community/ui/profile/house/house_owners_page.dart'; import 'package:aku_community/ui/profile/house/house_owners_page.dart';
import 'package:aku_community/widget/others/user_tool.dart'; import 'package:aku_community/widget/others/user_tool.dart';
import 'package:flutter/material.dart';
/// ///
///Application Object ///Application Object
@ -72,7 +71,7 @@ List<AO> appObjects = [
AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG, AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG,
() => VisitorAccessPage()), () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_APPLICATIONS_FIX_PNG, () => FixedSubmitPage()), AO('报事报修', R.ASSETS_APPLICATIONS_FIX_PNG, () => FixedSubmitPage()),
AO('生活缴费', R.ASSETS_APPLICATIONS_PAYMENT_PNG, () => LifePayPage()), AO('生活缴费', R.ASSETS_APPLICATIONS_PAYMENT_PNG, () => LifePayChoosePage()),
AO('业委会', R.ASSETS_APPLICATIONS_COMMITTEE_PNG, () => IndustryCommitteePage()), AO('业委会', R.ASSETS_APPLICATIONS_COMMITTEE_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_APPLICATIONS_ADVICE_PNG, AO('建议咨询', R.ASSETS_APPLICATIONS_ADVICE_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)), () => AdvicePage(type: AdviceType.SUGGESTION)),

@ -1,48 +0,0 @@
import 'package:flustars/flustars.dart';
class UserInfoModel {
int? id;
String? imgUrl;
String? name;
String? nickName;
String? tel;
/// 1. 2.
int? sex;
String? birthday;
String get sexValue {
if (sex == null) return '未设置';
if (sex == 1) return '';
if (sex == 2) return '';
return '未设置';
}
DateTime? get birthdayDate => DateUtil.getDateTime(birthday!);
String get birthdayValue {
if (TextUtil.isEmpty(birthday))
return '未设置';
else
return DateUtil.formatDate(birthdayDate, format: 'yyyy-MM-dd');
}
UserInfoModel(
{this.id,
this.imgUrl,
this.name,
this.nickName,
this.tel,
this.sex,
this.birthday});
UserInfoModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
if (json['imgUrls'] != null && (json['imgUrls'] as List).length != 0)
imgUrl = (json['imgUrls'] as List).first['url'];
name = json['name'];
nickName = json['nickName'];
tel = json['tel'];
sex = json['sex'];
birthday = json['birthday'];
}
}

@ -0,0 +1,124 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'share_pay_list_model.g.dart';
@JsonSerializable(createToJson: true)
class SharePayListModel extends Equatable {
final int id;
final String months;
final int type;
final int num;
final double total;
final List<AppMeterShareDetailsVos> appMeterShareDetailsVos;
factory SharePayListModel.fromJson(Map<String, dynamic> json) =>
_$SharePayListModelFromJson(json);
Map<String, dynamic> toJson() => _$SharePayListModelToJson(this);
@override
List<Object?> get props =>
[id, months, type, num, total, appMeterShareDetailsVos];
const SharePayListModel({
required this.id,
required this.months,
required this.type,
required this.num,
required this.total,
required this.appMeterShareDetailsVos,
});
SharePayListModel copyWith({
int? id,
String? months,
int? type,
int? num,
double? total,
List<AppMeterShareDetailsVos>? appMeterShareDetailsVos,
}) {
return SharePayListModel(
id: id ?? this.id,
months: months ?? this.months,
type: type ?? this.type,
num: num ?? this.num,
total: total ?? this.total,
appMeterShareDetailsVos:
appMeterShareDetailsVos ?? this.appMeterShareDetailsVos,
);
}
}
@JsonSerializable(createToJson: true)
class AppMeterShareDetailsVos extends Equatable {
final int id;
final double houseArea;
final double amountPayable;
final double paidAmount;
final double remainingUnpaidAmount;
final int status;
final double rate;
final String paymentPeriod;
final String? paymentTime;
final double lateFree;
factory AppMeterShareDetailsVos.fromJson(Map<String, dynamic> json) =>
_$AppMeterShareDetailsVosFromJson(json);
Map<String, dynamic> toJson() => _$AppMeterShareDetailsVosToJson(this);
@override
List<Object?> get props => [
id,
houseArea,
amountPayable,
paidAmount,
remainingUnpaidAmount,
status,
rate,
paymentPeriod,
paymentTime,
lateFree
];
const AppMeterShareDetailsVos({
required this.id,
required this.houseArea,
required this.amountPayable,
required this.paidAmount,
required this.remainingUnpaidAmount,
required this.status,
required this.rate,
required this.paymentPeriod,
this.paymentTime,
required this.lateFree,
});
AppMeterShareDetailsVos copyWith({
int? id,
double? houseArea,
double? amountPayable,
double? paidAmount,
double? remainingUnpaidAmount,
int? status,
double? rate,
String? paymentPeriod,
String? paymentTime,
double? lateFree,
}) {
return AppMeterShareDetailsVos(
id: id ?? this.id,
houseArea: houseArea ?? this.houseArea,
amountPayable: amountPayable ?? this.amountPayable,
paidAmount: paidAmount ?? this.paidAmount,
remainingUnpaidAmount:
remainingUnpaidAmount ?? this.remainingUnpaidAmount,
status: status ?? this.status,
rate: rate ?? this.rate,
paymentPeriod: paymentPeriod ?? this.paymentPeriod,
paymentTime: paymentTime ?? this.paymentTime,
lateFree: lateFree ?? this.lateFree,
);
}
}

@ -0,0 +1,61 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'share_pay_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SharePayListModel _$SharePayListModelFromJson(Map<String, dynamic> json) {
return SharePayListModel(
id: json['id'] as int,
months: json['months'] as String,
type: json['type'] as int,
num: json['num'] as int,
total: (json['total'] as num).toDouble(),
appMeterShareDetailsVos: (json['appMeterShareDetailsVos'] as List<dynamic>)
.map((e) => AppMeterShareDetailsVos.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
Map<String, dynamic> _$SharePayListModelToJson(SharePayListModel instance) =>
<String, dynamic>{
'id': instance.id,
'months': instance.months,
'type': instance.type,
'num': instance.num,
'total': instance.total,
'appMeterShareDetailsVos': instance.appMeterShareDetailsVos,
};
AppMeterShareDetailsVos _$AppMeterShareDetailsVosFromJson(
Map<String, dynamic> json) {
return AppMeterShareDetailsVos(
id: json['id'] as int,
houseArea: (json['houseArea'] as num).toDouble(),
amountPayable: (json['amountPayable'] as num).toDouble(),
paidAmount: (json['paidAmount'] as num).toDouble(),
remainingUnpaidAmount: (json['remainingUnpaidAmount'] as num).toDouble(),
status: json['status'] as int,
rate: (json['rate'] as num).toDouble(),
paymentPeriod: json['paymentPeriod'] as String,
paymentTime: json['paymentTime'] as String?,
lateFree: (json['lateFree'] as num).toDouble(),
);
}
Map<String, dynamic> _$AppMeterShareDetailsVosToJson(
AppMeterShareDetailsVos instance) =>
<String, dynamic>{
'id': instance.id,
'houseArea': instance.houseArea,
'amountPayable': instance.amountPayable,
'paidAmount': instance.paidAmount,
'remainingUnpaidAmount': instance.remainingUnpaidAmount,
'status': instance.status,
'rate': instance.rate,
'paymentPeriod': instance.paymentPeriod,
'paymentTime': instance.paymentTime,
'lateFree': instance.lateFree,
};

@ -0,0 +1,30 @@
import 'package:json_annotation/json_annotation.dart';
part 'share_pay_record_model.g.dart';
@JsonSerializable()
class SharePayRecordModel {
final double payPrice;
final String paymentTime;
final int payType;
final String code;
final String months;
final String effectiveTimeStart;
final String effectiveTimeEnd;
final double shareUnitPrice;
final double indoorArea;
factory SharePayRecordModel.fromJson(Map<String, dynamic> json) =>
_$SharePayRecordModelFromJson(json);
const SharePayRecordModel({
required this.payPrice,
required this.paymentTime,
required this.payType,
required this.code,
required this.months,
required this.effectiveTimeStart,
required this.effectiveTimeEnd,
required this.shareUnitPrice,
required this.indoorArea,
});
}

@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'share_pay_record_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SharePayRecordModel _$SharePayRecordModelFromJson(Map<String, dynamic> json) {
return SharePayRecordModel(
payPrice: (json['payPrice'] as num).toDouble(),
paymentTime: json['paymentTime'] as String,
payType: json['payType'] as int,
code: json['code'] as String,
months: json['months'] as String,
effectiveTimeStart: json['effectiveTimeStart'] as String,
effectiveTimeEnd: json['effectiveTimeEnd'] as String,
shareUnitPrice: (json['shareUnitPrice'] as num).toDouble(),
indoorArea: (json['indoorArea'] as num).toDouble(),
);
}

@ -0,0 +1,47 @@
import 'package:aku_community/model/common/img_model.dart';
import 'package:flustars/flustars.dart';
import 'package:json_annotation/json_annotation.dart';
part 'user_info_model.g.dart';
@JsonSerializable()
class UserInfoModel {
int id;
List<ImgModel> imgUrls;
String name;
String nickName;
String tel;
/// 1. 2.
int? sex;
String birthday;
String get sexValue {
if (sex == null) return '未设置';
if (sex == 1) return '';
if (sex == 2) return '';
return '未设置';
}
DateTime? get birthdayDate => DateUtil.getDateTime(birthday);
String get birthdayValue {
if (TextUtil.isEmpty(birthday))
return '未设置';
else
return DateUtil.formatDate(birthdayDate, format: 'yyyy-MM-dd');
}
factory UserInfoModel.fromJson(Map<String, dynamic> json) =>
_$UserInfoModelFromJson(json);
UserInfoModel({
required this.id,
required this.imgUrls,
required this.name,
required this.nickName,
required this.tel,
this.sex,
required this.birthday,
});
}

@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_info_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) {
return UserInfoModel(
id: json['id'] as int,
imgUrls: (json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
name: json['name'] as String,
nickName: json['nickName'] as String,
tel: json['tel'] as String,
sex: json['sex'] as int?,
birthday: json['birthday'] as String,
);
}

@ -0,0 +1,62 @@
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/extensions/widget_list_ext.dart';
import 'package:aku_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_community/pages/share_pay_page/share_pay_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class LifePayChoosePage extends StatefulWidget {
const LifePayChoosePage({Key? key}) : super(key: key);
@override
_LifePayChoosePageState createState() => _LifePayChoosePageState();
}
class _LifePayChoosePageState extends State<LifePayChoosePage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '生活缴费',
body: ListView(
padding: EdgeInsets.symmetric(vertical: 40.w, horizontal: 36.w),
children: [
_buidTile(R.ASSETS_ICONS_GOODS_BORROW_PNG, '生活缴费', true),
_buidTile(R.ASSETS_ICONS_GOODS_BORROW_PNG, '公摊缴费', false),
].sepWidget(separate: 20.w.heightBox),
),
);
}
Widget _buidTile(String iconPath, String text, bool isBorrow) {
return Row(
children: [
SizedBox(
width: 32.w,
height: 32.w,
child: Image.asset(iconPath),
),
28.w.widthBox,
text.text.black.size(30.sp).make(),
Spacer(),
Icon(
CupertinoIcons.chevron_forward,
size: 32.w,
),
],
)
.box
.padding(EdgeInsets.symmetric(vertical: 40.w, horizontal: 32.w))
.make()
.onInkTap(() {
isBorrow ? Get.to(() => LifePayPage()) : Get.to(() => SharePayPage());
}).material(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
clipBehavior: Clip.antiAlias,
);
}
}

@ -1,11 +1,4 @@
import 'package:flutter/cupertino.dart'; import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart' hide Response;
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
@ -26,6 +19,13 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_check_radio.dart'; import 'package:aku_community/widget/buttons/bee_check_radio.dart';
import 'package:aku_community/widget/others/house_head_card.dart'; import 'package:aku_community/widget/others/house_head_card.dart';
import 'package:aku_community/widget/others/user_tool.dart'; import 'package:aku_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart' hide Response;
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class LifePayPage extends StatefulWidget { class LifePayPage extends StatefulWidget {
LifePayPage({Key? key}) : super(key: key); LifePayPage({Key? key}) : super(key: key);
@ -49,11 +49,11 @@ class _LifePayPageState extends State<LifePayPage> {
int _page = 0; int _page = 0;
int _size = 10; int _size = 10;
double _prePrice = 0; double _prePrice = 0;
List<LifePayListModel> _selectModels = []; //models List<LifePayListModel> _selectModels = []; //models
bool get allSelect => bool get allSelect =>
((_models.length == _selectYears.length) && (_models.length != 0)); ((_models.length == _selectYears.length) && (_models.length != 0));
SelectPay get total { SelectPay get total {
int count = 0; int count = 0;
double price = 0; double price = 0;
@ -306,7 +306,7 @@ class _LifePayPageState extends State<LifePayPage> {
// _selectPay.clear(); // _selectPay.clear();
_selectYears.clear(); _selectYears.clear();
_selectModels = _models _selectModels = _models
.map((e) => LifePayListModel.fromJson(e.toJson())) .map((e) => LifePayListModel.fromJson(jsonDecode(jsonEncode(e))))
.toList(); .toList();
for (var i = 0; i < _selectModels.length; i++) { for (var i = 0; i < _selectModels.length; i++) {
_selectYears.add(i); _selectYears.add(i);

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
@ -17,9 +9,16 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/ui/profile/order/order_page.dart'; import 'package:aku_community/ui/profile/order/order_page.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/views/application_view.dart'; import 'package:aku_community/widget/views/application_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class PersonalIndex extends StatefulWidget { class PersonalIndex extends StatefulWidget {
final bool? isSign; final bool? isSign;
PersonalIndex({Key? key, this.isSign}) : super(key: key); PersonalIndex({Key? key, this.isSign}) : super(key: key);
@override @override
@ -72,8 +71,11 @@ class _PersonalIndexState extends State<PersonalIndex>
child: ClipOval( child: ClipOval(
child: FadeInImage.assetNetwork( child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image( image: API.image(userProvider
userProvider.userInfoModel?.imgUrl ?? ''), .userInfoModel!.imgUrls.isNotEmpty
? userProvider
.userInfoModel?.imgUrls.first.url
: ''),
height: 106.w, height: 106.w,
width: 106.w, width: 106.w,
fit: BoxFit.cover, fit: BoxFit.cover,

@ -1,14 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
@ -22,6 +13,13 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/picker/bee_custom_picker.dart'; import 'package:aku_community/widget/picker/bee_custom_picker.dart';
import 'package:aku_community/widget/picker/bee_date_picker.dart'; import 'package:aku_community/widget/picker/bee_date_picker.dart';
import 'package:aku_community/widget/picker/bee_image_picker.dart'; import 'package:aku_community/widget/picker/bee_image_picker.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class UserProfilePage extends StatefulWidget { class UserProfilePage extends StatefulWidget {
UserProfilePage({Key? key}) : super(key: key); UserProfilePage({Key? key}) : super(key: key);
@ -32,6 +30,7 @@ class UserProfilePage extends StatefulWidget {
class _UserProfilePageState extends State<UserProfilePage> { class _UserProfilePageState extends State<UserProfilePage> {
int _sex = 1; int _sex = 1;
Widget _buildTile(String title, Widget suffix, {VoidCallback? onPressed}) { Widget _buildTile(String title, Widget suffix, {VoidCallback? onPressed}) {
return MaterialButton( return MaterialButton(
color: Colors.white, color: Colors.white,
@ -95,7 +94,10 @@ class _UserProfilePageState extends State<UserProfilePage> {
child: ClipOval( child: ClipOval(
child: FadeInImage.assetNetwork( child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(userProvider.userInfoModel?.imgUrl ?? ''), image: API.image(
userProvider.userInfoModel!.imgUrls.isNotEmpty
? userProvider.userInfoModel?.imgUrls.first.url
: ''),
height: 56.w, height: 56.w,
width: 56.w, width: 56.w,
fit: BoxFit.cover, fit: BoxFit.cover,

@ -0,0 +1,298 @@
import 'dart:convert';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/models/life_pay/share_pay_list_model.dart';
import 'package:aku_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_check_radio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class SharePayDetailPage extends StatefulWidget {
final SharePayListModel model;
final SharePayListModel selectModel;
final String months;
const SharePayDetailPage(
{Key? key,
required this.model,
required this.selectModel,
required this.months})
: super(key: key);
@override
_SharePayDetailPageState createState() => _SharePayDetailPageState();
}
class _SharePayDetailPageState extends State<SharePayDetailPage> {
late SharePayListModel _selectModel; //model
late SharePayListModel _model;
SelectPay get total {
int count = 0;
double price = 0;
List<int> ids = [];
_selectModel.appMeterShareDetailsVos.forEach((element) {
count++;
price += element.remainingUnpaidAmount;
ids.add(element.id);
});
return SelectPay(payCount: count, payTotal: price, ids: ids);
}
bool get isAllSelect {
return total.payCount == widget.model.num && total.payCount != 0;
}
@override
void initState() {
super.initState();
_selectModel =
SharePayListModel.fromJson(jsonDecode(jsonEncode(widget.selectModel)));
_model = widget.model;
}
// Widget _expandedTile(AppMeterShareDetailsVos model, int index) {
// return ExpandablePanel(
// theme: ExpandableThemeData.combine(
// ExpandableThemeData(
// headerAlignment: ExpandablePanelHeaderAlignment.center),
// ExpandableThemeData.defaults),
// header: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// 12.w.widthBox,
// Spacer(),
// '¥${(model.remainingUnpaidAmount ).toStringAsFixed(2)}'
// .text
// .color(kDangerColor)
// .size(28.sp)
// .bold
// .make(),
// 24.w.widthBox,
// ],
// ).material(color: Colors.transparent),
// collapsed: SizedBox(),
// expanded: Column(
// children: model.detailsVoList
// .map((e) => _expandedChild(e, index1, index2))
// .toList()),
// );
// }
Widget _expandedChild(AppMeterShareDetailsVos model, int index) {
return GestureDetector(
onTap: () {
if (_selectModel.appMeterShareDetailsVos.contains(model)) {
_selectModel.appMeterShareDetailsVos.remove(model);
setState(() {});
} else {
_selectModel.appMeterShareDetailsVos.add(model);
setState(() {});
}
},
child: Padding(
padding: EdgeInsets.all(8.w),
child: Column(
children: [
Row(
children: [
BeeCheckRadio(
value: model.id,
groupValue: total.ids,
),
12.w.widthBox,
'房屋面积'.text.size(26.sp).black.make(),
12.wb,
('${model.houseArea}平方米')
.toString()
.text
.size(26.sp)
.black
.make(),
Spacer(),
'未缴金额'.text.size(26.sp).red500.make(),
12.wb,
'¥${(model.remainingUnpaidAmount).toStringAsFixed(2)}'
.text
.size(26.sp)
.black
.make(),
40.w.widthBox,
],
),
Row(
children: [
52.w.widthBox,
'应缴金额'.text.size(26.sp).black.make(),
12.wb,
'¥${model.amountPayable}'
.toString()
.text
.size(26.sp)
.black
.make(),
Spacer(),
],
),
Row(
children: [
52.w.widthBox,
'已缴金额'.text.size(26.sp).black.make(),
12.wb,
'¥${model.paidAmount}'.toString().text.size(26.sp).black.make(),
Spacer(),
],
),
// Row(
// children: [
// 52.w.widthBox,
// '缴费期限'.text.size(26.sp).black.make(),
// 12.wb,
// model.paidAmount.toString().text.size(26.sp).black.make(),
// Spacer(),
// ],
// )
].sepWidget(separate: 24.w.heightBox),
),
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w))
.make(),
);
}
Widget _buildCard(AppMeterShareDetailsVos model, int index) {
final appProvider = Provider.of<AppProvider>(context);
return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 20.w),
child: Column(
children: [
Row(
children: [
model.houseArea.text.black.size(30.sp).bold.make(),
Spacer(),
'${S.of(context)!.tempPlotName} ${appProvider.selectedHouse!.estateId}'
.text
.color(ktextSubColor)
.size(24.sp)
.make(),
_expandedChild(
model,
index,
)
],
),
],
),
);
}
SharePayListModel clearModel(SharePayListModel model) {
model.appMeterShareDetailsVos.clear();
return model;
}
Map<int, String> getType = {
1: '水费',
2: '电费',
};
@override
Widget build(BuildContext context) {
var animatedContainer = AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
border: Border.all(
width: 1.w, color: isAllSelect ? kPrimaryColor : kDarkSubColor),
color: isAllSelect ? kPrimaryColor : Colors.transparent,
borderRadius: BorderRadius.circular(20.w)),
curve: Curves.easeInOutCubic,
width: 40.w,
height: 40.w,
child: isAllSelect
? Icon(
CupertinoIcons.check_mark,
size: 25.w,
color: Colors.white,
)
: SizedBox(),
);
return BeeScaffold(
title: '公摊${getType[widget.model.type]}(${widget.months})',
body: ListView(
padding: EdgeInsets.only(top: 16.w),
children: List.generate(
_model.appMeterShareDetailsVos.length,
(index) => _expandedChild(
_model.appMeterShareDetailsVos[index], index))),
bottomNavi: Container(
padding: EdgeInsets.fromLTRB(
32.w, 16.w, 32.w, 12.w + MediaQuery.of(context).padding.bottom),
child: Row(
children: [
GestureDetector(
onTap: () {
if (isAllSelect) {
clearModel(_selectModel);
} else {
_selectModel = SharePayListModel.fromJson(
jsonDecode(jsonEncode(_model)));
}
setState(() {});
},
child: animatedContainer,
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 32.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
'已选${total.payCount}'
.text
.color(ktextSubColor)
.size(20.sp)
.make(),
],
),
8.w.widthBox,
MaterialButton(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(37.w)),
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () {
Get.back(result: _selectModel);
},
child: '选好了'.text.black.size(32.sp).bold.make(),
),
],
),
),
);
}
}

@ -0,0 +1,404 @@
import 'dart:convert';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/extensions/widget_list_ext.dart';
import 'package:aku_community/models/life_pay/share_pay_list_model.dart';
import 'package:aku_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_community/pages/life_pay/pay_util.dart';
import 'package:aku_community/pages/share_pay_page/share_pay_detail_page.dart';
import 'package:aku_community/pages/share_pay_page/share_record_page.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_check_radio.dart';
import 'package:aku_community/widget/others/house_head_card.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_easyrefresh/material_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class SharePayPage extends StatefulWidget {
const SharePayPage({Key? key}) : super(key: key);
@override
_SharePayPageState createState() => _SharePayPageState();
}
class _SharePayPageState extends State<SharePayPage> {
EasyRefreshController? _controller;
List<SharePayListModel> _models = []; //model,
double _prePrice = 0;
List<int> _selectYears = []; //
List<SharePayListModel> _selectModels = []; //models
bool get allSelect =>
((_models.length == _selectYears.length) && (_models.length != 0));
SelectPay get total {
int count = 0;
double price = 0;
List<int> ids = [];
for (var i in _selectYears) {
SelectPay _select = selectCount(_selectModels[i]);
count += _select.payCount;
price += _select.payTotal;
ids.addAll(_select.ids);
}
return SelectPay(payCount: count, payTotal: price, ids: ids);
}
SelectPay selectCount(SharePayListModel model) {
int count = 0;
double price = 0;
List<int> ids = [];
model.appMeterShareDetailsVos.forEach((element) {
count++;
price += element.remainingUnpaidAmount;
ids.add(element.id);
});
return SelectPay(payCount: count, payTotal: price, ids: ids);
}
Map<int, String> getType = {
1: '水费',
2: '电费',
};
@override
void initState() {
super.initState();
_controller = EasyRefreshController();
}
@override
void dispose() {
_controller?.dispose();
BotToast.closeAllLoading();
super.dispose();
}
Widget _buildCard(SharePayListModel model, int index) {
SelectPay _select = selectCount(_selectModels[index]);
return Container(
padding: EdgeInsets.symmetric(vertical: 20.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), color: kForeGroundColor),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
setState(() {
if (_selectYears.contains(index)) {
_selectYears.remove(index);
} else {
_selectYears.add(index);
}
});
},
child: BeeCheckRadio(
value: index,
groupValue: _selectYears,
),
),
],
),
24.w.widthBox,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
'公摊${getType[model.type]}(${model.months})'
.text
.color(ktextSubColor)
.size(28.sp)
.make(),
24.w.heightBox,
'待缴:${model.num}项 已选${_select.payCount}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
24.w.heightBox,
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '¥ ${_select.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold)),
]))
],
).expand(),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
GestureDetector(
onTap: () async {
if (_selectYears.contains(index)) {}
dynamic payMent = await (Get.to(() => SharePayDetailPage(
model: _models[index],
selectModel: _selectModels[index],
months: model.months,
)));
if (payMent.runtimeType == SharePayListModel) {
_selectModels[index] = payMent;
}
setState(() {});
},
child: Container(
decoration: BoxDecoration(
color: Color(0xFF2A2A2A),
borderRadius: BorderRadius.circular(22.w),
),
padding:
EdgeInsets.symmetric(horizontal: 20.w, vertical: 8.w),
child: '选择明细'.text.color(Colors.white).size(22.sp).make(),
),
),
],
),
],
),
);
}
Widget _payButton() {
return MaterialButton(
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(37.w)),
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () async {
Function cancel = BotToast.showLoading();
BaseModel baseModel =
await NetUtil().post(API.pay.sharePayOrderCode, params: {
"ids": total.ids,
"payType": 1, //
"payPrice": total.payTotal.toDoubleStringAsFixed()
});
if (baseModel.status ?? false) {
bool result = await PayUtil()
.callAliPay(baseModel.message!, API.pay.sharePayOrderCodeCheck);
if (result) {
Get.off(() => PayFinishPage());
}
}
cancel();
},
child: '去缴费'.text.black.size(32.sp).bold.make(),
);
}
Widget _buildPrePayment() {
return Container(
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
width: double.infinity,
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'当前预缴'.text.size(28.sp).color(ktextSubColor).make(),
30.w.heightBox,
Row(
children: [
'¥'.text.size(28.sp).black.make(),
16.w.widthBox,
_prePrice.text.size(40.sp).black.bold.make(),
Spacer(),
MaterialButton(
elevation: 0,
height: 50.w,
padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 25.w),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.w),
side: BorderSide(color: Color(0xFF979797), width: 1.w)),
color: Colors.white,
onPressed: () {
// Get.to(() => LifePrePayPage(
// prePay: _prePrice,
// ));
},
child: '预缴充值'.text.size(28.sp).black.make(),
)
],
),
],
),
);
}
// Future<double> _dailyPaymentPrePay() async {
// BaseModel baseModel =
// await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
// "estateId": UserTool.appProveider.selectedHouse!.estateId,
// });
// if (baseModel.status ?? false) {
// return (baseModel.data as num).toDouble();
// } else {
// return 0;
// }
// }
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '公摊缴费',
actions: [
InkWell(
onTap: () {
Get.to(() => ShareRecordPage());
},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
alignment: Alignment.center,
child: '缴费记录'.text.black.size(28.sp).make(),
),
),
],
body: EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
controller: _controller,
onRefresh: () async {
BaseModel baseModel =
await NetUtil().get(API.manager.sharePayList, params: {
'estateId': UserTool.appProveider.selectedHouse?.estateId,
});
_models = (baseModel.data as List)
.map((e) => SharePayListModel.fromJson(e))
.toList();
// _selectPay.clear();
_selectYears.clear();
_selectModels = _models
.map((e) => SharePayListModel.fromJson(jsonDecode(jsonEncode(e))))
.toList();
for (var i = 0; i < _selectModels.length; i++) {
_selectYears.add(i);
}
// _prePrice = await _dailyPaymentPrePay();
if (mounted) setState(() {});
},
child: Column(
children: [
HouseHeadCard(
onChanged: () {
_controller!.callRefresh();
},
context: context),
16.w.heightBox,
//
// _buildPrePayment(),
// 16.w.heightBox,
Container(
padding: EdgeInsets.all(32.w),
width: double.infinity,
color: kForeGroundColor,
constraints: BoxConstraints(minHeight: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'缴费账单'.text.color(ktextPrimary).size(28.sp).make(),
...List.generate(_models.length,
(index) => _buildCard(_models[index], index))
.sepWidget(separate: BeeDivider.horizontal()),
],
),
),
],
),
),
bottomNavi: Container(
color: kForeGroundColor,
padding: EdgeInsets.fromLTRB(
32.w, 16.w, 32.w, 12.w + MediaQuery.of(context).padding.bottom),
child: Row(
children: [
GestureDetector(
onTap: () {
if (allSelect) {
_selectYears.clear();
setState(() {});
} else {
_selectYears.clear();
for (var i = 0; i < _selectModels.length; i++) {
_selectYears.add(i);
}
setState(() {});
}
},
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
border: Border.all(
width: 1.w,
color: allSelect ? kPrimaryColor : kDarkSubColor),
color: allSelect ? kPrimaryColor : Colors.transparent,
borderRadius: BorderRadius.circular(20.w)),
curve: Curves.easeInOutCubic,
width: 40.w,
height: 40.w,
child: allSelect
? Icon(
CupertinoIcons.check_mark,
size: 25.w,
color: Colors.white,
)
: SizedBox(),
).material(color: Colors.transparent),
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 32.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '¥${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
'已选${total.payCount}'
.text
.color(ktextSubColor)
.size(20.sp)
.make(),
],
),
24.w.widthBox,
_payButton(),
],
),
),
);
}
}

@ -0,0 +1,156 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/extensions/widget_list_ext.dart';
import 'package:aku_community/models/life_pay/share_pay_record_model.dart';
import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class ShareRecordPage extends StatefulWidget {
const ShareRecordPage({Key? key}) : super(key: key);
@override
_ShareRecordPageState createState() => _ShareRecordPageState();
}
class _ShareRecordPageState extends State<ShareRecordPage> {
EasyRefreshController? _refreshController;
Map<int, String> getPayType = {
1: '支付宝',
2: '微信',
3: '现金',
4: 'pos',
5: '预缴扣除'
};
@override
void initState() {
super.initState();
_refreshController = EasyRefreshController();
}
@override
void dispose() {
_refreshController?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '公摊缴费记录',
body: BeeListView(
path: API.manager.sharePayRecord,
extraParams: {"tel": UserTool.userProvider.userInfoModel!.tel},
controller: _refreshController,
convert: (models) {
return models.tableList!
.map((e) => SharePayRecordModel.fromJson(e))
.toList();
},
builder: (items) {
return ListView(
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
children: [
'如果有疑问,请联系物业客服 '
.richText
.withTextSpanChildren([
'400-6754322'
.textSpan
.color(Color(0xFFFF8200))
.size(24.sp)
.bold
.make()
])
.size(24.sp)
.color(ktextSubColor)
.make(),
32.w.heightBox,
...<Widget>[
...items
.map((e) => _buildRecordCard(e as SharePayRecordModel))
.toList()
].sepWidget(separate: 24.w.heightBox)
],
);
},
),
);
}
Widget _buildRecordCard(SharePayRecordModel model) {
return Column(
children: [
Row(
children: [
'公摊费用'.text.size(30.sp).color(ktextPrimary).bold.make(),
Spacer(),
'${UserTool.userProvider.userInfoModel!.tel}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make()
],
),
16.w.heightBox,
Row(
children: [
'建筑面积'.text.color(ktextSubColor).size(24.sp).make(),
Spacer(),
'${model.indoorArea}平方米'
.text
.color(Color(0xFFFC361D))
.size(28.sp)
.bold
.make()
],
),
Row(
children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.payPrice}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'缴费时间'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${DateUtil.formatDateStr(model.paymentTime, format: "yyyy/MM/dd HH:mm")}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
],
),
Row(
children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${getPayType[model.payType]}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
],
),
Row(
children: [
'订单号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
].sepWidget(separate: 24.w.heightBox),
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w))
.make();
}
}

@ -1,7 +1,7 @@
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/user/pick_building_model.dart'; import 'package:aku_community/model/user/pick_building_model.dart';
import 'package:aku_community/model/user/user_detail_model.dart'; import 'package:aku_community/model/user/user_detail_model.dart';
import 'package:aku_community/model/user/user_info_model.dart'; import 'package:aku_community/models/user/user_info_model.dart';
import 'package:aku_community/provider/sign_up_provider.dart'; import 'package:aku_community/provider/sign_up_provider.dart';
import 'package:aku_community/provider/user_provider.dart'; import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/utils/network/base_model.dart'; import 'package:aku_community/utils/network/base_model.dart';

@ -1,14 +1,16 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/sign/sign_in_page.dart';
import 'package:aku_community/ui/community/community_views/community_page.dart'; import 'package:aku_community/ui/community/community_views/community_page.dart';
import 'package:aku_community/ui/market/market_page.dart'; import 'package:aku_community/ui/market/market_page.dart';
import 'package:aku_community/utils/websocket/web_socket_util.dart'; import 'package:aku_community/utils/websocket/web_socket_util.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'home/home_page.dart'; import 'home/home_page.dart';
import 'personal/personal_page.dart'; import 'personal/personal_page.dart';
import 'property/property_index.dart'; import 'property/property_index.dart';
@ -17,6 +19,7 @@ class TabNavigator extends StatefulWidget {
const TabNavigator({ const TabNavigator({
Key? key, Key? key,
}) : super(key: key); }) : super(key: key);
@override @override
_TabNavigatorState createState() => _TabNavigatorState(); _TabNavigatorState createState() => _TabNavigatorState();
} }
@ -124,8 +127,12 @@ class _TabNavigatorState extends State<TabNavigator>
selectedFontSize: 20.sp, selectedFontSize: 20.sp,
unselectedFontSize: 20.sp, unselectedFontSize: 20.sp,
onTap: (index) { onTap: (index) {
_tabController!.animateTo(index, curve: Curves.easeInOutCubic); if (UserTool.userProvider.isLogin == false) {
setFunc(() => _currentIndex = index); Get.offAll(() => SignInPage());
} else {
_tabController!.animateTo(index, curve: Curves.easeInOutCubic);
setFunc(() => _currentIndex = index);
}
}, },
); );
}), }),

@ -1,13 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:share/share.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/pages/manager_func.dart'; import 'package:aku_community/pages/manager_func.dart';
import 'package:aku_community/provider/app_provider.dart'; import 'package:aku_community/provider/app_provider.dart';
@ -19,7 +9,15 @@ import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/common_input.dart'; import 'package:aku_community/widget/common_input.dart';
import 'package:aku_community/widget/picker/bee_date_picker.dart'; import 'package:aku_community/widget/picker/bee_date_picker.dart';
import 'package:aku_community/extensions/widget_list_ext.dart'; import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:share/share.dart';
import 'package:velocity_x/velocity_x.dart';
class VisitorAccessPage extends StatefulWidget { class VisitorAccessPage extends StatefulWidget {
VisitorAccessPage({Key? key}) : super(key: key); VisitorAccessPage({Key? key}) : super(key: key);

@ -245,8 +245,12 @@ class AppProvider extends ChangeNotifier {
/// ///
setCurrentHouse(PassedHouseListModel? model) { setCurrentHouse(PassedHouseListModel? model) {
_selectedHouse = model; if (model != null) {
_selectedHouseId = model!.estateId; _selectedHouse = model;
_selectedHouseId = model.estateId;
} else {
_selectedHouse = null;
}
notifyListeners(); notifyListeners();
} }

@ -2,7 +2,7 @@ import 'dart:io';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/user/user_detail_model.dart'; import 'package:aku_community/model/user/user_detail_model.dart';
import 'package:aku_community/model/user/user_info_model.dart'; import 'package:aku_community/models/user/user_info_model.dart';
import 'package:aku_community/pages/sign/sign_func.dart'; import 'package:aku_community/pages/sign/sign_func.dart';
import 'package:aku_community/provider/app_provider.dart'; import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/ui/profile/house/house_func.dart'; import 'package:aku_community/ui/profile/house/house_func.dart';

@ -1,13 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/extensions/widget_list_ext.dart'; import 'package:aku_community/extensions/widget_list_ext.dart';
import 'package:aku_community/models/house/lease_detail_model.dart'; import 'package:aku_community/models/house/lease_detail_model.dart';
@ -20,6 +12,12 @@ import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/others/bee_input_row.dart'; import 'package:aku_community/widget/others/bee_input_row.dart';
import 'package:aku_community/widget/others/user_tool.dart'; import 'package:aku_community/widget/others/user_tool.dart';
import 'package:aku_community/widget/picker/identify_card_picker.dart'; import 'package:aku_community/widget/picker/identify_card_picker.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class SupplementInformationPage extends StatefulWidget { class SupplementInformationPage extends StatefulWidget {
final int leaseId; final int leaseId;
@ -37,7 +35,7 @@ class _SupplementInformationPageState extends State<SupplementInformationPage> {
String _sex = '请选择性别'; String _sex = '请选择性别';
/// ///
String _tel = UserTool.userProvider.userInfoModel!.tel!; String _tel = UserTool.userProvider.userInfoModel!.tel;
/// ///
TextEditingController _codeController = TextEditingController(); TextEditingController _codeController = TextEditingController();

Loading…
Cancel
Save