联调修改结构
This commit is contained in:
@@ -109,20 +109,24 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
child: Column(
|
||||
children: [
|
||||
// Tab 切换栏
|
||||
Obx(() => Container(
|
||||
color: Colors.grey[50],
|
||||
child: Row(
|
||||
children: [
|
||||
_buildTabItem(0, Icons.business_outlined, '站点信息'),
|
||||
_buildTabItem(1, Icons.campaign_outlined, '站点广播'),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Obx(
|
||||
() => Container(
|
||||
color: Colors.grey[50],
|
||||
child: Row(
|
||||
children: [
|
||||
_buildTabItem(0, Icons.business_outlined, '站点信息'),
|
||||
_buildTabItem(1, Icons.campaign_outlined, '站点广播'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
// 内容区域
|
||||
Obx(() => controller.selectedTabIndex.value == 0
|
||||
? _buildStationInfo(context)
|
||||
: _buildStationBroadcast(context)),
|
||||
Obx(
|
||||
() => controller.selectedTabIndex.value == 0
|
||||
? _buildStationInfo(context)
|
||||
: _buildStationBroadcast(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -180,7 +184,25 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
_buildDisplayField(label: '官方价格 (元/kg)', value: controller.customerPrice),
|
||||
const SizedBox(height: 16),
|
||||
_buildSectionTitle('运营信息'),
|
||||
Text('运营状态', style: TextStyle(color: Colors.grey[600], fontSize: 14)),
|
||||
Row(
|
||||
children: [
|
||||
Text('运营状态', style: TextStyle(color: Colors.grey[600], fontSize: 14)),
|
||||
//加氢站未执行的状态修改任务
|
||||
if (controller.jobTipStr.isNotEmpty)
|
||||
GestureDetector(
|
||||
onTap: controller.showJob,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
controller.jobTipStr,
|
||||
style: TextStyle(color: Colors.yellow[800], fontSize: 14),
|
||||
),
|
||||
Icon(AntdIcon.question_circle, size: 14, color: Colors.yellow[800]),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
DropdownButtonFormField<String>(
|
||||
value: controller.selectedOperationStatus,
|
||||
@@ -239,7 +261,11 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
const SizedBox(width: 10),
|
||||
const Text(
|
||||
'站点广播通知',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black87),
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -249,16 +275,17 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
SizedBox(
|
||||
height: 45.h,
|
||||
child: TextField(
|
||||
controller: controller.broadcastTitleController,
|
||||
maxLength: 30,
|
||||
decoration: InputDecoration(
|
||||
hintText: '例如:临时闭站通知',
|
||||
hintStyle: TextStyle(color: Colors.grey[400], fontSize: 14),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
counterText: '', // 隐藏原生计数器,我们可以按需自定义
|
||||
controller: controller.broadcastTitleController,
|
||||
maxLength: 30,
|
||||
decoration: InputDecoration(
|
||||
hintText: '例如:临时闭站通知',
|
||||
hintStyle: TextStyle(color: Colors.grey[400], fontSize: 14),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
counterText: '', // 隐藏原生计数器,我们可以按需自定义
|
||||
),
|
||||
),
|
||||
),),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_buildTextFieldLabel('通知内容'),
|
||||
const SizedBox(height: 8),
|
||||
@@ -283,7 +310,10 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
elevation: 0,
|
||||
),
|
||||
child: const Text('发送', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
child: const Text(
|
||||
'发送',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
@@ -294,7 +324,11 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
Widget _buildTextFieldLabel(String label) {
|
||||
return Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.black87),
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black87,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -340,7 +374,11 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
}
|
||||
|
||||
/// 构建一个“可点击”的选择行
|
||||
Widget _buildClickField({required String label, required String value, required VoidCallback onTap}) {
|
||||
Widget _buildClickField({
|
||||
required String label,
|
||||
required String value,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user