1.列表,筛选完成和未完成
2.详情,增加checkout
This commit is contained in:
@@ -5,7 +5,7 @@ import 'package:plan/api/endpoints/plan_api.dart';
|
||||
import 'package:plan/data/models/plan_acttion_type.dart';
|
||||
import 'package:plan/page/plan/detail/viewmodel/plan_detail_store.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:remixicon/remixicon.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class FooterBtn extends StatefulWidget {
|
||||
const FooterBtn({super.key});
|
||||
@@ -30,6 +30,17 @@ class _FooterBtnState extends State<FooterBtn> {
|
||||
return item.copyWith(stepStatus: allDone ? 0 : 2);
|
||||
}).toList();
|
||||
});
|
||||
|
||||
//如果是全部完成
|
||||
if (!allDone) {
|
||||
store.updatePlanDetail((dto) {
|
||||
final now = DateTime.now();
|
||||
final formatted = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
|
||||
print(formatted);
|
||||
dto.planEndTime = formatted;
|
||||
});
|
||||
}
|
||||
|
||||
//接口
|
||||
editPlanStepApi(
|
||||
store.planId,
|
||||
|
||||
Reference in New Issue
Block a user