添加401状态
加氢预约列表,确认 拒绝
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:getx_scaffold/getx_scaffold.dart';
|
||||
import 'package:ln_jq_app/common/styles/theme.dart';
|
||||
|
||||
import 'controller.dart';
|
||||
|
||||
///加氢预约
|
||||
class SitePage extends GetView<SiteController> {
|
||||
const SitePage({super.key});
|
||||
@@ -236,14 +237,14 @@ class SitePage extends GetView<SiteController> {
|
||||
itemBuilder: (context, index) {
|
||||
final item = controller.reservationList[index];
|
||||
// 调用新的方法来构建每一项
|
||||
return _buildReservationItem(item);
|
||||
return _buildReservationItem(index, item);
|
||||
},
|
||||
separatorBuilder: (context, index) => const SizedBox(height: 12), // 列表项之间的间距
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildReservationItem(ReservationModel item) {
|
||||
Widget _buildReservationItem(int index, ReservationModel item) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -275,7 +276,7 @@ class SitePage extends GetView<SiteController> {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Text(
|
||||
item.id,
|
||||
"${index + 1}",
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -373,6 +374,10 @@ class SitePage extends GetView<SiteController> {
|
||||
text = '已拒绝';
|
||||
color = Colors.red;
|
||||
break;
|
||||
default:
|
||||
text = '未知状态';
|
||||
color = Colors.grey;
|
||||
break;
|
||||
}
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
|
||||
Reference in New Issue
Block a user