调整和修改

This commit is contained in:
2025-12-19 13:18:04 +08:00
parent 62ca3888d3
commit 21a528d6d1
4 changed files with 44 additions and 37 deletions

View File

@@ -32,13 +32,16 @@ class HistoryController extends GetxController {
final args = Get.arguments as Map<String, dynamic>;
stationName = args['stationName'] as String;
fetchHistoryData();
getAllOrderCounts();
}
Future<void> getAllOrderCounts() async {
var response = await HttpService.to.post(
"appointment/orderAddHyd/getAllOrderCounts",
data: {
// --- 直接使用 DateFormat 来格式化日期 ---
'startTime': _apiDateFormat.format(startDate.value),
'endTime': _apiDateFormat.format(endDate.value),
'plateNumber': plateNumberController.text,
'stationName': stationName, // 加氢站名称
},
);
@@ -60,6 +63,10 @@ class HistoryController extends GetxController {
Future<void> fetchHistoryData() async {
isLoading.value = true;
//获取数据
getAllOrderCounts();
try {
var response = await HttpService.to.post(
"appointment/orderAddHyd/sitOrderPage",

View File

@@ -191,6 +191,7 @@ class SiteController extends GetxController with BaseControllerMixin {
showToast('暂时无法获取预约数据');
hasReservationData = false;
reservationList = [];
dismissLoading();
return;
}