|
|
@ -1,5 +1,7 @@
|
|
|
|
import 'package:akuCommunity/base/base_style.dart';
|
|
|
|
import 'package:akuCommunity/base/base_style.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/model/manager/estate_payment_model.dart';
|
|
|
|
import 'package:akuCommunity/pages/goods_deto_page/deto_create_page/widget/common_radio.dart';
|
|
|
|
import 'package:akuCommunity/pages/goods_deto_page/deto_create_page/widget/common_radio.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/pages/manager_func.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/bee_parse.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_divider.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_divider.dart';
|
|
|
@ -9,7 +11,8 @@ import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class MyHousePage extends StatefulWidget {
|
|
|
|
class MyHousePage extends StatefulWidget {
|
|
|
|
MyHousePage({Key key}) : super(key: key);
|
|
|
|
final bool needFindPayTag;
|
|
|
|
|
|
|
|
MyHousePage({Key key, this.needFindPayTag = false}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_MyHousePageState createState() => _MyHousePageState();
|
|
|
|
_MyHousePageState createState() => _MyHousePageState();
|
|
|
@ -41,6 +44,20 @@ Widget _unPaidTag() {
|
|
|
|
|
|
|
|
|
|
|
|
class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
int _select;
|
|
|
|
int _select;
|
|
|
|
|
|
|
|
List<EstatePaymentModel> _list;
|
|
|
|
|
|
|
|
List<EstatePaymentModel> get _unPaidList => _list.where((element) => element.status == 1).toList();
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void initState() {
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
if (widget.needFindPayTag) {
|
|
|
|
|
|
|
|
ManagerFunc.findEstatelsPayment().then((value) {
|
|
|
|
|
|
|
|
_list = value.data;
|
|
|
|
|
|
|
|
return _list;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget _buildCard(String currentHouse, String estateName, int index,
|
|
|
|
Widget _buildCard(String currentHouse, String estateName, int index,
|
|
|
|
{bool paid = false}) {
|
|
|
|
{bool paid = false}) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
@ -65,7 +82,12 @@ class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
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).text.color(ktextPrimary).size(28.sp).bold.make(),
|
|
|
|
BeeParse.getEstateName(estateName)
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.color(ktextPrimary)
|
|
|
|
|
|
|
|
.size(28.sp)
|
|
|
|
|
|
|
|
.bold
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
@ -88,7 +110,10 @@ class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
...userProvider.userDetailModel.estateNames
|
|
|
|
...userProvider.userDetailModel.estateNames
|
|
|
|
.map((e) => _buildCard(userProvider.currentHouse, e,
|
|
|
|
.map((e) => _buildCard(userProvider.currentHouse, e,
|
|
|
|
userProvider.userDetailModel.estateNames.indexOf(e)))
|
|
|
|
userProvider.userDetailModel.estateNames.indexOf(e),
|
|
|
|
|
|
|
|
paid: widget.needFindPayTag
|
|
|
|
|
|
|
|
? false
|
|
|
|
|
|
|
|
: _unPaidList.one((element) => element.roomName == e)))
|
|
|
|
.toList(),
|
|
|
|
.toList(),
|
|
|
|
].sepWidget(separate: BeeDivider.horizontal()),
|
|
|
|
].sepWidget(separate: BeeDivider.horizontal()),
|
|
|
|
),
|
|
|
|
),
|
|
|
|