<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->

<div class="layui-fluid oe_fluid" style="padding-top:5px;">

  <form class="layui-form" id="mysearch" action="<!--{$oefile}-->&c=<!--{$c}-->&a=select" method="post"> 
  <input type="hidden" name="inputid" id="inputid" value="<!--{$inputid}-->" />
  <input type="hidden" name="sunion" id="sunion" value="<!--{$sunion}-->" />
  <input type="hidden" name="stype" id="stype" value="<!--{$stype}-->" />
  <div class="oe_searchbar layui-form">
    <div class="more_search_open"></div>
    <div class="layui-form-item">
    
      <div class="layui-inline">
        <div class="layui-form-label">性&#12288;别：</div>
        <div class="layui-input-inline input-120">
          <!--{hook mod="var" item="gender" type="select" name="sgender" text="请选择" value=$sgender}-->
        </div>
      </div>
      
      <div class="layui-inline">
        <div class="layui-form-label">地区：</div>
        <div class="layui-input-inline input-120">
          <!--{assign var="distlist" value=vo_list("mod={area} where={v.parentid='0'} orderby={v.orders ASC}")}-->
          <select name="sdist1" id="sdist1" lay-filter="area" data-depth="1" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist1 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
        </div>
        <div class="layui-input-inline input-120" id="json_sdist2">
          <!--{if $sdist1 > 0}-->
          <!--{assign var="distlist2" value=vo_list("mod={area} where={v.parentid='<!--{$sdist1}-->'}")}-->
          <select name="sdist2" id="sdist2" lay-filter="area" data-depth="2" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist2 as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist2 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
          <!--{else}-->
          <select name="sdist2" id="sdist2" lay-filter="area">
            <option value="">=请选择=</option>
          </select>
          <!--{/if}-->
        </div>
        <div class="layui-input-inline input-120" id="json_sdist3">
          <!--{if $sdist2 > 0}-->
          <!--{assign var="distlist3" value=vo_list("mod={area} where={v.parentid='<!--{$sdist2}-->'}")}-->
          <select name="sdist3" id="sdist3" lay-filter="area" data-depth="3" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist3 as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist3 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
          <!--{else}-->
          <select name="sdist3" id="sdist3" lay-filter="area">
            <option value="">=请选择=</option>
          </select>
          <!--{/if}-->
        </div>
      </div>
      <br />
      <div class="layui-inline">
        <div class="layui-form-label">用户名：</div>
        <div class="layui-input-inline input-100">
          <input type="text" name="susername" id="susername" class="layui-input" value="<!--{$susername}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">姓名：</div>
        <div class="layui-input-inline input-100">
          <input type="text" name="struename" id="struename" class="layui-input" value="<!--{$struename}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">手机：</div>
        <div class="layui-input-inline input-100">
          <input type="text" name="smobile" id="smobile" class="layui-input" value="<!--{$smobile}-->" />
        </div>
      </div>
      
      <br />
      <div class="layui-inline">
        <div class="layui-form-label">年&#12288;龄：</div>
        <div class="layui-input-inline input-80">
          <input type="text" name="sage1" id="sage1" class="layui-input" value="<!--{if $sage1 > 0}--><!--{$sage1}--><!--{/if}-->" /> 
        </div>
        <div class="layui-form-label">-</div>
        <div class="layui-input-inline input-80">
          <input type="text" name="sage2" id="sage2" class="layui-input" value="<!--{if $sage2 > 0}--><!--{$sage2}--><!--{/if}-->" />
        </div>
        <div class="layui-form-label">岁</div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">婚况：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="marry" name="smarry" type="select" text="请选择" value=$smarry}-->
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">学历：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="education" name="seducation" type="select" text="请选择" value=$seducation}-->
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">职业：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="job" name="sjob" type="select" text="请选择" value=$sjob}-->
        </div>
      </div>
      <br />
      <div class="layui-inline">
        <div class="layui-form-label">年收入：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="salary" name="ssalary" type="select" text="请选择" value=$ssalary}-->
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">购房：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="house" name="shouse" type="select" text="请选择" value=$shouse}-->
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">购车：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="car" name="scar" type="select" text="请选择" value=$scar}-->
        </div>
      </div>
      
      
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm search" id="but_submit_search2" lay-submit lay-filter="searchform2">
          <i class="layui-icon layui-icon-search"></i>
          搜索
          <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
        </button>
      </div>
      
    </div>

  </div>
  <!--//search End -->
  </form>

  <div class="oe_table_wrap layui-form">
    
    <!--{if $stype == "multi"}-->
    <div class="oe_tbl_tool clearfix">
      <div class="oe_gnbar clearfix">
        <div class="select btn fl">
          <input type="checkbox" name="allid[]" lay-skin="primary" title="选择" lay-filter="selectAll">
        </div>
        <div class="btn del fl del_line" f="but_user_multi_confirm">
          <i class="layui-icon layui-icon-user"></i>
          <span>确定所选</span>
        </div>
      </div>
      <div class="oe_tongji_bar clearfix current">
        <span><b><!--{$total}--></b> 条记录</span>
      </div>
    </div>
    <!--{/if}-->

    <table class="layui-table">
      <thead>
        <tr>
          <th width="8%">操作</th>
          <th width="10%">UID</th>
          <th width="5%">性别</th>
          <th width="17%">用户名</th>
          <th width="10%">姓名</th>
          <th width="13%">手机</th>
          <th width="5%">年龄</th>
          <th width="10%">地区</th>
          <th>注册时间</th>
        </tr>
      </thead>
      
      <!--{if empty($user)}-->
      <tr>
        <td colspan="10" class="text_center">没有符合条件的信息</td>
      </tr>
      <!--{else}-->
      <!--{foreach $user as $volist}-->
      <tr>
        <td class="check text_center">
          <!--{if $stype == "multi"}-->
          <input type="checkbox" name="id[]" lay-skin="primary" value="<!--{$volist.userid}-->" />
          <!--{else}-->
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-normal" onclick="oeSelectUser('<!--{$volist.userid}-->', '<!--{$volist.username}-->', '<!--{$volist.truename}-->', '<!--{$volist.idnumber}-->', '<!--{$volist.mobile}-->', '<!--{$volist.weixin}-->');">选择</a>
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{$volist.userid}-->
        </td>
        <td class="text_center">
          <!--{if $volist.gender=='1'}-->
          <i class="iconfont icon-nan" title="男"></i>
          <!--{else}-->
          <i class="iconfont icon-nv" title="女"></i>
          <!--{/if}-->
        </td>
        <td>
          <!--{if !empty($volist.headimg)}-->
          <img src="<!--{$volist.headimg}-->"  width="25px" height="25px" />
          <!--{/if}-->
          <!--{$volist.username}-->
        </td>
        <td class="text_center">
          <!--{if !empty($volist.truename)}-->
          <!--{$volist.truename}-->
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center"><!--{$volist.mobile}--></td>
        <td class="text_center"><!--{$volist.age}--></td>
        <td class="text_center">
          <!--{$volist.city}-->
        </td>
        <td class="text_center">
          <!--{$volist.addtime|date_format:"%Y-%m-%d %H:%M:%S"}-->
        </td>
      </tr>
      <!--{/foreach}-->
      <!--{/if}-->
    </table>
    
    <div class="oe_page_box"><!--{$showpage}--></div>
    
  </div>
</div>

<script type="text/javascript">
//单个选择
function oeSelectUser(userid, username, truename, idnumber, mobile, weixin) {
    window.parent.$("#<!--{$inputid}-->").val(userid);
    if (typeof (window.parent.$("#truename")) != 'undefined'){
        window.parent.$("#truename").val(truename);
    }
    if (typeof (window.parent.$("#idnumber")) != 'undefined'){
        window.parent.$("#idnumber").val(idnumber);
    }
    if (typeof (window.parent.$("#mobile")) != 'undefined'){
        window.parent.$("#mobile").val(mobile);
    }
    if (typeof (window.parent.$("#weixin")) != 'undefined'){
        window.parent.$("#weixin").val(weixin);
    }
    window.parent.$("#<!--{$inputid}-->_tips").html(username);
    
    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
    //layer.msg(index);
    parent.layer.close(index); //再执行关闭   
}


$(function(){
    //批量选择 9.08.08
    $(document).on("click", "[f='but_user_multi_confirm']", function(){
        //判断是否选择...
        $ids = "";
        $("input[name='id[]']:checked").each(function() {
            if ($ids == "") {
                $ids = $(this).val();
            }
            else {
                $ids += ","+$(this).val();
            }
        });
        if ($ids.length == 0 || $ids == "") {
            layer.msg("请选择会员");
            return false;
        }
        
        window.parent.$("#<!--{$inputid}-->").val($ids);
        window.parent.$("#<!--{$inputid}-->_tips").html($ids);
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭          
    });
    
});
</script>
</body>
</html>