Showing
1 changed file
with
8 additions
and
6 deletions
| @@ -120,6 +120,13 @@ | @@ -120,6 +120,13 @@ | ||
| 120 | <script> | 120 | <script> |
| 121 | layui.use(['table','form'], function() { | 121 | layui.use(['table','form'], function() { |
| 122 | var table = layui.table,laydate = layui.laydate,form = layui.form,$ = layui.jquery,layer = layui.layer; | 122 | var table = layui.table,laydate = layui.laydate,form = layui.form,$ = layui.jquery,layer = layui.layer; |
| 123 | + // 监听第一个下拉框的选择 | ||
| 124 | + form.on('select(cityid)', function(data){ | ||
| 125 | + alert(1); | ||
| 126 | + $('#areaid').html(''); // 清空区域下拉框 | ||
| 127 | + //$('#areaid').append('<option value="' + city + '区">' + city + '区</option>'); | ||
| 128 | + form.render('select'); // 更新区域下拉框 | ||
| 129 | + }); | ||
| 123 | var tableIn = table.render({ | 130 | var tableIn = table.render({ |
| 124 | elem: '#list', | 131 | elem: '#list', |
| 125 | url: '{:url("sellerList")}', | 132 | url: '{:url("sellerList")}', |
| @@ -149,12 +156,7 @@ | @@ -149,12 +156,7 @@ | ||
| 149 | ,page: true | 156 | ,page: true |
| 150 | }); | 157 | }); |
| 151 | 158 | ||
| 152 | - // 监听第一个下拉框的选择 | ||
| 153 | - form.on('select(cityid)', function(data){ | ||
| 154 | - $('#areaid').html(''); // 清空区域下拉框 | ||
| 155 | - //$('#areaid').append('<option value="' + city + '区">' + city + '区</option>'); | ||
| 156 | - form.render('select'); // 更新区域下拉框 | ||
| 157 | - }); | 159 | + |
| 158 | 160 | ||
| 159 | //监听单元格编辑 | 161 | //监听单元格编辑 |
| 160 | table.on('edit(list)', function(obj){ | 162 | table.on('edit(list)', function(obj){ |
-
Please register or login to post a comment