Commit bdb12745 by chongli

Merge branch 'f-6.7.0' of 192.168.10.6:caosy/fun-admin into f-6.7.0

parents 7cda846e f1f54020
......@@ -96,7 +96,9 @@ public class CommuneAdmController {
if(mobileOfcommunes==null){
List<CommuneAdmBean> list = new ArrayList<CommuneAdmBean>();
model.put("bindedList", list);
model.put("bindedList2", list);
model.put("unBindedList", list);
model.put("unBindedList2", list);
model.put("nonCommuneAdm", list);
}else{
List<CommuneAdmBean> allMobile= new ArrayList<CommuneAdmBean>();
......@@ -106,7 +108,8 @@ public class CommuneAdmController {
bean.setMobilePhone(mobile);
allMobile.add(bean);
}
List<CommuneAdmBean> bindedCommune = communeAdmService.findBindedCommuneByMobilePhones(mobileOfcommunes);
List<CommuneAdmBean> bindedCommune1 = communeAdmService.findBindedCommuneByMobilePhones(mobileOfcommunes,1);
List<CommuneAdmBean> bindedCommune2 = communeAdmService.findBindedCommuneByMobilePhones(mobileOfcommunes,2);
List<CommuneAdmBean> communeByMobilePhones = communeAdmService.findCommuneByMobilePhones(mobileOfcommunes);
List<CommuneAdmBean> list = new ArrayList<CommuneAdmBean>();
......@@ -120,11 +123,19 @@ public class CommuneAdmController {
bean1.setMobilePhone("15012174236");
list.add(bean1);
model.put("bindedList", bindedCommune);
model.put("bindedList", bindedCommune1); //已绑定销售列表1
model.put("bindedList2", bindedCommune2); //已绑定销售列表2
List<CommuneAdmBean> communeByMobilePhones2 = new ArrayList<CommuneAdmBean>(communeByMobilePhones);
allMobile.removeAll(communeByMobilePhones);
communeByMobilePhones.removeAll(bindedCommune);
model.put("unBindedList", communeByMobilePhones);
model.put("nonCommuneAdm", allMobile);
model.put("nonCommuneAdm", allMobile); //未注册用户列表
communeByMobilePhones.removeAll(bindedCommune1);
model.put("unBindedList", communeByMobilePhones); //未绑定销售列表1
communeByMobilePhones2.removeAll(bindedCommune2);
model.put("unBindedList2", communeByMobilePhones2); //未绑定销售列表2
}
model.put("mobileOfcommunes",mobileOfcommunes);
......
......@@ -49,8 +49,14 @@ public class CommuneAdmService extends BaseService{
return responseBean;
}
public List<CommuneAdmBean> findBindedCommuneByMobilePhones(String mobilePhones) {
String uri = super.getServiceUri("uri.communeAdm.findBindedCommuneByMobilePhones");
public List<CommuneAdmBean> findBindedCommuneByMobilePhones(String mobilePhones, Integer type) {
String uri = "";
if(type==1){
uri = super.getServiceUri("uri.communeAdm.findBindedCommuneByMobilePhones");
}
if (type==2){
uri = super.getServiceUri("uri.communeAdm.findBindedCommune2ByMobilePhones");
}
List<CommuneAdmBean> responseBean = new ArrayList<CommuneAdmBean>();
Request<String> request = new Request<String>("", mobilePhones);
HttpEntity<Request<String>> entity = new HttpEntity<Request<String>>(request);
......
......@@ -508,6 +508,7 @@ uri.communeExt.activeCustomer.updateOpenOrderPerson=/fun-golf-service/activeCust
#communeAdm
uri.communeAdm.findBindedCommuneByMobilePhones=/fun-golf-service/communeAdm/findBindedCommuneByMobilePhones
uri.communeAdm.findBindedCommune2ByMobilePhones=/fun-golf-service/communeAdm/findBinded2CommuneByMobilePhones
uri.communeAdm.findCommuneByMobilePhones=/fun-golf-service/communeAdm/findCommuneByMobilePhones
uri.communeAdm.list=/fun-golf-service/communeAdm/list
uri.communeAdm.batchBind=/fun-golf-service/communeAdm/batchBind
......
<#assign pageJsContent>
<script>
//未绑定区域权限和全不选
function unBindCheckAll(){
if($('#unBind').is(':checked')) {
$(".UnBind :checkbox").prop("checked", true);
}else{
$(".UnBind :checkbox").prop("checked", false);
function unBindCheckAll(type){
if(type == 1){
if($('#unBind').is(':checked')) {
$(".UnBind :checkbox").prop("checked", true);
}else{
$(".UnBind :checkbox").prop("checked", false);
}
}
if(type == 2){
if($('#unBind2').is(':checked')) {
$(".UnBind2 :checkbox").prop("checked", true);
}else{
$(".UnBind2 :checkbox").prop("checked", false);
}
}
}
//绑定区域权限和全不选
function bindedCheckAll(){
if($('#binded').is(':checked')) {
$(".binded :checkbox").prop("checked", true);
}else{
$(".binded :checkbox").prop("checked", false);
}
function bindedCheckAll(type){
if(type == 1){
if($('#binded').is(':checked')) {
$(".binded :checkbox").prop("checked", true);
}else{
$(".binded :checkbox").prop("checked", false);
}
}
if(type == 2){
if($('#binded2').is(':checked')) {
$(".binded2 :checkbox").prop("checked", true);
}else{
$(".binded2 :checkbox").prop("checked", false);
}
}
}
//检查数据
......@@ -36,7 +55,7 @@
var admUserId = $('#adminName').val();
if(checkboxes.length==0){
alert('请选中要绑定的社员');
alert('请选中下面第一、二列要绑定的社员');
return;
}
if(admUserId==0){
......@@ -49,9 +68,45 @@
});
chgids = chgids.substr(0, chgids.length - 1);
var params = {"communeExtIds":chgids,"admUserId":admUserId,"rids":1};
$(this).button('loading');
$.post("/communeservice/communeAdm/batchBind", params ,function(msg){
if (msg['status'] == 0) {
location.reload();
}else{
alert(msg['message']);
$('#servicebtn').button("hide");
}
});
});
//批量绑定操作
$('#bindAdmBtn2').click(function () {
var checkboxes = $('[name="datacheck2"]:checked');
var chgids="";
var admUserId = $('#adminName2').val();
if(checkboxes.length==0){
alert('请选中下面第三、四列要绑定的社员');
return;
}
if(admUserId==0){
alert('请选择会服');
return;
}
checkboxes.each(function () {
chgids = chgids + $(this).attr("value") + ",";
});
chgids = chgids.substr(0, chgids.length - 1);
var params = {"communeExtIds":chgids,"admUserId":admUserId,"rids":2};
$(this).button('loading');
$.post("/communeservice/communeAdm/batchBind",{"communeExtIds":chgids,"admUserId":admUserId} ,function(msg){
$.post("/communeservice/communeAdm/batchBind",params ,function(msg){
if (msg['status'] == 0) {
location.reload();
}else{
......@@ -72,25 +127,34 @@
<textarea name="mobileOfcommunes" id="js-textarea" rows="8" style="width:550px" placeholder="待校验社员电话,英文逗号分割,例15013241233,15013241233,15013241233">${mobileOfcommunes!}</textarea>
</div>
<div class="span3">
<select id="adminName" name="bindedAdm">
<button class="btn btn-primary" type="submit" style="margin-right:52px;" id="information">信息检查</button>
</div>
<div class="span3" style="margin-top:50px">
<select id="adminName" name="bindedAdm" style="width: 114px;">
<option value="0">销售选择</option>
<#list adminBeanList as item>
<option value="${item.id}" >${item.nickName}</option>
</#list>
</select>
</div>
<div class="span3" style="margin-top:50px">
<button class="btn btn-primary" type="submit" style="margin-right:52px;" id="information">信息检查</button>
<button class="btn btn-primary" type="button" id="bindAdmBtn" >绑定销售</button>
</div>
<div class="span3" style="margin-top:5px">
<select id="adminName2" name="bindedAdm2" style="width: 114px;">
<option value="0">会服选择</option>
<#list adminBeanList as item>
<option value="${item.id}" >${item.nickName}</option>
</#list>
</select>
<button class="btn btn-primary" type="button" id="bindAdmBtn2" >绑定会服</button>
</div>
</div>
</form>
<div class="row">
<div class="span3">
<div class="span2">
<table class="table UnBind">
<tr>
<td align="left"> <input type="checkbox" id="unBind" onclick="unBindCheckAll();"> </td> <th>未绑定销售</th>
<td align="left"> <input type="checkbox" id="unBind" onclick="unBindCheckAll(1);"> </td> <th>未绑定销售(${unBindedList?size})</th>
</tr>
<#list unBindedList as item>
......@@ -100,10 +164,10 @@
</#list>
</table>
</div>
<div class="span3 binded">
<div class="span2 binded">
<table class="table">
<tr>
<td align="left"> <input type="checkbox" id="binded" onclick="bindedCheckAll();"> </td> <th>已绑定销售</th>
<td align="left"> <input type="checkbox" id="binded" onclick="bindedCheckAll(1);"> </td> <th>已绑定销售(${bindedList?size})</th>
</tr>
<#list bindedList as item>
<tr>
......@@ -112,10 +176,37 @@
</#list>
</table>
</div>
<div class="span3">
<div class="span2">
<table class="table UnBind2">
<tr>
<td align="left"> <input type="checkbox" id="unBind2" onclick="unBindCheckAll(2);"> </td> <th>未绑定会服(${unBindedList2?size})</th>
</tr>
<#list unBindedList2 as item>
<tr>
<td align="left"><input type="checkbox" name="datacheck2" value="${item.id}"></td> <td>${item.mobilePhone!}</td>
</tr>
</#list>
</table>
</div>
<div class="span2 binded2">
<table class="table">
<tr>
<td align="left"> <input type="checkbox" id="binded2" onclick="bindedCheckAll(2);"> </td> <th>已绑定会服(${bindedList2?size})</th>
</tr>
<#list bindedList2 as item>
<tr>
<td align="left"><input type="checkbox" name="datacheck2" value="${item.id}"></td> <td>${item.mobilePhone!}</td>
</tr>
</#list>
</table>
</div>
<div class="span2">
<table class="table">
<tr>
<th align="center">未注册用户</th>
<th align="center">未注册用户(${nonCommuneAdm?size})</th>
</tr>
<#list nonCommuneAdm as item>
<tr >
......
......@@ -122,18 +122,18 @@
<@com.textInput "dto.drawer" "style=\"margin-left: 5px;\"" "开单人"/>
<!-- <@com.textInput "dto.bindedAdm" "style=\"margin-left: 5px;\"" "绑定会服1" /> -->
<div class="short_content_div">
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定会服1</label>
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定销售</label>
<select id="bindedAdm" name="bindedAdm">
<option value="">全部</option>
<#if dto.bindedAdm?? && dto.bindedAdm=="0" >
<option value="0" selected="selected">未绑定会服</option>
<option value="0" selected="selected">未绑定用户</option>
<#else>
<option value="0" >未绑定会服</option>
<option value="0" >未绑定用户</option>
</#if>
<#if dto.bindedAdm?? && dto.bindedAdm=="1" >
<option value="1" selected="selected">已绑定会服</option>
<option value="1" selected="selected">已绑定用户</option>
<#else>
<option value="1" >已绑定会服</option>
<option value="1" >已绑定用户</option>
</#if>
<#list adminBeanList as item>
<#if dto.bindedAdm?? && dto.bindedAdm == item.userName >
......@@ -146,18 +146,18 @@
</div>
<!-- <@com.textInput "dto.bindedAdm" "style=\"margin-left: 5px;\"" "绑定会服2" /> -->
<div class="short_content_div">
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定会服2</label>
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定会服</label>
<select id="bindedAdm2" name="bindedAdm2">
<option value="">全部</option>
<#if dto.bindedAdm2?? && dto.bindedAdm2=="0" >
<option value="0" selected="selected">未绑定会服</option>
<option value="0" selected="selected">未绑定用户</option>
<#else>
<option value="0" >未绑定会服</option>
<option value="0" >未绑定用户</option>
</#if>
<#if dto.bindedAdm2?? && dto.bindedAdm2=="1" >
<option value="1" selected="selected">已绑定会服</option>
<option value="1" selected="selected">已绑定用户</option>
<#else>
<option value="1" >已绑定会服</option>
<option value="1" >已绑定用户</option>
</#if>
<#list adminBeanList as item>
<#if dto.bindedAdm2?? && dto.bindedAdm2 == item.userName >
......@@ -176,10 +176,10 @@
<@com.singleSelectQuery path="dto.customerRegion" options=enums["com.ctrip.fun.common.vo.user.CustomerRegionEnum"] label="客户区域" />
<br />
<button type="submit" id="selectButton" class="btn btn-primary">查询</button>
<button type="button" id="batchBind" class="btn btn-primary">绑定会服1</button>
<button type="button" id="batchUnbind" class="btn btn-primary">解绑会服1</button>
<button type="button" id="batchBind2" class="btn btn-primary">绑定会服2</button>
<button type="button" id="batchUnbind2" class="btn btn-primary">解绑会服2</button>
<button type="button" id="batchBind" class="btn btn-primary">绑定销售</button>
<button type="button" id="batchUnbind" class="btn btn-primary">解绑销售</button>
<button type="button" id="batchBind2" class="btn ">绑定会服</button>
<button type="button" id="batchUnbind2" class="btn ">解绑会服</button>
<button type="button" id="excelButton" class="btn btn-primary">导出excel</button>
</form>
......@@ -197,9 +197,9 @@
<th>客户区域</th>
<th>生日</th>
<th>社员到期时间</th>
<th>会服1</th>
<th>绑定销售</th>
<th>绑定时间</th>
<th>会服2</th>
<th>绑定会服</th>
<th>绑定时间</th>
<th colspan=1>操作</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment