# Conflicts:
#	lib/gen/assets.gen.dart
pull/1/head
章文轩 3 years ago
commit 17e136b20c

@ -4,7 +4,7 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application android:name="io.flutter.app.FlutterApplication" android:label="小蜜蜂" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config">
<application android:label="小蜜蜂" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config">
<service android:name="com.amap.api.location.APSService"></service>
<meta-data android:name="com.amap.api.v2.apikey"
android:value="f6361c0537bf2d6ddb898b10618d3726"/>

@ -34,7 +34,7 @@ ActivityDetailModel _$ActivityDetailModelFromJson(Map<String, dynamic> json) =>
organizerImgList: (json['organizerImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
isRegistration:json['isRegistration'] as int
isRegistration: json['isRegistration'] as int,
);
Registration _$RegistrationFromJson(Map<String, dynamic> json) => Registration(

@ -1,33 +1,40 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'life_pay_model.g.dart';
part 'life_pay_model.g.dart';
@JsonSerializable(createToJson: true, explicitToJson: true)
class LifePayModel extends Equatable {
final int id;
final String chargesName;
final String? chargesName;
final String billDateStart;
final String billDateEnd;
final String createDate;
final double payPrincipal;
final double defaultAmount;
factory LifePayModel.fromJson(Map<String, dynamic> json) =>
_$LifePayModelFromJson(json);
Map<String, dynamic> toJson() => _$LifePayModelToJson(this);
@override
List<Object?> get props => [
id,
chargesName,
billDateStart,
billDateEnd,
createDate,
payPrincipal,
defaultAmount
];
factory LifePayModel.fromJson(Map<String, dynamic> json) =>_$LifePayModelFromJson(json);
Map<String,dynamic> toJson()=> _$LifePayModelToJson(this);
LifePayModel({
const LifePayModel({
required this.id,
required this.chargesName,
this.chargesName,
required this.billDateStart,
required this.billDateEnd,
required this.createDate,
required this.payPrincipal,
required this.defaultAmount,
});
@override
List<Object?> get props => [id, chargesName, billDateStart,billDateEnd,createDate,payPrincipal,defaultAmount];
}

@ -8,7 +8,7 @@ part of 'life_pay_model.dart';
LifePayModel _$LifePayModelFromJson(Map<String, dynamic> json) => LifePayModel(
id: json['id'] as int,
chargesName: json['chargesName'] as String,
chargesName: json['chargesName'] as String?,
billDateStart: json['billDateStart'] as String,
billDateEnd: json['billDateEnd'] as String,
createDate: json['createDate'] as String,

@ -21,5 +21,5 @@ ReplyListModel _$ReplyListModelFromJson(Map<String, dynamic> json) =>
dynamicImgList: (json['dynamicImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
jumpId:json['jumpId'] as int
jumpId: json['jumpId'] as int,
);

@ -1,6 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:json_annotation/json_annotation.dart';
part 'user_info_model.g.dart';
@ -8,6 +7,7 @@ part 'user_info_model.g.dart';
class UserInfoModel {
final int id;
final int communityId;
final String communityName;
final String communityCode;
final String? name;
final String? idCard;
@ -44,6 +44,7 @@ class UserInfoModel {
const UserInfoModel({
required this.id,
required this.communityId,
required this.communityName,
required this.communityCode,
this.name,
this.idCard,

@ -10,6 +10,7 @@ UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) =>
UserInfoModel(
id: json['id'] as int,
communityId: json['communityId'] as int,
communityName: json['communityName'] as String,
communityCode: json['communityCode'] as String,
name: json['name'] as String?,
idCard: json['idCard'] as String?,

@ -18,10 +18,8 @@ import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/ui/home/home_notification.dart';
import 'package:aku_new_community/ui/home/home_title.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart';
import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
import 'package:aku_new_community/ui/market/search/good_detail_page.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/hive_store.dart';
import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/utils/websocket/tips_dialog.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
@ -112,17 +110,18 @@ class _HomePageState extends State<HomePage>
left: 32.w,
bottom: 20.w),
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
if (appProvider.location != null)
Image.asset(
Assets.home.icLocation.path,
width: 48.w,
height: 48.w,
),
// if (appProvider.location != null)
Image.asset(
Assets.home.icLocation.path,
width: 48.w,
height: 48.w,
),
16.wb,
Text(
appProvider.location?['city'] == null
? ''
: appProvider.location?['city'] as String? ?? '',
'${UserTool.userProvider.userInfoModel?.communityName ?? ""}',
// appProvider.location?['city'] == null
// ? ''
// : appProvider.location?['city'] as String? ?? '',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 28.sp,
@ -130,14 +129,14 @@ class _HomePageState extends State<HomePage>
),
textAlign: TextAlign.center,
),
Text(
'(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999),
),
textAlign: TextAlign.center,
),
// Text(
// '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
// style: TextStyle(
// fontSize: 28.sp,
// color: Color(0xff999999),
// ),
// textAlign: TextAlign.center,
// ),
Spacer(),
// GestureDetector(
// onTap: () {
@ -356,12 +355,7 @@ class _HomePageState extends State<HomePage>
),
),
onTap: () async {
var agreement = await HiveStore.appBox?.get('AdvicePage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('AdvicePage', true);
}
await TipsDialog.tipsDialog();
// Get.to(AdvicePage(
// type: AdviceType.SUGGESTION));
},

@ -1,22 +1,15 @@
import 'dart:convert';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart';
import 'package:aku_new_community/models/life_pay/life_pay_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_record_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pre_pay_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page.dart';
import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page_new.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/bee_parse.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
@ -42,7 +35,7 @@ class LifePayPageNew extends StatefulWidget {
class MonthPay {
double payTotal; //
List<LifePayModel> selectIds; //id
List<LifePayModel> ids;//id
List<LifePayModel> ids; //id
String itemNames; //
String timeTitle;
//
@ -50,7 +43,7 @@ class MonthPay {
{required this.payTotal,
required this.ids,
required this.itemNames,
required this.selectIds,
required this.selectIds,
required this.timeTitle});
}
@ -64,12 +57,10 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
List<int> _selectModelIndex = []; //model
bool get allSelect =>
((_selectMonths.length == _selectModelIndex.length) && (_selectMonths.length != 0));
bool get allSelect => ((_selectMonths.length == _selectModelIndex.length) &&
(_selectMonths.length != 0));
MonthPay get total {
double price = 0;
List<LifePayModel> ids = [];
for (var i in _selectModelIndex) {
@ -78,7 +69,8 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
price += model.payTotal;
ids.addAll(model.selectIds);
}
return MonthPay( payTotal: price, ids: [], selectIds: ids, itemNames: '', timeTitle: '');
return MonthPay(
payTotal: price, ids: [], selectIds: ids, itemNames: '', timeTitle: '');
}
@override
@ -86,12 +78,11 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
super.initState();
_controller = EasyRefreshController();
Future.delayed(Duration.zero,(){
if( UserTool.userProvider.defaultHouse==null){
Get.off(()=>MyHousePage());
BotToast.showText(text: '请先选择您的房屋');
Future.delayed(Duration.zero, () {
if (UserTool.userProvider.defaultHouse == null) {
Get.off(() => MyHousePage());
BotToast.showText(text: '请先选择您的房屋');
}
});
_models = [
@ -163,7 +154,7 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
Widget _buildCard(MonthPay model, int index) {
return Container(
padding: EdgeInsets.symmetric(vertical: 32.w,horizontal: 32.w),
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), color: kForeGroundColor),
child: Row(
@ -183,7 +174,8 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
});
},
child: Container(
padding: EdgeInsets.only(left: 10.w,right: 10.w,bottom: 50.w),
padding:
EdgeInsets.only(left: 10.w, right: 10.w, bottom: 50.w),
color: Colors.transparent,
child: BeeCheckRadio(
value: index,
@ -198,7 +190,11 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
model.timeTitle.text.color(Colors.black.withOpacity(0.8)).bold.size(32.sp).make(),
model.timeTitle.text
.color(Colors.black.withOpacity(0.8))
.bold
.size(32.sp)
.make(),
13.w.heightBox,
'已选择:'
.richText
@ -209,18 +205,17 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
.size(32.sp)
.bold
.make(),
' / ${model.ids.length}'
.textSpan
.color(Colors.black.withOpacity(0.25))
.size(32.sp)
.bold
.make(),
' / ${model.ids.length}'
.textSpan
.color(Colors.black.withOpacity(0.25))
.size(32.sp)
.bold
.make(),
])
.color(Colors.black.withOpacity(0.65))
.size(26.sp)
.make(),
13.w.heightBox,
SizedBox(
width: 400.w,
child: Text(
@ -230,11 +225,9 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
style: TextStyle(
color: ktextSubColor,
fontSize: 28.sp,
),
),
),
13.w.heightBox,
RichText(
text: TextSpan(
@ -244,12 +237,12 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '¥ ',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '¥ ',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${model.payTotal.toStringAsFixed(2)}',
style: TextStyle(
@ -265,22 +258,18 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
children: [
GestureDetector(
onTap: () async {
dynamic back = await Get.to(()=>LifePayDetailPageNew(model: model,));
if(back){
for(int i=0;i<_selectMonths.length;i++){
if(_selectMonths[i].selectIds.isEmpty){
_selectModelIndex.remove(_selectMonths.indexOf(_selectMonths[i]));
}
dynamic back = await Get.to(() => LifePayDetailPageNew(
model: model,
));
if (back) {
for (int i = 0; i < _selectMonths.length; i++) {
if (_selectMonths[i].selectIds.isEmpty) {
_selectModelIndex
.remove(_selectMonths.indexOf(_selectMonths[i]));
}
setState(() {
});
}
setState(() {});
}
},
child: Container(
decoration: BoxDecoration(
@ -289,11 +278,14 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
),
padding:
EdgeInsets.symmetric(horizontal: 20.w, vertical: 8.w),
child: '选择明细'.text.color(Colors.black.withOpacity(0.85)).size(22.sp).bold.make(),
child: '选择明细'
.text
.color(Colors.black.withOpacity(0.85))
.size(22.sp)
.bold
.make(),
),
),
],
),
],
@ -309,14 +301,13 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () async {
Function cancel = BotToast.showLoading();
BaseModel baseModel =
await NetUtil().post(SAASAPI.pay.createLivingExpensesOrder, params: {
BaseModel baseModel = await NetUtil()
.post(SAASAPI.pay.createLivingExpensesOrder, params: {
"chargesBillId": total.ids,
"paymentAmount": total.payTotal
});
if (baseModel.success) {
bool result = await PayUtil().callAliPay(
(baseModel.data as String),
bool result = await PayUtil().callAliPay((baseModel.data as String),
SAASAPI.pay.livingExpensesOrderCheckAlipay);
if (result) {
Get.off(() => PayFinishPage());
@ -370,10 +361,8 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
}
Future<double> _dailyPaymentPrePay() async {
BaseModel baseModel =
await NetUtil().get(SAASAPI.lifePay.findEstateBalance, params: {
"estateId": UserTool.userProvider.defaultHouse!.id
});
BaseModel baseModel = await NetUtil().get(SAASAPI.lifePay.findEstateBalance,
params: {"estateId": UserTool.userProvider.defaultHouse!.id});
if (baseModel.success) {
return (baseModel.data as num).toDouble();
} else {
@ -392,10 +381,13 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
Get.to(() => LifePayRecordPage());
},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
alignment: Alignment.center,
child: Image.asset(Assets.icons.lifePayRecord.path,width:48.w ,height: 48.w,)
),
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
alignment: Alignment.center,
child: Image.asset(
Assets.icons.lifePayRecord.path,
width: 48.w,
height: 48.w,
)),
),
],
body: EasyRefresh(
@ -403,66 +395,60 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
header: MaterialHeader(),
controller: _controller,
onRefresh: () async {
_prePrice = await _dailyPaymentPrePay();
_selectMonths.clear();
BaseModel model = await NetUtil()
.get(SAASAPI.lifePay.livingExpensesList, params: {
'estateId': UserTool.userProvider.defaultHouse!.id
});
if(model.success){
if(model.data!=null)
_models = ( model.data as List)
BaseModel model = await NetUtil().get(
SAASAPI.lifePay.livingExpensesList,
params: {'estateId': UserTool.userProvider.defaultHouse!.id});
if (model.success) {
if (model.data != null)
_models = (model.data as List)
.map((e) => LifePayModel.fromJson(e))
.toList() ;
.toList();
}
///
if(_models.isNotEmpty)
_models.forEach((element) {
if (_selectMonths.isEmpty) {
_selectMonths.add(MonthPay(
if (_models.isNotEmpty)
_models.forEach((element) {
if (_selectMonths.isEmpty) {
_selectMonths.add(MonthPay(
payTotal: element.payPrincipal + element.defaultAmount,
ids: [element],
itemNames: element.chargesName,
itemNames: element.chargesName ?? '',
timeTitle: DateUtil.formatDate(
DateTime.parse(element.billDateStart),
format: 'yyyy-MM'), selectIds: [element],));
} else {
bool same = false;
for(int i=0;i<_selectMonths.length;i++){
if (DateUtil.formatDate(DateTime.parse(element.billDateStart),
format: 'yyyy-MM') ==
_selectMonths[i].timeTitle) {
_selectMonths[i].payTotal +=
element.defaultAmount + element.payPrincipal;
_selectMonths[i].ids.add(element);
_selectMonths[i].itemNames += ''+element.chargesName;
_selectMonths[i].selectIds.add(element);
same = true;
format: 'yyyy-MM'),
selectIds: [element],
));
} else {
bool same = false;
for (int i = 0; i < _selectMonths.length; i++) {
if (DateUtil.formatDate(DateTime.parse(element.billDateStart),
format: 'yyyy-MM') ==
_selectMonths[i].timeTitle) {
_selectMonths[i].payTotal +=
element.defaultAmount + element.payPrincipal;
_selectMonths[i].ids.add(element);
_selectMonths[i].itemNames +=
'' + (element.chargesName ?? '');
_selectMonths[i].selectIds.add(element);
same = true;
}
}
if (!same) {
_selectMonths.add(MonthPay(
payTotal: element.payPrincipal + element.defaultAmount,
ids: [element],
selectIds: [element],
itemNames: element.chargesName ?? '',
timeTitle: DateUtil.formatDate(
DateTime.parse(element.billDateStart),
format: 'yyyy-MM')));
}
}
if(!same){
_selectMonths.add(MonthPay(
payTotal: element.payPrincipal + element.defaultAmount,
ids: [element],
selectIds: [element],
itemNames: element.chargesName,
timeTitle: DateUtil.formatDate(
DateTime.parse(element.billDateStart),
format: 'yyyy-MM')));
}
}
});
});
if (mounted) setState(() {});
},
child: Column(
@ -483,9 +469,11 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding: EdgeInsets.symmetric(vertical: 24.w,horizontal: 32.w),
child: '当前账单'.text.color(ktextPrimary).size(28.sp).make(),),
Padding(
padding:
EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: '当前账单'.text.color(ktextPrimary).size(28.sp).make(),
),
BeeDivider.horizontal(),
...List.generate(_selectMonths.length,
(index) => _buildCard(_selectMonths[index], index))
@ -508,7 +496,6 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
_selectModelIndex.clear();
setState(() {});
} else {
_selectModelIndex.clear();
for (var i = 0; i < _selectMonths.length; i++) {
_selectModelIndex.add(i);
@ -537,12 +524,7 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
).material(color: Colors.transparent),
),
16.wb,
'全选'
.text
.color(ktextSubColor)
.size(28.sp)
.bold
.make(),
'全选'.text.color(ktextSubColor).size(28.sp).bold.make(),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
@ -556,12 +538,12 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(

@ -1,22 +1,15 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:expandable/expandable.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/utils/bee_parse.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
class LifePayDetailPageNew extends StatefulWidget {
final MonthPay model;
@ -31,51 +24,45 @@ class LifePayDetailPageNew extends StatefulWidget {
}
class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
//model
//model
List<int> _selectModelIndex = []; //model
List<LifePayModel> _list = [];
SelectPay get total {
int count = 0;
double price = 0;
List<int> ids = [];
widget.model.selectIds.forEach((element) {
count++;
price += (element.defaultAmount + element.payPrincipal);
ids.add(element.id);
count++;
price += (element.defaultAmount + element.payPrincipal);
ids.add(element.id);
});
widget.model.payTotal = price;
return SelectPay(payCount: count, payTotal: price, ids: ids);
}
bool get isAllSelect {
return _selectModelIndex.length == widget.model.ids.length && _selectModelIndex != 0;
return _selectModelIndex.length == widget.model.ids.length &&
_selectModelIndex != 0;
}
@override
void initState() {
super.initState();
for(int i=0;i<widget.model.selectIds.length;i++){
_selectModelIndex.add(widget.model.ids.indexOf(widget.model.selectIds[i]));
for (int i = 0; i < widget.model.selectIds.length; i++) {
_selectModelIndex
.add(widget.model.ids.indexOf(widget.model.selectIds[i]));
}
for(int i=0;i<widget.model.ids.length;i++){
for (int i = 0; i < widget.model.ids.length; i++) {
_list.add(widget.model.ids[i]);
}
}
Widget _buildCard(LifePayModel model, int index) {
return Container(
padding: EdgeInsets.symmetric(vertical:32.w,horizontal: 32.w),
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), color: kForeGroundColor),
child: Row(
@ -87,9 +74,6 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
GestureDetector(
onTap: () {
setState(() {
if (_selectModelIndex.contains(index)) {
_selectModelIndex.remove(index);
widget.model.selectIds.remove(model);
@ -102,7 +86,8 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
});
},
child: Container(
padding: EdgeInsets.only(left: 10.w,right: 10.w,top: 5.w,bottom: 50.w),
padding: EdgeInsets.only(
left: 10.w, right: 10.w, top: 5.w, bottom: 50.w),
color: Colors.transparent,
child: BeeCheckRadio(
value: index,
@ -117,33 +102,33 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
model.chargesName.text.color(ktextSubColor).size(28.sp).make(),
(model.chargesName ?? '')
.text
.color(ktextSubColor)
.size(28.sp)
.make(),
24.w.heightBox,
DateUtil.formatDate(DateTime.parse(model.billDateStart),
format: 'yyyy/MM/dd')
format: 'yyyy/MM/dd')
.richText
.withTextSpanChildren([
' - '
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
DateUtil.formatDate(DateTime.parse(model.billDateEnd),
format: 'yyyy/MM/dd')
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
])
' - '
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
DateUtil.formatDate(DateTime.parse(model.billDateEnd),
format: 'yyyy/MM/dd')
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
])
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
],
).expand(),
RichText(
text: TextSpan(
text: '¥ ',
@ -152,19 +137,18 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '${model.payPrincipal+model.defaultAmount}',
style: TextStyle(
color: kDangerColor,
fontSize: 30.sp,
fontWeight: FontWeight.bold)),
])),
TextSpan(
text: '${model.payPrincipal + model.defaultAmount}',
style: TextStyle(
color: kDangerColor,
fontSize: 30.sp,
fontWeight: FontWeight.bold)),
])),
],
),
);
}
@override
Widget build(BuildContext context) {
var animatedContainer = AnimatedContainer(
@ -199,17 +183,22 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
),
title: widget.model.timeTitle,
body: WillPopScope(
onWillPop: () async{
onWillPop: () async {
///
widget.model.selectIds = _list;
Get.back(result: false);
return false;
},
child: ListView(
padding: EdgeInsets.only(top: 16.w),
children: List.generate(widget.model.ids.length,
(index) => _buildCard(widget.model.ids[index], index)).sepWidget(separate: BeeDivider.horizontal(indent: 100.w,)),),
padding: EdgeInsets.only(top: 16.w),
children:
List.generate(widget.model.ids.length,
(index) => _buildCard(widget.model.ids[index], index))
.sepWidget(
separate: BeeDivider.horizontal(
indent: 100.w,
)),
),
),
bottomNavi: Container(
color: Colors.white,
@ -217,7 +206,6 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
32.w, 16.w, 32.w, 12.w + MediaQuery.of(context).padding.bottom),
child: Row(
children: [
GestureDetector(
onTap: () {
if (isAllSelect) {
@ -225,7 +213,6 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
widget.model.selectIds.clear();
setState(() {});
} else {
_selectModelIndex.clear();
for (var i = 0; i < widget.model.ids.length; i++) {
_selectModelIndex.add(i);
@ -233,17 +220,11 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
}
setState(() {});
}
},
child: animatedContainer,
),
16.wb,
'全选'
.text
.color(ktextSubColor)
.size(28.sp)
.bold
.make(),
'全选'.text.color(ktextSubColor).size(28.sp).bold.make(),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
@ -257,20 +238,19 @@ class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
'已选${total.payCount}'
.text
.color(ktextSubColor)

@ -109,7 +109,7 @@ class _PersonalIndexState extends State<PersonalIndex>
height: 40.w,
alignment: Alignment.center,
child: Image.asset(
R.ASSETS_ICONS_ICON_MY_SETTING_PNG,
Assets.newIcon.imgShezhi.path,
width: 40.w,
height: 40.w),
),
@ -402,13 +402,13 @@ class _PersonalIndexState extends State<PersonalIndex>
),
24.hb,
_function('我的积分', Assets.newIcon.icJifen.path,
() => ClockInPage(), ''),
() => Get.to(() => ClockInPage()), ''),
_function(
'我的房屋',
R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
(){
Get.to(() => MyHousePage());
},
Assets.newIcon.icWdfw.path,
() {
Get.to(() => MyHousePage());
},
// () => HouseOwnersPage(
// identify: 4,
// ),
@ -417,39 +417,26 @@ class _PersonalIndexState extends State<PersonalIndex>
'${UserTool.userProvider.defaultHouse?.unitName ?? ''}'
'${UserTool.userProvider.defaultHouse?.estateName ?? ''}',
),
36.hb,
_function(
'我的家庭',
R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
(){
Get.to(() => MyFamilyPage());
}
,
''),
36.hb,
_function('我的家庭', Assets.newIcon.icWdjt.path, () {
Get.to(() => MyFamilyPage());
}, ''),
// _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG,
// () => CarParkingPage(), ''),
// 36.hb,
// _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG,
// () => CarManagePage(), ''),
// 36.hb,
_function(
'我的访客',
R.ASSETS_ICONS_ICON_MY_VISITOR_PNG,
(){
BotToast.showText(text: '当前小区尚未连接设备', align: Alignment(0, 0.5));
}
,
''),
36.hb,
_function('我的访客', Assets.newIcon.icWdfk.path, () {
BotToast.showText(
text: '当前小区尚未连接设备',
align: Alignment(0, 0.5));
}, ''),
_function(
'收货地址',
R.ASSETS_ICONS_ICON_MY_LOCATION_PNG,
() => AddressListPage(
Assets.newIcon.icShdz.path,
() => Get.to(() => AddressListPage(
canBack: false,
),
)),
''),
],
),

@ -1,12 +1,9 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/pages/setting_page/about_page/about_page.dart';
import 'package:aku_new_community/pages/setting_page/account_manager_page.dart';
import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:aku_new_community/pages/setting_page/feedback_page/feedback_page.dart';
import 'package:aku_new_community/pages/tab_navigator.dart';
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/websocket/web_socket_util.dart';
@ -81,7 +78,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
onPressed: () {
userProvider.logout();
Get.offAll(() => TabNavigator());
Get.to(() => OtherLoginPage());
},
),
],
@ -106,7 +103,7 @@ class _SettingsPageState extends State<SettingsPage> {
body: ListView(
padding: EdgeInsets.zero,
children: [
...[
...<Widget>[
// _buildTile(
// title: '是否接受信息通知',
// suffix: CupertinoSwitch(
@ -114,10 +111,10 @@ class _SettingsPageState extends State<SettingsPage> {
// onChanged: (state) {},
// ),
// ),
_buildTile(
title: '关于小蜜蜂智慧小区',
onTap: () => Get.to(() => AboutPage()),
),
// _buildTile(
// title: '关于小蜜蜂智慧小区',
// onTap: () => Get.to(() => AboutPage()),
// ),
//TODO
// _buildTile(
// title: '邀请注册',
@ -137,14 +134,14 @@ class _SettingsPageState extends State<SettingsPage> {
// title: '清除缓存',
// onTap: () {},
// ),
_buildTile(
title: '意见反馈',
onTap: () => Get.to(() => FeedBackPage()),
),
_buildTile(
title: '账号管理',
onTap: () => Get.to(() => AccountManagerPage()),
),
// _buildTile(
// title: '意见反馈',
// onTap: () => Get.to(() => FeedBackPage()),
// ),
// _buildTile(
// title: '账号管理',
// onTap: () => Get.to(() => AccountManagerPage()),
// ),
_buildTile(
title: '小蜜蜂用户协议',
onTap: () => Get.to(() => AgreementPage()),

@ -113,8 +113,10 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
await UserTool.dataProvider.addHistories();
await UserTool.userProvider.setLogin(response.data['data']);
} else {
// BotToast.showText(text: response.data['message']);
BotToast.showText(text: '账号尚未注册,请使用验证码登陆');
BotToast.showText(text: response.data['msg']);
if (response.data['msg'] == '该账户未设置密码,请使用验证码登录') {
_controller.jumpToPage(0);
}
}
} catch (e) {
print(e.toString());

@ -97,6 +97,9 @@ class _CommunityPageState extends State<CommunityPage>
child: TabBar(
onTap: (index) {
setState(() {});
if (_tabController?.index == 1) {
myKey.currentState?.refresh();
}
},
controller: _tabController,
indicatorColor: Color(0xffffc40c),

@ -131,6 +131,7 @@ class MyCommunityViewState extends State<MyCommunityView>
return EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
footer: MaterialFooter(),
controller: _refreshController,
onRefresh: () async {
BaseListModel model = await NetUtil().getList(

@ -122,7 +122,7 @@ class HallCard extends StatelessWidget {
24.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
Assets.icons.environment.image(width: 40.w, height: 40.w),
24.w.widthBox,
'${model.accessAddress}'
.text

@ -80,29 +80,6 @@ class MyTakeTaskCard extends StatelessWidget {
24.w.heightBox,
appointment,
20.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(model.readyEndTime)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${model.accessAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
Row(
children: [
Assets.icons.watch.image(width: 40.w, height: 40.w),
@ -120,7 +97,7 @@ class MyTakeTaskCard extends StatelessWidget {
24.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
Assets.icons.environment.image(width: 40.w, height: 40.w),
24.w.widthBox,
'${model.accessAddress}'
.text

@ -8,15 +8,16 @@ class TaskMap {
9: '其他'
};
static Map<int, String> statusToString = {
1: '未接单',
2: '待处理',
3: '已完成',
4: '已取消'
1: '已发布',
2: '服务中',
3: '待确认',
4: '已完成',
5: '已评价',
9: '已取消'
};
static Map<int, String> typeToString = {1: '跑腿', 2: '代驾', 3: '装修', 4: '陪玩'};
static Map<int, String> serviceObject = {1: '住户', 2: '物业', 3: '不限'};
static Map<int, String> rewardType = {1: '赏金', 2: '积分'};
}

@ -131,7 +131,7 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
estateId: 1,
workOrderTypeId: _types[_typeIndex].id,
reserveDate: _appointDate.toString(),
reserveAddress: _appointEndDate.toString(),
reserveAddress: _addressController.text.toString(),
content: _remark,
imgUrls: imgUrls);
if (re) {

@ -33,7 +33,7 @@ class BeeImageNetwork extends StatelessWidget {
Assets.images.placeholder.path,
width: width ?? 160.w,
height: height ?? 160.w,
fit: BoxFit.fill,
fit: BoxFit.cover,
);
},
height: height ?? 160.w,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save