admin-project.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!DOCTYPE html>
  2. <html lang=zh-cn>
  3. <head>
  4. <meta charset=utf-8>
  5. <title>纵横计量支付系统</title>
  6. <meta name=description content=计量支付>
  7. <meta name=copyright content=smartcost.com.cn>
  8. <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
  9. <link rel=stylesheet href={{rootUrl}}global/css/style.css>
  10. <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
  11. <script src={{rootUrl}}global/js/bootstrap.js></script>
  12. <script src={{rootUrl}}global/js/jl.js></script>
  13. </head>
  14. <body>
  15. <div class="wrapHeader">
  16. <h1 class="mainLogo" title="纵横计量支付"></h1>
  17. <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
  18. title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
  19. </div>
  20. <!-- include "top" -->
  21. <div class="warpAdmin">
  22. <!-- include "menu" -->
  23. <div class="adminContent">
  24. <div class="adminMain">
  25. <table class="table table-striped table-hover">
  26. <legend>项目列表</legend>
  27. <thead>
  28. <tr>
  29. <th>项目名称</th>
  30. <th width="40">id</th>
  31. <th>包含标段类型</th>
  32. <th>创建人</th>
  33. <th>操作</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <!-- loop pArray -->
  38. <tr>
  39. <td><a href="{{rootUrl}}manage/item/{{pArray' value.pid}}/section">{{pArray' value.pname}}</a></td>
  40. <td>{{pArray' value.pid}}</td>
  41. <td>{{pArray' value.mnum}}</td>
  42. <td>{{pArray' value.uname}}</td>
  43. <td><a href="#" id="del_{{pArray' value.pid}}" pid="{{pArray' value.pid}}" proname="{{pArray' value.pname}}"
  44. class="colGray" data-toggle="modal">删除</a>
  45. </td>
  46. </tr>
  47. <!-- endloop -->
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. </div>
  53. <!--删除标段不可删除-->
  54. <div class="modal hide fade" id="delpoj">
  55. <div class="modal-header">
  56. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  57. <h3>删除项目确认</h3>
  58. </div>
  59. <div class="modal-body">
  60. <p>项目下还有标段类型,不能删除该项目。</p>
  61. </div>
  62. <div class="modal-footer">
  63. <button class="btn" data-dismiss="modal">关闭</button>
  64. </div>
  65. </div>
  66. <!--删除标段可删除-->
  67. <div class="modal hide fade" id="delpoj2">
  68. <input id="pid" type="hidden" value="0" name="pid"/>
  69. <div class="modal-header">
  70. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  71. <h3>删除项目确认</h3>
  72. </div>
  73. <div class="modal-body">
  74. <p id="tip"></p>
  75. <p>删除后,将无法恢复。</p>
  76. <p>请谨慎操作!</p>
  77. </div>
  78. <div class="modal-footer">
  79. <a id="delproject" class="btn btn-danger">确认</a>
  80. <button class="btn" data-dismiss="modal">取消</button>
  81. </div>
  82. </div>
  83. <script type="text/javascript">autoFlashHeight();</script>
  84. <script type="text/javascript">
  85. $(document).ready(function () {
  86. $("a[id^='del_']").on('click',function () {
  87. var pid = $(this).attr('pid');
  88. var pname = $(this).attr('proname');
  89. $.ajax({
  90. type: "POST",
  91. dataType: "json",
  92. cache: false,
  93. data: {"type": 'del', "pid": pid},
  94. url: "{{rootUrl}}manage/item/index",
  95. success: function (data) {
  96. if (data['status'] == "1") {
  97. $("#delpoj").modal('show');
  98. } else {
  99. $("#pid").val(pid);
  100. $("#tip").html("确认删除项目“" + pname + "”?");
  101. $("#delpoj2").modal('show');
  102. }
  103. }
  104. });
  105. });
  106. $("#delproject").click(function () {
  107. var pid = $("#pid").val();
  108. $.ajax({
  109. type: "POST",
  110. dataType: "json",
  111. cache: false,
  112. data: {"type": 'delpro', "pid": pid},
  113. url: "{{rootUrl}}manage/item/index",
  114. success: function (data) {
  115. if (data['status'] == "ok") {
  116. $("#delpoj2").modal('hide');
  117. window.location.href = "{{rootUrl}}manage/item/index";
  118. }
  119. }
  120. });
  121. });
  122. });
  123. </script>
  124. </body>