ryxx.jsp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <script type="text/javascript">
  4. function ryxxadd(){
  5. var path="/gkjyr/details?path=8:id="+$('#jyrid').val()+"";
  6. location.href=$.app+'/ry/add?path='+path;
  7. }
  8. function ryxxview(ryid){
  9. var path="/gkjyr/details?path=8:id="+$('#jyrid').val()+"";
  10. location.href=$.app+'/ry/view?id='+ryid+'&path='+path;
  11. }
  12. function ryxxedit(ryid){
  13. var path="/gkjyr/details?path=8:id="+$('#jyrid').val()+"";
  14. location.href=$.app+'/ry/edit?id='+ryid+'&path='+path;
  15. }
  16. function ryxxdelete(ryid){
  17. $.confirm({
  18. title: '确认框',
  19. content: '确认删除吗',
  20. confirm: function(){
  21. $.post($.app + "/ry/delete", {
  22. id : ryid
  23. }, function(data) {
  24. if (data.success) {
  25. $.alert({
  26. title: '提示',
  27. content: '操作成功',
  28. confirm: function(){
  29. initryxx();
  30. }
  31. });
  32. } else {
  33. $.alert({
  34. title: '提示',
  35. content: data.message,
  36. confirm: function(){
  37. }
  38. });
  39. }
  40. }, "json");
  41. },
  42. cancel: function(){
  43. }
  44. });
  45. }
  46. function initryxx(){
  47. $.post($.app + "/gkjyr/ryxx2", {
  48. id : $('#jyrid').val()
  49. }, function(data) {
  50. if (data) {
  51. var str =""
  52. for(var i=0;i<data.length;i++){
  53. var ry = data[i];
  54. str+="<tr class='tr_bg'>";
  55. str+="<td>"+(i+1)+"</td>";
  56. str+="<td>"+(ry.ssjyrzw==null? "":ry.ssjyrzw)+"</td>";
  57. str+="<td>"+ry.xm+"</td>";
  58. str+="<td>"+ry.rylxzw+"</td>";
  59. str+="<td>";
  60. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ryxxview('"+ry.id+"')\"> <i class='glyphicon glyphicon-search'></i> 查看</a>";
  61. if(ry.recordStatus==1&&ry.xkzid==''){
  62. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ryxxedit('"+ry.id+"')\"> <i class='glyphicon glyphicon-pencil'></i> 编辑</a>";
  63. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ryxxdelete('"+ry.id+"')\"> <i class='glyphicon glyphicon-trash'></i> 删除</a>";
  64. }
  65. str+="</td>";
  66. str+="</tr>";
  67. }
  68. $('#ryxxdiv').empty();
  69. $('#ryxxdiv').append(str);
  70. } else {
  71. }
  72. }, "json");
  73. }
  74. </script>
  75. <a class="btn btn-default btn-sm" href="#"
  76. onclick="ryxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
  77. </a>
  78. <table class="main_table" cellpadding="0" cellspacing="0">
  79. <tr>
  80. <th width="5%">序号</th>
  81. <th width="15%">港口经营人</th>
  82. <th width="15%">姓名</th>
  83. <th width="15%">人员类型</th>
  84. <th width="20%">操作</th>
  85. </tr>
  86. <tbody id="ryxxdiv"></tbody>
  87. </table>