From 389527ea4755feacd29bca7db4502b4ef52e2fc4 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 16 Apr 2021 14:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=EF=BC=9A=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=88=BF=E4=BA=A7=E5=AE=A1=E6=A0=B8id=20=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E8=B0=83=E6=9F=A5/=E6=B4=BB=E5=8A=A8=E6=8A=95?= =?UTF-8?q?=E7=A5=A8=20=E6=9C=AA=E5=9C=A8=E8=BF=9B=E8=A1=8C=E4=B8=AD?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8D=E5=8F=AF=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/api.dart | 3 ++ .../event_activity/voting_detail_page.dart | 39 +++++++++++-------- .../borrow/borrow_finsh_page.dart | 3 +- .../questionnaire_detail_page.dart | 28 ++++++++----- .../questionnaire/questionnaire_page.dart | 1 + lib/ui/profile/house/pick_my_house_page.dart | 4 +- 6 files changed, 50 insertions(+), 28 deletions(-) diff --git a/lib/constants/api.dart b/lib/constants/api.dart index 127be2ec..0a9b44b4 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -77,6 +77,9 @@ class _User { ///我的房屋:假删除审核信息 String get deleteHouse => '/user/myHouse/falseDelete'; + ///我的房屋:修改选中的房产审核id + String get changeSelectExanmineId => '/user/myHouse/changeSelectExamineId'; + ///我的车位:查询所有的车位信息 String get carParkingList => '/user/myParkingSpace/list'; diff --git a/lib/pages/event_activity/voting_detail_page.dart b/lib/pages/event_activity/voting_detail_page.dart index ce04c5b1..d347233e 100644 --- a/lib/pages/event_activity/voting_detail_page.dart +++ b/lib/pages/event_activity/voting_detail_page.dart @@ -264,22 +264,29 @@ class _VotingDetailPageState extends State { ), ), bottomNavi: BottomButton( - onPressed: () async { - if (_selectId == null) { - BotToast.showText(text: '请先选择候选人!'); - } else { - BaseModel baseModel = - await ManagerFunc.vote(widget.id, _selectId); - if (baseModel.status) { - await Get.dialog(_shouwVoteDialog()); - _hasVoted = true; - setState(() {}); - } else { - BotToast.showText(text: '${baseModel.message}'); - } - } - }, - child: '投票'.text.black.size(28.sp).bold.make()), + onPressed: _model.status != 2 + ? () {} + : () async { + if (_selectId == null) { + BotToast.showText(text: '请先选择候选人!'); + } else { + BaseModel baseModel = + await ManagerFunc.vote(widget.id, _selectId); + if (baseModel.status) { + await Get.dialog(_shouwVoteDialog()); + _hasVoted = true; + setState(() {}); + } else { + BotToast.showText(text: '${baseModel.message}'); + } + } + }, + child: '投票' + .text + .color(_model.status != 2 ? ktextSubColor : ktextPrimary) + .size(28.sp) + .bold + .make()), ); } } diff --git a/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart b/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart index bc969b73..2a102913 100644 --- a/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart +++ b/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart @@ -1,5 +1,6 @@ import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/home/home_page.dart'; +import 'package:akuCommunity/pages/tab_navigator.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -59,7 +60,7 @@ class _BorrowFinshPageState extends State { minWidth: double.infinity, onPressed: widget.isSuccess ? () { - Get.offAll(HomePage()); + Get.offAll(TabNavigator()); } : () { Get.back(); diff --git a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart index b6e895c7..45a2aacd 100644 --- a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart @@ -22,7 +22,8 @@ import 'package:akuCommunity/widget/buttons/bottom_button.dart'; class QuestionnaireDetailPage extends StatefulWidget { final int id; - QuestionnaireDetailPage({Key key, this.id}) : super(key: key); + final int status; + QuestionnaireDetailPage({Key key, this.id, this.status}) : super(key: key); @override _QuestionnaireDetailPageState createState() => @@ -253,15 +254,22 @@ class _QuestionnaireDetailPageState extends State { ), ), bottomNavi: BottomButton( - child: '确认提交'.text.black.size(32.sp).bold.make(), - onPressed: () async { - BaseModel baseModel = - await ManagerFunc.questionnaireSubmit(widget.id, _submitModels); - Get.to(() => SubmitComplishPage( - status: baseModel.status, - message: baseModel.message, - )); - }, + child: '确认提交' + .text + .color(widget.status != 2 ? ktextSubColor : ktextPrimary) + .size(32.sp) + .bold + .make(), + onPressed: widget.status != 2 + ? () {} + : () async { + BaseModel baseModel = await ManagerFunc.questionnaireSubmit( + widget.id, _submitModels); + Get.to(() => SubmitComplishPage( + status: baseModel.status, + message: baseModel.message, + )); + }, ), ); } diff --git a/lib/ui/manager/questionnaire/questionnaire_page.dart b/lib/ui/manager/questionnaire/questionnaire_page.dart index b99cdb5f..3cbbe36b 100644 --- a/lib/ui/manager/questionnaire/questionnaire_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_page.dart @@ -47,6 +47,7 @@ class _QuestionnairePageState extends State { onTap: () { Get.to(() => QuestionnaireDetailPage( id: model.id, + status: model.status, )); }, child: Container( diff --git a/lib/ui/profile/house/pick_my_house_page.dart b/lib/ui/profile/house/pick_my_house_page.dart index 815665dc..2d7c5132 100644 --- a/lib/ui/profile/house/pick_my_house_page.dart +++ b/lib/ui/profile/house/pick_my_house_page.dart @@ -227,9 +227,11 @@ class _HouseCard extends StatelessWidget { ), ], ), - onPressed: () { + onPressed: () async { final appProvider = Provider.of(context, listen: false); appProvider.setCurrentHouse(model); + //我的房屋:修改选中的房产审核id + await NetUtil().get(API.user.changeSelectExanmineId,params: {"examineId":model.estateId}); Get.back(); }, ),