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
48697a32
authored
Jan 25, 2019
by
chongli
Browse files
Options
Browse Files
Download
Plain Diff
合并
parents
d723a921
d2c18a1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
13 deletions
src/main/java/com/ctrip/fun/admin/controller/communeservice/CommuneAdmController.java
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
src/main/webapp/WEB-INF/templates/system/UserInfoDetail.ftl
src/main/java/com/ctrip/fun/admin/controller/communeservice/CommuneAdmController.java
View file @
48697a32
...
...
@@ -192,11 +192,14 @@ public class CommuneAdmController {
@RequestMapping
(
value
=
"/batchBind"
,
method
=
RequestMethod
.
POST
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
Integer
>
batchBind
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"admUserId"
,
required
=
true
)
Integer
admUserId
,
public
Response
<
Integer
>
batchBind
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"admUserId"
,
required
=
true
)
Integer
admUserId
,
@RequestParam
(
value
=
"rids"
,
required
=
true
)
Integer
rids
,
@RequestParam
(
value
=
"communeExtIds"
,
required
=
true
)
String
communeExtIds
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"admUserId"
,
admUserId
);
map
.
put
(
"communeExtIds"
,
communeExtIds
.
split
(
","
));
map
.
put
(
"rids"
,
rids
);
Response
<
Integer
>
response
=
communeAdmService
.
batchBind
(
map
);
return
response
;
}
...
...
@@ -210,10 +213,12 @@ public class CommuneAdmController {
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
Integer
>
batchUnBind
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"communeExtIds"
,
required
=
true
)
String
communeExtIds
)
{
@RequestParam
(
value
=
"communeExtIds"
,
required
=
true
)
String
communeExtIds
,
@RequestParam
(
value
=
"rids"
,
required
=
true
)
Integer
rids
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
// map.put("admUserId", admUserId);
map
.
put
(
"communeExtIds"
,
communeExtIds
.
split
(
","
));
map
.
put
(
"rids"
,
rids
);
Response
<
Integer
>
response
=
communeAdmService
.
batchUnbind
(
map
);
return
response
;
}
...
...
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
View file @
48697a32
...
...
@@ -2,12 +2,22 @@
<script>
$(function(){
$('#batchBind2').click(function () {
var checkboxes = $('[name="datacheck"]:checked');
if (checkboxes.length == 0) {
alert("请选择要修改的资源");
} else {
$('#rids').val(2);
$('#bindAdmModal').modal('show');
}
});
$('#batchBind').click(function () {
var checkboxes = $('[name="datacheck"]:checked');
if (checkboxes.length == 0) {
alert("请选择要修改的资源");
} else {
$('#rids').val(1);
$('#bindAdmModal').modal('show');
}
});
...
...
@@ -22,9 +32,13 @@
var admUserId = $('#adminName').val();
$(this).button('loading');
//var params = {communeExtIds:chgids,admUserId:admUserId};
$.post("/communeservice/communeAdm/batchBind",{"communeExtIds":chgids,"admUserId":admUserId} ,function(msg){
var rids = $('#rids').val();
var params = {"communeExtIds":chgids,"admUserId":admUserId,"rids":rids};
$.post("/communeservice/communeAdm/batchBind",params ,function(msg){
if (msg['status'] == 0) {
location.reload();
}else{
...
...
@@ -36,13 +50,17 @@
});
$('#batchUnbind').click(function () {
batchUnbind(1);
});
function batchUnbind(rids){
var checkboxes = $('[name="datacheck"]:checked');
var chgids="";
checkboxes.each(function () {
chgids = chgids + $(this).attr("id") + ",";
});
chgids = chgids.substr(0, chgids.length - 1);
$.post("/communeservice/communeAdm/batchUnbind",{"communeExtIds":chgids},function(msg){
$.post("/communeservice/communeAdm/batchUnbind",{"communeExtIds":chgids
,"rids":rids
},function(msg){
if (msg['status'] == 0) {
location.reload();
}else{
...
...
@@ -50,7 +68,10 @@
$('#servicebtn').button("hide");
}
});
}
$('#batchUnbind2').click(function () {
batchUnbind(2);
});
});
...
...
@@ -99,9 +120,9 @@
<@com.textInput "dto.uid" "style=\"margin-left: 5px;\"" "UID"/>
<br />
<@com.textInput "dto.drawer" "style=\"margin-left: 5px;\"" "开单人"/>
<!-- <@com.textInput "dto.bindedAdm" "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;">绑定会服</label>
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定会服
1
</label>
<select id="bindedAdm" name="bindedAdm">
<option value="">全部</option>
<#if dto.bindedAdm?? && dto.bindedAdm=="0" >
...
...
@@ -123,6 +144,30 @@
</#list>
</select>
</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>
<select id="bindedAdm2" name="bindedAdm2">
<option value="">全部</option>
<#if dto.bindedAdm2?? && dto.bindedAdm2=="0" >
<option value="0" selected="selected">未绑定会服</option>
<#else>
<option value="0" >未绑定会服</option>
</#if>
<#if dto.bindedAdm2?? && dto.bindedAdm2=="1" >
<option value="1" selected="selected">已绑定会服</option>
<#else>
<option value="1" >已绑定会服</option>
</#if>
<#list adminBeanList as item>
<#if dto.bindedAdm2?? && dto.bindedAdm2 == item.userName >
<option value="${item.userName}" selected="selected">${item.nickName}</option>
<#else>
<option value="${item.userName}" >${item.nickName}</option>
</#if>
</#list>
</select>
</div>
<@com.textInputTwoDate "dto.communeAgainTimeStart" "dto.communeAgainTimeEnd" "" "社员到期时间"/>
...
...
@@ -131,8 +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">批量绑定</button>
<button type="button" id="batchUnbind" 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="excelButton" class="btn btn-primary">导出excel</button>
</form>
...
...
@@ -150,7 +197,9 @@
<th>客户区域</th>
<th>生日</th>
<th>社员到期时间</th>
<th>绑定会服</th>
<th>会服1</th>
<th>绑定时间</th>
<th>会服2</th>
<th>绑定时间</th>
<th colspan=1>操作</th>
...
...
@@ -172,6 +221,8 @@
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.bindedAdm!}</td>
<td><#if item.bindTime??>${item.bindTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.bindedAdm2!}</td>
<td><#if item.bindTime2??>${item.bindTime2?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>
...
...
src/main/webapp/WEB-INF/templates/system/UserInfoDetail.ftl
View file @
48697a32
...
...
@@ -606,8 +606,8 @@ $(function() {
<
#
list
vourchers
as
vourcher
>
<tr>
<th>
${vourcher.id}
</th>
<td>
${vourcher.amount!}
</td><td>
${(vourcher.startUseDate?string("yyyy-MM-dd
HH:mm:ss
"))!}
~
${(vourcher.endUseDate?string("yyyy-MM-dd
HH:mm:ss
"))!}
</td>
<td>
${vourcher.amount!}
</td><td>
${(vourcher.startUseDate?string("yyyy-MM-dd"))!}
~
${(vourcher.endUseDate?string("yyyy-MM-dd"))!}
</td>
<td>
<
#
if
vourcher
.
used =
=
1
>
<font
color=
"red"
>
已使用
</font>
...
...
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