物品出户页完成

hmxc
张萌 4 years ago
parent 70f233fe6e
commit ea5f4e9fec

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

@ -1,6 +1,7 @@
import 'package:aku_community_manager/provider/app_provider.dart'; import 'package:aku_community_manager/provider/app_provider.dart';
import 'package:aku_community_manager/provider/fix_provider.dart'; import 'package:aku_community_manager/provider/fix_provider.dart';
import 'package:aku_community_manager/provider/manage_provider.dart'; import 'package:aku_community_manager/provider/manage_provider.dart';
import 'package:aku_community_manager/provider/outdoor_provider.dart';
import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/ui/home/home_page.dart'; import 'package:aku_community_manager/ui/home/home_page.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
@ -23,6 +24,7 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (context) => FixProvider()), ChangeNotifierProvider(create: (context) => FixProvider()),
ChangeNotifierProvider(create: (context)=> GreenManageProvider()), ChangeNotifierProvider(create: (context)=> GreenManageProvider()),
ChangeNotifierProvider(create: (context)=>InspectionManageProvider()), ChangeNotifierProvider(create: (context)=>InspectionManageProvider()),
ChangeNotifierProvider(create: (context)=>OutdoorProvider()),
], ],
child: GetMaterialApp( child: GetMaterialApp(
title: '小蜜蜂管家', title: '小蜜蜂管家',

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:aku_community_manager/const/resource.dart';
class GreenManageCardModel { class GreenManageCardModel {
String title; String title;
@ -7,15 +8,13 @@ class GreenManageCardModel {
String timeend; String timeend;
String name; String name;
String body; String body;
GreenManageCardModel( GreenManageCardModel(this.title, this.task, this.timestart, this.timeend,
this.title, this.task, this.timestart, this.timeend, this.name, this.name, this.body);
this.body);
static List<GreenManageCardModel> initList() { static List<GreenManageCardModel> initList() {
return [ return [
GreenManageCardModel( GreenManageCardModel(
'中部广场周围绿化调整', '除杂草、松土、培土', '2020-10-08', '2020-10-18', '陈晖洁', '中部广场周围绿化调整', '除杂草、松土、培土', '2020-10-08', '2020-10-18', '陈晖洁', '''详细描述
'''详细描述
1. 1.
使 使
@ -26,32 +25,38 @@ class GreenManageCardModel {
绿'''), 绿'''),
GreenManageCardModel( GreenManageCardModel(
'东区周围绿化调整', '修剪、造型', '2020-10-08', '2020-10-18', '刘小青',''), '东区周围绿化调整', '修剪、造型', '2020-10-08', '2020-10-18', '刘小青', ''),
GreenManageCardModel( GreenManageCardModel(
'西区周围绿化调整', '修剪、造型', '2020-10-10', '2020-10-20', '张空间',''), '西区周围绿化调整', '修剪、造型', '2020-10-10', '2020-10-20', '张空间', ''),
GreenManageCardModel( GreenManageCardModel(
'北区周围绿化调整', '修剪造型', '2020-10-15', '2020-10-25', '凯尔希',''), '北区周围绿化调整', '修剪造型', '2020-10-15', '2020-10-25', '凯尔希', ''),
]; ];
} }
} }
class InspectionManageCardModel{ class InspectionManageCardModel {
String title; String title;
String date; String date;
String cycle; String cycle;
String time; String time;
List<String> persons; List<String> persons;
List<String> stations; List<String> stations;
InspectionManageCardModel(this.title,this.date,this.cycle,this.time,this.persons,this.stations); InspectionManageCardModel(this.title, this.date, this.cycle, this.time,
this.persons, this.stations);
static List<InspectionManageCardModel> initList(){ static List<InspectionManageCardModel> initList() {
return [ return [
InspectionManageCardModel('1号巡检任务', '2020.1-2020.12', '每周一、三、五', '8:00-12:00', ['王珂','陈晖洁','凯尔希','王铁锤','李狗蛋','尼古拉斯'], [ InspectionManageCardModel(
'小区东门入口','1号南门','3号门站','3号闸门','4号门站' '1号巡检任务',
]), '2020.1-2020.12',
InspectionManageCardModel('2号巡检任务', '2020.1-2020.12', '每周二', '8:00-12:00',['史尔特尔'] , []), '每周一、三、五',
InspectionManageCardModel('3号巡检任务', '2020.1-2020.12', '每周二、四、六', '8:00-12:00', ['叶莲娜'], []), '8:00-12:00',
['王珂', '陈晖洁', '凯尔希', '王铁锤', '李狗蛋', '尼古拉斯'],
['小区东门入口', '1号南门', '3号门站', '3号闸门', '4号门站']),
InspectionManageCardModel(
'2号巡检任务', '2020.1-2020.12', '每周二', '8:00-12:00', ['史尔特尔'], []),
InspectionManageCardModel(
'3号巡检任务', '2020.1-2020.12', '每周二、四、六', '8:00-12:00', ['叶莲娜'], []),
]; ];
} }
} }

@ -0,0 +1,157 @@
import 'package:flutter/material.dart';
import 'package:aku_community_manager/const/resource.dart';
enum OUTDOORSTATUS {
///
NOT_OUT,
///
OUT_DONE,
///
REJECTED,
///
CANCELLATION,
}
class ItemsOutdoorModel {
///
OUTDOORSTATUS status;
///
DateTime datetime;
///
String communityname;
///
String adress;
///
String name;
///
String identify;
///
ItemDetails items;
///
String outtime;
ItemsOutdoorModel(
{@required this.status,
@required this.datetime,
@required this.communityname,
@required this.adress,
@required this.name,
@required this.identify,
@required this.items,
@required this.outtime});
static List<ItemsOutdoorModel> initList() {
return [
ItemsOutdoorModel(
status: OUTDOORSTATUS.NOT_OUT,
datetime: DateTime(2020,10,23,09,28,56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 40,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
),
ItemsOutdoorModel(
status: OUTDOORSTATUS.OUT_DONE,
datetime: DateTime(2020,10,23,09,28,56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 40,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
),
ItemsOutdoorModel(
status: OUTDOORSTATUS.REJECTED,
datetime: DateTime(2020,10,23,09,28,56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 40,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
),
ItemsOutdoorModel(
status: OUTDOORSTATUS.CANCELLATION,
datetime: DateTime(2020,10,23,09,28,56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 40,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
),
];
}
static Map<OUTDOORSTATUS, String> outdoorStatusMap = {
OUTDOORSTATUS.NOT_OUT: '待出户',
OUTDOORSTATUS.OUT_DONE: '已出户',
OUTDOORSTATUS.REJECTED: '已驳回',
OUTDOORSTATUS.CANCELLATION: '已作废',
};
static Map<String, OUTDOORSTATUS> outdoorStatusStringMap = {
'待出户': OUTDOORSTATUS.NOT_OUT,
'已出户': OUTDOORSTATUS.OUT_DONE,
'已驳回': OUTDOORSTATUS.REJECTED,
'已作废': OUTDOORSTATUS.CANCELLATION,
};
}
class ItemDetails {
String itemname;
double weight;
String way;
List<String> imagepath;
ItemDetails(
{@required this.itemname,
@required this.weight,
this.way,
this.imagepath});
}

@ -0,0 +1,20 @@
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:flutter/material.dart';
class OutdoorProvider extends ChangeNotifier{
List<ItemsOutdoorModel> _itemOutdoorModel=ItemsOutdoorModel.initList();
List<ItemsOutdoorModel> get itemOutdoorModels => _itemOutdoorModel;
addOutdoormodel(ItemsOutdoorModel model){
_itemOutdoorModel.insert(0, model);
notifyListeners();
}
List<ItemsOutdoorModel> getOutdoorModels(int index){
return [
_itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.NOT_OUT).toList(),
_itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.OUT_DONE).toList(),
_itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.REJECTED).toList(),
_itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.CANCELLATION).toList(),
_itemOutdoorModel,
][index];
}
}

@ -2,6 +2,7 @@ import 'package:aku_community_manager/ui/manage_pages/green_manage/green_manage_
import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_manage_page.dart'; import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_manage_page.dart';
import 'package:aku_community_manager/ui/sub_pages/activity_manager/activity_manager_page.dart'; import 'package:aku_community_manager/ui/sub_pages/activity_manager/activity_manager_page.dart';
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_page.dart'; import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_page.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_page.dart';
import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart'; import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart';
import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:aku_ui/common_widgets/aku_material_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -56,6 +57,7 @@ class _ApplicationPageState extends State<ApplicationPage>
AppApplication('巡检管理', R.ASSETS_HOME_IC_PATROL_PNG, InspectionManagePage()), AppApplication('巡检管理', R.ASSETS_HOME_IC_PATROL_PNG, InspectionManagePage()),
AppApplication( AppApplication(
'装修管理', R.ASSETS_HOME_IC_DECORATION_PNG, DecorationManagerPage()), '装修管理', R.ASSETS_HOME_IC_DECORATION_PNG, DecorationManagerPage()),
AppApplication('物品出户', R.ASSETS_HOME_IC_ARTICLE_PNG, ItemsOutdoorPage()),
]; ];
@override @override

@ -28,7 +28,7 @@ class _GreenManagePageState extends State<GreenManagePage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return _greenManageCard(greenManageProvider.greenManageModels[index]); return _greenManageCard(greenManageProvider.greenManageModels[index]);
}, },
padding: EdgeInsets.only(left: 32.w, right: 32.w), padding: EdgeInsets.only(left: 32.w, right: 32.w,bottom: 40.w),
itemCount: greenManageProvider.greenManageModels.length, itemCount: greenManageProvider.greenManageModels.length,
), ),
); );

@ -25,7 +25,7 @@ class _InspectionManagePageState extends State<InspectionManagePage> {
return AkuScaffold( return AkuScaffold(
title: '巡检管理', title: '巡检管理',
body: ListView( body: ListView(
padding: EdgeInsets.only(left: 32.w, right: 32.w), padding: EdgeInsets.only(left: 32.w, right: 32.w,bottom: 40.w),
children: _inspectionManageModel.inspectionManageModels children: _inspectionManageModel.inspectionManageModels
.map((e) => InspectionManageCard(e).inspectionManageCard()) .map((e) => InspectionManageCard(e).inspectionManageCard())
.toList(), .toList(),

@ -0,0 +1,199 @@
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_ui/common_widgets/aku_common_widgets.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart';
class ItemsOutdoorCard extends StatefulWidget {
final ItemsOutdoorModel cardModel;
ItemsOutdoorCard({
Key key,
@required this.cardModel,
}) : super(key: key);
@override
_ItemsOutdoorCardState createState() => _ItemsOutdoorCardState();
}
class _ItemsOutdoorCardState extends State<ItemsOutdoorCard> {
ItemsOutdoorModel _cardModel;
String _datetime;
@override
void initState() {
super.initState();
_cardModel = widget.cardModel;
_datetime =
DateUtil.formatDate(_cardModel.datetime, format: "yyyy/MM/dd HH:mm:ss");
}
@override
Widget build(BuildContext context) {
TextStyle _textStyle =
TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
return AkuButton(
child: Container(
color: Color(0xFFFFFFFF),
margin: EdgeInsets.only(top: 16.w),
padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 24.w),
child: Column(children: [
Container(
alignment: Alignment.centerLeft,
height: 88.w,
width: double.infinity,
child: Row(
children: [
Container(
alignment: Alignment.center,
width: 112.w,
height: 40.w,
decoration: BoxDecoration(
border: Border.all(color: Color(0xFF3F8FFE), width: 2.w),
),
child: Text(
'物品出户',
style: TextStyle(
color: Color(0xFF3F8FFE),
fontSize: 20.sp,
fontWeight: FontWeight.bold),
),
),
AkuBox.w(16),
Text(
_datetime,
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 22.sp,
),
),
Spacer(),
Text(
ItemsOutdoorModel.outdoorStatusMap[_cardModel.status],
style: TextStyle(
color: _cardModel.status == OUTDOORSTATUS.CANCELLATION
? Color(0xFF999999)
: Color(0xFFFF4501),
fontSize: 24.sp,
fontWeight: FontWeight.bold),
),
],
),
),
Row(
children: [
Image.asset(
R.ASSETS_OUTDOOR_IC_HOME_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'小区名称',
style: _textStyle,
),
Spacer(),
Text(
_cardModel.communityname,
style: AppStyle().primaryStyle,
),
],
),
AkuBox.h(12),
Row(
children: [
Image.asset(
R.ASSETS_OUTDOOR_IC_ADDRESS_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text('详细地址', style: _textStyle),
Spacer(),
Text(
_cardModel.adress,
style: AppStyle().primaryStyle,
),
],
),
AkuBox.h(12),
Row(
children: [
Image.asset(
R.ASSETS_OUTDOOR_IC_GOOUT_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'出户人',
style: _textStyle,
),
Spacer(),
Text(
_cardModel.name,
style: AppStyle().primaryStyle,
),
],
),
AkuBox.h(12),
Row(
children: [
Image.asset(
R.ASSETS_OUTDOOR_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'身份',
style: _textStyle,
),
Spacer(),
Text(
_cardModel.identify,
style: AppStyle().primaryStyle,
),
],
),
AkuBox.h(12),
Row(
children: [
Text(
'出户物品',
style: _textStyle,
),
Spacer(),
Text(
_cardModel.items.itemname,
style: AppStyle().primaryStyle,
),
],
),
AkuBox.h(12),
Row(
children: [
Image.asset(
R.ASSETS_OUTDOOR_IC_TIME_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'出户时间',
style: _textStyle,
),
Spacer(),
Text(
_cardModel.outtime,
style: AppStyle().primaryStyle,
),
],
),
]),
),
);
}
}

@ -0,0 +1,51 @@
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/provider/outdoor_provider.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_card.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
class ItemsOutdoorPage extends StatefulWidget {
ItemsOutdoorPage({Key key}) : super(key: key);
@override
_ItemsOutdoorPageState createState() => _ItemsOutdoorPageState();
}
class _ItemsOutdoorPageState extends State<ItemsOutdoorPage> with TickerProviderStateMixin {
List<String> _tabs = ['待出户', '已出户', '已驳回', '已作废', '全部'];
TabController _tabController;
@override
void initState() {
super.initState();
_tabController=TabController(length: _tabs.length, vsync: this);
}
@override
void dispose() {
_tabController?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '物品出户',
appBarBottom: PreferredSize(
preferredSize: Size.fromHeight(88.w),
child: AkuTabBar(controller: _tabController, tabs: _tabs),
),
body: TabBarView(
controller: _tabController,
children: _tabs.map((e) => _buildListView(_tabs.indexOf(e))).toList()),
);
}
Widget _buildListView(int index){
final _outdoorModels=Provider.of<OutdoorProvider>(context);
List<ItemsOutdoorModel> _selectModels = _outdoorModels.getOutdoorModels(index);
return ListView(
padding: EdgeInsets.only(left: 32.w,right: 32.w),
children: _selectModels.map((e) => ItemsOutdoorCard(cardModel:e)).toList(),
);
}
}

@ -54,7 +54,7 @@ VisitorStatus _status;
AkuBox.w(8), AkuBox.w(8),
Text('$_name先生',style:_textStyle,), Text('$_name先生',style:_textStyle,),
AkuBox.w(137), AkuBox.w(137),
Image.asset(R.ASSETS_IC_BORROW_PNG,width: 40.w,height: 40.w,), Image.asset(R.ASSETS_HOME_IC_BORROW_PNG,width: 40.w,height: 40.w,),
AkuBox.w(8), AkuBox.w(8),
Text(_plate,style: _textStyle,), Text(_plate,style: _textStyle,),
Spacer(), Spacer(),

@ -78,6 +78,7 @@ flutter:
- assets/message/ - assets/message/
- assets/manage/ - assets/manage/
- assets/inspection/ - assets/inspection/
- assets/outdoor/
- assets/static_temp/ - assets/static_temp/
- assets/static_fix/ - assets/static_fix/

Loading…
Cancel
Save