serviceList.jsp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <%--
  2. Created by IntelliJ IDEA.
  3. User: Cesiumai
  4. Date: 2016/6/14
  5. Time: 14:15
  6. To change this template use File | Settings | File Templates.
  7. --%>
  8. <%@ page language="java" contentType="text/html; charset=UTF-8"
  9. pageEncoding="UTF-8" %>
  10. <%@ include file="/manage/system/pageBase.jsp" %>
  11. <%@ page info="解决方案" %>
  12. <form action="<%=path%>/manage/service" method="post">
  13. <div style="height:auto!important;height:550px;min-height:550px;">
  14. <h3 style="border-bottom: 1px solid #D7D7D7;color: #666666;font-size: 28px;padding-bottom: 20px;margin-bottom: 30px;">
  15. <%=getServletInfo()%>
  16. <a href="toAdd" class="btn btn-primary"
  17. style="padding: 2px 15px;float:right;">
  18. <i class="icon-plus "></i>添加服务
  19. </a>
  20. </h3>
  21. <div class="filter">
  22. <button method="deletes" class="btn btn-danger" style="padding:0px 5px;margin-top: -4px;"
  23. onclick="return submitIDs(this,'确定删除选择的服务信息?');">
  24. <i class="icon-trash"></i>删除
  25. </button>
  26. <div style="float: right">
  27. <input type="text" value="${e.title}" class="input-medium search-query" name="title" placeholder="标题"/>
  28. <button method="selectList" class="btn btn-info" style="padding:0px 5px;margin-top: -4px;"
  29. onclick="selectList(this)">
  30. <i class="icon-search"></i>查询
  31. </button>
  32. </div>
  33. </div>
  34. <table class="table table-bordered table-hover table-striped">
  35. <tr>
  36. <th width="50"><input type="checkbox" id="firstCheckbox"/></th>
  37. <th>服务标题</th>
  38. <th>状态</th>
  39. <th>排序</th>
  40. <th width="200">操作</th>
  41. </tr>
  42. <c:forEach var="item" items="${pager.list}">
  43. <tr>
  44. <td><input type="checkbox" name="ids"
  45. value="${item.id}"/></td>
  46. <td>${item.title}</td>
  47. <td>${item.status}</td>
  48. <td>${item.orders}</td>
  49. <td><a href="toEdit?id=${item.id}">编辑</a> | <a href="delete?id=${item.id}">删除</a></td>
  50. </tr>
  51. </c:forEach>
  52. <tr>
  53. <td colspan="71" style="text-align: center;">
  54. <%@ include file="/manage/system/page.jsp" %>
  55. </td>
  56. </tr>
  57. </table>
  58. </div>
  59. </form>
  60. <script type="text/javascript">
  61. $(function () {
  62. $("#firstCheckbox").on("click", function () {
  63. if ($(this).prop("checked")) {
  64. $("input[type=checkbox]").prop("checked", true);
  65. } else {
  66. $("input[type=checkbox]").prop("checked", false);
  67. }
  68. });
  69. });
  70. function submitIDs(obj, tip) {
  71. if ($("input:checked").size() == 0) {
  72. alert("请先选择要操作的内容!");
  73. return false;
  74. }
  75. if (confirm(tip)) {
  76. //createMark();
  77. var _form = $("form");
  78. _form.attr("action", $(obj).attr("method"));
  79. _form.submit();
  80. }
  81. return false;
  82. }
  83. //查询
  84. function selectList(obj) {
  85. var _form = $("form");
  86. _form.attr("action", $(obj).attr("method"));
  87. _form.submit();
  88. }
  89. </script>
  90. <%@ include file="/manage/system/baseFoot.jsp" %>