1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <script>
- var pageNo=1;
- $(function(){
- $("aside>ul>li").eq(9).find("a").css({"background":"#00C1DE"})
- $("aside>ul>li").eq(9).siblings('li').find("a").css({"background":"#42485B"})
- var mainHeight = $(window).height()-320+"px";
- $(".scrollTable").css({"max-height":mainHeight});
- loadPages();
- })
- /*获取页数*/
- function loadPages() {
- $.post("getUserList.do",{"mobile":$("#mobile").val()},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("getUserList.do",{"page":pageNo,"mobile":$("#mobile").val()}, 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.nickname == null)?"":item.nickname)+"</td>"
- +"<td>"+((item.nickname == null)?"":item.nickname)+"</td>"
- +"<td>"+((item.mobile == null)?"":item.mobile)+"</td>"
- +"<td>"
- +"<a href=\"javascript:lookAmtDetail("+item.id+")\">余额详情</a>"
- +"<a href=\"javascript:lookHistoryOrder("+item.id+")\">历史订单</a>"
- +"</td>"
- +"</tr>";
- $("#bodyData").append(line);
- }
- });
- }
- /*余额详情*/
- function lookAmtDetail(userId){
- location.href="#/amtDetail:&userId="+userId;
- }
- /*活跃*/
- function lookActive(userId){
- location.href="#/active&userId="+userId;
- }
- /*历史订单*/
- function lookHistoryOrder(userId){
- location.href="#/historyOrder:&userId="+userId;
- }
- </script>
- <div class="section">
- <div class="section_top">
- <p>
- <a>用户管理</a>
- </p>
- </div>
- <div class="add_item">
- <button onclick="loadData()" class="pull-right btn btn-default blackborder btn_search">搜索</button>
- <input id="mobile" class="pull-right inputKeyword" placeholder="请输入手机号搜索" type="text"/>
- </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>
- </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>
|