|
|
@ -4,12 +4,13 @@ import 'package:akuCommunity/pages/manager_func.dart';
|
|
|
|
import 'package:akuCommunity/utils/bee_map.dart';
|
|
|
|
import 'package:akuCommunity/utils/bee_map.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_divider.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_divider.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:akuCommunity/widget/horizontal_image_view.dart';
|
|
|
|
import 'package:akuCommunity/widget/views/horizontal_image_view.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/const/resource.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class FixedDetailPage extends StatefulWidget {
|
|
|
|
class FixedDetailPage extends StatefulWidget {
|
|
|
|
final int id;
|
|
|
|
final int id;
|
|
|
@ -23,6 +24,7 @@ class FixedDetailPage extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
|
|
|
|
bool _onLoading = true;
|
|
|
|
EasyRefreshController _easyRefreshController;
|
|
|
|
EasyRefreshController _easyRefreshController;
|
|
|
|
FixedDetailModel _model;
|
|
|
|
FixedDetailModel _model;
|
|
|
|
Color _getColor(int state) {
|
|
|
|
Color _getColor(int state) {
|
|
|
@ -43,14 +45,17 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
|
|
|
|
|
|
|
|
Widget _buildHead(FixedDetailModel model) {
|
|
|
|
Widget _buildHead(FixedDetailModel model) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: kForeGroundColor, borderRadius: BorderRadius.circular(8.w)),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(28.w, 20.w, 20.w, 24.w),
|
|
|
|
padding: EdgeInsets.fromLTRB(28.w, 20.w, 20.w, 24.w),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
'报修信息'.text.black.size(32.sp).bold.make(),
|
|
|
|
'报修信息'.text.black.size(32.sp).bold.make(),
|
|
|
|
8.widthBox,
|
|
|
|
8.w.widthBox,
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: 20.w, vertical: 4.w),
|
|
|
|
EdgeInsets.symmetric(horizontal: 20.w, vertical: 4.w),
|
|
|
@ -84,7 +89,7 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
indent: 24.w,
|
|
|
|
indent: 24.w,
|
|
|
|
endIndent: 20.w,
|
|
|
|
endIndent: 20.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
24.heightBox,
|
|
|
|
24.w.heightBox,
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 28.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 28.w),
|
|
|
|
child: model.appReportRepairVo.reportDetail.text.black
|
|
|
|
child: model.appReportRepairVo.reportDetail.text.black
|
|
|
@ -95,38 +100,65 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 8.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 8.w),
|
|
|
|
child: HorizontalImageView(model.appReportRepairVo.imgUrls),
|
|
|
|
child: HorizontalImageView(
|
|
|
|
|
|
|
|
model.appReportRepairVo.imgUrls.map((e) => e.url).toList()),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget _buildEmpty() {
|
|
|
|
|
|
|
|
return Container();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget _reparCard(){
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
|
|
|
horizontal: 28.w,
|
|
|
|
|
|
|
|
vertical: 24.w
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: kForeGroundColor,
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(8.w)
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
'维修信息'.text.black.size(32.sp).bold.make(),
|
|
|
|
|
|
|
|
24.w.heightBox,
|
|
|
|
|
|
|
|
BeeDivider.horizontal()
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BeeScaffold(
|
|
|
|
return BeeScaffold(
|
|
|
|
title: '报事报修',
|
|
|
|
title: '报事报修',
|
|
|
|
body: Column(
|
|
|
|
body: EasyRefresh(
|
|
|
|
children: [
|
|
|
|
|
|
|
|
EasyRefresh(
|
|
|
|
|
|
|
|
firstRefresh: true,
|
|
|
|
firstRefresh: true,
|
|
|
|
controller: _easyRefreshController,
|
|
|
|
controller: _easyRefreshController,
|
|
|
|
onRefresh: () async {
|
|
|
|
onRefresh: () async {
|
|
|
|
_model = await ManagerFunc.reportRepairFindBYLD(widget.id);
|
|
|
|
_model = await ManagerFunc.reportRepairFindBYLD(widget.id);
|
|
|
|
|
|
|
|
_onLoading = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: ListView(
|
|
|
|
header: MaterialHeader(),
|
|
|
|
|
|
|
|
child: _onLoading
|
|
|
|
|
|
|
|
? _buildEmpty()
|
|
|
|
|
|
|
|
: ListView(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 36.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 36.w),
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_buildHead(_model),
|
|
|
|
_buildHead(_model),
|
|
|
|
].sepWidget(separate: 16.heightBox),
|
|
|
|
].sepWidget(separate: 16.w.heightBox),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).expand(),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
bottomNavi: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: MediaQuery.of(context).padding.bottom + 39.w),
|
|
|
|
bottom: MediaQuery.of(context).padding.bottom + 39.w),
|
|
|
|
child: MaterialButton(
|
|
|
|
child: MaterialButton(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
shape:
|
|
|
|
borderRadius: BorderRadius.circular(48.w)),
|
|
|
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(48.w)),
|
|
|
|
color: kPrimaryColor,
|
|
|
|
color: kPrimaryColor,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 278.w, vertical: 26.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 278.w, vertical: 26.w),
|
|
|
|
elevation: 0,
|
|
|
|
elevation: 0,
|
|
|
@ -134,8 +166,6 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
|
|
|
|
onPressed: () {},
|
|
|
|
onPressed: () {},
|
|
|
|
child: '确认完成'.text.black.size(32.sp).bold.make(),
|
|
|
|
child: '确认完成'.text.black.size(32.sp).bold.make(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|