|
|
@ -2,6 +2,7 @@
|
|
|
|
import 'dart:math';
|
|
|
|
import 'dart:math';
|
|
|
|
|
|
|
|
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/models/manager/decoration/decoration_list_model.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -20,8 +21,6 @@ import 'package:aku_community_manager/tools/user_tool.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';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_checkbox.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_checkbox.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_department_page.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_follow_check.dart';
|
|
|
|
|
|
|
|
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';
|
|
|
@ -30,8 +29,8 @@ import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/show_bottom_sheet.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/show_bottom_sheet.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DecorationManagerDetailPage extends StatefulWidget {
|
|
|
|
class DecorationManagerDetailPage extends StatefulWidget {
|
|
|
|
final DecorationModel model;
|
|
|
|
final DecorationListModel decorationModel;
|
|
|
|
DecorationManagerDetailPage({Key key, @required this.model})
|
|
|
|
DecorationManagerDetailPage({Key key, this.decorationModel})
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -49,45 +48,36 @@ class _DecorationManagerDetailStatePage
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_buildInfo(),
|
|
|
|
_buildInfo(),
|
|
|
|
widget.model.workFinishCheck == null
|
|
|
|
widget.decorationModel.status>3
|
|
|
|
? SizedBox()
|
|
|
|
? SizedBox()
|
|
|
|
: _buildFinishWorkCheck(),
|
|
|
|
: _buildFinishWorkCheck(),
|
|
|
|
_buildCycleCheck(),
|
|
|
|
_buildCycleCheck(),
|
|
|
|
widget.model.checkInfomations == null
|
|
|
|
UserTool.userProvider.infoModel.manager
|
|
|
|
? SizedBox()
|
|
|
|
? SizedBox()
|
|
|
|
: _buildCheckDetail(),
|
|
|
|
: _buildCheckDetail(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
bottom: Builder(builder: (context) {
|
|
|
|
bottom: Builder(builder: (context) {
|
|
|
|
final CycleCheck cycleCheck = widget.model.cycleCheck;
|
|
|
|
|
|
|
|
if (UserTool.userProvider.infoModel.canOperation) {
|
|
|
|
if (UserTool.userProvider.infoModel.canOperation) {
|
|
|
|
switch (widget.model.type) {
|
|
|
|
switch (widget.decorationModel.operationStatus) {
|
|
|
|
case DecorationType.WAIT_HAND_OUT:
|
|
|
|
case 1:
|
|
|
|
return AkuBottomButton(
|
|
|
|
return AkuBottomButton(
|
|
|
|
title: '立即安排',
|
|
|
|
title: '立即安排',
|
|
|
|
onTap: cycleCheck.authPerson != null &&
|
|
|
|
onTap:() {
|
|
|
|
cycleCheck.checkCycle != null &&
|
|
|
|
|
|
|
|
cycleCheck.startDate != null
|
|
|
|
|
|
|
|
? () {
|
|
|
|
|
|
|
|
widget.model.type = DecorationType.HAND_OUT;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
: null,
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return SizedBox();
|
|
|
|
return SizedBox();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// else if(widget.model.type)
|
|
|
|
|
|
|
|
} else if (UserTool.userProvider.infoModel.canOperation) {
|
|
|
|
} else if (UserTool.userProvider.infoModel.canOperation) {
|
|
|
|
switch (widget.model.type) {
|
|
|
|
switch (widget.decorationModel.operationStatus) {
|
|
|
|
case DecorationType.HAND_OUT:
|
|
|
|
case 2:
|
|
|
|
return AkuBottomButton(
|
|
|
|
return AkuBottomButton(
|
|
|
|
title: '立即执行',
|
|
|
|
title: '立即执行',
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
Get.to(DecorationFollowCheck(model: widget.model));
|
|
|
|
// Get.to(DecorationFollowCheck(model: widget.model));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -115,13 +105,13 @@ class _DecorationManagerDetailStatePage
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_buildInfoCard(
|
|
|
|
_buildInfoCard(
|
|
|
|
tag: '家',
|
|
|
|
tag: '家',
|
|
|
|
midTop: widget.model.userHomeModel.plot,
|
|
|
|
midTop: '人才公寓',
|
|
|
|
midBottom: widget.model.userHomeModel.detailAddr,
|
|
|
|
midBottom: widget.decorationModel.roomName,
|
|
|
|
name: '业主:' + widget.model.userHomeModel.userName,
|
|
|
|
name: '业主:' + UserTool.userProvider.infoModel.nickName,
|
|
|
|
phone: widget.model.userHomeModel.phone,
|
|
|
|
phone: UserTool.userProvider.profileModel.tel,
|
|
|
|
rightTopWidget: Transform.rotate(
|
|
|
|
rightTopWidget: Transform.rotate(
|
|
|
|
angle: pi / 4,
|
|
|
|
angle: pi / 4,
|
|
|
|
child: widget.model.statusType == DecorationStatusType.DONE
|
|
|
|
child: widget.decorationModel.operationStatus==3
|
|
|
|
? Image.asset(R.ASSETS_MANAGE_IC_WANCHENG_PNG)
|
|
|
|
? Image.asset(R.ASSETS_MANAGE_IC_WANCHENG_PNG)
|
|
|
|
: Image.asset(R.ASSETS_MANAGE_IC_ZHUANGXIU_PNG),
|
|
|
|
: Image.asset(R.ASSETS_MANAGE_IC_ZHUANGXIU_PNG),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -129,9 +119,9 @@ class _DecorationManagerDetailStatePage
|
|
|
|
AkuBox.h(16),
|
|
|
|
AkuBox.h(16),
|
|
|
|
_buildInfoCard(
|
|
|
|
_buildInfoCard(
|
|
|
|
tag: '装',
|
|
|
|
tag: '装',
|
|
|
|
midTop: widget.model.decorationTeamModel.name,
|
|
|
|
midTop: widget.decorationModel.constructionUnit,
|
|
|
|
name: '负责人:' + widget.model.decorationTeamModel.userName,
|
|
|
|
name: '负责人:' + '马泽鹏',
|
|
|
|
phone: widget.model.decorationTeamModel.phone,
|
|
|
|
phone: '13831971345',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -254,7 +244,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///完工检查
|
|
|
|
_buildFinishWorkCheck() {
|
|
|
|
_buildFinishWorkCheck() {
|
|
|
|
return AkuTitleBox(
|
|
|
|
return AkuTitleBox(
|
|
|
|
title: '完工检查',
|
|
|
|
title: '完工检查',
|
|
|
@ -262,20 +252,20 @@ class _DecorationManagerDetailStatePage
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '开始装修时间',
|
|
|
|
title: '开始装修时间',
|
|
|
|
subTitle: DateUtil.formatDate(
|
|
|
|
subTitle: DateUtil.formatDateStr(
|
|
|
|
widget.model.decorationDate,
|
|
|
|
'2021-5-20 13:14',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '接受人',
|
|
|
|
title: '接受人',
|
|
|
|
subTitle: widget.model.workFinishCheck?.authPerson?.name,
|
|
|
|
subTitle: '金礼伟',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildRow(title: '所属项目', subTitle: '装修管理'),
|
|
|
|
_buildRow(title: '所属项目', subTitle: '装修管理'),
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '开始日期',
|
|
|
|
title: '开始日期',
|
|
|
|
subTitle: DateUtil.formatDate(
|
|
|
|
subTitle: DateUtil.formatDateStr(
|
|
|
|
widget.model.workFinishCheck?.startDate,
|
|
|
|
'2021-5-20 13:14',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -292,13 +282,18 @@ class _DecorationManagerDetailStatePage
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
DecorationCheckRow(
|
|
|
|
DecorationCheckRow(
|
|
|
|
details: widget.model.workFinishCheck?.checkDetails,
|
|
|
|
details: [
|
|
|
|
|
|
|
|
CHECK_TYPE.ELECTRIC,
|
|
|
|
|
|
|
|
CHECK_TYPE.WATER,
|
|
|
|
|
|
|
|
CHECK_TYPE.WALL,
|
|
|
|
|
|
|
|
CHECK_TYPE.DOOR_AND_WINDOWS,
|
|
|
|
|
|
|
|
],
|
|
|
|
onChange: (details) {},
|
|
|
|
onChange: (details) {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///周期检查
|
|
|
|
_buildCycleCheck() {
|
|
|
|
_buildCycleCheck() {
|
|
|
|
return AkuTitleBox(
|
|
|
|
return AkuTitleBox(
|
|
|
|
title: '周期检查',
|
|
|
|
title: '周期检查',
|
|
|
@ -306,27 +301,27 @@ class _DecorationManagerDetailStatePage
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '开始装修时间',
|
|
|
|
title: '开始装修时间',
|
|
|
|
subTitle: DateUtil.formatDate(
|
|
|
|
subTitle: DateUtil.formatDateStr(
|
|
|
|
widget.model.decorationDate,
|
|
|
|
'2021-05-20 13:14:00',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '接受人',
|
|
|
|
title: '接受人',
|
|
|
|
subTitle: widget.model.cycleCheck?.authPerson?.name,
|
|
|
|
subTitle: '黄鑫',
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
Get.to(DecorationDepartmentPage(
|
|
|
|
// Get.to(DecorationDepartmentPage(
|
|
|
|
model: widget.model,
|
|
|
|
// model: widget.model,
|
|
|
|
)).then((value) => setState(() {}));
|
|
|
|
// )).then((value) => setState(() {}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildRow(title: '所属项目', subTitle: '装修管理'),
|
|
|
|
_buildRow(title: '所属项目', subTitle: '装修管理'),
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '开始日期',
|
|
|
|
title: '开始日期',
|
|
|
|
subTitle: DateUtil.formatDate(
|
|
|
|
subTitle: DateUtil.formatDateStr(
|
|
|
|
widget.model.cycleCheck?.startDate,
|
|
|
|
'2021-05-20 13:14:00',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
@ -368,7 +363,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
height: 500.w,
|
|
|
|
height: 500.w,
|
|
|
|
child: CupertinoDatePicker(
|
|
|
|
child: CupertinoDatePicker(
|
|
|
|
onDateTimeChanged: (dateTime) {
|
|
|
|
onDateTimeChanged: (dateTime) {
|
|
|
|
widget.model.cycleCheck.startDate = dateTime;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -382,9 +377,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildRow(
|
|
|
|
_buildRow(
|
|
|
|
title: '检查周期',
|
|
|
|
title: '检查周期',
|
|
|
|
subTitle: widget.model.cycleCheck.checkCycle == null
|
|
|
|
subTitle: '${15}天',
|
|
|
|
? null
|
|
|
|
|
|
|
|
: '${widget.model.cycleCheck.checkCycle}天',
|
|
|
|
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
|
onTap: UserTool.userProvider.infoModel.canOperation
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
showAkuSheet(
|
|
|
|
showAkuSheet(
|
|
|
@ -460,7 +453,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
realValue = 30;
|
|
|
|
realValue = 30;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
widget.model.cycleCheck.checkCycle = realValue;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -493,19 +486,19 @@ class _DecorationManagerDetailStatePage
|
|
|
|
CHECK_TYPE.SECURITY,
|
|
|
|
CHECK_TYPE.SECURITY,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
onChange: (details) {
|
|
|
|
onChange: (details) {
|
|
|
|
widget.model.cycleCheck.checkDetails = details;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
canTap: UserTool.userProvider.infoModel.canOperation,
|
|
|
|
canTap: UserTool.userProvider.infoModel.canOperation,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///执行信息
|
|
|
|
_buildCheckDetail() {
|
|
|
|
_buildCheckDetail() {
|
|
|
|
return AkuTitleBox(
|
|
|
|
return AkuTitleBox(
|
|
|
|
title: '执行信息',
|
|
|
|
title: '执行信息',
|
|
|
|
spacing: 24,
|
|
|
|
spacing: 24,
|
|
|
|
children: widget.model.checkInfomations.map((e) {
|
|
|
|
children: [].map((e) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
border: Border(
|
|
|
@ -527,7 +520,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AkuBox.h(96),
|
|
|
|
AkuBox.h(96),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'${DateUtil.formatDate(e.checkDate, format: 'yyyy-MM-dd')} ' +
|
|
|
|
'${DateUtil.formatDateStr('2021-5-20 13:14', format: 'yyyy-MM-dd')} ' +
|
|
|
|
e.checkType,
|
|
|
|
e.checkType,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
@ -537,7 +530,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
e.checkAllResult ? '正常' : '异常',
|
|
|
|
3>2? '正常' : '异常',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: e.checkAllResult
|
|
|
|
color: e.checkAllResult
|
|
|
|
? Color(0xFF32B814)
|
|
|
|
? Color(0xFF32B814)
|
|
|
@ -550,7 +543,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
expanded: Column(
|
|
|
|
expanded: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
...e.details.map((e) {
|
|
|
|
...[].map((e) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
height: 96.w,
|
|
|
|
height: 96.w,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
@ -565,11 +558,11 @@ class _DecorationManagerDetailStatePage
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AkuBox.w(48),
|
|
|
|
AkuBox.w(48),
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
e.assetpath,
|
|
|
|
R.ASSETS_PLACEHOLDER_WEBP,
|
|
|
|
height: 40.w,
|
|
|
|
height: 40.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
e.typeValue,
|
|
|
|
'233',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 28.sp,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
@ -578,7 +571,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
DecorationCheckBox(
|
|
|
|
DecorationCheckBox(
|
|
|
|
initValue: e.status,
|
|
|
|
initValue: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -607,7 +600,7 @@ class _DecorationManagerDetailStatePage
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: e.info,
|
|
|
|
text: 'e.info',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|