工单页 服务团队页

pull/1/head
张萌 3 years ago
parent 124dc130fb
commit 075241dd86

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

@ -20,11 +20,11 @@ import 'package:aku_new_community/pages/service_browse/service_browse_page.dart'
import 'package:aku_new_community/pages/services/old_age/old_age_support_page_simple.dart';
import 'package:aku_new_community/pages/setting_page/settings_page.dart';
import 'package:aku_new_community/pages/surrounding_enterprises/surrounding_enterprises_page.dart';
import 'package:aku_new_community/pages/things_page/fixed_submit_page.dart';
import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart';
import 'package:aku_new_community/ui/community/activity/activity_list_page.dart';
import 'package:aku_new_community/ui/community/facility/facility_appointment_page.dart';
import 'package:aku_new_community/ui/function_and_service/task/task_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_page.dart';
import 'package:aku_new_community/ui/home/application/all_application.dart';
import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_page.dart';
@ -74,7 +74,7 @@ List<AO> appObjects = [
AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => FixedSubmitPage()),
AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => WorkOrderPage()),
AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()),
AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,

@ -133,6 +133,10 @@ class $AssetsIconsGen {
/// File path: assets/icons/alarm.png
AssetGenImage get alarm => const AssetGenImage('assets/icons/alarm.png');
/// File path: assets/icons/alarm_clock.png
AssetGenImage get alarmClock =>
const AssetGenImage('assets/icons/alarm_clock.png');
/// File path: assets/icons/alipay_round.png
AssetGenImage get alipayRound =>
const AssetGenImage('assets/icons/alipay_round.png');
@ -849,6 +853,10 @@ class $AssetsIconsGen {
/// File path: assets/icons/tag.png
AssetGenImage get tag => const AssetGenImage('assets/icons/tag.png');
/// File path: assets/icons/task_location.png
AssetGenImage get taskLocation =>
const AssetGenImage('assets/icons/task_location.png');
/// File path: assets/icons/test_kingcion.png
AssetGenImage get testKingcion =>
const AssetGenImage('assets/icons/test_kingcion.png');

@ -0,0 +1,24 @@
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:json_annotation/json_annotation.dart';
part 'team_list_model.g.dart';
@JsonSerializable()
class TeamListModel {
final int id;
final String name;
final List<ImgModel> imgs;
final String tel;
final String position;
factory TeamListModel.fromJson(Map<String, dynamic> json) =>
_$TeamListModelFromJson(json);
const TeamListModel({
required this.id,
required this.name,
required this.imgs,
required this.tel,
required this.position,
});
}

@ -0,0 +1,18 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'team_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
TeamListModel _$TeamListModelFromJson(Map<String, dynamic> json) =>
TeamListModel(
id: json['id'] as int,
name: json['name'] as String,
imgs: (json['imgs'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
tel: json['tel'] as String,
position: json['position'] as String,
);

@ -599,7 +599,7 @@ class _HomePageState extends State<HomePage>
padding: EdgeInsets.zero,
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(ao.title)) return;
// if (!LoginUtil.haveRoom(ao.title)) return;
if (ao.page == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class AllOrderView extends StatefulWidget {
const AllOrderView({Key? key}) : super(key: key);
@override
_AllOrderViewState createState() => _AllOrderViewState();
}
class _AllOrderViewState extends State<AllOrderView> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class HandlingView extends StatefulWidget {
const HandlingView({Key? key}) : super(key: key);
@override
_HandlingViewState createState() => _HandlingViewState();
}
class _HandlingViewState extends State<HandlingView> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class HasReceivedView extends StatefulWidget {
const HasReceivedView({Key? key}) : super(key: key);
@override
_HasReceivedViewState createState() => _HasReceivedViewState();
}
class _HasReceivedViewState extends State<HasReceivedView> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,79 @@
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/work_order/team_list_model.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class TeamListPage extends StatefulWidget {
const TeamListPage({Key? key}) : super(key: key);
@override
_TeamListPageState createState() => _TeamListPageState();
}
class _TeamListPageState extends State<TeamListPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '服务团队名单',
body: ListView(
children: [
_PositionTile('主负责人'),
...[].map((e) => _personTile(e)).toList()
],
),
);
}
Widget _personTile(TeamListModel model) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 16.w),
width: double.infinity,
child: Row(
children: [
CircleAvatar(
backgroundColor: Colors.red,
),
16.wb,
Column(
children: [
model.name.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
8.hb,
model.position.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
Spacer(),
GestureDetector(
onTap: () async {
await launch('tel:${model.tel}');
},
child: Assets.icons.phone.image(width: 40.w, height: 40.w),
)
],
),
);
}
Widget _PositionTile(String text) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 16.w),
width: double.infinity,
child: Text(
text,
style: TextStyle(
fontSize: 26.sp,
color: Colors.black.withOpacity(0.45),
),
),
);
}
}

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class ToBeAllocatedView extends StatefulWidget {
const ToBeAllocatedView({Key? key}) : super(key: key);
@override
_ToBeAllocatedViewState createState() => _ToBeAllocatedViewState();
}
class _ToBeAllocatedViewState extends State<ToBeAllocatedView> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class ToBeConfirmView extends StatefulWidget {
const ToBeConfirmView({Key? key}) : super(key: key);
@override
_ToBeConfirmViewState createState() => _ToBeConfirmViewState();
}
class _ToBeConfirmViewState extends State<ToBeConfirmView> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,183 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/utils/bee_date_util.dart';
import 'package:aku_new_community/widget/buttons/card_bottom_button.dart';
import 'package:aku_new_community/widget/views/bee_hor_image_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class WorkOrderCard extends StatelessWidget {
const WorkOrderCard({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Stack(
children: [
Positioned(
top: 9.35.w,
right: 0,
child: Container(
width: 160.w,
height: 60.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
Color(0xFFFAC058),
Color(0xFFFFD589),
]),
color: kPrimaryColor,
borderRadius:
BorderRadius.only(topRight: Radius.circular(12.w)),
),
alignment: Alignment.center,
child: Text(
'已接单',
style: TextStyle(
fontSize: 26.sp,
color: Colors.black,
),
),
)),
ClipPath(
clipper: WorkOrderCardClip(),
child: Container(
padding: EdgeInsets.all(24.w),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12.w),
bottomLeft: Radius.circular(12.w),
bottomRight: Radius.circular(12.w)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
padding:
EdgeInsets.symmetric(vertical: 8.w, horizontal: 16.w),
decoration: BoxDecoration(
color: Color(0xFFFFFBE6),
borderRadius: BorderRadius.circular(8.w),
),
child: '家政服务'
.text
.size(24.sp)
.color(Color(0xFFD48806))
.make(),
),
],
),
16.hb,
Row(
children: [
Assets.icons.alarmClock.image(width: 40.w, height: 40.w),
24.wb,
'2022.02.21 15:30'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
16.hb,
Row(
children: [
Assets.icons.taskLocation.image(width: 40.w, height: 40.w),
24.wb,
'绿城·碧桂园3好楼门外'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
60.hb,
'xxxxxxxxxxxxxxxxxxxxxxxx'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
24.hb,
BeeHorImageView(
maxCount: 4, imgs: [], imgWidth: 146.w, imgHeight: 146.w),
24.hb,
Row(
children: [
BeeDateUtil(DateTime.now())
.timeAgo
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
280.wb,
CardBottomButton.yellow(text: '催促进度', onPressed: () {}),
24.wb,
GestureDetector(
onTap: () {},
child: Icon(
CupertinoIcons.ellipsis_vertical,
size: 40.w,
),
)
],
),
],
),
),
)
],
);
}
}
class WorkOrderCardClip extends CustomClipper<Path> {
@override
bool shouldReclip(covariant CustomClipper oldClipper) {
return false;
}
@override
Path getClip(Size size) {
Path path = Path();
//
double asx = 531.w;
//
double aex = 542.46.w;
//
double aey = 9.34.w;
//
double acx = 540.w;
//
double bsx = 558.45.w;
//
double bsy = 58.88.w;
//
double bex = 569.91.w;
//
double bey = 67.35.w;
//
double bcx = 561.06.w;
//
double bcy = 67.35.w;
path.lineTo(asx, 0);
path.quadraticBezierTo(acx, 0, aex, aey);
path.lineTo(bsx, bsy);
path.quadraticBezierTo(bcx, bcy, bex, bey);
path.lineTo(size.width, bey);
path.lineTo(size.width, size.height);
path.lineTo(0, size.height);
path.lineTo(0, 0);
path.close();
return path;
}
}

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class WorkOrderDetailPage extends StatefulWidget {
const WorkOrderDetailPage({Key? key}) : super(key: key);
@override
_WorkOrderDetailPageState createState() => _WorkOrderDetailPageState();
}
class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,63 @@
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class WorkOrderPage extends StatefulWidget {
const WorkOrderPage({Key? key}) : super(key: key);
@override
_WorkOrderPageState createState() => _WorkOrderPageState();
}
class _WorkOrderPageState extends State<WorkOrderPage>
with SingleTickerProviderStateMixin {
List<String> _tabs = ['全部', '待分配', '已接单', '处理中', '待确认'];
late TabController _tabController;
@override
void initState() {
_tabController = TabController(length: _tabs.length, vsync: this);
super.initState();
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '报事报修',
actions: [
IconButton(
onPressed: () {},
icon: Icon(
CupertinoIcons.question_circle,
size: 40.w,
))
],
appBarBottom: BeeTabBar(
tabs: _tabs,
controller: _tabController,
),
body: TabBarView(
controller: _tabController,
children:
_tabs.mapIndexed((e, index) => _getOrderView(index)).toList()),
);
}
Widget _getOrderView(int index) {
return EasyRefresh(
child: ListView.separated(
padding: EdgeInsets.all(24.w),
itemBuilder: (context, index) {
return WorkOrderCard();
},
separatorBuilder: (context, index) {
return 24.w.heightBox;
},
itemCount: 1));
}
}
Loading…
Cancel
Save