Commit 48697a32 by chongli

合并

parents d723a921 d2c18a1a
...@@ -192,11 +192,14 @@ public class CommuneAdmController { ...@@ -192,11 +192,14 @@ public class CommuneAdmController {
@RequestMapping(value = "/batchBind", method = RequestMethod.POST) @RequestMapping(value = "/batchBind", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
@ResponseBody @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) { @RequestParam(value = "communeExtIds", required = true) String communeExtIds) {
Map<String,Object> map = new HashMap<String,Object>(); Map<String,Object> map = new HashMap<String,Object>();
map.put("admUserId", admUserId); map.put("admUserId", admUserId);
map.put("communeExtIds", communeExtIds.split(",")); map.put("communeExtIds", communeExtIds.split(","));
map.put("rids", rids);
Response<Integer> response = communeAdmService.batchBind(map); Response<Integer> response = communeAdmService.batchBind(map);
return response; return response;
} }
...@@ -210,10 +213,12 @@ public class CommuneAdmController { ...@@ -210,10 +213,12 @@ public class CommuneAdmController {
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
@ResponseBody @ResponseBody
public Response<Integer> batchUnBind(HttpServletRequest request, 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<String,Object> map = new HashMap<String,Object>();
// map.put("admUserId", admUserId); // map.put("admUserId", admUserId);
map.put("communeExtIds", communeExtIds.split(",")); map.put("communeExtIds", communeExtIds.split(","));
map.put("rids", rids);
Response<Integer> response = communeAdmService.batchUnbind(map); Response<Integer> response = communeAdmService.batchUnbind(map);
return response; return response;
} }
......
...@@ -2,12 +2,22 @@ ...@@ -2,12 +2,22 @@
<script> <script>
$(function(){ $(function(){
$('#batchBind2').click(function () {
var checkboxes = $('[name="datacheck"]:checked');
if (checkboxes.length == 0) {
alert("请选择要修改的资源");
} else {
$('#rids').val(2);
$('#bindAdmModal').modal('show');
}
});
$('#batchBind').click(function () { $('#batchBind').click(function () {
var checkboxes = $('[name="datacheck"]:checked'); var checkboxes = $('[name="datacheck"]:checked');
if (checkboxes.length == 0) { if (checkboxes.length == 0) {
alert("请选择要修改的资源"); alert("请选择要修改的资源");
} else { } else {
$('#rids').val(1);
$('#bindAdmModal').modal('show'); $('#bindAdmModal').modal('show');
} }
}); });
...@@ -22,9 +32,13 @@ ...@@ -22,9 +32,13 @@
var admUserId = $('#adminName').val(); var admUserId = $('#adminName').val();
$(this).button('loading'); $(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) { if (msg['status'] == 0) {
location.reload(); location.reload();
}else{ }else{
...@@ -36,13 +50,17 @@ ...@@ -36,13 +50,17 @@
}); });
$('#batchUnbind').click(function () { $('#batchUnbind').click(function () {
batchUnbind(1);
});
function batchUnbind(rids){
var checkboxes = $('[name="datacheck"]:checked'); var checkboxes = $('[name="datacheck"]:checked');
var chgids=""; var chgids="";
checkboxes.each(function () { checkboxes.each(function () {
chgids = chgids + $(this).attr("id") + ","; chgids = chgids + $(this).attr("id") + ",";
}); });
chgids = chgids.substr(0, chgids.length - 1); 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) { if (msg['status'] == 0) {
location.reload(); location.reload();
}else{ }else{
...@@ -50,7 +68,10 @@ ...@@ -50,7 +68,10 @@
$('#servicebtn').button("hide"); $('#servicebtn').button("hide");
} }
}); });
}
$('#batchUnbind2').click(function () {
batchUnbind(2);
}); });
}); });
...@@ -99,9 +120,9 @@ ...@@ -99,9 +120,9 @@
<@com.textInput "dto.uid" "style=\"margin-left: 5px;\"" "UID"/> <@com.textInput "dto.uid" "style=\"margin-left: 5px;\"" "UID"/>
<br /> <br />
<@com.textInput "dto.drawer" "style=\"margin-left: 5px;\"" "开单人"/> <@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"> <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"> <select id="bindedAdm" name="bindedAdm">
<option value="">全部</option> <option value="">全部</option>
<#if dto.bindedAdm?? && dto.bindedAdm=="0" > <#if dto.bindedAdm?? && dto.bindedAdm=="0" >
...@@ -123,6 +144,30 @@ ...@@ -123,6 +144,30 @@
</#list> </#list>
</select> </select>
</div> </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" "" "社员到期时间"/> <@com.textInputTwoDate "dto.communeAgainTimeStart" "dto.communeAgainTimeEnd" "" "社员到期时间"/>
...@@ -131,8 +176,10 @@ ...@@ -131,8 +176,10 @@
<@com.singleSelectQuery path="dto.customerRegion" options=enums["com.ctrip.fun.common.vo.user.CustomerRegionEnum"] label="客户区域" /> <@com.singleSelectQuery path="dto.customerRegion" options=enums["com.ctrip.fun.common.vo.user.CustomerRegionEnum"] label="客户区域" />
<br /> <br />
<button type="submit" id="selectButton" class="btn btn-primary">查询</button> <button type="submit" id="selectButton" class="btn btn-primary">查询</button>
<button type="button" id="batchBind" 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">批量解绑</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> <button type="button" id="excelButton" class="btn btn-primary">导出excel</button>
</form> </form>
...@@ -150,7 +197,9 @@ ...@@ -150,7 +197,9 @@
<th>客户区域</th> <th>客户区域</th>
<th>生日</th> <th>生日</th>
<th>社员到期时间</th> <th>社员到期时间</th>
<th>绑定会服</th> <th>会服1</th>
<th>绑定时间</th>
<th>会服2</th>
<th>绑定时间</th> <th>绑定时间</th>
<th colspan=1>操作</th> <th colspan=1>操作</th>
...@@ -172,6 +221,8 @@ ...@@ -172,6 +221,8 @@
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td> <td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.bindedAdm!}</td> <td>${item.bindedAdm!}</td>
<td><#if item.bindTime??>${item.bindTime?string("yyyy-MM-dd HH:mm:ss")}</#if></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> <td>
......
...@@ -606,8 +606,8 @@ $(function() { ...@@ -606,8 +606,8 @@ $(function() {
<#list vourchers as vourcher> <#list vourchers as vourcher>
<tr> <tr>
<th>${vourcher.id}</th> <th>${vourcher.id}</th>
<td>${vourcher.amount!}</td><td>${(vourcher.startUseDate?string("yyyy-MM-dd HH:mm:ss"))!}&nbsp;~&nbsp; <td>${vourcher.amount!}</td><td>${(vourcher.startUseDate?string("yyyy-MM-dd"))!}&nbsp;~&nbsp;
${(vourcher.endUseDate?string("yyyy-MM-dd HH:mm:ss"))!}</td> ${(vourcher.endUseDate?string("yyyy-MM-dd"))!}</td>
<td> <td>
<#if vourcher.used == 1> <#if vourcher.used == 1>
<font color="red">已使用</font> <font color="red">已使用</font>
......
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