<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->
<!--{if $a == "house"}-->
<div class="layui-fluid oe_fluid">
  <form class="layui-form" id="mysearch" action="<!--{$oefile}-->&c=<!--{$c}-->&a=house" method="post">
  <div class="oe_breadcrumb_box clearfix">
    <div class="layui-breadcrumb fl" lay-filter="breadcrumb" style="visibility: visible;">
      <a href="javascript:;">会员管理</a><span lay-separator="">/</span>
      <a href="javascript:;">认证管理</a><span lay-separator="">/</span>
      <a><cite>房产认证</cite></a>
    </div>
    
  </div>
  <!--//top end -->
  
  <div class="oe_searchbar layui-form">
    <div class="layui-form-item">

      <div class="layui-inline">
        <div class="layui-form-label">所在地区：</div>
        <div class="layui-input-inline input-120">
          <!--//9.10.12 -->
          <!--{assign var="distlist" value=vo_list("mod={area0} 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">&nbsp;会员UID：</div>
        <div class="layui-input-inline input-150">
          <input type="text" name="suserid" id="suserid" class="layui-input" value="<!--{if $suserid>0}--><!--{$suserid}--><!--{/if}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">用户名：</div>
        <div class="layui-input-inline input-150">
          <input type="text" name="susername" id="susername"  class="layui-input" value="<!--{$susername}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">&nbsp;手&nbsp;机&nbsp;号：</div>
        <div class="layui-input-inline input-150">
          <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;&#12288;别：</div>
        <div class="layui-input-inline input-150">
          <!--{hook mod="var" item="gender" name="sgender" type="select" text="不限" value=$sgender}-->
        </div>
      </div>
      
      <div class="layui-inline">
        <div class="layui-form-label">姓&#12288;名：</div>
        <div class="layui-input-inline input-150">
          <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-150">
          <input type="text" name="sidnumber" id="sidnumber" class="layui-input" value="<!--{$sidnumber}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm search" id="btn_search" 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 class="layui-form-item">
      <div class="layui-form-label">认证状态：</div>
      <div class="label_box">
        <input type="hidden" name="sflag" id="sflag" value="<!--{$sflag}-->" />
        <span f="but_search_cat" data-val="0" data-input="sflag"<!--{if $sflag == '0'}--> class="current"<!--{/if}-->>全部</span>
        <span f="but_search_cat" data-val="1" data-input="sflag"<!--{if $sflag == '1'}--> class="current"<!--{/if}-->>待认证</span>
        <span f="but_search_cat" data-val="2" data-input="sflag"<!--{if $sflag == '2'}--> class="current"<!--{/if}-->>已通过认证</span>
        <span f="but_search_cat" data-val="3" data-input="sflag"<!--{if $sflag == '3'}--> class="current"<!--{/if}-->>未通过认证</span>
      </div>
    </div>
  </div>
  <!--//search End -->
  </form>
  <div class="oe_table_wrap layui-form">
  
    <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" f="handle-auditrz" data-form="myform" data-type="pass">
          <i class="iconfont icon-tongguo"></i>
          <span>批量通过</span>
        </div>
        <div class="btn del fl del_line" f="handle-auditrz" data-form="myform" data-type="unpass">
          <i class=" iconfont icon-butongguo"></i>
          <span>批量不通过</span>
        </div>
      </div>
      <div class="oe_tongji_bar clearfix current">
        <span><b><!--{$total}--></b> 条记录</span>
      </div>
    </div>
    
    
    <form class="layui-form" id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post">
    <input type="hidden" name="a" id="a" value="savehouse" />
    <input type="hidden" name="lotact" id="lotact" value="" />
    <input type="hidden" name="send_msg" id="send_msg" value="" />
    <table class="layui-table">
      <thead>
        <tr>
          <th width="2%">选</th>
          <th width="7%">UID</th>
          <th width="4%">头像</th>
          <th width="12%">用户名</th>
          <th width="4%">性别</th>
          <th width="4%">年龄</th>
          <th width="4%">婚况</th>
          <th width="8%">所在地</th>
          <th width="8%">姓名</th>
          <th width="8%">购房情况</th>
          <th width="6%">房产</th>
          <th width="15%">上传时间</th>
          <th>审核认证</th>
          <th width="5%">编辑</th>
        </tr>
      </thead>
      <!--{if empty($user)}-->
      <tr>
        <td class="text_center" colspan="14">没有符合条件的信息</td>
      </tr>
      <!--{else}-->
      <!--{foreach $user as $volist}-->
      <tr>
        <td class="check text_center">
          <!--{if $volist.houserz == '0'}-->
          <input type="checkbox" lay-skin="primary" name="id[]" id="id[]" class="selall" value="<!--{$volist.userid}-->" />
          <!--{/if}-->
        </td>
        <td class="check text_center">
          <a href="<!--{$urlpath}-->index.php?c=home&a=detail&id=<!--{$volist.userid}-->" target="_blank"><!--{$volist.userid}--></a>
        </td>
        <td class="text_center drop">
          <!--{if !empty($volist.headimg)}-->
          <div class="down">
            <div><img src="<!--{$urlpath}-->tpl/static/images/loading_img.png" data-src="<!--{$volist.headimg}-->" width="20px" height="20px" f="viewimg" preload="0" /></div>
            <div class="sub">
              <img src="<!--{$urlpath}-->tpl/static/images/loading_img.png" data-src="<!--{$volist.headimg}-->" preload="0" />
            </div>
          </div>
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=user&a=view&id=<!--{$volist.userid}-->">
          <!--{$volist.username}--> 
          </a>
        </td>
        <td class="text_center"><!--{hook mod="var" item="gender" type="text" value=$volist.gender}--></td>
        <td class="text_center"><!--{$volist.age}--></td>
        <td class="text_center"><!--{hook mod="var" item="marry" type="text" value=$volist.marry}--></td>
        <td class="text_center"><!--{$volist.city}--></td>
        <td class="text_center">
          <!--{if !empty($volist.truename)}-->
          <!--{$volist.truename}-->
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{hook mod="var" item="house" type="text" value=$volist.house}-->
        </td>
        <td class="text_center">
          <!--{if !empty($volist.houseimg)}-->
          <img src="<!--{$urlpath}-->tpl/static/images/loading_img.png" data-src="<!--{$volist.houseimg}-->" width="20px" height="20px" f="viewimg" preload="0" />
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center"><!--{$volist.housetime|date_format:"%Y/%m/%d %H:%M:%S"}--></td>
        <td class="text_center" id="status_<!--{$volist.userid}-->">
          <!--{if $volist.houserz == '1'}-->
          <font color="green">已通过(认证)</font>
          <!--{elseif $volist.houserz == '2'}-->
          <font color="red">未通过</font>
          <!--{else}-->
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-normal btn_green" f="but_post_audit" data-id="<!--{$volist.userid}-->" data-type="pass"> <i class="layui-icon layui-icon-ok"></i>通过</a>
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-normal btn_red" f="but_post_audit" data-id="<!--{$volist.userid}-->" data-type="unpass"><i class="layui-icon layui-icon-close"></i>不通过</a>
          <!--{/if}-->
        </td>
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edithouse&id=<!--{$volist.userid}-->&<!--{$comeurl}-->" class="layui-btn layui-btn-xs layui-btn-normal">编辑</a>
        </td>
      </tr>
      <!--{/foreach}-->
      <!--{/if}-->
    </table>
    </form>
    
    <div class="oe_page_box"><!--{$showpage}--></div>
    
  </div>
</div>
<script type="text/javascript">
$(function(){
    //渲染...
    layui.use(['element', 'form'], function(){
        
    });
    
    layui.use('form', function(){
        $form = layui.form;
        //选择...
        $form.on('checkbox(sendmsg)', function(data){
            $sel = data.elem.checked;
            if ($sel == true) {
                $("#send_msg").val("1");
            }
            else {
                $("#send_msg").val("0");
            }
        });   
        
    });
    
    //ajax 审核
    $(document).on("click", "[f='but_post_audit']", function(){
        $id = $(this).attr("data-id");
        $type = $(this).attr("data-type");
        $url = "<!--{$oefile}-->&c=<!--{$c}-->&a=savehouse&id="+$id+"&lotact="+$type+"&datatype=ajax";
        oelove_do_ajax($url, function(){
            if ($type == "pass") {
                $("#status_"+$id).html("<font color='green'>已通过(认证)</font>");
            }
            else {
                $("#status_"+$id).html("<font color='red'>未通过</font>");
            }
        });
    });
    
    //预载图片 9.10.12
    preload_img();
    
    
});
</script>
<!--{/if}-->
<script type="text/javascript">
  jQuery(".drop").slide({ type:"menu", titCell:".down", targetCell:".sub",effect:"slideDown",delayTime:100,triggerTime:0,returnDefault:true});
</script>
</body>
</html>