bwxx.jsp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <script type="text/javascript">
  4. function bwxxadd(){
  5. var path="/gkjyr/details?path=4:id="+$('#jyrid').val()+"";
  6. location.href=$.app+'/bw/add?path='+path;
  7. }
  8. function bwxxview(bwid){
  9. var path="/gkjyr/details?path=4:id="+$('#jyrid').val()+"";
  10. location.href=$.app+'/bw/view?id='+bwid+'&path='+path;
  11. }
  12. function bwxxedit(bwid){
  13. var path="/gkjyr/details?path=4:id="+$('#jyrid').val()+"";
  14. location.href=$.app+'/bw/edit?id='+bwid+'&path='+path;
  15. }
  16. function bwxxdelete(bwid){
  17. $.confirm({
  18. title: '确认框',
  19. content: '确认删除吗',
  20. confirm: function(){
  21. $.post($.app + "/bw/delete", {
  22. id : bwid
  23. }, function(data) {
  24. if (data.success) {
  25. $.alert({
  26. title: '提示',
  27. content: '操作成功',
  28. confirm: function(){
  29. initbwxx();
  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 initbwxx(){
  47. $.post($.app + "/gkjyr/bwxx2", {
  48. id : $('#jyrid').val()
  49. }, function(data) {
  50. if (data) {
  51. var str ="";
  52. for(var i=0;i<data.length;i++){
  53. var bw = data[i];
  54. str+="<tr class='tr_bg'>";
  55. str+="<td>"+(i+1)+"</td>";
  56. str+="<td>"+bw.bwmc+"</td>";
  57. str+="<td>"+(bw.ssjyrzw==null?"":bw.ssjyrzw)+"</td>";
  58. str+="<td>"+bw.ssmtzw+"</td>";
  59. str+="<td>"+bw.szgkzw+"</td>";
  60. str+="<td>"+bw.szgqzw+"</td>";
  61. str+="<td>"+(bw.bwytzw==null?"":bw.bwytzw)+"</td>";
  62. str+="<td>"+(bw.wxpbwzw==null?"":bw.wxpbwzw)+"</td>";
  63. str+="<td>"+(bw.sfdwkfzw==null?"":bw.sfdwkfzw)+"</td>";
  64. str+="<td>";
  65. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"bwxxview('"+bw.id+"')\"> <i class='glyphicon glyphicon-search'></i> 查看</a>";
  66. if(bw.recordStatus==1&&bw.xkzid==''){
  67. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"bwxxedit('"+bw.id+"')\"> <i class='glyphicon glyphicon-pencil'></i> 编辑</a>";
  68. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"bwxxdelete('"+bw.id+"')\"> <i class='glyphicon glyphicon-trash'></i> 删除</a>";
  69. }
  70. str+="</td>";
  71. str+="</tr>";
  72. }
  73. $('#bwxxdiv').empty();
  74. $('#bwxxdiv').append(str);
  75. } else {
  76. }
  77. }, "json");
  78. }
  79. </script>
  80. <a class="btn btn-default btn-sm" href="#"
  81. onclick="bwxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
  82. </a>
  83. <table class="main_table" cellpadding="0" cellspacing="0">
  84. <tr>
  85. <th width="5%">序号</th>
  86. <th width="10%">泊位名称</th>
  87. <th width="10%">港口经营人</th>
  88. <th width="10%">码头名称</th>
  89. <th width="10%">所在港口</th>
  90. <th width="10%">所在港区</th>
  91. <!-- <th width="10%">泊位属性</th> -->
  92. <th width="15%">泊位用途</th>
  93. <th width="5%">是否<br>危险品泊位</th>
  94. <th width="5%">是否<br>对外开放泊位</th>
  95. <th width="20%">操作</th>
  96. </tr>
  97. <tbody id="bwxxdiv"></tbody>
  98. </table>