zxjxxx.jsp 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <script type="text/javascript">
  4. function zxjxxxadd(){
  5. var path="/gkjyr/details?path=11:id="+$('#jyrid').val()+"";
  6. location.href=$.app+'/zxjx/add?path='+path;
  7. }
  8. function zxjxxxview(zxjxid){
  9. var path="/gkjyr/details?path=11:id="+$('#jyrid').val()+"";
  10. location.href=$.app+'/zxjx/view?id='+zxjxid+'&path='+path;
  11. }
  12. function zxjxxxedit(zxjxid){
  13. var path="/gkjyr/details?path=11:id="+$('#jyrid').val()+"";
  14. location.href=$.app+'/zxjx/edit?id='+zxjxid+'&path='+path;
  15. }
  16. function zxjxxxdelete(zxjxid){
  17. $.confirm({
  18. title: '确认框',
  19. content: '确认删除吗',
  20. confirm: function(){
  21. $.post($.app + "/zxjx/delete", {
  22. id : zxjxid
  23. }, function(data) {
  24. if (data.success) {
  25. $.alert({
  26. title: '提示',
  27. content: '操作成功',
  28. confirm: function(){
  29. initzxjxxx();
  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 initzxjxxx(){
  47. $.post($.app + "/gkjyr/zxjxxx", {
  48. id : $('#jyrid').val()
  49. }, function(data) {
  50. if (data) {
  51. var str =""
  52. for(var i=0;i<data.length;i++){
  53. var zxjx = data[i];
  54. str+="<tr class='tr_bg'>";
  55. str+="<td>"+(i+1)+"</td>";
  56. str+="<td>"+zxjx.jxlbmczw+"</td>";
  57. str+="<td>"+zxjx.ssjyrzw+"</td>";
  58. str+="<td>"+zxjx.xhhgg+"</td>";
  59. str+="<td>"+zxjx.jxsl+"</td>";
  60. str+="<td>"+zxjx.syqzw+"</td>";
  61. str+="<td>";
  62. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"zxjxxxview('"+zxjx.id+"')\"> <i class='glyphicon glyphicon-search'></i> 查看</a>";
  63. if(zxjx.recordStatus==1&&zxjx.xkzid==''){
  64. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"zxjxxxedit('"+zxjx.id+"')\"> <i class='glyphicon glyphicon-pencil'></i> 编辑</a>";
  65. str+="<a class='btn btn-default btn-xs' href='#' onclick=\"zxjxxxdelete('"+zxjx.id+"')\"> <i class='glyphicon glyphicon-trash'></i> 删除</a>";
  66. }
  67. str+="</td>";
  68. str+="</tr>";
  69. }
  70. $('#zxjxxxdiv').empty();
  71. $('#zxjxxxdiv').append(str);
  72. } else {
  73. }
  74. }, "json");
  75. }
  76. </script>
  77. <a class="btn btn-default btn-sm" href="#"
  78. onclick="zxjxxxadd()" 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="15%">机械数量</th>
  87. <th width="15%">所有权</th>
  88. <th width="20%">操作</th>
  89. </tr>
  90. <tbody id="zxjxxxdiv"></tbody>
  91. </table>