对接:我的房屋:修改选中的房产审核id

问卷调查/活动投票 未在进行中状态不可提交
hmxc
张萌 4 years ago
parent d9de27a01f
commit 389527ea47

@ -77,6 +77,9 @@ class _User {
/// ///
String get deleteHouse => '/user/myHouse/falseDelete'; String get deleteHouse => '/user/myHouse/falseDelete';
///id
String get changeSelectExanmineId => '/user/myHouse/changeSelectExamineId';
/// ///
String get carParkingList => '/user/myParkingSpace/list'; String get carParkingList => '/user/myParkingSpace/list';

@ -264,22 +264,29 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
), ),
), ),
bottomNavi: BottomButton( bottomNavi: BottomButton(
onPressed: () async { onPressed: _model.status != 2
if (_selectId == null) { ? () {}
BotToast.showText(text: '请先选择候选人!'); : () async {
} else { if (_selectId == null) {
BaseModel baseModel = BotToast.showText(text: '请先选择候选人!');
await ManagerFunc.vote(widget.id, _selectId); } else {
if (baseModel.status) { BaseModel baseModel =
await Get.dialog(_shouwVoteDialog()); await ManagerFunc.vote(widget.id, _selectId);
_hasVoted = true; if (baseModel.status) {
setState(() {}); await Get.dialog(_shouwVoteDialog());
} else { _hasVoted = true;
BotToast.showText(text: '${baseModel.message}'); setState(() {});
} } else {
} BotToast.showText(text: '${baseModel.message}');
}, }
child: '投票'.text.black.size(28.sp).bold.make()), }
},
child: '投票'
.text
.color(_model.status != 2 ? ktextSubColor : ktextPrimary)
.size(28.sp)
.bold
.make()),
); );
} }
} }

@ -1,5 +1,6 @@
import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/home/home_page.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:akuCommunity/widget/bee_scaffold.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';
@ -59,7 +60,7 @@ class _BorrowFinshPageState extends State<BorrowFinshPage> {
minWidth: double.infinity, minWidth: double.infinity,
onPressed: widget.isSuccess onPressed: widget.isSuccess
? () { ? () {
Get.offAll(HomePage()); Get.offAll(TabNavigator());
} }
: () { : () {
Get.back(); Get.back();

@ -22,7 +22,8 @@ import 'package:akuCommunity/widget/buttons/bottom_button.dart';
class QuestionnaireDetailPage extends StatefulWidget { class QuestionnaireDetailPage extends StatefulWidget {
final int id; 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 @override
_QuestionnaireDetailPageState createState() => _QuestionnaireDetailPageState createState() =>
@ -253,15 +254,22 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
), ),
), ),
bottomNavi: BottomButton( bottomNavi: BottomButton(
child: '确认提交'.text.black.size(32.sp).bold.make(), child: '确认提交'
onPressed: () async { .text
BaseModel baseModel = .color(widget.status != 2 ? ktextSubColor : ktextPrimary)
await ManagerFunc.questionnaireSubmit(widget.id, _submitModels); .size(32.sp)
Get.to(() => SubmitComplishPage( .bold
status: baseModel.status, .make(),
message: baseModel.message, onPressed: widget.status != 2
)); ? () {}
}, : () async {
BaseModel baseModel = await ManagerFunc.questionnaireSubmit(
widget.id, _submitModels);
Get.to(() => SubmitComplishPage(
status: baseModel.status,
message: baseModel.message,
));
},
), ),
); );
} }

@ -47,6 +47,7 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
onTap: () { onTap: () {
Get.to(() => QuestionnaireDetailPage( Get.to(() => QuestionnaireDetailPage(
id: model.id, id: model.id,
status: model.status,
)); ));
}, },
child: Container( child: Container(

@ -227,9 +227,11 @@ class _HouseCard extends StatelessWidget {
), ),
], ],
), ),
onPressed: () { onPressed: () async {
final appProvider = Provider.of<AppProvider>(context, listen: false); final appProvider = Provider.of<AppProvider>(context, listen: false);
appProvider.setCurrentHouse(model); appProvider.setCurrentHouse(model);
//id
await NetUtil().get(API.user.changeSelectExanmineId,params: {"examineId":model.estateId});
Get.back(); Get.back();
}, },
), ),

Loading…
Cancel
Save