|
|
@ -1,4 +1,6 @@
|
|
|
|
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
|
|
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/provider/user_provider.dart';
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
|
import 'package:aku_community_manager/tools/widget_tool.dart';
|
|
|
|
import 'package:aku_community_manager/tools/widget_tool.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_check_row.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_check_row.dart';
|
|
|
@ -7,6 +9,7 @@ import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_util.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_util.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/aku_bottom_button.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
|
|
|
import 'package:aku_community_manager/tools/screen_tool.dart';
|
|
|
|
import 'package:aku_community_manager/tools/screen_tool.dart';
|
|
|
|
import 'package:aku_community_manager/const/resource.dart';
|
|
|
|
import 'package:aku_community_manager/const/resource.dart';
|
|
|
@ -17,6 +20,7 @@ import 'package:expandable/expandable.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DecorationManagerDetailPage extends StatefulWidget {
|
|
|
|
class DecorationManagerDetailPage extends StatefulWidget {
|
|
|
|
final DecorationModel model;
|
|
|
|
final DecorationModel model;
|
|
|
@ -31,6 +35,8 @@ class DecorationManagerDetailPage extends StatefulWidget {
|
|
|
|
class _DecorationManagerDetailStatePage
|
|
|
|
class _DecorationManagerDetailStatePage
|
|
|
|
extends State<DecorationManagerDetailPage> {
|
|
|
|
extends State<DecorationManagerDetailPage> {
|
|
|
|
bool get isWaitHandOut => widget.model.type == DecorationType.WAIT_HAND_OUT;
|
|
|
|
bool get isWaitHandOut => widget.model.type == DecorationType.WAIT_HAND_OUT;
|
|
|
|
|
|
|
|
USER_ROLE get role =>
|
|
|
|
|
|
|
|
Provider.of<UserProvider>(context, listen: false).userInfoModel.role;
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AkuScaffold(
|
|
|
|
return AkuScaffold(
|
|
|
@ -43,11 +49,40 @@ class _DecorationManagerDetailStatePage
|
|
|
|
? SizedBox()
|
|
|
|
? SizedBox()
|
|
|
|
: _buildFinishWorkCheck(),
|
|
|
|
: _buildFinishWorkCheck(),
|
|
|
|
_buildCycleCheck(),
|
|
|
|
_buildCycleCheck(),
|
|
|
|
widget.model.type == DecorationType.WAIT_HAND_OUT
|
|
|
|
widget.model.type == DecorationType.WAIT_HAND_OUT ||
|
|
|
|
|
|
|
|
widget.model.type == DecorationType.HAND_OUT
|
|
|
|
? SizedBox()
|
|
|
|
? SizedBox()
|
|
|
|
: _buildCheckDetail(),
|
|
|
|
: _buildCheckDetail(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
bottom: Builder(builder: (context) {
|
|
|
|
|
|
|
|
final CycleCheck cycleCheck = widget.model.cycleCheck;
|
|
|
|
|
|
|
|
if (role == USER_ROLE.MANAGER) {
|
|
|
|
|
|
|
|
switch (widget.model.type) {
|
|
|
|
|
|
|
|
case DecorationType.WAIT_HAND_OUT:
|
|
|
|
|
|
|
|
return AkuBottomButton(
|
|
|
|
|
|
|
|
title: '立即安排',
|
|
|
|
|
|
|
|
onTap: cycleCheck.authPerson != null &&
|
|
|
|
|
|
|
|
cycleCheck.checkCycle != null &&
|
|
|
|
|
|
|
|
cycleCheck.startDate != null
|
|
|
|
|
|
|
|
? () {
|
|
|
|
|
|
|
|
widget.model.type = DecorationType.HAND_OUT;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// else if(widget.model.type)
|
|
|
|
|
|
|
|
} else if (role == USER_ROLE.PROPERTY) {
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|