|
|
@ -13,6 +13,7 @@ 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.dart';
|
|
|
|
import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page_new.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/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/bee_parse.dart';
|
|
|
|
import 'package:aku_new_community/utils/headers.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_list_model.dart';
|
|
|
@ -84,6 +85,15 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
_controller = EasyRefreshController();
|
|
|
|
_controller = EasyRefreshController();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future.delayed(Duration.zero,(){
|
|
|
|
|
|
|
|
if( UserTool.userProvider.defaultHouse==null){
|
|
|
|
|
|
|
|
Get.off(()=>MyHousePage());
|
|
|
|
|
|
|
|
BotToast.showText(text: '请先选择您的房屋');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_models = [
|
|
|
|
_models = [
|
|
|
|
LifePayModel(
|
|
|
|
LifePayModel(
|
|
|
|
id: 1,
|
|
|
|
id: 1,
|
|
|
@ -358,8 +368,8 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
|
|
|
|
|
|
|
|
|
|
|
|
Future<double> _dailyPaymentPrePay() async {
|
|
|
|
Future<double> _dailyPaymentPrePay() async {
|
|
|
|
BaseModel baseModel =
|
|
|
|
BaseModel baseModel =
|
|
|
|
await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
|
|
|
|
await NetUtil().get(SAASAPI.lifePay.findEstateBalance, params: {
|
|
|
|
"estateId": 5,//UserTool.appProvider.selectedHouse!.estateId,
|
|
|
|
"estateId": UserTool.userProvider.defaultHouse!.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (baseModel.success) {
|
|
|
|
if (baseModel.success) {
|
|
|
|
return (baseModel.data as num).toDouble();
|
|
|
|
return (baseModel.data as num).toDouble();
|
|
|
@ -390,78 +400,28 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
|
|
|
|
header: MaterialHeader(),
|
|
|
|
header: MaterialHeader(),
|
|
|
|
controller: _controller,
|
|
|
|
controller: _controller,
|
|
|
|
onRefresh: () async {
|
|
|
|
onRefresh: () async {
|
|
|
|
_page = 1;
|
|
|
|
|
|
|
|
_size = 10;
|
|
|
|
_prePrice = await _dailyPaymentPrePay();
|
|
|
|
// BaseListModel baseListModel = await NetUtil()
|
|
|
|
|
|
|
|
// .getList(SAASAPI.lifePay.livingExpensesList, params: {
|
|
|
|
|
|
|
|
// "pageNum": _page,
|
|
|
|
|
|
|
|
// "size": _size,
|
|
|
|
|
|
|
|
// 'estateId': 5//appProvider.selectedHouse!.estateId
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// _models = baseListModel.rows
|
|
|
|
|
|
|
|
// .map((e) => LifePayModel.fromJson(e))
|
|
|
|
|
|
|
|
// .toList();
|
|
|
|
|
|
|
|
_selectMonths.clear();
|
|
|
|
_selectMonths.clear();
|
|
|
|
_models = [
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
BaseModel model = await NetUtil()
|
|
|
|
id: 1,
|
|
|
|
.get(SAASAPI.lifePay.livingExpensesList, params: {
|
|
|
|
createDate: '2022-02-11 00:00:01',
|
|
|
|
'estateId': UserTool.userProvider.defaultHouse!.id
|
|
|
|
payPrincipal: 100,
|
|
|
|
});
|
|
|
|
billDateStart: '2022-02-11 00:00:01',
|
|
|
|
if(model.success){
|
|
|
|
chargesName: '物业费',
|
|
|
|
if(model.data!=null)
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-03-11 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
_models = ( model.data as List)
|
|
|
|
id: 2,
|
|
|
|
.map((e) => LifePayModel.fromJson(e))
|
|
|
|
createDate: '2022-02-12 00:00:01',
|
|
|
|
.toList() ;
|
|
|
|
payPrincipal: 100,
|
|
|
|
}
|
|
|
|
billDateStart: '2022-02-11 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-03-12 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
|
|
|
|
id: 3,
|
|
|
|
|
|
|
|
createDate: '2022-03-11 00:00:01',
|
|
|
|
|
|
|
|
payPrincipal: 100,
|
|
|
|
|
|
|
|
billDateStart: '2022-03-11 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-04-11 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
|
|
|
|
id: 4,
|
|
|
|
|
|
|
|
createDate: '2022-04-11 00:00:01',
|
|
|
|
|
|
|
|
payPrincipal: 100,
|
|
|
|
|
|
|
|
billDateStart: '2022-04-11 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-05-11 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
|
|
|
|
id: 5,
|
|
|
|
|
|
|
|
createDate: '2022-02-15 00:00:01',
|
|
|
|
|
|
|
|
payPrincipal: 100,
|
|
|
|
|
|
|
|
billDateStart: '2022-02-15 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-03-15 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
|
|
|
|
id: 6,
|
|
|
|
|
|
|
|
createDate: '2022-02-16 00:00:01',
|
|
|
|
|
|
|
|
payPrincipal: 100,
|
|
|
|
|
|
|
|
billDateStart: '2022-02-16 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-03-16 00:00:01'),
|
|
|
|
|
|
|
|
LifePayModel(
|
|
|
|
|
|
|
|
id: 7,
|
|
|
|
|
|
|
|
createDate: '2022-03-18 00:00:01',
|
|
|
|
|
|
|
|
payPrincipal: 100,
|
|
|
|
|
|
|
|
billDateStart: '2022-03-11 00:00:01',
|
|
|
|
|
|
|
|
chargesName: '物业费',
|
|
|
|
|
|
|
|
defaultAmount: 50,
|
|
|
|
|
|
|
|
billDateEnd: '2022-04-19 00:00:01'),
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///先按月份分好
|
|
|
|
///先按月份分好
|
|
|
|
|
|
|
|
if(_models.isNotEmpty)
|
|
|
|
_models.forEach((element) {
|
|
|
|
_models.forEach((element) {
|
|
|
|
if (_selectMonths.isEmpty) {
|
|
|
|
if (_selectMonths.isEmpty) {
|
|
|
|
_selectMonths.add(MonthPay(
|
|
|
|
_selectMonths.add(MonthPay(
|
|
|
@ -500,8 +460,6 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_prePrice = 0;
|
|
|
|
|
|
|
|
if (mounted) setState(() {});
|
|
|
|
if (mounted) setState(() {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|