对接: 报事报修:根据报事报修id查询报修详情

对接:报事报修:查询派工单详情表-派工类型
hmxc
张萌 4 years ago
parent fdf33b205b
commit d0a5f150a5

@ -60,4 +60,10 @@ class _Manage {
///() ///()
String get repairList => '/user/repair/list'; String get repairList => '/user/repair/list';
///id
String get repairDetail => '/user/repair/findById';
///-
String get dispatchListDetailType => 'system/dataDictionary/findSysDispatchListDetailType';
} }

@ -17,7 +17,7 @@ enum FIX_ENUM {
/// ///
DONE, DONE,
} }
@deprecated
class FixModel { class FixModel {
static Map<FIX_ENUM, String> managerRoleMap = { static Map<FIX_ENUM, String> managerRoleMap = {
FIX_ENUM.HAND_OUT: '待派单', FIX_ENUM.HAND_OUT: '待派单',
@ -206,7 +206,7 @@ Map<String, FIX_DATE_LIMIT> fixDateLimitStringMap = {
'12小时内处理': FIX_DATE_LIMIT.HOUR_12, '12小时内处理': FIX_DATE_LIMIT.HOUR_12,
'8小时内处理': FIX_DATE_LIMIT.HOUR_8, '8小时内处理': FIX_DATE_LIMIT.HOUR_8,
}; };
@deprecated
class FixDetailModel { class FixDetailModel {
/// ///
String userName; String userName;

@ -0,0 +1,21 @@
class DispatchDetialModel {
String showName;
int showValue;
String remarks;
DispatchDetialModel({this.showName, this.showValue, this.remarks});
DispatchDetialModel.fromJson(Map<String, dynamic> json) {
showName = json['showName'];
showValue = json['showValue'];
remarks = json['remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['showName'] = this.showName;
data['showValue'] = this.showValue;
data['remarks'] = this.remarks;
return data;
}
}

@ -0,0 +1,239 @@
class FixedDetailModel {
HandlingSituation handlingSituation;
DispatchType dispatchType;
CostDetail costDetail;
RepairDetail repairDetail;
String evaluateInfo;
int type;
List<ProcessRecord> processRecord;
FixedDetailModel(
{this.handlingSituation,
this.dispatchType,
this.costDetail,
this.repairDetail,
this.evaluateInfo,
this.type,
this.processRecord});
FixedDetailModel.fromJson(Map<String, dynamic> json) {
handlingSituation = json['handlingSituation'] != null
? new HandlingSituation.fromJson(json['handlingSituation'])
: null;
dispatchType = json['dispatchType'] != null
? new DispatchType.fromJson(json['dispatchType'])
: null;
costDetail = json['costDetail'] != null
? new CostDetail.fromJson(json['costDetail'])
: null;
repairDetail = json['repairDetail'] != null
? new RepairDetail.fromJson(json['repairDetail'])
: null;
evaluateInfo = json['evaluateInfo'];
type = json['type'];
if (json['processRecord'] != null) {
processRecord = new List<ProcessRecord>();
json['processRecord'].forEach((v) {
processRecord.add(new ProcessRecord.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.handlingSituation != null) {
data['handlingSituation'] = this.handlingSituation.toJson();
}
if (this.dispatchType != null) {
data['dispatchType'] = this.dispatchType.toJson();
}
if (this.costDetail != null) {
data['costDetail'] = this.costDetail.toJson();
}
if (this.repairDetail != null) {
data['repairDetail'] = this.repairDetail.toJson();
}
data['evaluateInfo'] = this.evaluateInfo;
data['type'] = this.type;
if (this.processRecord != null) {
data['processRecord'] =
this.processRecord.map((v) => v.toJson()).toList();
}
return data;
}
}
class HandlingSituation {
int id;
String detail;
String materialList;
List<ImgUrls> imgUrls;
HandlingSituation({this.id, this.detail, this.materialList, this.imgUrls});
HandlingSituation.fromJson(Map<String, dynamic> json) {
id = json['id'];
detail = json['detail'];
materialList = json['materialList'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>();
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['detail'] = this.detail;
data['materialList'] = this.materialList;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
}
return data;
}
}
class ImgUrls {
String url;
String size;
int longs;
int paragraph;
int sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});
ImgUrls.fromJson(Map<String, dynamic> json) {
url = json['url'];
size = json['size'];
longs = json['longs'];
paragraph = json['paragraph'];
sort = json['sort'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['url'] = this.url;
data['size'] = this.size;
data['longs'] = this.longs;
data['paragraph'] = this.paragraph;
data['sort'] = this.sort;
return data;
}
}
class DispatchType {
int dispatchType;
String workOrderLimitName;
String workOrderSubclassName;
DispatchType(
{this.dispatchType, this.workOrderLimitName, this.workOrderSubclassName});
DispatchType.fromJson(Map<String, dynamic> json) {
dispatchType = json['dispatchType'];
workOrderLimitName = json['workOrderLimitName'];
workOrderSubclassName = json['workOrderSubclassName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['dispatchType'] = this.dispatchType;
data['workOrderLimitName'] = this.workOrderLimitName;
data['workOrderSubclassName'] = this.workOrderSubclassName;
return data;
}
}
class CostDetail {
int laborCost;
int materialCost;
int totalCost;
CostDetail({this.laborCost, this.materialCost, this.totalCost});
CostDetail.fromJson(Map<String, dynamic> json) {
laborCost = json['laborCost'];
materialCost = json['materialCost'];
totalCost = json['totalCost'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['laborCost'] = this.laborCost;
data['materialCost'] = this.materialCost;
data['totalCost'] = this.totalCost;
return data;
}
}
class RepairDetail {
int id;
int dispatchId;
String name;
String tel;
int type;
int status;
List<ImgUrls> imgUrls;
RepairDetail(
{this.id,
this.dispatchId,
this.name,
this.tel,
this.type,
this.status,
this.imgUrls});
RepairDetail.fromJson(Map<String, dynamic> json) {
id = json['id'];
dispatchId = json['dispatchId'];
name = json['name'];
tel = json['tel'];
type = json['type'];
status = json['status'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>();
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['dispatchId'] = this.dispatchId;
data['name'] = this.name;
data['tel'] = this.tel;
data['type'] = this.type;
data['status'] = this.status;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
}
return data;
}
}
class ProcessRecord {
int id;
int operationType;
String operationDate;
ProcessRecord({this.id, this.operationType, this.operationDate});
ProcessRecord.fromJson(Map<String, dynamic> json) {
id = json['id'];
operationType = json['operationType'];
operationDate = json['operationDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['operationType'] = this.operationType;
data['operationDate'] = this.operationDate;
return data;
}
}

@ -1,4 +1,5 @@
class AkuMap { class AkuMap {
///
static String fixStatus(bool canOpention, bool canPickup, int status) { static String fixStatus(bool canOpention, bool canPickup, int status) {
if (canOpention) { if (canOpention) {
switch (status) { switch (status) {
@ -57,4 +58,20 @@ class AkuMap {
} }
} }
} }
///
static Map<int, String> fixAreaType = {1: '公区维修', 2: '家庭维修'};
///-
static Map<int, String> operationType = {
1: '提交报修',
2: '派单',
3: '开始处理',
4: '处理完成',
5: '确认',
6: '回访',
7: '回退',
8: '作废',
9: '取消'
};
} }

@ -1,5 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/models/manager/bussiness_and_fix_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// Project imports: // Project imports:

@ -1,5 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/models/manager/bussiness_and_fix_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';

@ -1,29 +1,33 @@
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix/dispatch_detail_model.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix/fixed_detail_model.dart';
import 'package:aku_community_manager/tools/aku_map.dart';
import 'package:aku_community_manager/utils/network/manage_func.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// Package imports: // Package imports:
import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:aku_ui/common_widgets/aku_material_button.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
// Project imports: // Project imports:
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
import 'package:aku_community_manager/mock_models/users/user_info_model.dart'; import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/screen_tool.dart'; import 'package:aku_community_manager/tools/screen_tool.dart';
import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fix_more_time_page.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fix_work_finish_page.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fixer_department_page.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fixer_department_page.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart'; import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
import 'package:aku_community_manager/ui/widgets/inner/show_bottom_sheet.dart'; import 'package:aku_community_manager/ui/widgets/inner/show_bottom_sheet.dart';
class BusinessAndFixDetailPage extends StatefulWidget { class BusinessAndFixDetailPage extends StatefulWidget {
final FixModel model; final BussinessAndFixModel model;
BusinessAndFixDetailPage({Key key, this.model}) : super(key: key); BusinessAndFixDetailPage({Key key, this.model}) : super(key: key);
@override @override
@ -37,90 +41,117 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
return userProvider.userInfoModel.role; return userProvider.userInfoModel.role;
} }
bool get isHandOut => widget.model.type == FIX_ENUM.HAND_OUT; bool get isHandOut => widget.model.status == 1;
FixDetailModel get detailModel => widget.model.detail; FixedDetailModel _detailModel;
bool _onload = true;
EasyRefreshController _easyRefreshController;
String get fixType { List<DispatchDetialModel> _dispatchModels;
switch (detailModel.type) {
case FIX_PAYMENT_TYPE.FREE:
return '无偿服务';
break;
case FIX_PAYMENT_TYPE.PAY:
return '有偿服务';
break;
default:
return '';
break;
}
}
String get dateLimit { @override
switch (detailModel.limit) { void initState() {
case FIX_DATE_LIMIT.HOUR_24: super.initState();
return '24小时内处理'; _easyRefreshController = EasyRefreshController();
break;
case FIX_DATE_LIMIT.HOUR_12:
return '12小时内处理';
break;
case FIX_DATE_LIMIT.HOUR_8:
return '8小时内处理';
break;
default:
return '';
break;
}
} }
String get subType { @override
switch (detailModel.subType) { void dispose() {
case FIX_SUB_TYPE.NORMAL: _easyRefreshController?.dispose();
return '一般单'; super.dispose();
break;
case FIX_SUB_TYPE.HURRY:
return '加急单';
break;
default:
return '';
break;
}
} }
Widget get fixTypeWidget { // String get fixType {
if (userRole == USER_ROLE.MANAGER) { // switch (detailModel.type) {
return Text( // case FIX_PAYMENT_TYPE.FREE:
FixModel.managerRoleMap[widget.model.type], // return '无偿服务';
style: TextStyle( // break;
color: widget.model.type != FIX_ENUM.DONE // case FIX_PAYMENT_TYPE.PAY:
? Color(0XFFFF4501) // return '有偿服务';
: AppStyle.minorTextColor, // break;
), // default:
); // return '';
} else { // break;
// }
// }
// String get dateLimit {
// switch (detailModel.limit) {
// case FIX_DATE_LIMIT.HOUR_24:
// return '24小时内处理';
// break;
// case FIX_DATE_LIMIT.HOUR_12:
// return '12小时内处理';
// break;
// case FIX_DATE_LIMIT.HOUR_8:
// return '8小时内处理';
// break;
// default:
// return '';
// break;
// }
// }
// String get subType {
// switch (detailModel.subType) {
// case FIX_SUB_TYPE.NORMAL:
// return '一般单';
// break;
// case FIX_SUB_TYPE.HURRY:
// return '加急单';
// break;
// default:
// return '';
// break;
// }
// }
Widget fixTypeWidget() {
UserProvider userProvider =
Provider.of<UserProvider>(context, listen: false);
return Text( return Text(
FixModel.otherRoleMap[widget.model.type], AkuMap.fixStatus(userProvider.infoModel.canOperation,
userProvider.infoModel.canPickUpTicket, widget.model.status),
style: TextStyle( style: TextStyle(
color: widget.model.type != FIX_ENUM.DONE color: widget.model.status < 4
? Color(0XFFFF4501) ? Color(0XFFFF4501)
: AppStyle.minorTextColor, : AppStyle.minorTextColor,
), ),
); );
} }
Widget _empty() {
return Container();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AkuScaffold( return AkuScaffold(
title: '报修详情', title: '报修详情',
body: ListView( body: EasyRefresh(
firstRefresh: true,
controller: _easyRefreshController,
header: MaterialHeader(),
onRefresh: () async {
_detailModel = await ManageFunc.repairDetail(widget.model.id);
_onload = false;
},
child: _onload
? _empty()
: ListView(
padding: EdgeInsets.symmetric(vertical: 16.w), padding: EdgeInsets.symmetric(vertical: 16.w),
children: [ children: [
_buildInfo(), _buildInfo(),
_buildType(widget.model.type == FIX_ENUM.HAND_OUT), _buildType(widget.model.type == FIX_ENUM.HAND_OUT),
_buildProcess(), _buildProcess(),
detailModel.result == null ? SizedBox() : _buildResult(), _detailModel.handlingSituation == null
detailModel.review == null ? SizedBox() : _buildRating(), ? SizedBox()
: _buildResult(),
_detailModel.evaluateInfo == null
? SizedBox()
: _buildRating(),
], ],
), ),
),
bottom: Builder( bottom: Builder(
builder: (context) { builder: (context) {
final userProvider = final userProvider =
@ -149,10 +180,10 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
color: AppStyle.primaryColor, color: AppStyle.primaryColor,
nullColor: AppStyle.minorColor, nullColor: AppStyle.minorColor,
onPressed: () { onPressed: () {
Get.to(FixerDepartmentPage( // Get.to(FixerDepartmentPage(
model: widget.model, // model: widget.model,
changeType: true, // changeType: true,
)); // ));
}, },
child: Text( child: Text(
'改派', '改派',
@ -166,14 +197,14 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
color: AppStyle.primaryColor, color: AppStyle.primaryColor,
nullColor: AppStyle.minorColor, nullColor: AppStyle.minorColor,
onPressed: () { onPressed: () {
final userProvider = // final userProvider =
Provider.of<UserProvider>(context, listen: false); // Provider.of<UserProvider>(context, listen: false);
detailModel.fixStatuses.add(FixStatus( // detailModel.fixStatuses.add(FixStatus(
title: '${userProvider.userInfoModel.nickName}已接单', // title: '${userProvider.userInfoModel.nickName}已接单',
date: DateTime.now(), // date: DateTime.now(),
)); // ));
widget.model.type = FIX_ENUM.PROCESSING; // widget.model.type = FIX_ENUM.PROCESSING;
Get.back(); // Get.back();
}, },
child: Text( child: Text(
'立即接单', '立即接单',
@ -212,7 +243,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
), ),
), ),
onPressed: () { onPressed: () {
Get.to(FixMoreTimePage(model: widget.model)); // Get.to(FixMoreTimePage(model: widget.model));
}, },
child: Text( child: Text(
'申请延时', '申请延时',
@ -228,7 +259,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
radius: 4.w, radius: 4.w,
color: AppStyle.primaryColor, color: AppStyle.primaryColor,
onPressed: () { onPressed: () {
Get.to(FixWorkFinishPage(model: widget.model)); // Get.to(FixWorkFinishPage(model: widget.model));
}, },
child: Text( child: Text(
'处理完成', '处理完成',
@ -251,27 +282,27 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
_buildInfo() { _buildInfo() {
return AkuTitleBox( return AkuTitleBox(
title: '报修信息', title: '报修信息',
suffix: fixTypeWidget, suffix: fixTypeWidget(),
children: [ children: [
AkuBox.h(16), AkuBox.h(16),
_buildTile( _buildTile(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG, R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
'报修人', '报修人',
widget.model.detail.userName, _detailModel.repairDetail.name,
), ),
_buildTile( _buildTile(
R.ASSETS_MESSAGE_IC_PHONE_PNG, R.ASSETS_MESSAGE_IC_PHONE_PNG,
'联系电话', '联系电话',
widget.model.detail.userPhoneNumber, _detailModel.repairDetail.tel,
), ),
_buildTile( _buildTile(
R.ASSETS_MESSAGE_IC_AREA_PNG, R.ASSETS_MESSAGE_IC_AREA_PNG,
'报修区域', '报修区域',
widget.model.detail.fixArea, AkuMap.fixAreaType[_detailModel.repairDetail.type],
), ),
AkuBox.h(8), AkuBox.h(8),
Text( Text(
widget.model.title, widget.model.reportDetail,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -285,10 +316,11 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
crossAxisSpacing: 16.w, crossAxisSpacing: 16.w,
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
), ),
children: widget.model.imgs.map((e) { children: _detailModel.repairDetail.imgUrls.map((e) {
return ClipRRect( return ClipRRect(
borderRadius: BorderRadius.circular(4.w), borderRadius: BorderRadius.circular(4.w),
child: (e is String) ? Image.asset(e) : Image.file(e), child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_PLACEHOLDER_WEBP, image: e.url),
); );
}).toList(), }).toList(),
shrinkWrap: true, shrinkWrap: true,
@ -307,10 +339,13 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
fixType, fixType,
canTap, canTap,
helpContent: '请选择服务类型', helpContent: '请选择服务类型',
onTap: () { onTap: () async {
List models = await ManageFunc.dispatchListDetailType();
_dispatchModels =
models.map((e) => DispatchDetialModel.fromJson(e)).toList();
showItemSheet( showItemSheet(
title: '派单类型', title: '派单类型',
items: ['无偿服务', '有偿服务'], items: _dispatchModels.map((e) => e.showName).toList(),
selectItem: fixPaymentMap[detailModel.type], selectItem: fixPaymentMap[detailModel.type],
onTap: (result) { onTap: (result) {
detailModel.type = fixPaymentStringMap[result]; detailModel.type = fixPaymentStringMap[result];
@ -363,10 +398,11 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
_buildProcess() { _buildProcess() {
return AkuTitleBox( return AkuTitleBox(
title: '报修进程', title: '报修进程',
children: detailModel.fixStatuses.map((e) { children: _detailModel.processRecord.map((e) {
return _buildProcessTile( return _buildProcessTile(
e.title, AkuMap.operationType[e.operationType],
DateUtil.formatDate(e.date, format: 'yyyy-MM-dd HH:mm:ss'), DateUtil.formatDateStr(e.operationDate,
format: 'yyyy-MM-dd HH:mm:ss'),
); );
}).toList(), }).toList(),
); );
@ -386,7 +422,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
), ),
AkuBox.h(8), AkuBox.h(8),
Text( Text(
detailModel.result.detail, _detailModel.handlingSituation.detail,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.w, fontSize: 28.w,
@ -403,7 +439,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
), ),
AkuBox.h(8), AkuBox.h(8),
Text( Text(
detailModel.result.material, _detailModel.handlingSituation.materialList,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.w, fontSize: 28.w,
@ -425,19 +461,11 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4, crossAxisCount: 4,
), ),
children: detailModel.result.imgs.map((e) { children: _detailModel.handlingSituation.imgUrls.map((e) {
return ClipRRect( return ClipRRect(
borderRadius: BorderRadius.circular(4.w), borderRadius: BorderRadius.circular(4.w),
child: (e is String) child: FadeInImage.assetNetwork(
? Image.asset( placeholder: R.ASSETS_PLACEHOLDER_WEBP, image: e.url));
e,
fit: BoxFit.cover,
)
: Image.file(
e,
fit: BoxFit.cover,
),
);
}).toList(), }).toList(),
), ),
], ],
@ -459,7 +487,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
), ),
), ),
Spacer(), Spacer(),
_buildStar(detailModel.review.rate), _buildStar(5),
], ],
), ),
AkuBox.h(24), AkuBox.h(24),
@ -472,7 +500,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
), ),
AkuBox.h(8), AkuBox.h(8),
Text( Text(
detailModel.review.content, _detailModel.evaluateInfo,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.w, fontSize: 28.w,

@ -1,5 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/models/manager/bussiness_and_fix_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart';
import 'package:aku_community_manager/tools/aku_map.dart'; import 'package:aku_community_manager/tools/aku_map.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,5 +1,5 @@
import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/const/api.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix_card.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix_card.dart';
import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart'; import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -0,0 +1,19 @@
import 'package:aku_community_manager/const/api.dart';
import 'package:aku_community_manager/utils/network/net_util.dart';
import 'package:dio/dio.dart';
class ManageFunc {
static Future repairDetail(int id) async {
Response response =
await NetUtil().dio.get(API.manage.repairDetail, queryParameters: {
'repairId': id,
});
return response.data;
}
static Future dispatchListDetailType() async {
Response response =
await NetUtil().dio.get(API.manage.dispatchListDetailType);
return response.data as List;
}
}
Loading…
Cancel
Save