123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <script>
- var pageNo=1;
- $(function(){
- $("aside>ul>li").eq(5).find("a").css({"background":"#00C1DE"})
- $("aside>ul>li").eq(5).siblings('li').find("a").css({"background":"#42485B"})
- var mainHeight = $(window).height()-320+"px";
- $(".scrollTable").css({"max-height":mainHeight});
- loadPages();
- })
- /*获取页数*/
- function loadPages() {
- $.post("system/getCommunityPropertyList.do",{},function(resp) {
- $('.page').empty();
- 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("system/getCommunityPropertyList.do",{"page":pageNo}, function(resp){
- $("#bodyData").empty();
- listArray = resp.data.list;
- for (var i=0;i<listArray.length;i++) {
- var item = listArray[i];
- var line = "<tr><td>"+((item.username == null)?"":item.username)+"</td>"
- +"<td>"+((item.name == null)?"":item.name)+"</td>"
- +"<td>"+((item.tel == null)?"":item.tel)+"</td>"
- +"<td>"+((item.bankAccount == null)?"":item.bankAccount)+"</td>"
- +"<td>"+((item.serviceFee == null)?"":item.serviceFee)+"</td>"
- +"<td>"+((item.indate == null)?"":formatCaiDanDate(new Date(item.indate)))+"</td>"
- +"<td><a href=\"javascript:modItem("+item.id+")\">修改</a>"
- +"<a href=\"javascript:deleteItem("+item.id+")\">删除</a>"
- +"<a href=\"javascript:parkSpace("+item.id+")\">车位</a>"
- +"</td>"
- +"</tr>";
- $("#bodyData").append(line);
- }
- });
- }
- /*删除物业*/
- function deleteItem(id){
- if(confirm("是否删除该物业?")){
- $.post("delCommunityProperty.do",{"id":id},function(){
- refreshList();
- });
- }
- }
- /*保留页码刷新列表*/
- function refreshList(){
- if(listArray.length == 1){
- pageNo -= 1;
- }
- totalCnt -= 1;
- $('.page').empty();
- $("#page").initPage(totalCnt,pageNo,function(pageNo){
- loadData();
- $(".page").prepend("<span class=\"page_all\">共 "+totalCnt+" 条</span>");
- });
- }
- /*修改物业*/
- function modItem(id){
- location.href="addProperty.html?id="+id;
- }
- /*查看车位*/
- function parkSpace(id){
- location.href="#/parkSpace:&id="+id;
- }
-
- </script>
- <div class="section">
- <div class="section_top">
- <p >
- <a>物业管理</a>
- </p>
- </div>
- <div class="add_item">
- <button onclick="location.href='addProperty.html'" class=" btn btn-default blackborder ">添加物业</button>
- <!-- <button onclick="loadData()" class="pull-right btn btn-default blackborder btn_search">搜索</button> -->
- <!-- <input id="inputKeyword" class="pull-right" placeholder="优惠券名称或类型" type="text"/> -->
- </div>
- <div class="information">
- <div class="scrollTable">
- <table class="table table-striped table-bordered">
- <thead>
- <tr style="background:#ededed;">
- <th>账号</th>
- <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>
|