admin-project.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 fade" id="delpoj">
  55. <div class="modal-dialog">
  56. <div class="modal-content">
  57. <div class="modal-header">
  58. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  59. <h3>删除项目确认</h3>
  60. </div>
  61. <div class="modal-body">
  62. <p>项目下还有标段类型,不能删除该项目。</p>
  63. </div>
  64. <div class="modal-footer">
  65. <button class="btn btn-default" data-dismiss="modal">关闭</button>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <!--删除标段可删除-->
  71. <div class="modal fade" id="delpoj2">
  72. <div class="modal-dialog">
  73. <div class="modal-content">
  74. <input id="pid" type="hidden" value="0" name="pid"/>
  75. <div class="modal-header">
  76. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  77. <h3>删除项目确认</h3>
  78. </div>
  79. <div class="modal-body">
  80. <p id="tip"></p>
  81. <p>删除后,将无法恢复。</p>
  82. <p>请谨慎操作!</p>
  83. </div>
  84. <div class="modal-footer">
  85. <a id="delproject" class="btn btn-danger">确认</a>
  86. <button class="btn btn-default" data-dismiss="modal">取消</button>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script type="text/javascript">autoFlashHeight();</script>
  92. <script type="text/javascript">
  93. $(document).ready(function () {
  94. $("a[id^='del_']").on('click',function () {
  95. var pid = $(this).attr('pid');
  96. var pname = $(this).attr('proname');
  97. $.ajax({
  98. type: "POST",
  99. dataType: "json",
  100. cache: false,
  101. data: {"type": 'del', "pid": pid},
  102. url: "{{rootUrl}}manage/item/index",
  103. success: function (data) {
  104. if (data['status'] == "1") {
  105. $("#delpoj").modal('show');
  106. } else {
  107. $("#pid").val(pid);
  108. $("#tip").html("确认删除项目“" + pname + "”?");
  109. $("#delpoj2").modal('show');
  110. }
  111. }
  112. });
  113. });
  114. $("#delproject").click(function () {
  115. var pid = $("#pid").val();
  116. $.ajax({
  117. type: "POST",
  118. dataType: "json",
  119. cache: false,
  120. data: {"type": 'delpro', "pid": pid},
  121. url: "{{rootUrl}}manage/item/index",
  122. success: function (data) {
  123. if (data['status'] == "ok") {
  124. $("#delpoj2").modal('hide');
  125. window.location.href = "{{rootUrl}}manage/item/index";
  126. }
  127. }
  128. });
  129. });
  130. });
  131. </script>
  132. </body>