list.vm 12.2 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">
            <form action="${webUtils.getLocalPath("member/list.do")}" id="form" method="get" class="form-horizontal">
                <input type="hidden" name="currPage" value=""/>
				<div class="row">
                    <div class="col-xs-4">
                        <div class="form-group">
                            <label class="col-xs-3 control-label text-right">会员ID: </label>

                            <div class="col-xs-9">
                                <input type="text" name="param[userId]"
                                       class="form-control"
                                       data-bv-stringlength-message="超出了最大范围!"
                                       data-bv-stringlength
                                       data-bv-stringlength-max="50"
                                       value="$!{model.query.param.userId}"/>
                            </div>
                        </div>
                    </div>
					<div class="col-xs-4">
                        <div class="form-group">
                            <label class="col-xs-3 control-label text-right">登录名: </label>

                            <div class="col-xs-9">
                                <input type="text" name="param[accountName]"
                                       class="form-control"
                                       data-bv-stringlength-message="超出了最大范围!"
                                       data-bv-stringlength
                                       data-bv-stringlength-max="50"
                                       value="$!{model.query.param.accountName}"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <div class="form-group">
                            <label class="col-xs-3 control-label text-right">手机: </label>

                            <div class="col-xs-9">
                                <input type="text" name="param[telephone]"
                                       class="form-control"
                                       data-bv-stringlength-message="超出了最大范围!"
                                       data-bv-stringlength
                                       data-bv-stringlength-max="50"
                                       value="$!{model.query.param.telephone}"/>
                            </div>
                        </div>
                    </div>

				</div>
				<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-4">
                                <input type="text" name="param[startTime]"
                                       class="form-control form-time"
                                       onclick="var d5222=$dp.$('d5222');WdatePicker({onpicked:function(){d5222.focus();},readOnly:true,dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'d5222\')}'})"
                                       readonly
                                       value="$!{model.query.param.startTime}"
                                       id="d5221" />
                            </div>

                            <div class="col-xs-4">
                                <input type="text" name="param[endTime]"
                                       class="form-control form-time"
                                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,minDate:'#F{$dp.$D(\'d5221\')}'})"
                                       readonly
                                       value="$!{model.query.param.endTime}"
                                       id="d5222" />
                            </div>
                        </div>
                    </div>
					<div class="col-xs-4">
                        <div class="form-group">
                            <label class="col-xs-3 control-label text-right">会员类型: </label>
                            <div class="col-xs-9">
                                <select style="width:100%" name="param[userType]">
                                	<option value="">全部</option>
                                	<option value="2" #if($!{model.query.param.userType} == "2")selected#end>企业</option>
                                	<option value="1" #if($!{model.query.param.userType} == "1")selected#end>个人</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    
					<div class="col-xs-4">
                        <div class="form-group">
                            <label class="col-xs-3 control-label text-right">开店: </label>

                            <div class="col-xs-9">
                                <div >
                                    <label>
                                        <input name="param[shopStatus]" type="radio"
                                               class="ace" value=""
                                               defaultItem="true"
                                               #if($model.query.param.shopStatus != 0 && $model.query.param.shopStatus != 1 && $model.query.param.shopStatus != 2)checked="checked" #end>
                                        <span class="lbl"> 全部</span>
                                    </label>
                                    <label>
                                        <input name="param[shopStatus]" type="radio"
                                               class="ace" value="0"
                                               #if($model.query.param.shopStatus == 0)checked="checked" #end>
                                        <span class="lbl"> 否</span>
                                    </label>

                                    <label>
                                        <input name="param[shopStatus]" type="radio"
                                               class="ace" value="2"
                                               #if($model.query.param.shopStatus == 2)checked="checked" #end>
                                        <span class="lbl"> 是</span>
                                    </label>
                                </div>
                            </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 width="15%">会员ID</th>
        <th width="20%">登录名</th>
        <th width="15%">会员类型</th>
        <th width="15%">开店</th>
        <th width="25%">认证</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 $!{model.list})
        <tr>
            <td>
                $!{obj.userId}
            </td>
        	<td>
                #if($!{getLockUserFlag})
                    <a href="${webUtils.getLocalPath("member/memberInfo.do")}?userId=$!{obj.userId}">
                        #if($obj.accountName == "null")
                            无用户名
                        #else
                            $!{obj.accountName}
                        #end
                    </a>
                    #else $!{obj.accountName}
                #end

            </td>
            <td>
            #if($!{obj.userType} == 1)
            	个人
            #elseif($!{obj.userType} == 2)
            	企业
            #end
            </td>
            <td>
            #if($!{obj.isOpenStore} == 2)

            #else

            #end
            </td>
            <td>
            #if($!{obj.userStatus} == 102)
            	<img src="$!{webUtils.getLocalPath("assets/img/idcard.png")}" title="身份认证" />
            #end
            #if($!{obj.emailStatus} == 2)
            	<img src="$!{webUtils.getLocalPath("assets/img/mail.png")}" title="邮箱认证" />
            #end
            #if($!{obj.mobileStatus} == 1)
            	<img src="$!{webUtils.getLocalPath("assets/img/mobil.png")}" title="手机绑定" />
            #end
            #if($!{obj.companyStatus} == 102)
            	<img src="$!{webUtils.getLocalPath("assets/img/qiye.png")}" title="企业认证" />
            #end 
            </td>
            <td>
                #if($!{getLockUserFlag})
                    <a href="${webUtils.getLocalPath("member/memberInfo.do")}?userId=$!{obj.userId}">查看</a>
                #end

            	#if($!{obj.accountState} == 2 && $!{unlockUserFlag})
            	    <a href="${webUtils.getLocalPath("member/getLockUser.do")}?uid=$!{obj.userId}&accountName=$!{obj.accountName}">解锁</a>
            	#elseif($!{lockUserFlag})
            	    <a href="${webUtils.getLocalPath("member/getLockUser.do")}?uid=$!{obj.userId}&accountName=$!{obj.accountName}">锁定</a>
            	#end
            	##<a href="${webUtils.getLocalPath("member/getCredit.do")}?uid=$!{obj.userId}">信用管理</a>
            	#*<a href="${webUtils.getLocalPath("member/memberBrowerHistory.do")}?userId=$!{obj.userId}">浏览历史</a>*#
                #if($!{memberFavoriteFlag})
                    <a href="${webUtils.getLocalPath("member/memberFavorite.do")}?userId=$!{obj.userId}">会员收藏</a>
                #end
            </td>
        </tr>
        #end
    </tbody>
</table>
<div class="row">
##    <div class="col-sm-6">
##    </div>
    <div class="col-sm-6" style="width: 100%; padding: 10px 0">
        <div class="dataTables_paginate paging_bootstrap">
            <div class="pull-right">
                #page($!{model.totalPage},$!{model.currPage})
            </div>
            <span class="pull-right" style="line-height: 33px;">
                #set($tmpPage = $model.currPage + 1)
                <a href="javascript:void(0);" onclick="gotoPage();">GO</a>
                                <input type="text" id="gotoPage" value="$!{tmpPage}" style="width: 30px;height: 20px;vertical-align: middle;line-height: 20px;margin-top: -3px;"/>
                                <span> 页 </span>
                                                查询出$!{model.totalSize}条数据,共$!{model.totalPage}页,当前第$!{tmpPage}页
            </span>
        </div>
    </div>
</div>
</div>
</div>
</div>
</div>

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

<script type="text/javascript">
    function cleanForm(id) {
        var form = $("#" + id);
        form.find("input[type=text],select").each(function () {
            var obj = $(this);
            obj.val("");
        });
        form.find("input[type=radio],input[type=checkbox]").each(function () {
        	if($(this).attr("defaultitem")){
	            $(this).attr("checked", true);
        	}else {
	            $(this).attr("checked", false);
        	}
        })
    }

    function gotoPage(){
        var reg = /^\+?[1-9][0-9]*$/;
        var inputPage = $("#gotoPage").val();
        if(!reg.test(inputPage)){
            alert("请输入一个正整数!");
            return;
        }
        var gotoPage = inputPage -1;
        window.location.href = "/member/list.do?currPage="+gotoPage;
    }

</script>