添加装修管理card

对接:一键报警信息记录
hmxc
张萌 4 years ago
parent 39c76ff04a
commit 9ef282b2ae

@ -233,6 +233,9 @@ class _Manager {
//// ////
String get completeFeedBack => '/user/advice/completeFeedback'; String get completeFeedBack => '/user/advice/completeFeedback';
///
String get recordAlarmInfo => '/user/alarm/insertAlarmRecord';
} }
class _Community { class _Community {

@ -1,3 +1,5 @@
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
@ -219,10 +221,18 @@ class _AlarmPageState extends State<AlarmPage> {
child: MaterialButton( child: MaterialButton(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(172.w)), borderRadius: BorderRadius.circular(172.w)),
onPressed: () { onPressed: () async{
setState(() { setState(() {
_makephonenum('tel:110'); _makephonenum('tel:110');
}); });
if (appProvider.selectedHouse?.status==4) {
await NetUtil().post(API.manager.recordAlarmInfo,params: {
"estateId":appProvider.selectedHouse?.estateId,
});
}
}, },
child: Icon( child: Icon(
Feather.phone_call, Feather.phone_call,

@ -1,7 +1,14 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/pages/renovation_manage/renovation_map.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/const/resource.dart';
class RenovationManageCard extends StatefulWidget { class RenovationManageCard extends StatefulWidget {
RenovationManageCard({Key? key}) : super(key: key); final int index;
RenovationManageCard({Key? key, required this.index}) : super(key: key);
@override @override
_RenovationManageCardState createState() => _RenovationManageCardState(); _RenovationManageCardState createState() => _RenovationManageCardState();
@ -10,6 +17,138 @@ class RenovationManageCard extends StatefulWidget {
class _RenovationManageCardState extends State<RenovationManageCard> { class _RenovationManageCardState extends State<RenovationManageCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container(); return GestureDetector(
onTap: () {},
child: Container(
margin: EdgeInsets.only(top: 16.w),
padding: EdgeInsets.all(24.w),
child: Column(
children: [
Row(
children: [
_akuChipBox('装修管理'),
16.w.widthBox,
Text(
DateUtil.formatDateStr('2020-10-23 10:24:56',
format: 'yyyy-MM-dd HH:mm:ss'),
style: TextStyle(
color: ktextSubColor,
fontSize: 22.w,
),
),
Spacer(),
Text(
RenovationMap.getTagName(
widget.index,
widget.index,
),
style: TextStyle(
color: RenovationMap.getTagColor(widget.index),
fontSize: 24.w,
),
),
],
),
24.w.heightBox,
_buildTile(R.ASSETS_ICONS_ARTICLE_NAME_PNG, '小区名称', '人才公寓'),
12.w.heightBox,
_buildTile(
R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG,
'详细地址',
'1幢-1单元-302室',
),
12.w.heightBox,
_buildTile(
R.ASSETS_ICONS_APPOINTMENT_CODE_PNG,
'装修公司',
'深圳莫川装修有限公司',
),
12.w.heightBox,
_buildTile(
R.ASSETS_ICONS_APPOINTMENT_DATE_PNG,
'装修状态',
RenovationMap().getDecorationStatus(widget.index),
),
Divider(
height: 48.w,
),
Align(
alignment: Alignment.centerRight,
child: MaterialButton(
onPressed: () {
// Get.to(DecorationManagerDetailPage(model: widget.model));
},
height: 64.w,
minWidth: 160.w,
color: kPrimaryColor,
child: Text(
'查看详情',
style: TextStyle(
color: ktextPrimary,
fontWeight: FontWeight.bold,
fontSize: 28.w,
),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.w)),
),
),
],
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
),
);
}
_buildTile(String path, String title, String subTitle) {
return Row(
children: [
Image.asset(
path,
height: 40.w,
width: 40.w,
),
Text(
title,
style: TextStyle(
color: ktextSubColor,
fontSize: 28.sp,
),
),
Spacer(),
Text(
subTitle,
style: TextStyle(
color: ktextPrimary,
fontSize: 28.sp,
fontWeight: FontWeight.bold,
),
),
],
);
}
_akuChipBox(String title) {
return Container(
child: Text(
title,
style: TextStyle(
color: kPrimaryColor,
fontSize: 20.sp,
fontWeight: FontWeight.bold,
),
),
padding: EdgeInsets.symmetric(vertical: 6.w, horizontal: 16.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2.w),
border: Border.all(
width: 2.w,
color: kPrimaryColor,
),
),
);
} }
} }

@ -0,0 +1,18 @@
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
class RenovationManageDetailPage extends StatefulWidget {
RenovationManageDetailPage({Key? key}) : super(key: key);
@override
_RenovationManageDetailPageState createState() =>
_RenovationManageDetailPageState();
}
class _RenovationManageDetailPageState
extends State<RenovationManageDetailPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(title: '装修详情', body: Container());
}
}

@ -26,7 +26,7 @@ class _RenovationManagePageState extends State<RenovationManagePage> with Ticker
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '电子商务', title: '装修管理',
appBarBottom: BeeTabBar(controller: _tabController, tabs: _tabs,scrollable: true,), appBarBottom: BeeTabBar(controller: _tabController, tabs: _tabs,scrollable: true,),
body: TabBarView( body: TabBarView(
controller: _tabController, controller: _tabController,

@ -1,3 +1,4 @@
import 'package:aku_community/pages/renovation_manage/renovation_manage_card.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RenovationManageView extends StatefulWidget { class RenovationManageView extends StatefulWidget {
@ -11,6 +12,8 @@ class RenovationManageView extends StatefulWidget {
class _RenovationManageViewState extends State<RenovationManageView> { class _RenovationManageViewState extends State<RenovationManageView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView(); return ListView(
children: [RenovationManageCard(index: widget.index)],
);
} }
} }

@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
class RenovationMap {
static String getTagName(int operationStatus, int status, {int? tracker}) {
switch (operationStatus) {
case 0:
return '待指派';
case 1:
return '待执行';
case 2:
return '已完成';
default:
return '已完成';
}
}
static Color getTagColor(int operationStatus) {
switch (operationStatus) {
case 1:
case 2:
return Color(0xFFFF4501);
case 3:
return Color(0xFF32B814);
default:
return Color(0xFFFF4501);
}
}
Map<int, String> stautsToString = {
-1: '申请中',
-2: '申请未通过',
-3: '申请通过',
0:'待处理',
1: '已付押金',
2: '装修中',
3: '完工检查申请中',
4: '完工检查不通过',
5: '完工检查通过',
6: '申请退款中',
7: '装修结束',
8: '已作废',
};
String getDecorationStatus(int status) {
return stautsToString[status]!;
}
}
Loading…
Cancel
Save