修改搜索条件
This commit is contained in:
@@ -23,10 +23,14 @@ class HistoryController extends GetxController {
|
|||||||
String get formattedStartDate => DateFormat('yyyy/MM/dd').format(startDate.value);
|
String get formattedStartDate => DateFormat('yyyy/MM/dd').format(startDate.value);
|
||||||
|
|
||||||
String get formattedEndDate => DateFormat('yyyy/MM/dd').format(endDate.value);
|
String get formattedEndDate => DateFormat('yyyy/MM/dd').format(endDate.value);
|
||||||
|
String stationName = "";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
|
final args = Get.arguments as Map<String, dynamic>;
|
||||||
|
stationName = args['stationName'] as String;
|
||||||
fetchHistoryData();
|
fetchHistoryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,12 +41,12 @@ class HistoryController extends GetxController {
|
|||||||
"appointment/orderAddHyd/sitOrderPage",
|
"appointment/orderAddHyd/sitOrderPage",
|
||||||
data: {
|
data: {
|
||||||
// --- 直接使用 DateFormat 来格式化日期 ---
|
// --- 直接使用 DateFormat 来格式化日期 ---
|
||||||
'startDate': _apiDateFormat.format(startDate.value),
|
'startTime': _apiDateFormat.format(startDate.value),
|
||||||
'endDate': _apiDateFormat.format(endDate.value),
|
'endTime': _apiDateFormat.format(endDate.value),
|
||||||
'plateNumber': plateNumberController.text,
|
'plateNumber': plateNumberController.text,
|
||||||
'pageNum': 1,
|
'pageNum': 1,
|
||||||
'pageSize': 50,
|
'pageSize': 50,
|
||||||
'stationName': "", // 加氢站名称
|
'stationName': stationName, // 加氢站名称
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,12 @@ class SitePage extends GetView<SiteController> {
|
|||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.to(() => const HistoryPage());
|
Get.to(
|
||||||
|
() => HistoryPage(),
|
||||||
|
arguments: {
|
||||||
|
'stationName': controller.name,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.blue.shade700,
|
backgroundColor: Colors.blue.shade700,
|
||||||
|
|||||||
Reference in New Issue
Block a user