屏蔽租客和业主流程中其他身份选择

hmxc
张萌 3 years ago
parent b4ff8f9432
commit 749fa1c9e9

@ -1,8 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/manager/mine_goods_model.dart'; import 'package:aku_community/model/manager/mine_goods_model.dart';
import 'package:aku_community/pages/manager_func.dart'; import 'package:aku_community/pages/manager_func.dart';
@ -10,6 +5,9 @@ import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_community/utils/bee_map.dart'; import 'package:aku_community/utils/bee_map.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
class MineGoodsPage extends StatefulWidget { class MineGoodsPage extends StatefulWidget {
MineGoodsPage({Key? key}) : super(key: key); MineGoodsPage({Key? key}) : super(key: key);
@ -58,7 +56,7 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
String _getDatelength(int date) { String _getDatelength(int date) {
if (date >= 24) { if (date >= 24) {
return '${date / 24}' + '${date % 24}'; return '${(date ~/ 24)}' + '${date % 24}小时';
} else { } else {
return '$date'; return '$date';
} }

@ -196,14 +196,14 @@ class _AddHousePageState extends State<AddHousePage> {
title: '身份', title: '身份',
item: _renderPicker( item: _renderPicker(
text: PickRolePage.getType(_roleType), text: PickRolePage.getType(_roleType),
hintText: '请选择身份', hintText: '业主',
onTap: () async { onTap: () async {
int? role = // int? role =
await Get.to(() => PickRolePage(init: _roleType)); // await Get.to(() => PickRolePage(init: _roleType));
if (role != null) { // if (role != null) {
_roleType = role; // _roleType = role;
setState(() {}); // setState(() {});
} // }
}, },
), ),
), ),
@ -265,7 +265,7 @@ class _AddHousePageState extends State<AddHousePage> {
Map<String, dynamic> params = { Map<String, dynamic> params = {
'estateId': _item!.room.value, 'estateId': _item!.room.value,
'name': _nameController.text, 'name': _nameController.text,
'type': _roleType, 'type': 1,
'idType': 1, 'idType': 1,
'idNumber': _idController.text, 'idNumber': _idController.text,
}; };

@ -1,12 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.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_echo_model.dart'; import 'package:aku_community/models/house/lease_echo_model.dart';
@ -16,6 +7,13 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/bottom_sheets/sex_bottom_sheet.dart'; import 'package:aku_community/widget/bottom_sheets/sex_bottom_sheet.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart'; 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:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class UserIdentifyPage extends StatefulWidget { class UserIdentifyPage extends StatefulWidget {
UserIdentifyPage({Key? key}) : super(key: key); UserIdentifyPage({Key? key}) : super(key: key);
@ -104,12 +102,9 @@ class _UserIdentifyPageState extends State<UserIdentifyPage> {
), ),
BeeInputRow.button( BeeInputRow.button(
title: '身份', title: '身份',
hintText: _identify, hintText: '租客',
isRequire: true, isRequire: true,
onPressed: () async { onPressed: () async {},
await Get.bottomSheet(_identifyBottomSheet());
setState(() {});
},
) )
].sepWidget(separate: 32.w.heightBox), ].sepWidget(separate: 32.w.heightBox),
), ),
@ -145,37 +140,33 @@ class _UserIdentifyPageState extends State<UserIdentifyPage> {
BotToast.showText(text: '请先选择性别'); BotToast.showText(text: '请先选择性别');
return false; return false;
} }
if (_identify == '请选择身份') {
BotToast.showText(text: '请先选择身份');
return false;
}
return true; return true;
} }
Widget _identifyBottomSheet() { // Widget _identifyBottomSheet() {
return CupertinoActionSheet( // return CupertinoActionSheet(
title: // title:
'选择身份'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(), // '选择身份'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(),
cancelButton: TextButton( // cancelButton: TextButton(
onPressed: () => Get.back(), // onPressed: () => Get.back(),
child: '取消'.text.size(28.sp).color(ktextSubColor).isIntrinsic.make()), // child: '取消'.text.size(28.sp).color(ktextSubColor).isIntrinsic.make()),
actions: [ // actions: [
CupertinoActionSheetAction( // CupertinoActionSheetAction(
onPressed: () { // onPressed: () {
_identify = '业主'; // _identify = '业主';
Get.back(); // Get.back();
}, // },
child: // child:
'业主'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()), // '业主'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()),
CupertinoActionSheetAction( // CupertinoActionSheetAction(
onPressed: () { // onPressed: () {
_identify = '租户'; // _identify = '租户';
Get.back(); // Get.back();
}, // },
child: '租户'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()) // child: '租户'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make())
], // ],
); // );
} // }
Widget _errorDialog() { Widget _errorDialog() {
return CupertinoAlertDialog( return CupertinoAlertDialog(

@ -39,7 +39,7 @@ class BeeMap {
}; };
static Map<int, String> goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核失败'}; static Map<int, String> goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核失败'};
static Map<int, String> borrowStatus = {1: '出借中', 2: '已归还'}; static Map<int, String> borrowStatus = {1: '出借中', 2: '已归还', 3: '待检查'};
static Map<int, String> votingStatus = { static Map<int, String> votingStatus = {
1: '未开始', 1: '未开始',

Loading…
Cancel
Save