From 749fa1c9e9c5416a5d7cd6c9f3531bcfbc661a27 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 20 Aug 2021 09:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E7=A7=9F=E5=AE=A2=E5=92=8C?= =?UTF-8?q?=E4=B8=9A=E4=B8=BB=E6=B5=81=E7=A8=8B=E4=B8=AD=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mine_goods_page/mine_goods_page.dart | 10 +-- lib/ui/profile/house/add_house_page.dart | 16 ++-- .../lease_relevation/user_identify_page.dart | 75 ++++++++----------- lib/utils/bee_map.dart | 2 +- 4 files changed, 46 insertions(+), 57 deletions(-) diff --git a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart index 19eb4122..190616a1 100644 --- a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart +++ b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart @@ -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/model/manager/mine_goods_model.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/headers.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 { MineGoodsPage({Key? key}) : super(key: key); @@ -58,7 +56,7 @@ class _MineGoodsPageState extends State { String _getDatelength(int date) { if (date >= 24) { - return '${date / 24}' + '${date % 24}'; + return '${(date ~/ 24)}天' + '${date % 24}小时'; } else { return '$date'; } diff --git a/lib/ui/profile/house/add_house_page.dart b/lib/ui/profile/house/add_house_page.dart index ed869b25..5133697e 100644 --- a/lib/ui/profile/house/add_house_page.dart +++ b/lib/ui/profile/house/add_house_page.dart @@ -196,14 +196,14 @@ class _AddHousePageState extends State { title: '身份', item: _renderPicker( text: PickRolePage.getType(_roleType), - hintText: '请选择身份', + hintText: '业主', onTap: () async { - int? role = - await Get.to(() => PickRolePage(init: _roleType)); - if (role != null) { - _roleType = role; - setState(() {}); - } + // int? role = + // await Get.to(() => PickRolePage(init: _roleType)); + // if (role != null) { + // _roleType = role; + // setState(() {}); + // } }, ), ), @@ -265,7 +265,7 @@ class _AddHousePageState extends State { Map params = { 'estateId': _item!.room.value, 'name': _nameController.text, - 'type': _roleType, + 'type': 1, 'idType': 1, 'idNumber': _idController.text, }; diff --git a/lib/ui/profile/house/lease_relevation/user_identify_page.dart b/lib/ui/profile/house/lease_relevation/user_identify_page.dart index f0985280..c1985ef3 100644 --- a/lib/ui/profile/house/lease_relevation/user_identify_page.dart +++ b/lib/ui/profile/house/lease_relevation/user_identify_page.dart @@ -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/extensions/widget_list_ext.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/buttons/bottom_button.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 { UserIdentifyPage({Key? key}) : super(key: key); @@ -104,12 +102,9 @@ class _UserIdentifyPageState extends State { ), BeeInputRow.button( title: '身份', - hintText: _identify, + hintText: '租客', isRequire: true, - onPressed: () async { - await Get.bottomSheet(_identifyBottomSheet()); - setState(() {}); - }, + onPressed: () async {}, ) ].sepWidget(separate: 32.w.heightBox), ), @@ -145,37 +140,33 @@ class _UserIdentifyPageState extends State { BotToast.showText(text: '请先选择性别'); return false; } - if (_identify == '请选择身份') { - BotToast.showText(text: '请先选择身份'); - return false; - } return true; } - Widget _identifyBottomSheet() { - return CupertinoActionSheet( - title: - '选择身份'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(), - cancelButton: TextButton( - onPressed: () => Get.back(), - child: '取消'.text.size(28.sp).color(ktextSubColor).isIntrinsic.make()), - actions: [ - CupertinoActionSheetAction( - onPressed: () { - _identify = '业主'; - Get.back(); - }, - child: - '业主'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()), - CupertinoActionSheetAction( - onPressed: () { - _identify = '租户'; - Get.back(); - }, - child: '租户'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()) - ], - ); - } + // Widget _identifyBottomSheet() { + // return CupertinoActionSheet( + // title: + // '选择身份'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(), + // cancelButton: TextButton( + // onPressed: () => Get.back(), + // child: '取消'.text.size(28.sp).color(ktextSubColor).isIntrinsic.make()), + // actions: [ + // CupertinoActionSheetAction( + // onPressed: () { + // _identify = '业主'; + // Get.back(); + // }, + // child: + // '业主'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()), + // CupertinoActionSheetAction( + // onPressed: () { + // _identify = '租户'; + // Get.back(); + // }, + // child: '租户'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()) + // ], + // ); + // } Widget _errorDialog() { return CupertinoAlertDialog( diff --git a/lib/utils/bee_map.dart b/lib/utils/bee_map.dart index b549e951..29901fde 100644 --- a/lib/utils/bee_map.dart +++ b/lib/utils/bee_map.dart @@ -39,7 +39,7 @@ class BeeMap { }; static Map goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核失败'}; - static Map borrowStatus = {1: '出借中', 2: '已归还'}; + static Map borrowStatus = {1: '出借中', 2: '已归还', 3: '待检查'}; static Map votingStatus = { 1: '未开始',