list.vm 6.38 KB
#set($page_title="认证等级")
#set($crumbs="首页:/home,认证等级")
<script language="javascript" type="text/javascript"
        src="$!{webUtils.getCommonAssetsPath("common/date/WdatePicker.js")}"></script>
<div class="row">

    <div class="col-xs-12">
        <div class="table-header">
            认证等级
        </div>

        <div class="table-responsive">
            <div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
                <div class="row">
                    <div class="col-sm-6" style="width:100%">
                        <div id="sample-table-2_length" class="dataTables_length">
                            <input type="hidden" id="staId" value="$!{state}"/>
                            <input id="sid" name="sid" type="hidden"/>

                            <form action="${webUtils.getLocalPath("authLevel/list.do")}" id="form" method="get"
                                  class="form-horizontal">
                                <input type="hidden" id="currPageId" name="currPage" value=""/>
                                <input type="hidden" id="pageSizeId" name="pageSize" value="$!{page.pageSize}"/>
                                <input type="hidden" id="currPageId" name="totalPage" value="$!{page.totalPage}"/>
                                <input type="hidden" id="currPageId" name="totalSize" value="$!{page.totalSize}"/>

                            ##                                <div class="row">
                            ##                                    <div class="col-xs-4">
                            ##                                        <div class="form-group">
                            ##                                            <label class="col-xs-3 control-label text-right">等级名称: </label>
                            ##
                            ##                                            <div class="col-xs-6">
                            ##                                                <input type="text" name="levelName"
                            ##                                                       class="form-control" maxlength="12"
                            ##                                                       value="$!{levelName}"/>
                            ##                                            </div>
                            ##                                        </div>
                            ##                                    </div>
                            ##                                </div>

                            ##                                <div class="clearfix">
                            ##	                <span class="pull-right">
                            ##	                    <input type="submit" value="查询结果">
                            ##	                    <input type="button" value="清空条件" onclick="cleanForm('form');">
                            ##	                </span>
                            ##                                </div>

                            </form>
                        </div>
                    </div>
                </div>

                <table id="sample-table-2"
                       class="table table-striped table-bordered table-hover dataTable"
                       aria-describedby="sample-table-2_info">
                    <thead>
                    <tr role="row">
                        <th>等级名称</th>
                        <th>等级图标</th>
                        <th><i class="icon-time bigger-110 hidden-480"></i>操作</th>
                    </tr>
                    </thead>

                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                        #foreach($obj in $!{page.list})
                        <tr>
                            <td>$!{obj.levelName}</td>
                            <td><img width="100" height="100" src="$!{obj.levelLogo}"/></td>
                            <td>
##                                <a href="javascript:void(0);" onclick="toModify($!{obj.id});">修改</a>
                                <a href="${webUtils.getLocalPath("authLevel/toModify.do")}?id=$!{obj.id}">修改</a>
                                #if( $!{obj.state}==1)
##                                    <a href="${webUtils.getLocalPath("authLevel/close.do")}?id=$!{obj.id}">停用</a>
                                    <a href="javascript:void(0);" onclick="closeLevel($!{obj.id});">停用</a>
                                #end
                                #if( $!{obj.state}==2)
##                                    <a href="${webUtils.getLocalPath("authLevel/open.do")}?id=$!{obj.id}">启用</a>
                                    <a href="javascript:void(0);" onclick="openLevel($!{obj.id});">启用</a>
                                #end
                            </td>
                        </tr>
                        #end
                    </tbody>
                </table>
                <div class="row">
                    <div class="col-sm-6">
                        <a href="${webUtils.getLocalPath("authLevel/toAdd.do")}" class="btn btn-success btn-sm">添加认证等级</a>
                    </div>
                    <div class="col-sm-6">
                        <div class="dataTables_paginate paging_bootstrap">
                            <div class="pull-right">
                                #page($!{page.totalPage},$!{page.currPage})
                            </div>
                                <span class="pull-right" style="line-height: 33px;">
                                    #set($tmpPage = $page.currPage + 1)
                                    查询出$!{page.totalSize}条数据,共$!{page.totalPage}页,当前第$!{tmpPage}页
                                </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    function closeLevel(id){
        if (confirm("确定要停用此认证等级?"))  {
            location.href= "${webUtils.getLocalPath("authLevel/close.do")}?id="+id;
        }
    }

    function openLevel(id){
        if (confirm("确定要启用此认证等级?"))  {
            location.href= "${webUtils.getLocalPath("authLevel/open.do")}?id="+id;
        }
    }

</script>

<script src="$!{webUtils.getAssetsPath("/js/diligrp.form.js")}"></script>