123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <%@ page contentType="text/html;charset=UTF-8" language="java"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
- <%
- String base = pageContext.getServletContext().getContextPath();
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui/css/H-ui.min.css" />
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/H-ui.admin.css" />
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/Hui-iconfont/1.0.7/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/icheck/icheck.css" />
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/skin/default/skin.css" id="skin" />
- <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/style.css" />
- <link href="${pageContext.request.contextPath}/static/admin/css/page.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/manage/js/jquery.min.js"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/js/layer.js"></script>
- <title>call</title>
- </head>
- <body>
- <nav class="breadcrumb">
- <i class="Hui-iconfont"></i> 经销商
- <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"></i></a>
- </nav>
- <div class="page-container">
- <form action="searchdistributor.html" method="post" id="search">
- <div class="text-c">
- <input type="text" name="name" placeholder="经销商名称" style="width:200px" class="input-text">
- <input type="text" name="address" placeholder="所属城市" style="width:200px" class="input-text">
- <button onClick="$('#search').submit()" class="btn btn-success" type="submit"><i class="Hui-iconfont"></i> 搜索</button>
- </div>
- </form>
- <div class="cl pd-5 bg-1 bk-gray mt-20">
- <span class="l">
- <a class="btn btn-primary radius" href="adddistributor.html"><i class="Hui-iconfont"></i> 新增经销商</a>
- <a class="btn btn-primary radius" onclick="downs()"><i class="Hui-iconfont"></i> 导出数据</a>
- <a class="btn btn-primary radius" href="singexcel.html"><i class="Hui-iconfont"></i> 导入数据</a>
- <a onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont"></i> 批量删除</a>
- <a onclick="delall()" class="btn btn-danger radius"><i class="Hui-iconfont"></i> 删除全部</a>
- </span>
- <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
- </div>
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th><input type="checkbox" id="sltall"/> </th>
- <th width="80">编号</th>
- <th>经销商名称</th>
- <th>经销商地址</th>
- <th>联系方式</th>
- <th>纬度</th>
- <th>经度</th>
- <th>所属城市</th>
- <th>经销商等级</th>
- <th width="100">操作</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${pageInfo.list }" var="item">
- <tr class="text-c">
- <td> <input type="checkbox" name="id" value="${item.id }"/></td>
- <td>${item.id }</td>
- <td>${item.name }</td>
- <td>${item.address }</td>
- <td>${item.phone }</td>
- <td>${item.latitude }</td>
- <td>${item.longitude }</td>
- <td>${item.city }</td>
- <td>${item.sort }</td>
- <td class="td-manage">
- <a style="text-decoration:none" class="ml-5" href="upddistributor.html?id=${item.id }" title="查看"><i class="Hui-iconfont"></i></a>
- <a href="javascript:del(${item.id })"><i class="Hui-iconfont"></i></a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
-
- <div id="PageNum">
- <section>
- <div class="bd points-goods-list">
- <ul class="pages">
- <li>显示条数:</li>
- <li><select name="rows" class="select" id="select">
- <option value="10" <c:if test="${rows == 10 }">selected="selected"</c:if>>10</option>
- <option value="20" <c:if test="${rows == 20 }">selected="selected"</c:if>>20</option>
- <option value="50" <c:if test="${rows == 50 }">selected="selected"</c:if>>50</option>
- <option value="100" <c:if test="${rows == 100 }">selected="selected"</c:if>>100</option>
- </select></li>
- <li><a href="admindistributor.html?page=1&rows=${pageInfo.pageSize}">首页</a></li>
- <li class="prev"><a href="admindistributor.html?page=${pageInfo.prePage}&rows=${pageInfo.pageSize}">上一页</a></li>
- <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
- <c:if test="${nav == pageInfo.pageNum}">
- <li><a href="admindistributor.html?page=${nav}&rows=${pageInfo.pageSize}" class="active">${nav}</a></li>
- </c:if>
- <c:if test="${nav != pageInfo.pageNum}">
- <li><a href="admindistributor.html?page=${nav}&rows=${pageInfo.pageSize}">${nav}</a></li>
- </c:if>
- </c:forEach>
- <li class="next"><a href="admindistributor.html?proid=${proid}&page=${pageInfo.nextPage}&rows=${pageInfo.pageSize}">下一页</a></li>
- <li><a href="admindistributor.html?proid=${proid}&page=${pageInfo.pages }&rows=${pageInfo.pageSize}">末页</a></li>
- </ul>
- </div>
- </section>
- </div>
- </div>
- <script type="text/javascript">
- $("#select").change(function(){
- var rows = $("#select").val();
- window.location.href = "admindistributor.html?page=1&rows="+rows;
- });
- //全选与反选
- $("#sltall").click(function(){
- if($(this).prop("checked")){
- $("[name='id']").prop("checked",true);//全选
- }else{
- $("[name='id']").prop("checked",false);//取消全选
- }
- });
- function downs(){
- var chkvalue ="";//定义一个数组
- $("input[name='id']:checked").each(function(){
- chkvalue += $(this).val() + ",";
- });
- window.location.href="exportexecl.html?chkvalue="+chkvalue;
- };
- //批量删除
- function datadel() {
- var chkvalue ="";//定义一个数组
- $("input[name='id']:checked").each(function(){
- chkvalue += $(this).val() + ",";
- });
- $.post("delbatch.html",{chkvalue:chkvalue},function(data){
- layer.alert(data.msg, {skin: 'layui-layer-molv',closeBtn: 0,anim: 4 },function(){
- window.location = window.location;
- });
- },"json");
- }
-
- //删除全部
- function delall() {
- layer.alert('请再次确认', {skin: 'layui-layer-molv',closeBtn: 0,anim: 4 },function(){
- $.post("delall.html",function(){
- window.location = window.location;
- },"json");
- });
- }
- function del(id) {
- if (confirm("确定要删除吗?")) {
- $.post("deldistributor.html", {
- id : id
- }, function() {
- window.location = window.location;
- }, "json");
- }
- }
- </script>
- </body>
- </html>
|