admindistributor.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <%@ page contentType="text/html;charset=UTF-8" language="java"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
  4. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  5. <%
  6. String base = pageContext.getServletContext().getContextPath();
  7. %>
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui/css/H-ui.min.css" />
  13. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/H-ui.admin.css" />
  14. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/Hui-iconfont/1.0.7/iconfont.css" />
  15. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/icheck/icheck.css" />
  16. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/skin/default/skin.css" id="skin" />
  17. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/style.css" />
  18. <link href="${pageContext.request.contextPath}/static/admin/css/page.css" rel="stylesheet" type="text/css" />
  19. <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/manage/js/jquery.min.js"></script>
  20. <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/js/layer.js"></script>
  21. <title>call</title>
  22. </head>
  23. <body>
  24. <nav class="breadcrumb">
  25. <i class="Hui-iconfont">&#xe67f;</i> 经销商
  26. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
  27. </nav>
  28. <div class="page-container">
  29. <form action="searchdistributor.html" method="post" id="search">
  30. <div class="text-c">
  31. <input type="text" name="name" placeholder="经销商名称" style="width:200px" class="input-text">
  32. <input type="text" name="address" placeholder="所属城市" style="width:200px" class="input-text">
  33. <button onClick="$('#search').submit()" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
  34. </div>
  35. </form>
  36. <div class="cl pd-5 bg-1 bk-gray mt-20">
  37. <span class="l">
  38. <a class="btn btn-primary radius" href="adddistributor.html"><i class="Hui-iconfont">&#xe600;</i> 新增经销商</a>
  39. <a class="btn btn-primary radius" onclick="downs()"><i class="Hui-iconfont">&#xe6dc;</i> 导出数据</a>
  40. <a class="btn btn-primary radius" href="singexcel.html"><i class="Hui-iconfont">&#xe6de;</i> 导入数据</a>
  41. <a onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
  42. <a onclick="delall()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 删除全部</a>
  43. </span>
  44. <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
  45. </div>
  46. <div class="mt-20">
  47. <table class="table table-border table-bordered table-bg table-hover table-sort">
  48. <thead>
  49. <tr class="text-c">
  50. <th><input type="checkbox" id="sltall"/> </th>
  51. <th width="80">编号</th>
  52. <th>经销商名称</th>
  53. <th>经销商地址</th>
  54. <th>联系方式</th>
  55. <th>纬度</th>
  56. <th>经度</th>
  57. <th>所属城市</th>
  58. <th>经销商等级</th>
  59. <th width="100">操作</th>
  60. </tr>
  61. </thead>
  62. <tbody>
  63. <c:forEach items="${pageInfo.list }" var="item">
  64. <tr class="text-c">
  65. <td> <input type="checkbox" name="id" value="${item.id }"/></td>
  66. <td>${item.id }</td>
  67. <td>${item.name }</td>
  68. <td>${item.address }</td>
  69. <td>${item.phone }</td>
  70. <td>${item.latitude }</td>
  71. <td>${item.longitude }</td>
  72. <td>${item.city }</td>
  73. <td>${item.sort }</td>
  74. <td class="td-manage">
  75. <a style="text-decoration:none" class="ml-5" href="upddistributor.html?id=${item.id }" title="查看"><i class="Hui-iconfont">&#xe6df;</i></a>
  76. <a href="javascript:del(${item.id })"><i class="Hui-iconfont">&#xe6e2;</i></a>
  77. </td>
  78. </tr>
  79. </c:forEach>
  80. </tbody>
  81. </table>
  82. </div>
  83. <div id="PageNum">
  84. <section>
  85. <div class="bd points-goods-list">
  86. <ul class="pages">
  87. <li>显示条数:</li>
  88. <li><select name="rows" class="select" id="select">
  89. <option value="10" <c:if test="${rows == 10 }">selected="selected"</c:if>>10</option>
  90. <option value="20" <c:if test="${rows == 20 }">selected="selected"</c:if>>20</option>
  91. <option value="50" <c:if test="${rows == 50 }">selected="selected"</c:if>>50</option>
  92. <option value="100" <c:if test="${rows == 100 }">selected="selected"</c:if>>100</option>
  93. </select></li>
  94. <li><a href="admindistributor.html?page=1&rows=${pageInfo.pageSize}">首页</a></li>
  95. <li class="prev"><a href="admindistributor.html?page=${pageInfo.prePage}&rows=${pageInfo.pageSize}">上一页</a></li>
  96. <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
  97. <c:if test="${nav == pageInfo.pageNum}">
  98. <li><a href="admindistributor.html?page=${nav}&rows=${pageInfo.pageSize}" class="active">${nav}</a></li>
  99. </c:if>
  100. <c:if test="${nav != pageInfo.pageNum}">
  101. <li><a href="admindistributor.html?page=${nav}&rows=${pageInfo.pageSize}">${nav}</a></li>
  102. </c:if>
  103. </c:forEach>
  104. <li class="next"><a href="admindistributor.html?proid=${proid}&page=${pageInfo.nextPage}&rows=${pageInfo.pageSize}">下一页</a></li>
  105. <li><a href="admindistributor.html?proid=${proid}&page=${pageInfo.pages }&rows=${pageInfo.pageSize}">末页</a></li>
  106. </ul>
  107. </div>
  108. </section>
  109. </div>
  110. </div>
  111. <script type="text/javascript">
  112. $("#select").change(function(){
  113. var rows = $("#select").val();
  114. window.location.href = "admindistributor.html?page=1&rows="+rows;
  115. });
  116. //全选与反选
  117. $("#sltall").click(function(){
  118. if($(this).prop("checked")){
  119. $("[name='id']").prop("checked",true);//全选
  120. }else{
  121. $("[name='id']").prop("checked",false);//取消全选
  122. }
  123. });
  124. function downs(){
  125. var chkvalue ="";//定义一个数组
  126. $("input[name='id']:checked").each(function(){
  127. chkvalue += $(this).val() + ",";
  128. });
  129. window.location.href="exportexecl.html?chkvalue="+chkvalue;
  130. };
  131. //批量删除
  132. function datadel() {
  133. var chkvalue ="";//定义一个数组
  134. $("input[name='id']:checked").each(function(){
  135. chkvalue += $(this).val() + ",";
  136. });
  137. $.post("delbatch.html",{chkvalue:chkvalue},function(data){
  138. layer.alert(data.msg, {skin: 'layui-layer-molv',closeBtn: 0,anim: 4 },function(){
  139. window.location = window.location;
  140. });
  141. },"json");
  142. }
  143. //删除全部
  144. function delall() {
  145. layer.alert('请再次确认', {skin: 'layui-layer-molv',closeBtn: 0,anim: 4 },function(){
  146. $.post("delall.html",function(){
  147. window.location = window.location;
  148. },"json");
  149. });
  150. }
  151. function del(id) {
  152. if (confirm("确定要删除吗?")) {
  153. $.post("deldistributor.html", {
  154. id : id
  155. }, function() {
  156. window.location = window.location;
  157. }, "json");
  158. }
  159. }
  160. </script>
  161. </body>
  162. </html>