Commit fc20d76f9eab9328769f3323e4ae6849b5153192

Authored by 廖磊
1 parent 917b329b

加油设置删除

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