Browse Source

账号关联页和新建关联页完成(back)

bao.zhang 9 years ago
parent
commit
9ec12dc62b

+ 30 - 20
src/main/java/com/cloudcross/ssp/model/mapper/correlation.sql.xml

@@ -1,15 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="correlationSqlMapper">
 <mapper namespace="correlationSqlMapper">
-	<select id="findAllCorrelation"  resultType="com.cloudcross.ssp.model.Correlation">
+
+	<select id="findAllCorrelation" parameterType="HashMap" resultType="com.cloudcross.ssp.model.Correlation">
 		select t_adv_agent.operator_id as operatorId
 		select t_adv_agent.operator_id as operatorId
 		,t_adv_agent.id as agentId
 		,t_adv_agent.id as agentId
 		,t_adv_agent.name as agentName
 		,t_adv_agent.name as agentName
-		, t_operator.company_name 
+		, t_operator.company_name as operatorName
 		from t_adv_agent,t_operator 
 		from t_adv_agent,t_operator 
 		where operator_id !=0 and t_operator.id = t_adv_agent.operator_id
 		where operator_id !=0 and t_operator.id = t_adv_agent.operator_id
+		order by  t_adv_agent.id   desc
+	limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
+	<select id="countAllCorrelation"  resultType="int">
+		select count(t_adv_agent.operator_id)
+		from t_adv_agent,t_operator 
+		where operator_id !=0 and t_operator.id = t_adv_agent.operator_id
+	</select>
+	
+	
 	<select id="findCorrelationByOperatorId"  resultType="com.cloudcross.ssp.model.Correlation" parameterType="Long">
 	<select id="findCorrelationByOperatorId"  resultType="com.cloudcross.ssp.model.Correlation" parameterType="Long">
 		select t_adv_agent.operator_id as operatorId
 		select t_adv_agent.operator_id as operatorId
 		,t_adv_agent.id as agentId
 		,t_adv_agent.id as agentId
@@ -51,7 +61,7 @@
 		t_rpt_adv_location g,
 		t_rpt_adv_location g,
 		t_rpt_adv_os h,
 		t_rpt_adv_os h,
 		t_rpt_adv_place i,
 		t_rpt_adv_place i,
-		t_rpt_adv_schema j,
+		
 		t_rpt_advertiser k,
 		t_rpt_advertiser k,
 		t_rpt_advertiser_hour l
 		t_rpt_advertiser_hour l
 		
 		
@@ -60,18 +70,18 @@
 		g.operator_id=#{operatorId},
 		g.operator_id=#{operatorId},
 		h.operator_id=#{operatorId},
 		h.operator_id=#{operatorId},
 		i.operator_id=#{operatorId},
 		i.operator_id=#{operatorId},
-		j.operator_id=#{operatorId},
+		
 		k.operator_id=#{operatorId},
 		k.operator_id=#{operatorId},
 		l.operator_id=#{operatorId}
 		l.operator_id=#{operatorId}
 
 
 		where 
 		where 
-		and f.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and g.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and h.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and i.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and j.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and k.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and l.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
+		f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+
+		and k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
 
 
 	</update>
 	</update>
 	
 	
@@ -107,7 +117,7 @@
 		t_rpt_adv_location g,
 		t_rpt_adv_location g,
 		t_rpt_adv_os h,
 		t_rpt_adv_os h,
 		t_rpt_adv_place i,
 		t_rpt_adv_place i,
-		t_rpt_adv_schema j,
+		
 		t_rpt_advertiser k,
 		t_rpt_advertiser k,
 		t_rpt_advertiser_hour l
 		t_rpt_advertiser_hour l
 		
 		
@@ -116,18 +126,18 @@
 		g.operator_id=0,
 		g.operator_id=0,
 		h.operator_id=0,
 		h.operator_id=0,
 		i.operator_id=0,
 		i.operator_id=0,
-		j.operator_id=0,
+		
 		k.operator_id=0,
 		k.operator_id=0,
 		l.operator_id=0
 		l.operator_id=0
 
 
 		where 
 		where 
-		and f.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and g.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and h.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and i.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and j.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and k.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
-		and l.advertiser_id in (select id from t_advertiser where agent_id = #{agent_id})
+		f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		
+		and k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
+		and l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
 
 
 	</update>
 	</update>
 	
 	

+ 3 - 1
src/main/java/com/cloudcross/ssp/service/ICorrelationService.java

@@ -2,10 +2,12 @@ package com.cloudcross.ssp.service;
 
 
 import java.util.List;
 import java.util.List;
 
 
+import com.cloudcross.ssp.common.utils.Pager;
 import com.cloudcross.ssp.model.Correlation;
 import com.cloudcross.ssp.model.Correlation;
 
 
 public interface ICorrelationService {
 public interface ICorrelationService {
-	public List<Correlation> findAllCorrelation();
+	public List<Correlation> findAllCorrelation(Pager p);
+	public int countAllCorrelation();
 	public Correlation findCorrelationByOperatorId(Long operatorId);
 	public Correlation findCorrelationByOperatorId(Long operatorId);
 	public boolean addCorrelation(Correlation c);
 	public boolean addCorrelation(Correlation c);
 	public boolean deleteCorrelation(Correlation c);
 	public boolean deleteCorrelation(Correlation c);

+ 12 - 2
src/main/java/com/cloudcross/ssp/service/impl/CorrelationService.java

@@ -1,11 +1,13 @@
 package com.cloudcross.ssp.service.impl;
 package com.cloudcross.ssp.service.impl;
 
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import com.cloudcross.ssp.base.dao.GenericIBatisDao;
 import com.cloudcross.ssp.base.dao.GenericIBatisDao;
+import com.cloudcross.ssp.common.utils.Pager;
 import com.cloudcross.ssp.model.Correlation;
 import com.cloudcross.ssp.model.Correlation;
 import com.cloudcross.ssp.service.ICorrelationService;
 import com.cloudcross.ssp.service.ICorrelationService;
 
 
@@ -16,9 +18,11 @@ public class CorrelationService implements ICorrelationService{
 	private GenericIBatisDao myBatisDao;
 	private GenericIBatisDao myBatisDao;
 	
 	
 	@Override
 	@Override
-	public List<Correlation> findAllCorrelation() {
+	public List<Correlation> findAllCorrelation(Pager p) {
 		// TODO Auto-generated method stub
 		// TODO Auto-generated method stub
-		return myBatisDao.getList("correlationSqlMapper.findAllCorrelation");
+		HashMap<String, Object> paramMap = new HashMap<String, Object>();
+		paramMap.put("pager", p);
+		return myBatisDao.getList("correlationSqlMapper.findAllCorrelation",paramMap);
 	}
 	}
 
 
 	@Override
 	@Override
@@ -70,5 +74,11 @@ public class CorrelationService implements ICorrelationService{
 		deleteCorrelation2(c);
 		deleteCorrelation2(c);
 		return true;
 		return true;
 	}
 	}
+
+	@Override
+	public int countAllCorrelation() {
+		// TODO Auto-generated method stub
+		return myBatisDao.get("correlationSqlMapper.countAllCorrelation",null);
+	}
 	
 	
 }
 }

+ 15 - 5
src/main/java/com/cloudcross/ssp/web/back/main/ClientAccountController.java

@@ -421,8 +421,14 @@ public class ClientAccountController extends SimpleController{
 	 * @return
 	 * @return
 	 */
 	 */
 	@RequestMapping("/correlation")
 	@RequestMapping("/correlation")
-	public String correlation(Model model){
-		List<Correlation> correlations = correlationService.findAllCorrelation();
+	public String correlation(Model model,
+			@RequestParam(defaultValue="1") int page){
+		int totalRow = correlationService.countAllCorrelation();
+		Pager pager = new Pager();
+		pager.setPage(page);
+		pager.setTotalRow(totalRow);
+		List<Correlation> correlations = correlationService.findAllCorrelation(pager);
+		model.addAttribute("pager",pager);
 		model.addAttribute("correlations",correlations);
 		model.addAttribute("correlations",correlations);
 		return page("correlation");
 		return page("correlation");
 	}
 	}
@@ -439,9 +445,13 @@ public class ClientAccountController extends SimpleController{
 	 * @return
 	 * @return
 	 */
 	 */
 	@RequestMapping("cancelcorrelation")
 	@RequestMapping("cancelcorrelation")
-	public String cancelCorrelation(@ModelAttribute("form")Correlation ca){
+	public String cancelCorrelation(@RequestParam Long agentId,
+			@RequestParam Long operatorId){
+		Correlation ca = new Correlation();
+		ca.setAgentId(agentId);
+		ca.setOperatorId(operatorId);
 		correlationService.deleteCorrelation(ca);
 		correlationService.deleteCorrelation(ca);
-		return OK;
+		return redirect(page("correlation"));
 	}
 	}
 	/**
 	/**
 	 * 保存关联
 	 * 保存关联
@@ -450,7 +460,7 @@ public class ClientAccountController extends SimpleController{
 	@RequestMapping("savecorrelation")
 	@RequestMapping("savecorrelation")
 	public String saveCorrelation(@ModelAttribute("form")Correlation ca){
 	public String saveCorrelation(@ModelAttribute("form")Correlation ca){
 		correlationService.addCorrelation(ca);
 		correlationService.addCorrelation(ca);
-		return OK;
+		return redirect(page("correlation"));
 	}
 	}
 	
 	
 	
 	

+ 2 - 1
src/main/webapp/WEB-INF/pages/back/main/authority/list.ftl

@@ -15,7 +15,7 @@
 	
 	
 	<script type="text/javascript" >
 	<script type="text/javascript" >
 		$(function(){
 		$(function(){
-		
+			
 			//创建账号
 			//创建账号
 			$("#btn-create").unbind('click').click(function(){
 			$("#btn-create").unbind('click').click(function(){
 				location.href = "${ctx}/back/main/authority/create";
 				location.href = "${ctx}/back/main/authority/create";
@@ -113,6 +113,7 @@
 		<div id="content">
 		<div id="content">
 			<form id="formPage" action="${ctx}/back/main/authority/list" method="post" style="margin:0px;">
 			<form id="formPage" action="${ctx}/back/main/authority/list" method="post" style="margin:0px;">
 			  	<div id="buttons">
 			  	<div id="buttons">
+			  		
 			  		<div id="btn-create" class="btna">创建账号</div>      
 			  		<div id="btn-create" class="btna">创建账号</div>      
 			        <div id="all-btn-enable" class="btna">批量开启</div>  
 			        <div id="all-btn-enable" class="btna">批量开启</div>  
 			        <div id="all-btn-disable" class="btna">批量暂停</div> 
 			        <div id="all-btn-disable" class="btna">批量暂停</div> 

+ 100 - 0
src/main/webapp/WEB-INF/pages/back/main/client-account/correlation.ftl

@@ -0,0 +1,100 @@
+<@override name="head">
+	<title>账号管理</title>
+	<link rel="stylesheet" href="${ctx}/assets/css/public-head.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/font-awesome.min.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/zbone.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/authority.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/bootstrap.min.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/newforwebback.css"/>
+	
+	<script type="text/javascript" src="${ctx}/assets/js/lib/jquery-1.9.1.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/divselect.js"></script>
+	
+	<script type="text/javascript" >
+		$(function(){
+		// 分页中超链接跳转
+			$('#pagecontent .pagination ul li a[href]').live('click' ,function(){
+				var _page = $(this).attr('href').substr(1);
+				//alert(_page);
+				var _form = $('#formPage');
+				_form.find('input:hidden[name="page"]').val(_page);
+				_form.submit();
+				return false;
+			});
+		//新增账号关联
+			$("#new-correlate").unbind('click').click(function(){
+				location.href = "${ctx}/back/main/client-account/createcorrelation";
+			});
+		});	
+		
+	</script>
+	
+</@override>
+
+<@override name="body">
+	<!-- PAGE CONTENT BEGINS HERE -->
+<div id=content_bg>
+	<#include "/back/main/public-head.ftl">
+    <div id= "pagecontent">
+		<div id="handler">
+			<ul>
+				<li class="size1"><i class="icon-home" style="background-image:none;"></i> <a href="${ctx}/back/main/dashboard">首页</a>
+				<span class="divider1"><i class="icon-angle-right"></i></span></li>
+				<li class="size2"><a href="${ctx}/back/main/authority/list">权限管理</a></li>
+				<span class="divider2"><i class="icon-angle-right"></i></span></li>
+				<li class="size2">账号关联</li>
+			</ul>  
+		</div>
+		<div id="content">
+			<form id="formPage" action="${ctx}/back/main/client-account/correlation" method="post" style="margin:0px;">
+			  	
+			  	<div id="new-correlate" class="btn1">新增关联</div>  
+			  	<input type="hidden" id="page" name="page" value="${pager.page}">
+				<div id="account-table" style="margin:20px 0px 0px 0px;">
+					<table border="1" class="tablefig" id="tablefig" style="width:90%;">
+						<thead>
+							<tr>
+							
+								<th width="20%">代理商</th>
+								<th width="10%">媒体</th>
+								<th width="25%">操作</th>
+							</tr>
+						</thead>
+						<tbody>
+						<#if correlations ??>
+						<#list correlations as correlation>
+							<tr class="">
+								
+								<td class="breakword">${correlation.agentName!}</td>
+								<td class="breakword">${correlation.operatorName!}</td>
+								<td class="hide-piece">
+									<div id="btndiv" >
+										<div id="cancel-correlate" class="btn11" style=" margin-left: 53px !important;">
+										<a style="color:#ffffff;" href="${ctx}/back/main/client-account/cancelcorrelation?agentId=#{correlation.agentId!}&operatorId=#{correlation.operatorId!}" >取消关联
+										</a>
+										</div>
+									</div>
+								</td>
+							</tr>
+						</#list>
+						</#if>
+					</tbody>
+					</table>
+					
+					<div id="daochu1" style="margin-top:20px; margin-left:20px;">
+						<a class="ljbtn2" id="exportExcel" href="javascript:void(0);" onClick="exportExcel()">导出Excel</a>
+					</div>
+								
+					<div id="pageDiv" style="margin:-55px 50px 20px 0px !important;">
+		               	<#include "/common/pagination/simple.ftl"/>
+		            </div>	
+				</div>
+			</form>
+		</div>
+	</div>
+</div>
+</@override>
+<@extends name="/common/simple.ftl"/>

+ 152 - 0
src/main/webapp/WEB-INF/pages/back/main/client-account/createcorrelation.ftl

@@ -0,0 +1,152 @@
+<@override name="head">
+	<title>账号管理</title>
+	<link rel="stylesheet" href="${ctx}/assets/css/public-head.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/ap-apmac.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/zbone.css"/>
+	<link rel="stylesheet" href="${ctx}/assets/css/bootstrap.min.css"/>
+	
+	<script type="text/javascript" src="${ctx}/assets/js/lib/jquery-1.9.1.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
+	<script type="text/javascript" src="${ctx}/assets/js/divselect.js"></script>
+
+	
+	<script type="text/javascript" >
+		$(function(){
+		  //请选择运营商
+ 	if($("#main_operatorListUl").html()){
+ 		if($("#selectedOperatorId").val() == -1 || $("#selectedOperatorId").val() == ""){
+ 			$("#operatorListUl_span").html("运营商");
+ 		}
+ 		$("#son_operatorListUl").hide();
+ 		var url = "/ssp_web/widget/selector/provide/operator?parentId=1";
+ 		
+ 		$("#operatorListUl_span").on("click",function(){
+	 		$("#son_operatorListUl").empty();
+	 		$('#son_operatorListUl').css({height:"auto",overflow:"hidden"});
+	 		
+	 	
+		 		$.getJSON( url, function(data){
+					var data_1 = data.operatorList;
+					//alert(data_1);
+					$.each( data_1, function( key, val ) {
+						$("#son_operatorListUl").append('<li value='+ val.id +'>' + val.companyName + '</li>');
+					});
+					$('#son_operatorListUl').show(); //ul显示
+					if($('#son_operatorListUl').height()>210){
+						$('#son_operatorListUl').css({"height":"210"+"px","overflow-y":"scroll","overflow-x":"hidden","z-index":"9999" });
+					};
+				});	
+	 		
+	 	});		
+ 		
+ 		$('ul#son_operatorListUl li').live("click",function(){
+ 	 		$(this).parents('li').find('span').html($(this).html());
+ 			$("#selectedOperatorId").val($(this).attr("value"));
+ 			$("#selectedOperatorName").val($(this).html());
+ 			$('#son_operatorListUl').hide(); //ul隐藏
+ 			
+ 		});
+ 	}
+ 	
+ 	//请选择代理商
+ 	if($("#main_agent").html()){
+ 		if($("#selectedAgentId").val() == -1 || $("#selectedAgentId").val() == ""){
+ 			$("#agent_span").html("代理商");
+ 		}
+ 		$("#son_agent").hide();
+ 		
+ 		var url_1 = "${ctx}/widget/selector/provide/adv-agent"; //请求地址
+ 		$("#agent_span").on("click",function(){
+	 		$("#son_agent").empty();
+	 		$('#son_agent').css({height:"auto",overflow:"hidden"});
+	 		
+	 	
+		 		$.getJSON( url_1, function(data){
+					var data_1 = data.advAgentsList;
+					//alert(data_1);
+					$.each( data_1, function( key, val ) {
+						$("#son_agent").append('<li value='+ val.value  +'>' + val.label + '</li>');
+					});
+					$('#son_agent').show(); //ul显示
+					if($('#son_agent').height()>210){
+						$('#son_agent').css({"height":"210"+"px","overflow-y":"scroll","overflow-x":"hidden","z-index":"9999" });
+					};
+				});	
+	 		
+	 	});		
+ 		
+ 		$('ul#son_agent li').live("click",function(){
+ 	 		$(this).parents('li').find('span').html($(this).html());
+ 			$("#selectedAgentId").val($(this).attr("value"));
+ 			//$("#selectedOperatorName").val($(this).html());
+ 			$('#son_agent').hide(); //ul隐藏
+ 			
+ 		});
+ 	}
+ 	//新增账号关联
+			$("#cancel-correlate").unbind('click').click(function(){
+				location.href = "${ctx}/back/main/client-account/correlation";
+			});
+		
+	});	
+	</script>
+	
+</@override>
+
+<@override name="body">
+	<!-- PAGE CONTENT BEGINS HERE -->
+<div id=content_bg>
+	<#include "/back/main/public-head.ftl">
+    <div id= "pagecontent">
+		<div id="handler" style="margin-left: 24px;">
+			<ul>
+				<li class="size1"><i class="icon-home" style="background-image:none;"></i> <a href="${ctx}/back/main/dashboard">首页</a>
+				<span class="divider1"><i class="icon-angle-right"></i></span></li>
+				<li class="size2"><a href="${ctx}/back/main/authority/list">权限管理</a></li>
+				<span class="divider2"><i class="icon-angle-right"></i></span></li>
+				<li class="size2">账号关联</li>
+			</ul>  
+		</div>
+		<div id="content">
+			<form id="formPage" action="${ctx}/back/main/client-account/savecorrelation" method="post" style="margin:0px;">
+			  	
+			  	
+			  	<div id="selectuls">
+			  			<span id="choose" style="float:left;margin-left:20px;">请选择运营商:</span>
+			  			<ul id="main_operatorListUl">
+						<li class="select_box" id="operatorListUl_box" style="margin-right: 85px;">
+							<span id="operatorListUl_span">${operatorName!}</span>
+							<ul class="son_ul" id="son_operatorListUl"></ul>
+						</li>
+						</ul>
+						
+						<input type="hidden" name="operatorId" id="selectedOperatorId" value="${selectedOperatorId!}">
+					
+						<span id="choose" style="float:left;">请选择代理商:</span>
+			  			<ul id="main_agent">
+						<li class="select_box" id="agent_box" style="margin-right: 85px;">
+							<span id="agent_span">${operatorName!}</span>
+							<ul class="son_ul" id="son_agent"></ul>
+						</li>
+						</ul>
+						
+						<input type="hidden" name="agentId" id="selectedAgentId" value="${selectedAgentId!}">
+						
+			  	</div> 
+			  	<div id="buttons">
+			  			 
+				  		<button id="save-correlate" type="submit" class="btn1" style="float:left;width:126px;">保存</button>      
+				        <div id="cancel-correlate" class="btn1">取消</div> 
+				      
+				    </div>
+			  	
+					
+		
+			</form>
+		</div>
+	</div>
+</div>
+</@override>
+<@extends name="/common/simple.ftl"/>

+ 5 - 1
src/main/webapp/WEB-INF/pages/back/main/client-account/list.ftl

@@ -35,7 +35,10 @@
 				}
 				}
 				$('#formPage').submit();
 				$('#formPage').submit();
 			});
 			});
-			
+			//账号关联
+			$("#btn-corelate").unbind('click').click(function(){
+				location.href = "${ctx}/back/main/client-account/correlation";
+			});
 			//创建账号
 			//创建账号
 			$("#btn-create").unbind('click').click(function(){
 			$("#btn-create").unbind('click').click(function(){
 				location.href = "${ctx}/back/main/client-account/create";
 				location.href = "${ctx}/back/main/client-account/create";
@@ -144,6 +147,7 @@
 			<form id="formPage" action="${ctx}/back/main/client-account/list" method="post" style="margin:0px;">
 			<form id="formPage" action="${ctx}/back/main/client-account/list" method="post" style="margin:0px;">
 				<input type="hidden" id="sysType" name="sysType" value="${sysType!}">
 				<input type="hidden" id="sysType" name="sysType" value="${sysType!}">
 		  		<div id="buttons">
 		  		<div id="buttons">
+		  			<div id="btn-corelate" class="btna">账号关联</div> 
 			  		<div id="btn-create" class="btna">创建账号</div>      
 			  		<div id="btn-create" class="btna">创建账号</div>      
 			        <div id="all-btn-enable" class="btna">批量开启</div>  
 			        <div id="all-btn-enable" class="btna">批量开启</div>  
 			        <div id="all-btn-disable" class="btna">批量停用</div> 
 			        <div id="all-btn-disable" class="btna">批量停用</div>