  <div class="<?=$block==1?"layui-form-item":"layui-inline"?>">
            <label class="layui-form-label required"><?=$title?></label>
            <div class="<?=$block==1?"layui-input-block":"layui-input-inline"?>">
                <input  type="text" name="<?=$field?>"  autocomplete="off" id="<?=$id?>"  lay-verify="<?=$required?>" placeholder="请输入<?=$title?>" value="<?=$fvalue?>" class="layui-input">

                <div class="search" id="search<?=$id?>">
               
              </div>
              
            </div>
        </div>
        <style type="text/css">
          .search{position: absolute; top: 40px;z-index: 12111; background: white;padding: 10px;min-height: 100px; min-width: 400px; border: 1px solid #eee; border-radius: 2px; display: none}
          .search p{line-height: 35px; color: #888888; cursor: pointer;}
        </style>


        <script>
          
           layui.use(['form','miniAdmin'], function () {

             var  form = layui.form,
                  layer = layui.layer,
                  miniAdmin = layui.miniAdmin,
                  $ = layui.jquery;

     
     $("body").on("input","#<?=$id?>",function(){

       throttle(change_title_<?=$id?>,$(this))
          
     })
      $("#search<?=$id?>").on("click",".scompany",function(){
        $("#search<?=$id?>").hide()
        $("#<?=$id?>").val($(this).html())
      
   });

     function throttle(method, context) {
     clearTimeout(method.tId);
     method.tId = setTimeout(function(){
         method.call(context);
     },200);
 }
   function change_title_<?=$id?>(){

         var obj=$('#<?=$id?>');
          if (obj.val()=="" || !obj.val()){
             $("#search<?=$id?>").hide()
             return
          }
           $.post("<?=$posturl?>",{q:obj.val()}, function(res) {
            
              if (res.data.length==0){
                  $("#search<?=$id?>").hide()
                } else{

                   $("#search<?=$id?>").show();
                   html=""

                   for (var i=0;i<res.data.length;i++){ 
                      html=html+"<p  class='scompany'>"+res.data[i].title+"</p>"
                      
                  }
                   // $html.="<p  class='scompany'>".$value['title']."</p>";
                   $("#search<?=$id?>").html(html)
                }
                   
           },"json");
   }
           })


        </script>   