Sfoglia il codice sorgente

追加咨询自动勾选

wlzhao 5 anni fa
parent
commit
c305fe72eb

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

@@ -250,6 +250,20 @@
     function removeLine(obj) {
         $(obj).parent().parent().remove();
     }
+    $(document).ready(function(){
+        $('input[name^="consultationList"]').blur(function(){
+            $('input[name^="consultationList"]').each(function(index,item){
+                if (item.value) {
+                    let defaultIndex = 'defaultList[' + item.name.split('.')[0].split('')[item.name.split('.')[0].split('').length-2] + ']'
+                    $('input[name^="defaultList"]').each(function(vindex,vitem){
+                        if (vitem.name == defaultIndex) {
+                            vitem.checked = true
+                        }
+                    })
+                }
+            })
+        })
+    })
 </script>
 </body>
 </html>