<extend name="Common/layui_list" />
<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 房佳（新房报备ERP管理系统）
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| © 2020-2023 http://www.kaidandashi.com/ All rights reserved.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 本系统由淮南市银泰软件科技有限公司提供技术支持
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| QQ号：984784483
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<block name="title">
	<title>{$title}</title>
</block>
<block name="css">
	<style type="text/css">
		a.layui-btn{
			margin-left: 10px;
		}
		#greetings{
			position: absolute;
			height: auto;
			border-left: 1px solid rgba(0, 0, 0, 0.11);
			border-right: 1px solid rgba(0, 0, 0, 0.11);
			left: 0px;
			z-index:5555;
		}
		#greetings ul{
			list-style: none;
			box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.44);
			-webkit-margin-before: 0em;
			-webkit-margin-after: 0em;
			-webkit-margin-start: 0px;
			-webkit-margin-end: 0px;
			-webkit-padding-start: 0px;
		}
		#greetings li{
			text-align: left;
			padding: 5px;
			font-family: inherit;
			border-bottom: 1px solid rgba(0, 0, 0, 0.16);
			height: 25px;
			width: 180px;
			line-height: 25px;
			background-color: rgba(255, 255, 255, 0.8);
			cursor: pointer;
		}
		#greetings li:hover{
			background-color: rgba(175, 42, 0, 0.52);
			color: white;
		}
	</style>
</block>
<block name="content">
	<form class="layui-form">
		<blockquote class="layui-elem-quote">
			<!-- 排序所需要的两个字段 开始 -->
			<input type="hidden" name="field" value="id">
			<input type="hidden" name="order" value="desc">
			<!-- 排序所需要的两个字段 结束 -->
			<div class="layui-form-item">
				<div class="layui-inline">
					<div class="layui-input-inline" style="width: 180px;">
						<select name="status" lay-verify="">
							<option value="">审核状态</option>
							<option value="1">已通过</option>
							<option value="2">已驳回</option>
							<option value="3"<eq name="status" value="3">selected=""</eq>>待审核</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 180px;">
						<select name="jindu" lay-verify="">
							<option value="">报备进度</option>
							<option value="1">待审核</option>
							<option value="2">已驳回</option>
							<option value="3"<eq name="jindu" value="3">selected=""</eq>>待带看</option>
							<option value="4">带看驳回</option>
							<option value="5">待认筹</option>
							<option value="6">认筹驳回</option>
							<option value="7">待认购</option>
							<option value="8">认购驳回</option>
							<option value="9">待签约</option>
							<option value="10">签约驳回</option>
							<option value="11">待网签</option>
							<option value="12">网签驳回</option>
							<option value="13">待结佣</option>
							<option value="14">结佣驳回</option>
							<option value="15">已结佣</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 180px;">
						<input type="text" name="shijian" placeholder="录入时间" class="layui-input" id="test1" readonly="readonly">
					</div>
					<div class="layui-input-inline" style="width: 240px;">
						<input type="text" name="sousuo" list="greetings" autocomplete="off" placeholder="请输入报备编号、客户姓名、电话" class="layui-input" id="sousuo">
						<div id="greetings">
							<ul id="tcontent"></ul>
						</div>
					</div>
				</div>
				<button class="layui-btn k-search" lay-submit="" lay-filter="search" type="submit" id="submit_one">
					搜索
				</button>
				<button class="" style="display: none;" lay-submit="" lay-filter="search_hidden" type="button" id="submit_two">
					搜索
				</button>
				<button class="layui-btn layui-btn-primary" type="reset">
					重置
				</button>
				<a class="layui-btn pull-right layui-btn-primary" href="javascript:;" onClick="parent.removeIframe()">
					关闭
				</a>
				<a class="layui-btn pull-right layui-btn-primary" href="javascript:location.replace(location.href);" title="刷新">
					刷新
				</a>
				<a data-href="" id="xiangqing" data-title="" href="javascript:;" onClick="parent.Hui_admin_tab(this)" style="display:none;"></a>
			</div>
		</blockquote>
		<div class="more-search">
			<div class="layui-form-item"></div>
		</div>
	</form>
	<table id="table" lay-filter="table" class="layui-table" lay-data="{height:'full-100', url:'__ACTION__?is_ajax=1&jindu={$jindu}&status={$status}',limit:30,limits:[30,60,90],page:true, id:'table',request: {pageName: 'p'}}">
		<thead>
			<tr>
				<th lay-data="{field:'id',sort: 'true',hide: 'true'}">id</th>
				<th lay-data="{type:'numbers',align: 'center'}">序号</th>
				<th lay-data="{field:'bianhao',align: 'center',templet: '#zybh',sort: 'true'}">报备编号</th>
				<th lay-data="{field:'khxm',align: 'center'}">客户姓名</th>
				<th lay-data="{field:'dianhua',align: 'center'}">客户电话</th>
				<th lay-data="{field:'jindu',align: 'center'}">报备进度</th>
				<th lay-data="{field:'status',align: 'center'}">审核状态</th>
				<th lay-data="{field:'xiaoqum',align: 'center'}">报备小区</th>
				<th lay-data="{field:'tjren',align: 'center'}">添加人</th>
				<th lay-data="{field:'remark',align: 'center'}">备注</th>
				<th lay-data="{field:'addtime',align: 'center',sort: 'true'}">录入时间</th>
				<th lay-data="{field:'',align: 'center',fixed: 'right',width: 120,templet: '#btn',unresize: true}">操作</th>
			</tr>
		</thead>
	</table>
</block>
<block name="js">
	<script type="text/html" id="btn">
		{{# if(d.rbacxq == 1) { }}
			<a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="detail" title="报备详情" data-href="{:U('baobei/neirong')}?id={{d.id}}" data-title="{{d.zybh}}" href="javascript:;" onClick="parent.Hui_admin_tab(this)">详情</a>
		{{# } }}
	</script>
	<script type="text/html" id="zybh">
		{{# if(d.rbacxq == 1) { }}
			<a title="报备详情" data-href="{:U('baobei/neirong')}?bianhao={{d.zybh}}" data-title="{{d.zybh}}" href="javascript:;" onClick="parent.Hui_admin_tab(this)" style="text-decoration:none;" class="bitian">
		{{# } }}
		{{d.zybh}}
		{{# if(d.rbacxq == 1) { }}
			</a>
		{{# } }}
	</script>
	<script>
		$(document).ready(function(){
			$(document).bind("contextmenu",function(e){
				return false;
			});
			table.on('rowDouble(table)', function(obj){
				var data=obj.data;
				if (data.rbacxq) {
					document.getElementById("xiangqing").setAttribute('data-href','{:U('baobei/neirong')}?id='+data.id);
					document.getElementById("xiangqing").setAttribute('data-title',data.zybh);
					document.getElementById("xiangqing").click();
				}
			});
		});
		var laydate = layui.laydate;
		laydate.render({
			elem: '#test1'
			,range: true
			,max: '{:date("Y-m-d",time())}'
		});
		$("#sousuo").keyup(function(){
			$("#greetings").show();
			var txt=$("#sousuo").val();
			if (txt!="") {
				$.ajax({
					url:'{:U('ajax/get_wodekh')}',
					type:"get",
					data:{'txt': txt},
					dataType:"json",
					success:function(data){
						var district = data.district;
						$("#tcontent li").remove();
						for(var i in district){
							var li=$("<li></li>");
							$(li).html(district[i]['bianhao']);
							$("#tcontent").append(li);
						}
					}
				});
			}
		});
		$("#tcontent").on("click","li", function() {
			$("#greetings").show();
			var Uarry=$("#tcontent li");
			var count=$(this).index();//获取li的下标
			var Tresult=Uarry.eq(count).text();
			$("#sousuo").val(Tresult);
			$("#greetings").hide();
		})
		$("body").click(function(){
			$("#greetings").hide();
		});
	</script>
</block>