diff --git a/lib/const/api.dart b/lib/const/api.dart index 8138a75..75a6303 100644 --- a/lib/const/api.dart +++ b/lib/const/api.dart @@ -60,4 +60,10 @@ class _Manage { ///报事报修:查询所有的报事报修信息(包含条件搜索) String get repairList => '/user/repair/list'; + + ///报事报修:根据报事报修id查询报修详情 + String get repairDetail => '/user/repair/findById'; + + ///报事报修:查询派工单详情表-派工类型 + String get dispatchListDetailType => 'system/dataDictionary/findSysDispatchListDetailType'; } diff --git a/lib/mock_models/fix/fix_model.dart b/lib/mock_models/fix/fix_model.dart index 0b21788..1b4134a 100644 --- a/lib/mock_models/fix/fix_model.dart +++ b/lib/mock_models/fix/fix_model.dart @@ -17,7 +17,7 @@ enum FIX_ENUM { ///已处理 DONE, } - +@deprecated class FixModel { static Map managerRoleMap = { FIX_ENUM.HAND_OUT: '待派单', @@ -206,7 +206,7 @@ Map fixDateLimitStringMap = { '12小时内处理': FIX_DATE_LIMIT.HOUR_12, '8小时内处理': FIX_DATE_LIMIT.HOUR_8, }; - +@deprecated class FixDetailModel { ///报修人 String userName; diff --git a/lib/models/manager/bussiness_and_fix_model.dart b/lib/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart similarity index 100% rename from lib/models/manager/bussiness_and_fix_model.dart rename to lib/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart diff --git a/lib/models/manager/bussiness_and_fix/dispatch_detail_model.dart b/lib/models/manager/bussiness_and_fix/dispatch_detail_model.dart new file mode 100644 index 0000000..6ba1219 --- /dev/null +++ b/lib/models/manager/bussiness_and_fix/dispatch_detail_model.dart @@ -0,0 +1,21 @@ +class DispatchDetialModel { + String showName; + int showValue; + String remarks; + + DispatchDetialModel({this.showName, this.showValue, this.remarks}); + + DispatchDetialModel.fromJson(Map json) { + showName = json['showName']; + showValue = json['showValue']; + remarks = json['remarks']; + } + + Map toJson() { + final Map data = new Map(); + data['showName'] = this.showName; + data['showValue'] = this.showValue; + data['remarks'] = this.remarks; + return data; + } +} \ No newline at end of file diff --git a/lib/models/manager/bussiness_and_fix/fixed_detail_model.dart b/lib/models/manager/bussiness_and_fix/fixed_detail_model.dart new file mode 100644 index 0000000..53c56a9 --- /dev/null +++ b/lib/models/manager/bussiness_and_fix/fixed_detail_model.dart @@ -0,0 +1,239 @@ +class FixedDetailModel { + HandlingSituation handlingSituation; + DispatchType dispatchType; + CostDetail costDetail; + RepairDetail repairDetail; + String evaluateInfo; + int type; + List processRecord; + + FixedDetailModel( + {this.handlingSituation, + this.dispatchType, + this.costDetail, + this.repairDetail, + this.evaluateInfo, + this.type, + this.processRecord}); + + FixedDetailModel.fromJson(Map 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(); + json['processRecord'].forEach((v) { + processRecord.add(new ProcessRecord.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + 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; + + HandlingSituation({this.id, this.detail, this.materialList, this.imgUrls}); + + HandlingSituation.fromJson(Map json) { + id = json['id']; + detail = json['detail']; + materialList = json['materialList']; + if (json['imgUrls'] != null) { + imgUrls = new List(); + json['imgUrls'].forEach((v) { + imgUrls.add(new ImgUrls.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + 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 json) { + url = json['url']; + size = json['size']; + longs = json['longs']; + paragraph = json['paragraph']; + sort = json['sort']; + } + + Map toJson() { + final Map data = new Map(); + 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 json) { + dispatchType = json['dispatchType']; + workOrderLimitName = json['workOrderLimitName']; + workOrderSubclassName = json['workOrderSubclassName']; + } + + Map toJson() { + final Map data = new Map(); + 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 json) { + laborCost = json['laborCost']; + materialCost = json['materialCost']; + totalCost = json['totalCost']; + } + + Map toJson() { + final Map data = new Map(); + 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; + + RepairDetail( + {this.id, + this.dispatchId, + this.name, + this.tel, + this.type, + this.status, + this.imgUrls}); + + RepairDetail.fromJson(Map 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(); + json['imgUrls'].forEach((v) { + imgUrls.add(new ImgUrls.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + 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 json) { + id = json['id']; + operationType = json['operationType']; + operationDate = json['operationDate']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['operationType'] = this.operationType; + data['operationDate'] = this.operationDate; + return data; + } +} diff --git a/lib/tools/aku_map.dart b/lib/tools/aku_map.dart index 398d937..60c9fff 100644 --- a/lib/tools/aku_map.dart +++ b/lib/tools/aku_map.dart @@ -1,4 +1,5 @@ class AkuMap { + ///根据权限返回不同的派单状态 static String fixStatus(bool canOpention, bool canPickup, int status) { if (canOpention) { switch (status) { @@ -57,4 +58,20 @@ class AkuMap { } } } + + ///报事报修服务类型 + static Map fixAreaType = {1: '公区维修', 2: '家庭维修'}; + + ///报事报修处理进程-操作类型 + static Map operationType = { + 1: '提交报修', + 2: '派单', + 3: '开始处理', + 4: '处理完成', + 5: '确认', + 6: '回访', + 7: '回退', + 8: '作废', + 9: '取消' + }; } diff --git a/lib/ui/home/business/business_page.dart b/lib/ui/home/business/business_page.dart index 7ee4f1f..cbf56f3 100644 --- a/lib/ui/home/business/business_page.dart +++ b/lib/ui/home/business/business_page.dart @@ -1,5 +1,5 @@ // 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'; // Project imports: diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 7ecb887..bfd833d 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -1,5 +1,5 @@ // 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/services.dart'; diff --git a/lib/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart b/lib/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart index d40c976..f6f35a5 100644 --- a/lib/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart +++ b/lib/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart @@ -1,29 +1,33 @@ // 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'; // Package imports: import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:common_utils/common_utils.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; // Project imports: 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/provider/user_provider.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/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/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/show_bottom_sheet.dart'; class BusinessAndFixDetailPage extends StatefulWidget { - final FixModel model; + final BussinessAndFixModel model; BusinessAndFixDetailPage({Key key, this.model}) : super(key: key); @override @@ -37,89 +41,116 @@ class _BusinessAndFixDetailPageState extends State { return userProvider.userInfoModel.role; } - bool get isHandOut => widget.model.type == FIX_ENUM.HAND_OUT; - FixDetailModel get detailModel => widget.model.detail; + bool get isHandOut => widget.model.status == 1; + FixedDetailModel _detailModel; + bool _onload = true; + EasyRefreshController _easyRefreshController; - String get fixType { - switch (detailModel.type) { - case FIX_PAYMENT_TYPE.FREE: - return '无偿服务'; - break; - case FIX_PAYMENT_TYPE.PAY: - return '有偿服务'; - break; - default: - return ''; - break; - } + List _dispatchModels; + + @override + void initState() { + super.initState(); + _easyRefreshController = EasyRefreshController(); } - 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; - } + @override + void dispose() { + _easyRefreshController?.dispose(); + super.dispose(); } - String get subType { - switch (detailModel.subType) { - case FIX_SUB_TYPE.NORMAL: - return '一般单'; - break; - case FIX_SUB_TYPE.HURRY: - return '加急单'; - break; - default: - return ''; - break; - } + // String get fixType { + // switch (detailModel.type) { + // case FIX_PAYMENT_TYPE.FREE: + // return '无偿服务'; + // break; + // case FIX_PAYMENT_TYPE.PAY: + // return '有偿服务'; + // break; + // default: + // return ''; + // 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(context, listen: false); + return Text( + AkuMap.fixStatus(userProvider.infoModel.canOperation, + userProvider.infoModel.canPickUpTicket, widget.model.status), + style: TextStyle( + color: widget.model.status < 4 + ? Color(0XFFFF4501) + : AppStyle.minorTextColor, + ), + ); } - Widget get fixTypeWidget { - if (userRole == USER_ROLE.MANAGER) { - return Text( - FixModel.managerRoleMap[widget.model.type], - style: TextStyle( - color: widget.model.type != FIX_ENUM.DONE - ? Color(0XFFFF4501) - : AppStyle.minorTextColor, - ), - ); - } else { - return Text( - FixModel.otherRoleMap[widget.model.type], - style: TextStyle( - color: widget.model.type != FIX_ENUM.DONE - ? Color(0XFFFF4501) - : AppStyle.minorTextColor, - ), - ); - } + Widget _empty() { + return Container(); } @override Widget build(BuildContext context) { return AkuScaffold( title: '报修详情', - body: ListView( - padding: EdgeInsets.symmetric(vertical: 16.w), - children: [ - _buildInfo(), - _buildType(widget.model.type == FIX_ENUM.HAND_OUT), - _buildProcess(), - detailModel.result == null ? SizedBox() : _buildResult(), - detailModel.review == null ? SizedBox() : _buildRating(), - ], + 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), + children: [ + _buildInfo(), + _buildType(widget.model.type == FIX_ENUM.HAND_OUT), + _buildProcess(), + _detailModel.handlingSituation == null + ? SizedBox() + : _buildResult(), + _detailModel.evaluateInfo == null + ? SizedBox() + : _buildRating(), + ], + ), ), bottom: Builder( builder: (context) { @@ -149,10 +180,10 @@ class _BusinessAndFixDetailPageState extends State { color: AppStyle.primaryColor, nullColor: AppStyle.minorColor, onPressed: () { - Get.to(FixerDepartmentPage( - model: widget.model, - changeType: true, - )); + // Get.to(FixerDepartmentPage( + // model: widget.model, + // changeType: true, + // )); }, child: Text( '改派', @@ -166,14 +197,14 @@ class _BusinessAndFixDetailPageState extends State { color: AppStyle.primaryColor, nullColor: AppStyle.minorColor, onPressed: () { - final userProvider = - Provider.of(context, listen: false); - detailModel.fixStatuses.add(FixStatus( - title: '${userProvider.userInfoModel.nickName}已接单', - date: DateTime.now(), - )); - widget.model.type = FIX_ENUM.PROCESSING; - Get.back(); + // final userProvider = + // Provider.of(context, listen: false); + // detailModel.fixStatuses.add(FixStatus( + // title: '${userProvider.userInfoModel.nickName}已接单', + // date: DateTime.now(), + // )); + // widget.model.type = FIX_ENUM.PROCESSING; + // Get.back(); }, child: Text( '立即接单', @@ -212,7 +243,7 @@ class _BusinessAndFixDetailPageState extends State { ), ), onPressed: () { - Get.to(FixMoreTimePage(model: widget.model)); + // Get.to(FixMoreTimePage(model: widget.model)); }, child: Text( '申请延时', @@ -228,7 +259,7 @@ class _BusinessAndFixDetailPageState extends State { radius: 4.w, color: AppStyle.primaryColor, onPressed: () { - Get.to(FixWorkFinishPage(model: widget.model)); + // Get.to(FixWorkFinishPage(model: widget.model)); }, child: Text( '处理完成', @@ -251,27 +282,27 @@ class _BusinessAndFixDetailPageState extends State { _buildInfo() { return AkuTitleBox( title: '报修信息', - suffix: fixTypeWidget, + suffix: fixTypeWidget(), children: [ AkuBox.h(16), _buildTile( R.ASSETS_MESSAGE_IC_PEOPLE_PNG, '报修人', - widget.model.detail.userName, + _detailModel.repairDetail.name, ), _buildTile( R.ASSETS_MESSAGE_IC_PHONE_PNG, '联系电话', - widget.model.detail.userPhoneNumber, + _detailModel.repairDetail.tel, ), _buildTile( R.ASSETS_MESSAGE_IC_AREA_PNG, '报修区域', - widget.model.detail.fixArea, + AkuMap.fixAreaType[_detailModel.repairDetail.type], ), AkuBox.h(8), Text( - widget.model.title, + widget.model.reportDetail, style: TextStyle( color: AppStyle.primaryTextColor, fontWeight: FontWeight.bold, @@ -285,10 +316,11 @@ class _BusinessAndFixDetailPageState extends State { crossAxisSpacing: 16.w, mainAxisSpacing: 16.w, ), - children: widget.model.imgs.map((e) { + children: _detailModel.repairDetail.imgUrls.map((e) { return ClipRRect( 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(), shrinkWrap: true, @@ -307,10 +339,13 @@ class _BusinessAndFixDetailPageState extends State { fixType, canTap, helpContent: '请选择服务类型', - onTap: () { + onTap: () async { + List models = await ManageFunc.dispatchListDetailType(); + _dispatchModels = + models.map((e) => DispatchDetialModel.fromJson(e)).toList(); showItemSheet( title: '派单类型', - items: ['无偿服务', '有偿服务'], + items: _dispatchModels.map((e) => e.showName).toList(), selectItem: fixPaymentMap[detailModel.type], onTap: (result) { detailModel.type = fixPaymentStringMap[result]; @@ -363,10 +398,11 @@ class _BusinessAndFixDetailPageState extends State { _buildProcess() { return AkuTitleBox( title: '报修进程', - children: detailModel.fixStatuses.map((e) { + children: _detailModel.processRecord.map((e) { return _buildProcessTile( - e.title, - DateUtil.formatDate(e.date, format: 'yyyy-MM-dd HH:mm:ss'), + AkuMap.operationType[e.operationType], + DateUtil.formatDateStr(e.operationDate, + format: 'yyyy-MM-dd HH:mm:ss'), ); }).toList(), ); @@ -386,7 +422,7 @@ class _BusinessAndFixDetailPageState extends State { ), AkuBox.h(8), Text( - detailModel.result.detail, + _detailModel.handlingSituation.detail, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 28.w, @@ -403,7 +439,7 @@ class _BusinessAndFixDetailPageState extends State { ), AkuBox.h(8), Text( - detailModel.result.material, + _detailModel.handlingSituation.materialList, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 28.w, @@ -425,19 +461,11 @@ class _BusinessAndFixDetailPageState extends State { gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 4, ), - children: detailModel.result.imgs.map((e) { + children: _detailModel.handlingSituation.imgUrls.map((e) { return ClipRRect( - borderRadius: BorderRadius.circular(4.w), - child: (e is String) - ? Image.asset( - e, - fit: BoxFit.cover, - ) - : Image.file( - e, - fit: BoxFit.cover, - ), - ); + borderRadius: BorderRadius.circular(4.w), + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_PLACEHOLDER_WEBP, image: e.url)); }).toList(), ), ], @@ -459,7 +487,7 @@ class _BusinessAndFixDetailPageState extends State { ), ), Spacer(), - _buildStar(detailModel.review.rate), + _buildStar(5), ], ), AkuBox.h(24), @@ -472,7 +500,7 @@ class _BusinessAndFixDetailPageState extends State { ), AkuBox.h(8), Text( - detailModel.review.content, + _detailModel.evaluateInfo, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 28.w, diff --git a/lib/ui/sub_pages/business_and_fix/business_fix_card.dart b/lib/ui/sub_pages/business_and_fix/business_fix_card.dart index 924239f..292e7a6 100644 --- a/lib/ui/sub_pages/business_and_fix/business_fix_card.dart +++ b/lib/ui/sub_pages/business_and_fix/business_fix_card.dart @@ -1,5 +1,5 @@ // 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:flutter/material.dart'; diff --git a/lib/ui/sub_pages/business_and_fix/bussiness_and_fix_view.dart b/lib/ui/sub_pages/business_and_fix/bussiness_and_fix_view.dart index 43a8f4c..8ced96a 100644 --- a/lib/ui/sub_pages/business_and_fix/bussiness_and_fix_view.dart +++ b/lib/ui/sub_pages/business_and_fix/bussiness_and_fix_view.dart @@ -1,5 +1,5 @@ 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/widgets/common/bee_list_view.dart'; import 'package:flutter/material.dart'; diff --git a/lib/utils/network/manage_func.dart b/lib/utils/network/manage_func.dart new file mode 100644 index 0000000..4556344 --- /dev/null +++ b/lib/utils/network/manage_func.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; + } +}