123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
- <meta http-equiv="Cache-Control" content="no-siteapp"/>
- <!--[if lt IE 9]>
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/html5shiv.js"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/respond.min.js"></script>
- <![endif]-->
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/static/h-ui/css/H-ui.min.css"/>
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/static/h-ui.admin/css/H-ui.admin.css"/>
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/static/h-ui.admin/skin/default/skin.css" id="skin"/>
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/static/h-ui.admin/css/style.css"/>
- <link rel="stylesheet" type="text/css"
- href="${pageContext.request.contextPath}/static/static/h-ui.admin/css/page.css"/>
- <!--[if IE 6]>
- <script type="text/javascript"
- src="${pageContext.request.contextPath}/static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
- <script>DD_belatedPNG.fix('*');</script>
- <![endif]-->
- <title>品牌管理</title>
- </head>
- <body>
- <nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 产品管理 <span
- class="c-gray en">></span> 品牌管理 <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">
- <div class="text-c">
- </div>
- <div class="cl pd-5 bg-1 bk-gray mt-20"><span class="l"><a href="javascript:;"
- class="btn btn-danger radius" id="delete"><i
- class="Hui-iconfont"></i> 批量删除</a></span>
- <a class="btn btn-primary radius" href="${pageContext.request.contextPath}/mycompany/mycompanyadd.html"><i
- class="Hui-iconfont"></i> 添加公司</a>
- <span class="r data_num">共有数据:<strong>${pageInfo.total }</strong> 条</span></div>
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-sort">
- <thead>
- <tr class="text-c">
- <th width="25"><input type="checkbox" name="" value="" id="sltall"></th>
- <th width="70">公司ID</th>
- <th width="80">公司名称</th>
- <th width="200">公司地址</th>
- <th width="120">公司邮箱</th>
- <th width="200">公司电话</th>
- <th width="120">显示状态</th>
- <th width="100">操作</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${pageInfo.list}" var="itme">
- <tr class="text-c">
- <td><input name="allid" type="checkbox" value="${itme.id}"></td>
- <td>${itme.id}</td>
- <td>${itme.name}</td>
- <td>${itme.address}</td>
- <td>${itme.emil}</td>
- <td>${itme.phone}</td>
- <c:if test="${itme.shows == 0}">
- <td> 隐藏</td>
- </c:if>
- <c:if test="${itme.shows == 1}">
- <td> 显示</td>
- </c:if>
- <td class="td-manage">
- <a style="text-decoration:none" class="ml-5" onClick="article_edit(${itme.id})"
- href="javascript:;" title="编辑"><i class="Hui-iconfont"></i></a>
- <a style="text-decoration:none" class="ml-5" onClick="article_del(this,${itme.id})"
- href="javascript:;" title="删除"><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><a href="mycompanylist.html?page=1&rows=${pageInfo.pageSize }">首页</a></li>
- <li class="prev"><a
- href="mycompanylist.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="mycompanylist.html?page=${nav}&rows=${pageInfo.pageSize }"
- class="active">${nav}</a></li>
- </c:if>
- <c:if test="${nav != pageInfo.pageNum}">
- <li>
- <a href="mycompanylist.html?page=${nav}&rows=${pageInfo.pageSize }">${nav}</a>
- </li>
- </c:if>
- </c:forEach>
- <li class="next"><a
- href="mycompanylist.html?page=${pageInfo.nextPage}&rows=${pageInfo.pageSize }">下一页</a>
- </li>
- <li>
- <a href="mycompanylist.html?page=${pageInfo.pages }&rows=${pageInfo.pageSize }">末页</a>
- </li>
- </ul>
- </div>
- </section>
- </div>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/static/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript"
- src="${pageContext.request.contextPath}/static/static/h-ui.admin/js/H-ui.admin.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--请在下方写此页面业务相关的脚本-->
- <script type="text/javascript"
- src="${pageContext.request.contextPath}/static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <!--
- <script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
- -->
- <script type="text/javascript">
- //全选与反选
- $("#sltall").click(function () {
- if ($(this).prop("checked")) {
- $("[name='allid']").prop("checked", true);//全选
- } else {
- $("[name='allid']").prop("checked", false);//取消全选
- }
- });
- //单个删除
- function article_del(obj, id) {
- layer.confirm('确认要删除吗?', function (index) {
- $.post("${pageContext.request.contextPath}/mycompany/deletemycompany.html", {id: id + ","}, function (data) {
- if (data.is) {
- $(obj).parents("tr").remove();
- layer.msg(data.msg, {icon: 1, time: 1000});
- var counts = $("#count").html();
- $("#count").html(counts - 1);
- } else {
- layer.msg(data.msg, {icon: 2, time: 1000});
- }
- }, "json");
- });
- }
- //批量删除
- $("#delete").click(function () {
- //判断是否至少选择一项
- var checkedNum = $("input[name='allid']:checked").length;
- if (checkedNum == 0) {
- layer.msg("请至少选择一个!", {icon: 2, time: 1000});
- return;
- }
- var lengths = 0;
- layer.confirm('确认要删除所选项吗?', function (index) {
- var checkList = new Array();
- $("input[name='allid']:checked").each(function () {
- checkList.push($(this).val());
- var l = checkList.toString();
- lengths = l.length;
- });
- $.ajax({
- type: "POST",
- url: "${pageContext.request.contextPath}/mycompany/deletemycompany.html",
- data: {
- "id": checkList.toString()
- },
- dataType: "json",
- success: function (ajax) {
- if (ajax.is) {
- window.location.href = "${pageContext.request.contextPath}/mycompany/mycompanylist.html?page=1&rows=10";
- layer.msg(data.msg, {icon: 1, time: 1000});
- var counts = $("#count").html();
- $("#count").html(counts - lengths);
- lengths
- } else {
- layer.msg(data.msg, {icon: 2, time: 1000});
- }
- }
- })
- })
- });
- function article_edit(id) {
- window.location.href = "${pageContext.request.contextPath}/mycompany/getMycompany/" + id;
- }
- $('.table-sort').dataTable({
- "aaSorting": [[1, "desc"]],//默认第几个排序
- "bStateSave": true,//状态保存
- "aoColumnDefs": [
- //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
- {"orderable": false, "aTargets": [0, 6]}// 制定列不参与排序
- ]
- });
- </script>
- </body>
- </html>
|