优化问题修改

This commit is contained in:
2026-01-15 16:28:59 +08:00
parent e7a9e4483a
commit 8302d7c179
7 changed files with 28 additions and 7 deletions

View File

@@ -74,8 +74,8 @@ class ReservationEditController extends GetxController with BaseControllerMixin
final now = DateTime.now();
final isToday =
selectedDate.value.year == now.year &&
selectedDate.value.month == now.month &&
selectedDate.value.day == now.day;
selectedDate.value.month == now.month &&
selectedDate.value.day == now.day;
final List<TimeSlot> availableSlots = [];
for (int i = 0; i < 24; i++) {
@@ -123,7 +123,7 @@ class ReservationEditController extends GetxController with BaseControllerMixin
// 查找当前选中的时间对应的新列表中的索引
int initialItem = availableSlots.indexWhere(
(slot) => slot.start.hour == startTime.value.hour,
(slot) => slot.start.hour == startTime.value.hour,
);
if (initialItem == -1) {
@@ -132,7 +132,6 @@ class ReservationEditController extends GetxController with BaseControllerMixin
TimeSlot tempSlot = availableSlots[initialItem];
Get.bottomSheet(
Container(
height: 300,
@@ -228,6 +227,7 @@ class ReservationEditController extends GetxController with BaseControllerMixin
'appointment/orderAddHyd/saveOrUpdate',
data: {
'id': reservation.id,
'stationId': reservation.stationId,
'startTime': startTimeStr,
'endTime': endTimeStr,
'hydAmount': amountStr,