|
@@ -0,0 +1,168 @@
|
|
|
+<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
+ pageEncoding="UTF-8"%>
|
|
|
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
|
|
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<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" />
|
|
|
+ <LINK rel="Bookmark" href="/favicon.ico">
|
|
|
+ <LINK rel="Shortcut Icon" href="/favicon.ico" />
|
|
|
+ <!--[if lt IE 9]>
|
|
|
+ <script type="text/javascript" src="lib/html5.js"></script>
|
|
|
+ <script type="text/javascript" src="lib/respond.min.js"></script>
|
|
|
+ <script type="text/javascript" src="lib/PIE_IE678.js"></script>
|
|
|
+ <![endif]-->
|
|
|
+ <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
|
|
|
+ <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
|
|
|
+ <link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
|
|
|
+ <link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
|
|
|
+ <link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />
|
|
|
+
|
|
|
+ <!--[if IE 6]>
|
|
|
+ <script type="text/javascript" src="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 mr-20"
|
|
|
+ style="line-height: 1.6em; margin-top: 3px"
|
|
|
+ href="javascript:location.replace(location.href);" title="刷新"><i
|
|
|
+ class="Hui-iconfont"></i></a>
|
|
|
+</nav>
|
|
|
+<div class="pd-20">
|
|
|
+ <div class="cl pd-5 bg-1 bk-gray mt-20">
|
|
|
+ <form action="${pageContext.request.contextPath }/admin/agentTooth/select_agentInfo_list" method="post" id="searchForm">
|
|
|
+ <div class="text-c">
|
|
|
+ <button type="button" style="float:left;" class="btn btn-success radius" onclick="add_Agent();" id="addAgent" name=""><i class="Hui-iconfont"></i> 添加代理商</button>
|
|
|
+ <select name="agentStatus" style="height: 30px;">
|
|
|
+ <option value="">线下状态</option>
|
|
|
+ <option <c:if test="${agentStatus == 1}">selected = "selected"</c:if> value="1">正在使用</option>
|
|
|
+ <option <c:if test="${agentStatus == 2}">selected = "selected"</c:if> value="2">停止使用</option>
|
|
|
+ </select>
|
|
|
+ <input type="text" class="input-text" style="width:130px" placeholder="请输入代理商姓名" value="${agentName}" name="agentName">
|
|
|
+ <input type="text" class="input-text" style="width:130px" placeholder="请输入代理商电话" value="${agentTel}" name="agentTel">
|
|
|
+ <button type="submit" class="btn btn-success radius" id="searchButton" name=""><i class="Hui-iconfont"></i> 搜索</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <form id="configform" >
|
|
|
+ <table class="table table-border table-bordered table-bg" id="example">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th scope="col" colspan="11">代理商列表</th>
|
|
|
+ </tr>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th width="100">名称</th>
|
|
|
+ <th width="100">地址</th>
|
|
|
+ <th width="100">电话</th>
|
|
|
+ <th width="100">线下状态</th>
|
|
|
+ <th width="100">创建时间</th>
|
|
|
+ <th width="100">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:if test="${! (empty agentToothList) }">
|
|
|
+ <c:forEach items="${agentToothList }" var="list">
|
|
|
+ <tr class="text-c">
|
|
|
+ <td>${list.agentName }</td>
|
|
|
+ <td>${list.agentAddr }</td>
|
|
|
+ <td>${fn:substring(list.agentTel,0,3)}****${fn:substring(list.agentTel,7,11)}</td>
|
|
|
+ <td>
|
|
|
+ <c:if test="${list.agentStatus == 1}">
|
|
|
+ 正在使用
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${list.agentStatus == 2}">
|
|
|
+ 停止使用
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <td><fmt:formatDate value="${list.agentCreateDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
+ <td class="td-manage">
|
|
|
+ <div id="config_status">
|
|
|
+ <c:if test="${list.agentStatus == 2}">
|
|
|
+ <a onclick="updateagentState('${list.agentId }','1')"
|
|
|
+ title="修改状态" href="javascript:;" class="ml-5" style="text-decoration:none">修改为正在使用</a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${list.agentStatus == 1}">
|
|
|
+ <a onclick="updateagentState('${list.agentId }','2')"
|
|
|
+ title="修改状态" href="javascript:;" class="ml-5" style="text-decoration:none">修改为停用</a>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a onclick="updateAgent('${list.agentId}')"
|
|
|
+ title="修改" href="javascript:;" class="ml-5" style="text-decoration:none">修改代理商信息</a>
|
|
|
+ </td>
|
|
|
+ </c:forEach>
|
|
|
+ </c:if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div align="right" class="mt-10 mb-10 mr-10">
|
|
|
+ <%@include file="/common/other/paper/pager.jsp"%>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/js/page/jqPaginator.js"></script>
|
|
|
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/goods/js/utils.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+ function updateagentState(id,state){
|
|
|
+ layer.confirm('确认要修改状态吗?',function(index){
|
|
|
+ $.ajax({
|
|
|
+ url: '${pageContext.request.contextPath }/admin/agentTooth/update_agentInfo',
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ data: {agentId : id,agentStatus : state},
|
|
|
+ error:function(data){
|
|
|
+ layer.msg("修改失败</br>",{icon: 5,time:2000});
|
|
|
+ },
|
|
|
+ success: function(data){
|
|
|
+ if (data.status) {
|
|
|
+ layer.msg("修改成功</br>",{icon: 1,time:2000});
|
|
|
+ location.replace(location.href);
|
|
|
+ /*var message = '';
|
|
|
+ switch (state) {
|
|
|
+ case "1":
|
|
|
+ message = '<a onclick="updateagentState('+id+',2)" title="修改状态" href="javascript:;" class="ml-5" style="text-decoration:none">修改为停止使用</a>';
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ message = '<a onclick="updateagentState('+id+',1)" title="修改状态" href="javascript:;" class="ml-5" style="text-decoration:none">修改为正在使用</a>';
|
|
|
+ break;
|
|
|
+ }*/
|
|
|
+ /* $('#config_status').html(message);*/
|
|
|
+ } else {
|
|
|
+ layer.msg("修改失败</br>",{icon: 5,time:2000});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, function () {
|
|
|
+ window.location.reload(location.href);
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateAgent(id){
|
|
|
+ window.location.href = '${pageContext.request.contextPath }/admin/agentTooth/_update_agentInfo?agentId='+id;
|
|
|
+ }
|
|
|
+ function add_Agent(){
|
|
|
+ window.location.href = '${pageContext.request.contextPath }/admin/agentTooth/_add_agentInfo';
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|