添加状态

master
张萌 3 years ago
parent 1b62948817
commit 90c1ced86c

@ -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/ui/service/task_map.dart';
import 'package:aku_new_community/widget/bee_divider.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/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bottom_button.dart';
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import '../task_func.dart';
class MyTaskDetailPage extends StatefulWidget { class MyTaskDetailPage extends StatefulWidget {
final MyTaskListModel model; final MyTaskListModel model;
@ -118,6 +121,14 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
)), )),
], ],
), ),
bottomNavi: widget.model.status != 3
? SizedBox()
: BottomButton(
onPressed: () async {
await TaskFunc.finish(taskId: widget.model.id);
},
child: Text('完成任务'),
),
); );
} }

@ -2,8 +2,9 @@ class TaskMap {
static Map<int, String> statusToString = { static Map<int, String> statusToString = {
1: '未接单', 1: '未接单',
2: '待处理', 2: '待处理',
3: '已完成', 3: '待确认',
4: '已取消' 4: '已完成',
9: '已取消'
}; };
static Map<int, String> typeToString = {1: '跑腿', 2: '代驾', 3: '装修', 4: '陪玩'}; static Map<int, String> typeToString = {1: '跑腿', 2: '代驾', 3: '装修', 4: '陪玩'};
@ -13,8 +14,9 @@ class TaskMap {
static Map<int, String> detailStatusToString = { static Map<int, String> detailStatusToString = {
1: '已发布', 1: '已发布',
2: '待处理', 2: '待处理',
3: '已完成', 3: '待确认',
4: '已取消' 4: '已完成',
9: '已取消'
}; };
static Map<int, String> subStatus = { static Map<int, String> subStatus = {

Loading…
Cancel
Save