list.vm 14.2 KB
##set($page_title="列表")
##set($crumbs="首页:/home,用户列表")

##详情
#set($url_show = "/user/show.do")
##查询地址
#set($url_list = "/user/list.do")
##添加
#set($url_save = "/user/preSave.do")
##删除
#set($url_del = "/user/del.do")
##数据认证
#set($url_data_auth = "/dataAuth/preSave.do")

<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="$url_list" id="form" method="post">
                                <input type="hidden" name="currPage" value="0" />
								<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-9">
                                                   #selectCount($!{model.query.pageSize})
                                               </div>
                                           </div>
                                       </div>
                                    <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[id]" value="$!{model.query.param.id}" class="form-control"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                    <div class="row" style="padding-top: 12px; padding-bottom: 12px; border-bottom-width: 1px;">
                                		<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[userName]" value="$!{model.query.param.userName}" class="form-control"/>
                                               </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[realName]" value="$!{model.query.param.realName}" class="form-control"/>
                                               </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[serialNumber]" value="$!{model.query.param.serialNumber}" class="form-control"/>
                                            </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-9">
                                                    <input type="text" name="param[cellphone]" value="$!{model.query.param.cellphone}" class="form-control"/>
                                                </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[email]" value="$!{model.query.param.email}" class="form-control"/>
                                                </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[fixedLineTelephone]" value="$!{model.query.param.fixedLineTelephone}" class="form-control"/>
                                                </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-9">
                                                    <input type="text" name="param[validTimeBegin]"  readonly="readonly"
				                                       class="form-control  form-time"
				                                       onclick="var d5222=$dp.$('d5222');WdatePicker({onpicked:function(){d5222.focus();},dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'d5222\')}'})"
				                                       value="$!{model.query.param.validTimeBegin}"
				                                       id="d5221"/>
                                                </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[validTimeEnd]"  readonly="readonly"
			                                       class="form-control  form-time"
			                                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'d5221\')}'})"
			                                       value="$!{model.query.param.validTimeEnd}"
			                                       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">
                                                    <input type="text" name="param[created]"  readonly="readonly"
				                                       class="form-control  form-time"
				                                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
				                                       value="$!{model.query.param.created}"
				                                       id="created"/>
                                              </div>
                                            </div>
                                        </div> -->
                                        <div class="row">
	                                        <div class="clearfix">
			                                    <span class="pull-right">
			                                        <input type="submit" value="查询结果" />
			                                        <input type="button" value="重置条件" onclick="cleanForm('form');"/>
			                                    </span>
			                                </div>
		                                </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>ID</th>
                            <th>用户名</th>
                            <th>用户编号</th>
                            <th width="70px">真实姓名</th>
                            <th>固定电话</th>
                            <th>手机号码</th>
                            <th>邮箱</th>
##                            <th>所属交割地</th>
                        <th width="220px"><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.id}
                        </td>
                        <td>
                            $!{obj.userName}
                        </td>
                        <td>
                            $!{obj.serialNumber}
                        </td>
                        <td>
                            $!{obj.realName}
                        </td>
                        <td>
                            $!{obj.fixedLineTelephone}
                        </td>
                        <td>
                            $!{obj.cellphone}
                        </td>
                        <td>
                            $!{obj.email}
                        </td>
##                        <td>
##                            $!{obj.packUpAddress}
##                        </td>
                        <td>
                            <div class="action-buttons">
                            <a class="green" href="${url_show}?id=${obj.id}">
                                    <i class=""></i>查看
                                </a>
                                <a class="red" href="${url_data_auth}?userId=${obj.id}">
                                    <i class="fa fa-trash  "></i>数据权限
                                </a>
                            <a class="green" href="${url_save}?id=${obj.id}">
                                    <i class="fa fa-pencil "></i>修改
                                </a>
                                    <a class="red" href="${url_del}?id=${obj.id}" onclick="return confirm('确定要删除!');">
                                        <i class="fa fa-trash  "></i>删除
                                    </a>
                            </div>
                        </td>

                    </tr>
                    #end
                    </tbody>
                </table>
                <div class="row">
                    <div class="col-sm-6">
                        <a href="$url_save" class="btn btn-success btn-sm ">添加</a>
                    </div>
                    <div class="col-sm-6">
                        <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)
                                查询出$!{model.totalSize}条数据,共$!{model.totalPage}页,当前第$!{tmpPage}页
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    jQuery(function($) {

        $('table th input:checkbox').on('click' , function(){
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function(){
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });

        });
    })
    
    function cleanForm(id) {
		var form = $("#" + id);
		
			form.find("input[type=text]").each(function() {
			var obj = $(this);
			obj.val("");
		});
		
		form.find("select").each(function() {
			var obj = $(this);
			obj.val("20");
		});
		
		$("input[class='form-control  form-time']").each(function() {
			var obj = $(this);
			obj.val("");
		});
		
	}
	
</script>
<script src="$!{webUtils.getAssetsPath('/date/WdatePicker.js')}"></script>
<script src="$!{webUtils.getAssetsPath('/ace1.3/assets/js/diligrp.form.js')}"></script>