添加家政服务模块

hmxc
张萌 3 years ago
parent 28d94c170f
commit 3ab174c275

@ -1,5 +1,6 @@
// import 'package:aku_community/widget/bee_scaffold.dart'; // import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/ui/manager/house_keeping/house_keeping_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
@ -90,6 +91,7 @@ List<AO> appObjects = [
AO('电子商务', R.ASSETS_ICONS_COMMERC_PNG, () => ElectronicCommercPage()), AO('电子商务', R.ASSETS_ICONS_COMMERC_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_SERVICE_PNG, () => ServiceBrowsePage()), AO('服务浏览', R.ASSETS_ICONS_SERVICE_PNG, () => ServiceBrowsePage()),
AO('社区介绍', R.ASSETS_ICONS_INTRODUCE_PNG, () => CommunityIntroducePage()), AO('社区介绍', R.ASSETS_ICONS_INTRODUCE_PNG, () => CommunityIntroducePage()),
AO('家政服务', R.ASSETS_IMAGES_PLACEHOLDER_WEBP, () => HouseKeepingPage()),
// AO( // AO(
// '小区教育', // '小区教育',
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP, // R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
@ -173,6 +175,7 @@ List<String> _smartManagerApp = [
'电子商务', '电子商务',
'服务浏览', '服务浏览',
'社区介绍', '社区介绍',
'家政服务'
// '小区教育', // '小区教育',
// '健康运动', // '健康运动',
// '家政服务', // '家政服务',

@ -0,0 +1,53 @@
import 'package:aku_community/ui/manager/house_keeping/add_house_keeping_page.dart';
import 'package:aku_community/ui/manager/house_keeping/house_keeping_view.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class HouseKeepingPage extends StatefulWidget {
HouseKeepingPage({Key? key}) : super(key: key);
@override
_HouseKeepingPageState createState() => _HouseKeepingPageState();
}
class _HouseKeepingPageState extends State<HouseKeepingPage>
with TickerProviderStateMixin {
List<String> _tabs = ['全部', '待派单', '已派单', '处理中', '待支付', '待评价', '已完成'];
late TabController _controller;
@override
void initState() {
super.initState();
_controller = TabController(length: _tabs.length, vsync: this);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '家政服务',
appBarBottom: BeeTabBar(
controller: _controller,
tabs: _tabs,
scrollable: true,
),
body: TabBarView(
controller: _controller,
children: List.generate(
_tabs.length,
(index) => HouseKeepingView(
index: index,
),
),
),
bottomNavi: BottomButton(
onPressed: () {
Get.to(() => AddHouseKeepingPage());
},
child: '新增'.text.size(32.sp).bold.black.make()),
);
}
}

@ -0,0 +1,48 @@
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart';
import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
class HouseKeepingView extends StatefulWidget {
final int index;
HouseKeepingView({Key? key, required this.index}) : super(key: key);
@override
_HouseKeepingViewState createState() => _HouseKeepingViewState();
}
class _HouseKeepingViewState extends State<HouseKeepingView> {
late EasyRefreshController _controller;
@override
void initState() {
super.initState();
_controller = EasyRefreshController();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return BeeListView(
path: API.manager.houseKeepingList,
controller: _controller,
extraParams: {
"housekeepingStatus": widget.index == 0 ? null : widget.index
},
convert: (models) {
return models.tableList!.map((e) => HouseKeepingListModel.fromJson(e)).toList();
},
builder: (items) {
return ListView(
children: [
],
);
});
}
}
Loading…
Cancel
Save