cgxx.jsp 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <script type="text/javascript">
  4. function cgxxadd(){
  5. var path="/gkjyr/details?path=5:id="+$('#jyrid').val()+"";
  6. location.href=$.app+'/cg/add?path='+path;
  7. }
  8. function cgxxview(cgid){
  9. var path="/gkjyr/details?path=5:id="+$('#jyrid').val()+"";
  10. location.href=$.app+'/cg/view?id='+cgid+'&path='+path;
  11. }
  12. function cgxxedit(cgid){
  13. var path="/gkjyr/details?path=5:id="+$('#jyrid').val()+"";
  14. location.href=$.app+'/cg/edit?id='+cgid+'&path='+path;
  15. }
  16. function cgxxdelete(cgid){
  17. $.confirm({
  18. title: '确认框',
  19. content: '确认删除吗',
  20. confirm: function(){
  21. $.post($.app + "/cg/delete", {
  22. id : cgid
  23. }, function(data) {
  24. if (data.success) {
  25. $.alert({
  26. title: '提示',
  27. content: '操作成功',
  28. confirm: function(){
  29. initcgxx();
  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 initcgxx(){
  47. $.post($.app + "/gkjyr/cgxx", {
  48. id : $('#jyrid').val()
  49. }, function(data) {
  50. if (data) {
  51. var str ="";
  52. for(var i=0;i<data.length;i++){
  53. var cg = data[i];
  54. str+="<tr class='tr_bg'>";
  55. str+="<td>"+(i+1)+"</td>";
  56. str+="<td>"+cg.cgmc+"</td>";
  57. str+="<td>"+cg.hxpmc+"</td>";
  58. str+="<td>"+cg.ssjyrzw+"</td>";
  59. str+="<td>"+(cg.cgqmj == null?"":cg.cgqmj)+"</td>";
  60. str+="<td>"+(cg.aqgd == null ? "":cg.aqgd)+"</td>";
  61. str+="<td>";
  62. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"cgxxview('"+cg.id+"')\"> <i class='glyphicon glyphicon-search'></i> 查看</a>";
  63. if(cg.recordStatus==1&&cg.xkzid==''){
  64. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"cgxxedit('"+cg.id+"')\"> <i class='glyphicon glyphicon-pencil'></i> 编辑</a>";
  65. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"cgxxdelete('"+cg.id+"')\"> <i class='glyphicon glyphicon-trash'></i> 删除</a>";
  66. }
  67. str+="</td>";
  68. str+="</tr>";
  69. }
  70. $('#cgxxdiv').empty();
  71. $('#cgxxdiv').append(str);
  72. } else {
  73. }
  74. }, "json");
  75. }
  76. </script>
  77. <a class="btn btn-default btn-sm" href="#"
  78. onclick="cgxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
  79. </a>
  80. <table class="main_table" cellpadding="0" cellspacing="0">
  81. <tr>
  82. <th width="5%">序号</th>
  83. <th width="15%">储罐名称</th>
  84. <th width="15%">作业品名</th>
  85. <th width="15%">港口经营人</th>
  86. <!-- <th width="12%">企业存储编号</th>
  87. <th width="11%">储罐容积(升)</th> -->
  88. <th width="15">罐体容积(立方米)</th>
  89. <th width="15%">罐体高度(米)</th>
  90. <!-- <th width="12%">是否危险品储罐</th> -->
  91. <th width="20%">操作</th>
  92. </tr>
  93. <tbody id="cgxxdiv"></tbody>
  94. </table>