Commit fc20d76f9eab9328769f3323e4ae6849b5153192

Authored by 廖磊
1 parent 917b329b

加油设置删除

src/main/resources/static/pages/oil/jyszList.html
... ... @@ -115,7 +115,8 @@
115 115 <td>{{obj.xgr}}</td>
116 116 <td>{{obj.createDate}}</td>
117 117 <td>
118   - <!-- <button> <i class="fa fa-times"></i> 删除</button>-->
  118 + <button type="button" class="btn btn-sm blue btn-jyszList"
  119 + data-id="{{obj.id}}">删除</button>
119 120 </td>
120 121 </tr>
121 122 {{/each}}
... ... @@ -241,9 +242,7 @@ $(function(){
241 242 $.each(data.content, function(i, obj) {
242 243 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD");
243 244 });
244   - console.log(data.content);
245 245 var bodyHtm = template('jysz_list_temp', {list: data.content});
246   -
247 246 $('#datatable_jysz tbody').html(bodyHtm)
248 247 .find('.icheck').iCheck(icheckOptions)
249 248 .on('ifChanged', iCheckChange);
... ... @@ -252,6 +251,7 @@ $(function(){
252 251 initPagination = true;
253 252 showPagination(data);
254 253 }
  254 + $('.btn-jyszList').on('click', remJysz);
255 255 layer.close(i);
256 256 });
257 257 }
... ... @@ -302,9 +302,14 @@ $(function(){
302 302 }
303 303 });
304 304 }
305   -
306   -
307 305 //删除
  306 + function remJysz(){
  307 + var id = $(this).data('id');
  308 + removeConfirm('确定要删除选中的数据?', '/cwjy/' + id ,function(){
  309 + $('tr.filter .filter-submit').click();
  310 + });
  311 + }
  312 + /*
308 313 $('#removeButton').on('click', function(){
309 314 if($(this).attr('disabled'))
310 315 return;
... ... @@ -314,7 +319,7 @@ $(function(){
314 319 removeConfirm('确定要删除选中的数据?', '/resource/' + id ,function(){
315 320 $('tr.filter .filter-submit').click();
316 321 });
317   - });
  322 + }); */
318 323  
319 324  
320 325 $('#addJysz').on('click', function(){
... ...