diff --git a/lib/ui/home/personal_draw.dart b/lib/ui/home/personal_draw.dart index 307608d..7113e0d 100644 --- a/lib/ui/home/personal_draw.dart +++ b/lib/ui/home/personal_draw.dart @@ -104,7 +104,7 @@ class _PersonalDrawState extends State { children: [ Icon(Icons.location_on_outlined, size: 33.w), Text( - '深圳华悦茂峰', + '人才公寓', style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 24.sp), 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 93652f5..f112f97 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 @@ -132,7 +132,7 @@ class _BusinessAndFixDetailPageState extends State { _reportModel.workOrderTyoe != null && _reportModel.workOrderTimeLimit != null ? () { - Get.to(FixerDepartmentPage(model: _reportModel)); + Get.to(FixerDepartmentPage(model: _reportModel,dispatchId: _detailModel.repairDetail.dispatchId,)); } : null, child: Text( @@ -381,7 +381,7 @@ class _BusinessAndFixDetailPageState extends State { canTap, helpContent: '请选择工单子类', onTap: () async { - List models = await ManageFunc.workOrderTypeDetail(widget.model.id); + List models = await ManageFunc.workOrderTypeDetail(1); _workTypeModels = models.map((e) => WorkOrderTypeModel.fromJson(e)).toList(); showItemSheet( diff --git a/lib/ui/sub_pages/business_and_fix/business_and_fix_page.dart b/lib/ui/sub_pages/business_and_fix/business_and_fix_page.dart index a659a05..8ebf7bc 100644 --- a/lib/ui/sub_pages/business_and_fix/business_and_fix_page.dart +++ b/lib/ui/sub_pages/business_and_fix/business_and_fix_page.dart @@ -35,10 +35,12 @@ class _BusinessAndFixPageState extends State // return ['待接单', '处理中', '已处理', '全部']; // break; // } - if (userProvider.infoModel.canOperation) { + if (userProvider.infoModel.canSendTicket) { return ['待派单', '已派单', '处理中', '已处理', '全部']; - } else { + } else if (userProvider.infoModel.canPickUpTicket) { return ['待接单', '处理中', '已处理', '全部']; + } else { + return ['未处理', '处理中', '已处理', '全部']; } } @@ -68,27 +70,12 @@ class _BusinessAndFixPageState extends State ), body: TabBarView( controller: _tabController, - children: [ - ...userProvider.infoModel.canOperation - ? [ - BussinessAndFixView( - status: 1, - ) - ] - : [], - BussinessAndFixView( - status: 2, - ), - BussinessAndFixView( - status: 3, - ), - BussinessAndFixView( - status: 4, - ), - BussinessAndFixView( - status: null, - ), - ], + children: + List.generate( + _tabs.length, + (index) => BussinessAndFixView( + status: index == _tabs.length - 1 ? null : index + 1, + )), ), ); } 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 e39e142..0fb2aae 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 @@ -5,6 +5,8 @@ import 'package:aku_community_manager/models/user/user_info_model.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/tools/aku_map.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_detail_page.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:flutter/material.dart'; // Package imports: @@ -179,7 +181,8 @@ class _BusinessFixCardState extends State { ), ), onPressed: () { - // Get.to(FixMoreTimePage(model: widget.model)); + Get.to(FixMoreTimePage( + dispatchId: widget.model.dispatchId)); }, ) : SizedBox(), @@ -187,7 +190,9 @@ class _BusinessFixCardState extends State { widget.model.status == 3 ? AkuMaterialButton( onPressed: () { - // Get.to(FixWorkFinishPage(model: widget.model)); + Get.to(() => BusinessAndFixDetailPage( + model: widget.model, + )); }, radius: 4.w, color: AppStyle.primaryColor, @@ -202,7 +207,7 @@ class _BusinessFixCardState extends State { ), ) : SizedBox(), - widget.model.status == 2 + (widget.model.status == 2) && (!userInfoModel.canSendTicket) ? AkuMaterialButton( onPressed: () { // final userProvider = diff --git a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart index 0553d66..66322b0 100644 --- a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart +++ b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart @@ -50,8 +50,8 @@ class _FixWorkFinishPageState extends State { TextEditingController _humanController = TextEditingController(); TextEditingController _materialPriceController = TextEditingController(); - double humanPrice; - double materialPrice; + double humanPrice = 0; + double materialPrice = 0; @override void dispose() { _descriptionController?.dispose(); @@ -344,10 +344,6 @@ class _FixWorkFinishPageState extends State { Spacer(), Builder( builder: (context) { - humanPrice = double.tryParse(_humanController.text); - materialPrice = - double.tryParse(_materialPriceController.text); - if (TextUtil.isEmpty(_humanController.text) || TextUtil.isEmpty( _materialPriceController.text)) { @@ -356,8 +352,13 @@ class _FixWorkFinishPageState extends State { materialPrice == null) return Text('输入有误'); else - return Text( - '¥${(humanPrice + materialPrice).toStringAsFixed(2)}'); + humanPrice = + double.tryParse(_humanController.text); + materialPrice = + double.tryParse(_materialPriceController.text); + + return Text( + '¥${(humanPrice + materialPrice).toStringAsFixed(2)}'); }, ), ], diff --git a/lib/ui/sub_pages/business_and_fix/fixer_department_page.dart b/lib/ui/sub_pages/business_and_fix/fixer_department_page.dart index 931fe44..7595a59 100644 --- a/lib/ui/sub_pages/business_and_fix/fixer_department_page.dart +++ b/lib/ui/sub_pages/business_and_fix/fixer_department_page.dart @@ -24,7 +24,8 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; class FixerDepartmentPage extends StatefulWidget { final DispatchReportModel model; final bool changeType; - FixerDepartmentPage({Key key, @required this.model, this.changeType = false}) + final int dispatchId; + FixerDepartmentPage({Key key, @required this.model, this.changeType = false, this.dispatchId}) : super(key: key); @override @@ -91,7 +92,7 @@ class _FixerDepartmentPageState extends State { } } else { BaseModel baseModel = - await ManageFunc.repairDispatch(_reportModel); + await ManageFunc.repairDispatch(_reportModel,widget.dispatchId); if (baseModel.status) { Get.back(); Get.back(); diff --git a/lib/ui/tool_pages/warning/warning_sub_page.dart b/lib/ui/tool_pages/warning/warning_sub_page.dart index 2a178a3..67398ec 100644 --- a/lib/ui/tool_pages/warning/warning_sub_page.dart +++ b/lib/ui/tool_pages/warning/warning_sub_page.dart @@ -81,7 +81,7 @@ class _WarningSubPageState extends State { ], ), Text( - '深圳华悦茂峰', + '人才公寓', style: TextStyle( fontSize: 44.w, color: AppStyle.primaryTextColor, diff --git a/lib/ui/tool_pages/warning/warning_success.dart b/lib/ui/tool_pages/warning/warning_success.dart index c96d94f..ae31835 100644 --- a/lib/ui/tool_pages/warning/warning_success.dart +++ b/lib/ui/tool_pages/warning/warning_success.dart @@ -52,7 +52,7 @@ class _WarningSuccessState extends State { width: 420.w, ), Text( - '深圳华悦茂峰', + '人才公寓', style: TextStyle( fontSize: 44.w, color: AppStyle.primaryTextColor, diff --git a/lib/utils/network/manage_func.dart b/lib/utils/network/manage_func.dart index 526e615..8a98f35 100644 --- a/lib/utils/network/manage_func.dart +++ b/lib/utils/network/manage_func.dart @@ -39,10 +39,10 @@ class ManageFunc { } ///派单 - static Future repairDispatch(DispatchReportModel model) async { + static Future repairDispatch(DispatchReportModel model,int dispatchId) async { BaseModel baseModel = await NetUtil().post(API.manage.repairDispatch, params: { - 'dispatchListId': model.dispatchListId, + 'dispatchListId': dispatchId, 'workOrderType': model.workOrderTyoe, 'workOrderTypeDetail': model.workOrderTypeDetail, 'workOrderTimeLimit': model.workOrderTimeLimit,