1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <script>
- var pageNo=1;
- $(function(){
- $("aside>ul>li").eq(6).find("a").css({"background":"#00C1DE"})
- $("aside>ul>li").eq(6).siblings('li').find("a").css({"background":"#42485B"})
- var mainHeight = $(window).height()-320+"px";
- $(".scrollTable").css({"max-height":mainHeight});
- loadPages();
- })
- /*获取页数*/
- function loadPages() {
- $.post("getAllUserList.do",{},function(resp) {
- $('.page').empty();
- var totalCnt = resp.data.totalCnt;
- var GG = {
- "kk":function(dd){
- pageNo = dd;
- loadData();
- $(".page").prepend("<span class=\"page_all\">共 "+resp.data.totalCnt+" 条</span>");
- }
- }
- $("#page").initPage(totalCnt,1,GG.kk);
- });
- }
- /*获取数据*/
- function loadData() {
- $.post("getAllUserList.do",{"page":pageNo}, function(resp){
- $("#bodyData").empty();
- var listArray = resp.data.list;
- for (var i=0;i<listArray.length;i++) {
- var item = listArray[i];
- var line = "<tr><td>"+((item.count == null)?"":item.count)+"</td>"
- +"<td>"+((item.nickname == null)?"":item.nickname)+"</td>"
- +"<td>"+((item.mobile == null)?"":item.mobile)+"</td>"
- +"<td>"+((item.carNo == null)?"":item.carNo)+"</td>"
- +"<td>"+((item.address == null)?"":item.address)+"</td>"
- +"<td style=\"padding-top:8px\">"+((item.money == null)?"":"¥"+item.money)+"</td>"
- +"</tr>";
- $("#bodyData").append(line);
- }
- });
- }
- </script>
- <div class="section">
- <div class="section_top">
- <p>
- <a>业主管理</a>
- </p>
- </div>
- <div class="add_item">
- <button onclick="location.href='addOwner.html'" class=" btn btn-default blackborder ">添加业主</button>
- <!-- <select class="form-control pull-right" style="width:200px;" > -->
- <!-- <option>--全部--</option> -->
- <!-- <option>物业1</option> -->
- <!-- </select> -->
- <!-- <span class=" pull-right" style="line-height: 35px;">所属物业:</span> -->
- </div>
- <div class="information">
- <div class="scrollTable">
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr style="background:#ededed;">
- <th>账号</th>
- <th>姓名</th>
- <th>手机号</th>
- <th>车牌号</th>
- <th>住址</th>
- <th>余额</th>
- </tr>
- </thead>
- <tbody id="bodyData" class="td_btn">
- </tbody>
- </table>
- </div>
-
- <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
- </div>
- </div>
- <script>
- var mainHeight = $(window).height()-320+"px";
- $(".scrollTable").css({"max-height":mainHeight});
- </script>
|