diff --git a/lib/ui/service/my_task/my_task_detail_page.dart b/lib/ui/service/my_task/my_task_detail_page.dart index 627882a6..d605d294 100644 --- a/lib/ui/service/my_task/my_task_detail_page.dart +++ b/lib/ui/service/my_task/my_task_detail_page.dart @@ -3,11 +3,14 @@ import 'package:aku_new_community/models/task/my_task_list_model.dart'; import 'package:aku_new_community/ui/service/task_map.dart'; import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.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'; +import '../task_func.dart'; + class MyTaskDetailPage extends StatefulWidget { final MyTaskListModel model; @@ -118,6 +121,14 @@ class _MyTaskDetailPageState extends State { )), ], ), + bottomNavi: widget.model.status != 3 + ? SizedBox() + : BottomButton( + onPressed: () async { + await TaskFunc.finish(taskId: widget.model.id); + }, + child: Text('完成任务'), + ), ); } diff --git a/lib/ui/service/task_map.dart b/lib/ui/service/task_map.dart index 740d206b..461d3642 100644 --- a/lib/ui/service/task_map.dart +++ b/lib/ui/service/task_map.dart @@ -2,8 +2,9 @@ class TaskMap { static Map statusToString = { 1: '未接单', 2: '待处理', - 3: '已完成', - 4: '已取消' + 3: '待确认', + 4: '已完成', + 9: '已取消' }; static Map typeToString = {1: '跑腿', 2: '代驾', 3: '装修', 4: '陪玩'}; @@ -13,8 +14,9 @@ class TaskMap { static Map detailStatusToString = { 1: '已发布', 2: '待处理', - 3: '已完成', - 4: '已取消' + 3: '待确认', + 4: '已完成', + 9: '已取消' }; static Map subStatus = {