添加家政服务 服务详情

hmxc
张萌 3 years ago
parent fafa1623a4
commit 62c58222c0

@ -2,11 +2,14 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart';
import 'package:aku_community/ui/manager/house_keeping/house_keeping_detail_page.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/buttons/card_bottom_button.dart';
import 'package:aku_community/widget/others/aku_chip_box.dart';
import 'package:flustars/flustars.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 HouseKeepingCard extends StatelessWidget {
@ -18,9 +21,12 @@ class HouseKeepingCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () async {},
onTap: () async {
Get.to(() => HouseKeepingDetailPage(model: model));
},
child: Container(
padding: EdgeInsets.all(24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@ -40,9 +46,7 @@ class HouseKeepingCard extends StatelessWidget {
),
Text(
model.statusString,
style: TextStyle(
color:
model.statusColor),
style: TextStyle(color: model.statusColor),
),
],
),
@ -58,6 +62,21 @@ class HouseKeepingCard extends StatelessWidget {
),
16.w.heightBox,
_buildImgs(),
Row(
children: [
Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
width: 40.w,
height: 40.w,
),
12.w.widthBox,
'${S.of(context)!.tempPlotName}·${model.roomName}'
.text
.size(28.sp)
.color(ktextSubColor)
.make()
],
),
_getBottomCard(),
],
),
@ -120,7 +139,11 @@ class HouseKeepingCard extends StatelessWidget {
];
case 3:
return [
CardBottomButton.white(onPressed: () async {}, text: ('查看详情')),
CardBottomButton.white(
onPressed: () async {
Get.to(() => HouseKeepingDetailPage(model: model));
},
text: ('查看详情')),
];
case 4:
return [

@ -0,0 +1,110 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/views/bee_grid_image_view.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class HouseKeepingDetailPage extends StatefulWidget {
final HouseKeepingListModel model;
HouseKeepingDetailPage({Key? key, required this.model}) : super(key: key);
@override
_HouseKeepingDetailPageState createState() => _HouseKeepingDetailPageState();
}
class _HouseKeepingDetailPageState extends State<HouseKeepingDetailPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '服务详情',
body: ListView(
padding: EdgeInsets.symmetric(vertical: 24.w),
children: [
_buildInfo(),
],
),
);
}
Widget _buildInfo() {
return Container(
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 24.w),
child: Column(
children: [
Row(
children: [
'服务信息'.text.size(36.sp).bold.black.make(),
Spacer(),
widget.model.statusString.text
.size(32.sp)
.color(widget.model.statusColor)
.make()
],
),
40.w.heightBox,
_buildTile(R.ASSETS_ICONS_ARTICLE_COUNT_PNG, '申请人',
widget.model.proposerName),
16.w.heightBox,
_buildTile(
R.ASSETS_ICONS_PHONE_PNG, '联系电话', widget.model.proposerTel),
16.w.heightBox,
_buildTile(R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG, '地址',
'${S.of(context)!.tempPlotName}·${widget.model.roomName}'),
56.w.heightBox,
BeeGridImageView(
urls: widget.model.submitImgList.map((e) => e.url).toList()),
],
),
);
}
Widget _buildTile(String iconPath, String title, String suffix) {
return Row(
children: [
Image.asset(
iconPath,
width: 40.w,
height: 40.w,
),
8.w.widthBox,
title.text.size(28.sp).color(ktextSubColor).make(),
Spacer(),
suffix.text.size(28.sp).black.make(),
],
);
}
Widget _buidProcess() {
return Container(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 24.w),
width: double.infinity,
child: Column(
children: [
Row(
children: [
'服务进程'.text.size(36.sp).bold.black.make(),
],
),
],
),
);
}
Widget _buidProcessTile(String title, DateTime date) {
return Row(children: [
title.text.size(28.sp).color(ktextSubColor).make(),
Spacer(),
'${DateUtil.formatDate(date, format: 'yyyy-MM-dd HH:mm:ss')}'
.text
.size(28.sp)
.black
.make(),
]);
}
}
Loading…
Cancel
Save