Commit 7659182a by sunxin

移交列表下一页bug修复

parent 8d5947c6
...@@ -736,9 +736,9 @@ public class ReportController extends BaseController { ...@@ -736,9 +736,9 @@ public class ReportController extends BaseController {
*/ */
@RequestMapping(value = "viewTransfer") @RequestMapping(value = "viewTransfer")
public void viewTransfer(User user, String flag, HttpServletRequest request, HttpServletResponse public void viewTransfer(User user, String flag, HttpServletRequest request, HttpServletResponse
response, Model model) throws IOException { response, Model model,Integer pageNo,Integer pageSize) throws IOException {
Page<User> page = reportService.findUserPage(new Page<User>(request, response), user); Page<User> page = reportService.findUserPage(new Page<User>(pageNo, pageSize), user);
StringBuffer html = new StringBuffer(); StringBuffer html = new StringBuffer();
html.append("<table id='contentTable' class='table table-striped table-bordered table-condensed'>"); html.append("<table id='contentTable' class='table table-striped table-bordered table-condensed'>");
html.append(" <thead>"); html.append(" <thead>");
...@@ -769,7 +769,7 @@ public class ReportController extends BaseController { ...@@ -769,7 +769,7 @@ public class ReportController extends BaseController {
for (User userEntity : page.getList()) { for (User userEntity : page.getList()) {
html.append(" <tr>"); html.append(" <tr>");
if (flag.equals("1")) { if (flag.equals("1")) {
html.append(" <td><input type='radio' value='" + userEntity.getId() + "' onclick='chooseRen(this);'></td>"); html.append(" <td><input type='radio' value='" + userEntity.getId() + "'></td>");
html.append(" <td>" + i + "</td>"); html.append(" <td>" + i + "</td>");
html.append(" <td>" + (userEntity.getNo() == null ? "" : userEntity.getNo()) + "</td>"); html.append(" <td>" + (userEntity.getNo() == null ? "" : userEntity.getNo()) + "</td>");
html.append(" <td>" + (userEntity.getName() == null ? "" : userEntity.getName()) + "</td>"); html.append(" <td>" + (userEntity.getName() == null ? "" : userEntity.getName()) + "</td>");
......
...@@ -293,10 +293,6 @@ ...@@ -293,10 +293,6 @@
} }
function resetPageNo() {
$("#pageNo").val(0);
}
</script> </script>
<style type="text/css"> <style type="text/css">
......
...@@ -996,7 +996,7 @@ ...@@ -996,7 +996,7 @@
<div id="chooseContent"> <div id="chooseContent">
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
$("#btnSearch").click(function () { /* $("#btnSearch").click(function () {
$.ajax({ $.ajax({
url: "${ctx}/report/viewTransfer?flag=1", url: "${ctx}/report/viewTransfer?flag=1",
dataType: "html", dataType: "html",
...@@ -1017,7 +1017,7 @@ ...@@ -1017,7 +1017,7 @@
$("#btnSearch").removeAttr("disabled"); $("#btnSearch").removeAttr("disabled");
} }
}); });
}); });*/
$("input:radio").click(function () { $("input:radio").click(function () {
$("input:radio").attr("checked", false); $("input:radio").attr("checked", false);
...@@ -1028,44 +1028,47 @@ ...@@ -1028,44 +1028,47 @@
}); });
function chooseRen(obj) { /*function chooseRen(obj) {
$("input:radio").attr("checked", false); $("input:radio").attr("checked", false);
$("#chooseItem").empty(); $("#chooseItem").empty();
obj.checked = true; obj.checked = true;
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html() + "<span onclick='remove();'><font size='5'> ×</font></span>"); $("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html() + "<span onclick='remove();'><font size='5'> ×</font></span>");
} }*/
function remove() { function remove() {
$("input:radio").attr("checked", false); $("input:radio").attr("checked", false);
$("#chooseItem").empty(); $("#chooseItem").empty();
} }
<%--function page(n, s) {--%> /* 移交人员列表分页 page */
<%--$("#pageNo").val(n);--%> function page(n, s) {
<%--$("#pageSize").val(s);--%> /* alert(n+"=========================="+s);*/
<%--$.ajax({--%> $.ajax({
<%--url: "${ctx}/report/viewTransfer?flag=1",--%> url: "${ctx}/report/viewTransfer?flag=1",
<%--dataType: "html",--%> dataType: "html",
<%--data: $('#searchForm').serialize(),--%> data:{"pageNo":n,"pageSize":s},
<%--cache: false,--%> cache: false,
<%--success: function (data) { //登录成功后返回的数据--%> success: function (data) { //登录成功后返回的数据
<%--$("#userList").empty();--%> $("#userList").empty();
<%--$("#userList").html($(data));--%> $("#userList").html($(data));
<%--},--%> },
<%--error: function () {--%> error: function () {
<%--alert("数据错误!");--%> alert("数据错误!");
<%--}--%> }
<%--});--%> });
<%--return false;--%> return false;
<%--}--%> }
function resetPageNo() { function resetPageNo() {
$("#pageNo").val(0); $("#pageNo").val(0);
} }
</script> </script>
<span class="title">选择移交人员</span>
<span id="chooseItem"></span> <span class="title">选择移交人员</span>
<div id="userList"> <div id="userList">
<table id="contentTable" class="table table-striped table-bordered table-condensed"> <table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
...@@ -1097,13 +1100,13 @@ ...@@ -1097,13 +1100,13 @@
</c:if> </c:if>
</tbody> </tbody>
</table> </table>
<span id="chooseItem"></span>
<c:if test="${page.list.size()=='0'}"> <c:if test="${page.list.size()=='0'}">
<span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span> <span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span>
</c:if> </c:if>
<c:if test="${page.list.size()>0}"> <c:if test="${page.list.size()>0}">
<div class="pagination">${page}</div> <div class="pagination">${page}</div>
</c:if> </c:if>
</div> </div>
<li class="btns"> <li class="btns">
<label style="width:auto;"><input id="btnConfirm" class="btn btn-primary" type="button" value="确定"/>&nbsp;&nbsp; <label style="width:auto;"><input id="btnConfirm" class="btn btn-primary" type="button" value="确定"/>&nbsp;&nbsp;
......
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 to comment