Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bdb12745
authored
Feb 02, 2019
by
chongli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'f-6.7.0' of 192.168.10.6:caosy/fun-admin into f-6.7.0
parents
7cda846e
f1f54020
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
46 deletions
src/main/java/com/ctrip/fun/admin/controller/communeservice/CommuneAdmController.java
src/main/java/com/ctrip/fun/admin/service/market/CommuneAdmService.java
src/main/resources/properties/service.properties
src/main/webapp/WEB-INF/templates/market/communeAdm/centralizedBind.ftl
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
src/main/java/com/ctrip/fun/admin/controller/communeservice/CommuneAdmController.java
View file @
bdb12745
...
...
@@ -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
);
...
...
src/main/java/com/ctrip/fun/admin/service/market/CommuneAdmService.java
View file @
bdb12745
...
...
@@ -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
);
...
...
src/main/resources/properties/service.properties
View file @
bdb12745
...
...
@@ -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
...
...
src/main/webapp/WEB-INF/templates/market/communeAdm/centralizedBind.ftl
View file @
bdb12745
<#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="span
3
">
<div class="span
2
">
<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="span
3
binded">
<div class="span
2
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 >
...
...
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
View file @
bdb12745
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment