Просмотр исходного кода

小程序活动报名接口修改

ZHIHAO HU 4 лет назад
Родитель
Сommit
df3d1b39e5

+ 3 - 3
src/main/java/platform/modules/api/web/ActivityOpenController.java

@@ -170,9 +170,9 @@ public class ActivityOpenController extends BaseController {
             }
             activityRegistrationService.deleteOldCancelRegist(String.valueOf(id), null, String.valueOf(userId));
             for (ActivityRegistration registration : registrationList) {
-//                if (registration.getId() == null) {
-                activityRegistrationService.saveActivityRegistration(registration);
-//                }
+                if (registration.getId() == null) {
+                    activityRegistrationService.saveActivityRegistration(registration);
+                }
             }
             List<User> pusers = userService.findUsersByPermission("G_ACTIVITY_MANAGE");
             waitToDoService.completeAllTODO(activityDetail.getId(), Constant.DictionaryType.ACTIVITY_APPLICATION);

+ 18 - 3
src/main/resources/templates/admin/government/industrial_land_supply/add.html

@@ -93,7 +93,11 @@
             <div class="row cl">
                 <label class="form-label col-xs-4 col-sm-2"></label>
                 <div class="formControls col-xs-8 col-sm-9">
-                    <input type="checkbox" th:name="'defaultList['+${itemStat.index}+']'" th:value="${item.id}">要求反馈意见
+                    <input type="checkbox"
+                           th:name="'defaultList['+${itemStat.index}+']'"
+                           th:value="${item.id}"
+                           th:id="'checkbox_'+${itemStat.index}"
+                    >要求反馈意见
                 </div>
             </div>
             <div class="row cl" th:id=" 'department'+${item.id}">
@@ -113,10 +117,13 @@
                         <tr class="text-c">
                             <td class="td_material">
                                 <input type="text" class="input-text consultation" placeholder="请输入咨询的问题"
-                                       th:name="'consultationList['+${itemStat.index}+'].consultation'"/>
+                                       th:name="'consultationList['+${itemStat.index}+'].consultation'"
+                                       th:onchange="'checkboxChecked('+${itemStat.index}+')'"
+                                />
                                 <input class="department_id" type="hidden"
                                        th:name="'consultationList['+${itemStat.index}+'].department_id'"
-                                       th:value="${item.id}"/>
+                                       th:value="${item.id}"
+                                />
                             </td>
                             <td class="icon_font"><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>
                             </td>
@@ -403,6 +410,14 @@
     function removeLine(obj) {
         $(obj).parent().parent().remove();
     }
+
+    function checkboxChecked(index){
+        var id="checkbox_"+index;
+        var b= document.getElementById(id);
+        // b.setAttribute('checked',false);
+        // b.setAttribute('checked',true);
+        $("#"+id).prop('checked',true);
+    }
 </script>
 </body>
 </html>

+ 6 - 0
src/main/resources/templates/admin/government/industrial_land_supply/feedback_append.html

@@ -299,6 +299,12 @@
             })
         })
     })
+
+    function checkboxChecked(index){
+        var id="checkbox_"+index;
+        var b= document.getElementById(id);
+        b.setAttribute('checked',true);
+    }
 </script>
 </body>
 </html>