From 47ba2849a355187ef9235b36024a994edb95b82e Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期三, 05 十一月 2025 16:43:16 +0800
Subject: [PATCH] bug修改
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html | 4 ++--
cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite_info.js | 53 +----------------------------------------------------
2 files changed, 3 insertions(+), 54 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html
index 13c4ffc..7663713 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html
@@ -401,10 +401,10 @@
<label class="control-label">*是否可预定半场:</label>
<div>
<label style="margin-right: 20px;">
- <input type="radio" name="ishalf_step2" value="2" checked onclick="TSiteInfo.updateHalfField(2)"> 否
+ <input type="radio" name="ishalf_step2" ${list.ishalf == 2 ? 'checked' : ''} value="2" onclick="TSiteInfo.updateHalfField(2)"> 否
</label>
<label>
- <input type="radio" name="ishalf_step2" value="1" onclick="TSiteInfo.updateHalfField(1)"> 是
+ <input type="radio" name="ishalf_step2" value="1" ${list.ishalf == 1 ? 'checked' : ''} onclick="TSiteInfo.updateHalfField(1)"> 是
</label>
</div>
</div>
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite_info.js
index 1ab07ce..b23a7d2 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite_info.js
@@ -784,40 +784,7 @@
// 更新界面(但不显示价格表)
TSiteInfo.updateAudienceUI();
-
- // 初始化是否可预定半场状态
- // 编辑模式下从隐藏字段读取,新增模式从 priceConfig 读取
- var isHalf = TSiteInfo.priceConfig ? TSiteInfo.priceConfig.isHalf : null;
- if (!isHalf) {
- // 如果 priceConfig 还没初始化(编辑模式直接进入步骤2),从页面隐藏字段读取
- var hiddenIsHalf = $("#type_").val();
- if (hiddenIsHalf) {
- isHalf = parseInt(hiddenIsHalf);
- } else {
- // 从步骤1的单选按钮读取
- isHalf = $("input[name='ishalf']:checked").val();
- if (isHalf) {
- isHalf = parseInt(isHalf);
- } else {
- isHalf = 2; // 默认值:不支持半场
- }
- }
- // 初始化 priceConfig
- if (!TSiteInfo.priceConfig) {
- TSiteInfo.priceConfig = {};
- }
- TSiteInfo.priceConfig.isHalf = isHalf;
- }
-
- // 设置单选按钮状态
- if (isHalf == 1) {
- $("input[name='ishalf_step2'][value='1']").prop('checked', true);
- $("#halfCode_step2").show();
- } else {
- $("input[name='ishalf_step2'][value='2']").prop('checked', true);
- $("#halfCode_step2").hide();
- }
-
+
// 加载已有的价格数据(如果是编辑模式)
var siteId = $("#id").val();
if (siteId) {
@@ -1951,24 +1918,6 @@
getContent: function() { return ""; },
setContent: function() {}
};
- }
-
- // 编辑模式:初始化价格配置页面的半场选项
- var siteId = $("#id").val();
- if (siteId) {
- // 从隐藏字段读取 ishalf 值
- var hiddenIsHalf = $("#type_").val();
- if (hiddenIsHalf) {
- var isHalf = parseInt(hiddenIsHalf);
- // 设置步骤2的单选按钮
- if (isHalf == 1) {
- $("input[name='ishalf_step2'][value='1']").prop('checked', true);
- $("#halfCode_step2").show();
- } else {
- $("input[name='ishalf_step2'][value='2']").prop('checked', true);
- $("#halfCode_step2").hide();
- }
- }
}
// 限制分钟选项为 0 和 30
// var timeInputs = document.querySelectorAll('input[type="time"]');
--
Gitblit v1.7.1