Commit 57afb45a by Huang Linyu

增加开卡区域,客户区域查询,优化查询结果页面

parent 84f364b2
......@@ -45,6 +45,13 @@ public class CommuneAdmController {
@Autowired
private UserDetailsService userDetailsService;
/**
* 标签列表
* @param request
* @param query
* @param model
* @return
*/
@RequestMapping(value = "queryList", method = RequestMethod.GET)
public String queryList(HttpServletRequest request, @ModelAttribute("dto") CommuneAdmQuery query, ModelMap model) {
int currentPage = 0;
......@@ -56,6 +63,9 @@ public class CommuneAdmController {
}
query.setPagerOffset(currentPage * query.getPagerPerPage());
PagedResponseBean<CommuneAdmBean> response = communeAdmService.list(query);
Response<List<AdminUserBean>> adminsresponse = userDetailsService.getCommuneAdmUserList(null);
List<AdminUserBean> adminBeanList = adminsresponse.getBody();
model.put("adminBeanList", adminBeanList);
pageSize = query.getPagerPerPage();
total = response.getCount();
pageCount = (0 == total % pageSize) ? (total / pageSize) : (total / pageSize + 1);
......@@ -66,6 +76,13 @@ public class CommuneAdmController {
return "market/communeAdm/list";
}
/**
* 我管理的标签
* @param request
* @param query
* @param model
* @return
*/
@RequestMapping(value = "myBindList", method = RequestMethod.GET)
public String myBindList(HttpServletRequest request, @ModelAttribute("dto") CommuneAdmQuery query, ModelMap model) {
int currentPage = 0;
......@@ -77,10 +94,6 @@ public class CommuneAdmController {
}
String username = SpringSecurityUtil.getCurrentUserName();
query.setBindedAdm(username);
/*String label = query.getLabels();
if(label!=null){
query.setLabels(" "+label+" ");
}*/
query.setPagerOffset(currentPage * query.getPagerPerPage());
PagedResponseBean<CommuneAdmBean> response = communeAdmService.myBindList(query);
pageSize = query.getPagerPerPage();
......@@ -94,18 +107,6 @@ public class CommuneAdmController {
return "market/communeAdm/myBindList";
}
/*@RequestMapping(value = "update", method = RequestMethod.GET)
public String toUpdate(HttpServletRequest request, @ModelAttribute("id") Integer id, ModelMap model) {
CommuneExtBean bean = communeExtService.getById(id);
CommuneAdmBean admBean = communeAdmService.getByCommuneExtId(id);
model.put("dto", bean);
model.put("labels", admBean.getLabels());
model.put("action", "/communeExt/update");
model.put("page", request.getParameter("page"));
return "market/communeExt/form";
}*/
/**
* 批量绑定管理员
......@@ -140,6 +141,10 @@ public class CommuneAdmController {
}
/**
* 查找所有的标签
* @return
*/
@ResponseBody
@RequestMapping(value = "/labels/list", method = RequestMethod.GET)
public List<CommuneLabelBean> findAllLabels() {
......
......@@ -95,9 +95,36 @@
<@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;\"" "绑定会服" /> -->
<div class="short_content_div">
<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>
<#else>
<option value="0" >未绑定会服</option>
</#if>
<#if dto.bindedAdm?? && dto.bindedAdm=="1" >
<option value="1" selected="selected">已绑定会服</option>
<#else>
<option value="1" >已绑定会服</option>
</#if>
<#list adminBeanList as item>
<#if dto.bindedAdm?? && dto.bindedAdm == item.userName >
<option value="${item.userName}" selected="selected">${item.userName}</option>
<#else>
<option value="${item.userName}" >${item.userName}</option>
</#if>
</#list>
</select>
</div>
<@com.textInputTwoDate "dto.communeAgainTimeStart" "dto.communeAgainTimeEnd" "" "社员到期时间"/>
<br />
<@com.singleSelectQuery path="dto.checkedRegion" options=enums["com.ctrip.fun.common.vo.user.CheckedRegionEnum"] label="开卡区域" />
<@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>
......@@ -114,6 +141,8 @@
<th>电话</th>
<th>uid</th>
<th>开单人</th>
<th>开卡区域</th>
<th>客户区域</th>
<th>生日</th>
<th>社员到期时间</th>
<th>绑定会服</th>
......@@ -132,6 +161,8 @@
</td>
<td>${item.uid!}</td>
<td>${item.drawer!}</td>
<td>${item.checkedRegionMsg!}</td>
<td>${item.customerRegionMsg!}</td>
<td><#if item.birthday??>${item.birthday?string("yyyy-MM-dd")}</#if></td>
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.bindedAdm!}</td>
......
......@@ -241,12 +241,13 @@
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="shiftCheckAll();"> </th>
<th>姓名</th>
<th>电话</th>
<th>uid</th>
<th>生日</th>
<th>开单人</th>
<th>开卡区域</th>
<th>客户区域</th>
<th>社员到期时间</th>
<th>标签</th>
<th>绑定会服</th>
<th>绑定时间</th>
<th colspan=1>操作</th>
</tr>
......@@ -257,14 +258,15 @@
<td><input type="checkbox" name="datacheck" data-index="${item_index}" id="${item.id}" class="J_shiftCheck J_check-${item_index}" value="${item.id}"></td>
<td>${item.userName!}</td>
<td>
<a href="/system/user/${item.mobilePhone!}/detailByUid">${item.mobilePhone!}</a>
<a href="/system/user/${item.uid!}/detailByUid">${item.mobilePhone!}</a>
</td>
<td>${item.uid!}</td>
<td><#if item.birthday??>${item.birthday?string("yyyy-MM-dd")}</#if></td>
<td>${item.drawer!}</td>
<td>${item.checkedRegionMsg!}</td>
<td>${item.customerRegionMsg!}</td>
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.labels!}</td>
<td>${item.bindedAdm!}</td>
<td><#if item.bindTime??>${item.bindTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>
<a target="_blank" href="/communeExt/update?id=${item.id!}&page=0">社员资料</a>
</td>
......
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