parent
124dc130fb
commit
075241dd86
After Width: | Height: | Size: 794 B |
After Width: | Height: | Size: 836 B |
@ -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,
|
||||
);
|
@ -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…
Reference in new issue