pull/1/head
张萌 3 years ago
parent 0c684354bd
commit d1a7396ddc

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -10,4 +10,7 @@ class _MyHouse {
/// ///
String get addHouse => '/app/user/myEstate/insertEstateApply'; String get addHouse => '/app/user/myEstate/insertEstateApply';
//
String get applyRecord => '/app/user/myEstate/findAllMyEstateApply';
} }

@ -249,6 +249,10 @@ class $AssetsIconsGen {
/// File path: assets/icons/examine.png /// File path: assets/icons/examine.png
AssetGenImage get examine => const AssetGenImage('assets/icons/examine.png'); AssetGenImage get examine => const AssetGenImage('assets/icons/examine.png');
/// File path: assets/icons/examining.png
AssetGenImage get examining =>
const AssetGenImage('assets/icons/examining.png');
/// File path: assets/icons/eye_close.png /// File path: assets/icons/eye_close.png
AssetGenImage get eyeClose => AssetGenImage get eyeClose =>
const AssetGenImage('assets/icons/eye_close.png'); const AssetGenImage('assets/icons/eye_close.png');
@ -657,6 +661,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/oxygen.png /// File path: assets/icons/oxygen.png
AssetGenImage get oxygen => const AssetGenImage('assets/icons/oxygen.png'); AssetGenImage get oxygen => const AssetGenImage('assets/icons/oxygen.png');
/// File path: assets/icons/pass.png
AssetGenImage get pass => const AssetGenImage('assets/icons/pass.png');
/// File path: assets/icons/pay.png /// File path: assets/icons/pay.png
AssetGenImage get pay => const AssetGenImage('assets/icons/pay.png'); AssetGenImage get pay => const AssetGenImage('assets/icons/pay.png');
@ -682,6 +689,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/record.png /// File path: assets/icons/record.png
AssetGenImage get record => const AssetGenImage('assets/icons/record.png'); AssetGenImage get record => const AssetGenImage('assets/icons/record.png');
/// File path: assets/icons/reject.png
AssetGenImage get reject => const AssetGenImage('assets/icons/reject.png');
/// File path: assets/icons/report.png /// File path: assets/icons/report.png
AssetGenImage get report => const AssetGenImage('assets/icons/report.png'); AssetGenImage get report => const AssetGenImage('assets/icons/report.png');

@ -1,10 +1,9 @@
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/tab_navigator.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class SetNickNamePage extends StatefulWidget { class SetNickNamePage extends StatefulWidget {
@ -88,7 +87,7 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
onTap: () async { onTap: () async {
var result = await SignFunc.setNickName(_nickController.text); var result = await SignFunc.setNickName(_nickController.text);
if (result) { if (result) {
Get.offAll(TabNavigator()); UserTool.userProvider.updateUserInfo();
} }
}, },
text: '确定'), text: '确定'),

@ -1,12 +1,11 @@
import 'package:aku_new_community/pages/sign/login/forgot_psd_page.dart';
import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; import 'package:aku_new_community/pages/sign/login/psd_verify.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class SetPsdPage extends StatefulWidget { class SetPsdPage extends StatefulWidget {
@ -93,7 +92,7 @@ class _SetPsdPageState extends State<SetPsdPage> {
var result = var result =
await SignFunc.settingPsd(_psdController.text); await SignFunc.settingPsd(_psdController.text);
if (result) { if (result) {
Get.to(() => ForgotPsdPage()); UserTool.userProvider.updateUserInfo();
} }
} }
: null, : null,

@ -168,10 +168,8 @@ class SignFunc {
if (!UserTool.userProvider.userInfoModel!.isExistPassword) { if (!UserTool.userProvider.userInfoModel!.isExistPassword) {
await Get.to(() => SetPsdPage()); await Get.to(() => SetPsdPage());
} else if (UserTool.userProvider.userInfoModel!.nickName == null) { } else if (UserTool.userProvider.userInfoModel!.nickName == null) {
print('111');
await Get.to(() => SetNickNamePage()); await Get.to(() => SetNickNamePage());
} else { } else {
print('222');
Get.offAll(() => TabNavigator()); Get.offAll(() => TabNavigator());
} }
} }

@ -32,6 +32,13 @@ class _AddHousePageState extends State<AddHousePage> {
PickedHouseModel? _otherPickHouse; PickedHouseModel? _otherPickHouse;
TextEditingController _nameController = TextEditingController(); TextEditingController _nameController = TextEditingController();
TextEditingController _telController = TextEditingController(); TextEditingController _telController = TextEditingController();
List<int> get manageEstateIds {
if (_identify == Identify.OWNER) {
return _pickedHouses.map((e) => e.house!.id).toList();
} else {
return [_otherPickHouse!.house!.id];
}
}
@override @override
void dispose() { void dispose() {
@ -213,9 +220,7 @@ class _AddHousePageState extends State<AddHousePage> {
var base = await NetUtil().post(SARSAPI.profile.house.addHouse, var base = await NetUtil().post(SARSAPI.profile.house.addHouse,
params: { params: {
'identity': _identify.index + 1, 'identity': _identify.index + 1,
'manageEstateIds': _identify.index == 0 'manageEstateIds': manageEstateIds,
? _pickedHouses
: [_otherPickHouse],
'ownerName': _nameController.text, 'ownerName': _nameController.text,
'ownerTel': _telController.text, 'ownerTel': _telController.text,
'tenantName': _nameController.text, 'tenantName': _nameController.text,
@ -297,14 +302,21 @@ class _AddHousePageState extends State<AddHousePage> {
var house = GestureDetector( var house = GestureDetector(
onTap: () async { onTap: () async {
var cancel = BotToast.showLoading(); var cancel = BotToast.showLoading();
var base = await NetUtil().get(SARSAPI.house.allHouses); var base = await NetUtil().get(SARSAPI.house.allHouses, params: {
'communityId': UserTool.userProvider.userInfoModel!.communityId
});
cancel(); cancel();
if (base.success) { if (base.success) {
var _buildings = (base.data as List) if ((base.data as List).isNotEmpty) {
.map((e) => EstateCascadeModel.fromJson(e)) var _buildings = (base.data as List)
.toList(); .map((e) => EstateCascadeModel.fromJson(e))
_otherPickHouse = .toList();
await BeeHouseCascadePicker.pick(context, _buildings); _otherPickHouse =
await BeeHouseCascadePicker.pick(context, _buildings);
setState(() {});
} else {
BotToast.showText(text: '房屋列表为空');
}
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }
@ -323,12 +335,15 @@ class _AddHousePageState extends State<AddHousePage> {
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),
56.w.widthBox, 56.w.widthBox,
'${_otherPickHouse == null ? '请选择楼层房号' : '${_otherPickHouse!.building!.name}-${_otherPickHouse!.unit!.name}-${_otherPickHouse!.floor!.name}层-${_otherPickHouse!.house!.name}'}' Expanded(
.text child:
.size(28.sp) '${_otherPickHouse == null ? '请选择楼层房号' : '${_otherPickHouse!.building!.name}-${_otherPickHouse!.unit!.name}-${_otherPickHouse!.floor!.name}-${_otherPickHouse!.house!.name}'}'
.color(Colors.black.withOpacity(0.25)) .text
.make(), .size(28.sp)
Spacer(), .color(Colors.black.withOpacity(0.25))
.maxLines(2)
.make(),
),
Icon( Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
size: 25.w, size: 25.w,
@ -454,7 +469,9 @@ class _AddHousePageState extends State<AddHousePage> {
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
var cancel = BotToast.showLoading(); var cancel = BotToast.showLoading();
var base = await NetUtil().get(SARSAPI.house.allHouses); var base = await NetUtil().get(SARSAPI.house.allHouses, params: {
'communityId': UserTool.userProvider.userInfoModel!.communityId
});
cancel(); cancel();
if (base.success) { if (base.success) {
var _buildings = (base.data as List) var _buildings = (base.data as List)
@ -462,6 +479,7 @@ class _AddHousePageState extends State<AddHousePage> {
.toList(); .toList();
_pickedHouses[index] = _pickedHouses[index] =
await BeeHouseCascadePicker.pick(context, _buildings); await BeeHouseCascadePicker.pick(context, _buildings);
setState(() {});
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }
@ -480,12 +498,14 @@ class _AddHousePageState extends State<AddHousePage> {
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),
56.w.widthBox, 56.w.widthBox,
'${model.house == null ? '请选择楼层房号' : '${model.building!.name}-${model.unit!.name}-${model.floor!.name}层-${model.house!.name}'}' Expanded(
.text child:
.size(28.sp) '${model.house == null ? '请选择楼层房号' : '${model.building!.name}-${model.unit!.name}-${model.floor!.name}-${model.house!.name}'}'
.color(Colors.black.withOpacity(0.25)) .text
.make(), .size(28.sp)
Spacer(), .color(Colors.black.withOpacity(0.25))
.make(),
),
Icon( Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
size: 25.w, size: 25.w,

@ -1,4 +1,7 @@
import 'package:aku_new_community/constants/sars_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/sars_model/my_house/my_house_apply_record_list_model.dart'; import 'package:aku_new_community/models/sars_model/my_house/my_house_apply_record_list_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.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/bee_scaffold.dart';
import 'package:aku_new_community/widget/tag/bee_tag.dart'; import 'package:aku_new_community/widget/tag/bee_tag.dart';
@ -24,7 +27,10 @@ class _ApplyRecordPageState extends State<ApplyRecordPage> {
firstRefresh: true, firstRefresh: true,
header: MaterialHeader(), header: MaterialHeader(),
footer: MaterialFooter(), footer: MaterialFooter(),
onRefresh: () async {}, onRefresh: () async {
var base = await NetUtil().get(SARSAPI.profile.house.applyRecord);
if (base.success) {}
},
onLoad: () async {}, onLoad: () async {},
child: ListView( child: ListView(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
@ -82,7 +88,21 @@ class _ApplyRecordPageState extends State<ApplyRecordPage> {
], ],
), ),
), ),
Positioned(child: Image.asset(_getStatusIconPath(model.status))),
], ],
); );
} }
String _getStatusIconPath(int status) {
switch (status) {
case 1:
return Assets.icons.examining.path;
case 2:
return Assets.icons.reject.path;
case 3:
return Assets.icons.pass.path;
default:
return '';
}
}
} }

@ -8,6 +8,7 @@ import 'package:get/get.dart';
class BeeHouseCascadePicker extends StatefulWidget { class BeeHouseCascadePicker extends StatefulWidget {
final List<EstateCascadeModel> buildings; final List<EstateCascadeModel> buildings;
static Future<PickedHouseModel> pick( static Future<PickedHouseModel> pick(
BuildContext context, List<EstateCascadeModel> buildings) async { BuildContext context, List<EstateCascadeModel> buildings) async {
var result = await showModalBottomSheet( var result = await showModalBottomSheet(
@ -29,15 +30,26 @@ class _BeeHouseCascadePickerState extends State<BeeHouseCascadePicker> {
List<EstateCascadeModel> _buildings = []; List<EstateCascadeModel> _buildings = [];
int _pickBuildingIndex = 0; int _pickBuildingIndex = 0;
EstateCascadeModel get _pickedBuilding => _buildings[_pickBuildingIndex]; EstateCascadeModel? get _pickedBuilding {
if (_buildings.isEmpty) {
return null;
}
return _buildings[_pickBuildingIndex];
}
int _pickUnitIndex = 0; int _pickUnitIndex = 0;
Unit get _pickedUnit => _pickedBuilding.childList[_pickUnitIndex]; Unit? get _pickedUnit {
if ((_pickedBuilding?.childList ?? []).isEmpty) {
return null;
}
return _pickedBuilding?.childList[_pickUnitIndex];
}
Floor get _pickedFloor => _pickedUnit.floors[_pickFloorIndex]; Floor? get _pickedFloor => _pickedUnit?.floors[_pickFloorIndex];
int _pickFloorIndex = 0; int _pickFloorIndex = 0;
House get _pickedHouse => _pickedFloor.houses[_pickHouseIndex]; House? get _pickedHouse => _pickedFloor?.houses[_pickHouseIndex];
int _pickHouseIndex = 0; int _pickHouseIndex = 0;
PickedHouseModel get pickedHouseModel => PickedHouseModel( PickedHouseModel get pickedHouseModel => PickedHouseModel(
@ -76,12 +88,15 @@ class _BeeHouseCascadePickerState extends State<BeeHouseCascadePicker> {
child: CupertinoPicker( child: CupertinoPicker(
onSelectedItemChanged: (int value) { onSelectedItemChanged: (int value) {
_pickBuildingIndex = value; _pickBuildingIndex = value;
// _pickUnitIndex = 0;
// _pickFloorIndex = 0;
// _pickHouseIndex = 0;
_unitController.jumpToItem(0); _unitController.jumpToItem(0);
_floorController.jumpToItem(0); _floorController.jumpToItem(0);
_houseController.jumpToItem(0); _houseController.jumpToItem(0);
setState(() {}); setState(() {});
}, },
itemExtent: 80.w, itemExtent: 100.w,
children: _buildings children: _buildings
.map((e) => Center( .map((e) => Center(
child: Padding( child: Padding(
@ -96,12 +111,14 @@ class _BeeHouseCascadePickerState extends State<BeeHouseCascadePicker> {
child: CupertinoPicker( child: CupertinoPicker(
onSelectedItemChanged: (int value) { onSelectedItemChanged: (int value) {
_pickUnitIndex = value; _pickUnitIndex = value;
// _pickFloorIndex = 0;
// _pickHouseIndex = 0;
_floorController.jumpToItem(0); _floorController.jumpToItem(0);
_houseController.jumpToItem(0); _houseController.jumpToItem(0);
setState(() {}); setState(() {});
}, },
itemExtent: 80.w, itemExtent: 100.w,
children: _pickedBuilding.childList children: (_pickedBuilding?.childList ?? [])
.map((e) => Center( .map((e) => Center(
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w), padding: EdgeInsets.only(left: 20.w, right: 20.w),
@ -115,11 +132,12 @@ class _BeeHouseCascadePickerState extends State<BeeHouseCascadePicker> {
child: CupertinoPicker( child: CupertinoPicker(
onSelectedItemChanged: (int value) { onSelectedItemChanged: (int value) {
_pickFloorIndex = value; _pickFloorIndex = value;
// _pickHouseIndex = 0;
_houseController.jumpToItem(0); _houseController.jumpToItem(0);
setState(() {}); setState(() {});
}, },
itemExtent: 80.w, itemExtent: 80.w,
children: _pickedUnit.floors children: (_pickedUnit?.floors ?? [])
.map((e) => Center( .map((e) => Center(
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w), padding: EdgeInsets.only(left: 20.w, right: 20.w),
@ -136,7 +154,7 @@ class _BeeHouseCascadePickerState extends State<BeeHouseCascadePicker> {
setState(() {}); setState(() {});
}, },
itemExtent: 80.w, itemExtent: 80.w,
children: _pickedFloor.houses children: (_pickedFloor?.houses ?? [])
.map((e) => Center( .map((e) => Center(
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w), padding: EdgeInsets.only(left: 20.w, right: 20.w),

Loading…
Cancel
Save