Browse Source

编辑球场

lchao 5 months ago
parent
commit
10890b0eeb

+ 9 - 4
qmjszx-admin/src/main/resources/templates/admissionticket/edit.html

@@ -16,12 +16,17 @@
                     </div>
                 </div>
             </div>
-            <div class="col-xs-6">
+            <div class="col-xs-12">
                 <div class="form-group">
-                    <label class="col-sm-4 control-label is-required">场馆名称:</label>
+                    <label class="col-sm-3 control-label is-required">场馆名称:</label>
                     <div class="col-sm-8">
-                        <select name="venueId" class="form-control" >
-                            <option th:each="post:${beilvSitesList}" th:value="${post.id}" th:text="${post.venueName}" ></option>
+                        <!-- 添加 value 属性绑定到 beilvSession.venueId -->
+                        <select name="venueId" class="form-control" th:value="${beilvSession.venueId}">
+                            <option th:each="post:${beilvSitesList}"
+                                    th:value="${post.id}"
+                                    th:text="${post.venueName}"
+                                    th:selected="${post.id == beilvSession.venueId}">
+                            </option>
                         </select>
                     </div>
                 </div>

+ 18 - 3
qmjszx-admin/src/main/resources/templates/system/session/edit.html

@@ -42,13 +42,28 @@
                 </div>
             </div>
         </div>
+<!--        <div class="col-xs-12">-->
+<!--            <div class="form-group">-->
+<!--                <label class="col-sm-3 control-label is-required">场馆名称:</label>-->
+<!--                <div class="col-sm-8">-->
+<!--                    <select name="venueId" class="form-control">-->
+<!--                        <option th:each="post:${beilvSitesList}" th:value="${post.id}"-->
+<!--                                th:text="${post.venueName}"></option>-->
+<!--                    </select>-->
+<!--                </div>-->
+<!--            </div>-->
+<!--        </div>-->
         <div class="col-xs-12">
             <div class="form-group">
                 <label class="col-sm-3 control-label is-required">场馆名称:</label>
                 <div class="col-sm-8">
-                    <select name="venueId" class="form-control">
-                        <option th:each="post:${beilvSitesList}" th:value="${post.id}"
-                                th:text="${post.venueName}"></option>
+                    <!-- 添加 value 属性绑定到 beilvSession.venueId -->
+                    <select name="venueId" class="form-control" th:value="${beilvSession.venueId}">
+                        <option th:each="post:${beilvSitesList}"
+                                th:value="${post.id}"
+                                th:text="${post.venueName}"
+                                th:selected="${post.id == beilvSession.venueId}">
+                        </option>
                     </select>
                 </div>
             </div>

+ 7 - 3
qmjszx-admin/src/main/resources/templates/system/site/edit.html

@@ -50,9 +50,13 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label is-required">场馆名称:</label>
                 <div class="col-sm-8">
-                    <select name="venueId" class="form-control">
-                        <option th:each="post:${beilvSitesList}" th:value="${post.id}"
-                                th:text="${post.venueName}"></option>
+                    <!-- 添加 value 属性绑定到 beilvSession.venueId -->
+                    <select name="venueId" class="form-control" th:value="${beilvSession.venueId}">
+                        <option th:each="post:${beilvSitesList}"
+                                th:value="${post.id}"
+                                th:text="${post.venueName}"
+                                th:selected="${post.id == beilvSession.venueId}">
+                        </option>
                     </select>
                 </div>
             </div>