<extend name="Common/layui_list" />
<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 房开源（综合房产ERP管理系统）
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| © 2019-2023 http://www.kaidandashi.com/ All rights reserved.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 本系统由淮南市银泰软件科技有限公司提供技术支持
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| QQ号：984784483
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<block name="title">
	<title>{$title}</title>
</block>
<block name="css">
	<style type="text/css">
		#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;
		}
		.layui-form-checkbox span {
			font-size: 15px;
			color: black !important;
		}
		.fybq {
			margin-left: 5px;
		}
	</style>
</block>
<block name="content">
	<form class="layui-form">
		<blockquote class="layui-elem-quote" style="padding: 5px;">
			<!-- 排序所需要的两个字段 开始 -->
			<input type="hidden" name="field">
			<input type="hidden" name="order">
			<!-- 排序所需要的两个字段 结束 -->
			<div class="layui-form-item" style="margin-top: 5px;">
				<div class="layui-input-inline" style="width:120px;margin-left:20px;">
					<select lay-filter="zylx">
						<option value="1">写字楼</option>
						<option selected="selected">商铺</option>
						<option value="2">住宅</option>
						<option value="3">写字楼客源</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>
					</select>
				</div>
				<div class="layui-inline" style="float:left;">
					<div class="layui-input-inline" style="width:400px;">
						<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 layui-btn-primary" 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()" style="text-decoration:none">
					关闭
				</a>
				<a class="layui-btn pull-right layui-btn-primary" href="javascript:location.replace(location.href);" title="刷新" style="text-decoration:none">
					刷新
				</a>
			</div>
			<div class="layui-form-item" style="margin-top: 5px;">
				<div class="layui-inline">
					<div class="layui-input-inline" style="width:100px;margin-left:20px;">
						<select name="mmzl">
							<option value="">类型</option>
							<option value="1">出售</option>
							<option value="2">出租</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width:100px;">
						<select name="leixing">
							<option value="">商铺类型</option>
							<foreach name="leixing" item="pz">
								<option value="{$pz.lxid}">{$pz.lxming}</option>
							</foreach>
						</select>
					</div>
					<div class="layui-input-inline" style="width:100px;">
						<select name="yetai">
							<option value="">商铺业态</option>
							<foreach name="yetai" item="pz">
								<option value="{$pz.lxid}">{$pz.lxming}</option>
							</foreach>
						</select>
					</div>
					<div class="layui-input-inline" style="width:100px;">
						<select name="hangye">
							<option value="">商铺行业</option>
							<foreach name="hangye" item="pz">
								<option value="{$pz.lxid}">{$pz.lxming}</option>
							</foreach>
						</select>
					</div>
					<div class="layui-input-inline" style="width:100px;">
						<select name="zhuangxiu">
							<option value="">装修</option>
							<foreach name="zhuangxiu" item="pz">
								<option value="{$pz.lxid}">{$pz.lxming}</option>
							</foreach>
						</select>
					</div>
					<div class="layui-inline">
						<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="我的房源" name="myfy" value="1"/>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline" style="margin-left: 20px;">
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="我的收藏" name="mysc" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="今日浏览" name="jrll" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="图片" name="tupian" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="视频" name="shipin" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="新上" name="xinshang" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="核验" name="heyan" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="急售" name="jishou" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="有钥匙" name="yaoshi" value="1"/>
					<input type="checkbox" lay-filter="checkbox" lay-skin="primary" title="外网同步" name="waiwangtb" value="1"/>
				</div>
			</div>
			<div class="layui-form-item" style="margin-top: 5px;">
				<label class="layui-form-label" style="width: 40px;">价格</label>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="jiage1" placeholder="￥" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-form-mid">~</div>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="jiage2" placeholder="￥" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label" style="width: 40px;margin-left: -20px;">面积</label>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="mianji1" placeholder="m²" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-form-mid">~</div>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="mianji2" placeholder="m²" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label" style="width: 40px;margin-left: -20px;">楼层</label>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="louceng1" placeholder="层" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-form-mid">~</div>
				<div class="layui-input-inline" style="width: 50px;">
					<input type="text" name="louceng2" placeholder="层" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label" style="width: 40px;margin-left: -20px;">时间</label>
				<div class="layui-input-inline" style="width: 100px;">
					<input class="layui-input" placeholder="开始日" id="test1" name="shijian1" readonly="">
				</div>
				<div class="layui-form-mid">~</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input class="layui-input" placeholder="截止日" id="test2" name="shijian2" readonly="">
				</div>
			</div>
		</blockquote>
	</form>
	<table id="table" lay-filter="table" class="layui-table" lay-data="{height:'full-200', url:'__ACTION__?is_ajax=1',limit:30,limits:[30,60,90],page:true, id:'table',request: {pageName: 'p'}}">
		<thead>
			<tr>
				<th lay-data="{type:'numbers',align: 'center'}">序号</th>
				<th lay-data="{field:'',align: 'center',width: 100,templet: '#img', unresize: true}">图片</th>
				<th lay-data="{field:'',align: 'center',minWidth: 150, templet: '#fybq'}">标签</th>
				<th lay-data="{field:'',align: 'center',minWidth: 100, templet: '#fybh',sort: 'true'}">编号</th>
				<th lay-data="{field:'fyzt',align: 'center'}">状态</th>
				<th lay-data="{field:'xqm',align: 'center'}">地址</th>
				<th lay-data="{field:'jzmianji',align: 'center',minWidth: 150,sort: 'true'}">面积</th>
				<th lay-data="{field:'fyjg',align: 'center',minWidth: 150}">价格</th>
				<th lay-data="{field:'danjia',align: 'center',minWidth: 150,sort: 'true'}">单价</th>
				<th lay-data="{field:'fylc',align: 'center'}">楼层</th>
				<th lay-data="{field:'splx',align: 'center'}">类型</th>
				<th lay-data="{field:'spyt',align: 'center'}">业态</th>
				<th lay-data="{field:'sphy',align: 'center'}">行业</th>
				<th lay-data="{field:'fydj',align: 'center'}">等级</th>
				<th lay-data="{field:'syl',align: 'center'}">使用率</th>
				<th lay-data="{field:'fyzx',align: 'center'}">装修</th>
				<th lay-data="{field:'lurusj',align: 'center',sort: 'true'}">录入时间</th>
				<th lay-data="{field:'ygmingcheng',align: 'center'}">经纪人</th>
				<th lay-data="{field:'',align: 'center',fixed: 'right',width: 270,templet: '#btn',unresize: true}">操作</th>
			</tr>
		</thead>
	</table>
	<input type="hidden" id="zifujiyemian">
</block>
<block name="js">
	<script type="text/html" id="btn">
		{{# if(d.rbacxq == 1) { }}
			<a class="layui-btn layui-btn-xs layui-btn-primary" title="房源详情" data-href="{:U('Fangyuan/neirong')}?id={{d.id}}" data-title="{{d.bianhao}}" href="javascript:;" onClick="parent.Hui_admin_tab(this)">详情</a>
		{{# } }}
	</script>
	<script type="text/html" id="img">
		{{# if(d.img) { }}
			<div class="layer-photos-demo">
				<img width="100%" height="100%" layer-pid="" layer-src="/Upload/{{d.gongsiid}}/shangpu/{{d.bianhao}}/{{d.img}}" src="/Upload/{{d.gongsiid}}/shangpu/{{d.bianhao}}/t_{{d.img}}" alt="">
				<div style="display: none;">
					{{# for (var i in d.photo) { }}
						<img width="100%" layer-pid="" layer-src="/Upload/{{d.gongsiid}}/shangpu/{{d.bianhao}}/{{d['photo'][i]['image']}}" src="/Upload/{{d.gongsiid}}/shangpu/{{d.bianhao}}/t_{{d['photo'][i]['image']}}" alt="">
					{{# } }}
				</div>
			</div>
		{{# } else { }}
			<img width="100%" src="/Public/images/default_icon.png" alt="">
		{{# } }}
	</script>
	<script type="text/html" id="fybq">
		{{# if(d.zhgjsj < qitian) { }}
			<span class="layui-badge fybq" style="background-color: rgba(255,0,0,0.15);color: rgb(255,0,0);">
				七天未跟进
			</span>
		{{# } else if(d.zhgjsj < santian) { }}
			<span class="layui-badge fybq" style="background-color: rgba(255,200,0,0.15);color: rgb(255,200,0);">
				三天未跟进
			</span>
		{{# } }}
		{{# if(d.img) { }}
			<span class="layui-badge fybq" style="background-color: rgba(100,142,249,0.15);color: rgb(100,142,249);">
				图片
			</span>
		{{# } }}
		{{# if(d.shouyaobm != 0 || d.shouyaoren != 0) { }}
			<span class="layui-badge fybq" style="background-color: rgba(32,178,170,0.15);color: rgb(32,178,170);">
				钥匙
			</span>
		{{# } }}
		{{# if(d.heyan == 1) { }}
			<span class="layui-badge fybq" style="background: rgba(219,112,147,0.15);color: rgb(219,112,147);">
				核验
			</span>
		{{# } }}
		{{# if(d.jishou == 1) { }}
			<span class="layui-badge fybq" style="background: rgba(255,99,71,0.15);color: rgb(255,99,71);">
				急售
			</span>
		{{# } }}
		{{# if(d.dqshu > 9) { }}
			<span class="layui-badge fybq" style="background-color: rgba(51,190,133,0.15);color: rgb(51,190,133);">
				精品
			</span>
		{{# } }}
		{{# if(d.isshikan) { }}
			<span class="layui-badge fybq" style="background: rgba(38,156,255,0.15);color: rgb(38,156,255);">
				已实勘
			</span>
		{{# } }}
		{{# if(d.shoujia > 0) { }}
			<a class="layui-badge fybq" href="javascript:;" onclick="motai('计算器','{:U('Index/tool',array('shoujia'=>d.shoujia,'mianji'=>d.mianji))}','1060','500')" style="text-decoration: none;background: rgba(184,134,11,0.15);color: rgb(184,134,11);">
				计算器
			</a>
		{{# } }}
	</script>
	<script type="text/html" id="fybh">
		{{# if(d.rbacxq == 1) { }}
			<a title="房源详情" data-href="{:U('fyshangpu/neirong')}?id={{d.id}}" data-title="{{d.bianhao}}" href="javascript:;" onClick="parent.Hui_admin_tab(this)" style="text-decoration:none;color:red;">
		{{# } }}
		{{d.bianhao}}
		{{# if(d.rbacxq == 1) { }}
			</a>
		{{# } }}
	</script>
	<script>
		var santian = Date.parse(new Date())/1000-3600*24*3;
		var qitian = Date.parse(new Date())/1000-3600*24*7;
		$(document).ready(function(){
			$(document).bind("contextmenu",function(e){
				return false;
			});
			var layer = layui.layer
			,layedit = layui.layedit
			,laydate = layui.laydate;
			laydate.render({
				elem: '#test1'
				,max: '{:date("Y-m-d",time())}'
			});
			laydate.render({
				elem: '#test2'
				,max: '{:date("Y-m-d",time())}'
			});
			$('body').on("click",".layer-photos-demo",function(){
				layer.photos({
					photos: this
					,anim: 0 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
				});
			});
			form.on('checkbox(checkbox)', function(data){
				$('#submit_one').click();
			});
			form.on('select(zylx)', function(data){
				var sousuo = $('#sousuo').val();
				if(data.value == 1){
					window.location.href="{:U('Shangji/fyxiezilou')}?txt="+sousuo;
				} else if(data.value == 2){
					window.location.href="{:U('Shangji/fyzhuzhai')}?txt="+sousuo;
				} else if(data.value == 3){
					window.location.href="{:U('Shangji/kyxiezilou')}?txt="+sousuo;
				} else if(data.value == 4){
					window.location.href="{:U('Shangji/kyshangpu')}?txt="+sousuo;
				} else if(data.value == 5){
					window.location.href="{:U('Shangji/kyzhuzhai')}?txt="+sousuo;
				} else if(data.value == 6){
					window.location.href="{:U('Shangji/kyxinfang')}?txt="+sousuo;
				} else if(data.value == 7){
					window.location.href="{:U('Shangji/kyjinrong')}?txt="+sousuo;
				} else if(data.value == 8){
					window.location.href="{:U('Shangji/kyzhuangxiu')}?txt="+sousuo;
				} else if(data.value == 9){
					window.location.href="{:U('Shangji/kygongshang')}?txt="+sousuo;
				} else if(data.value == 10){
					window.location.href="{:U('Shangji/kykuaiji')}?txt="+sousuo;
				} else if(data.value == 11){
					window.location.href="{:U('Shangji/kyjiaju')}?txt="+sousuo;
				}
			});
			$("#sousuo").keyup(function(){
				$("#greetings").show();
				var txt=$("#sousuo").val();
				if (txt!="") {
					$.ajax({
						url:'{:U('ajax/get_xiaoqu_txt')}',
						type:"get",
						data:"txt="+txt,
						dataType:"json",
						success:function(data){
							var district = data.lists;
							$("#tcontent li").remove();
							for(var i in district){
								var li=$("<li></li>");
								$(li).html(district[i]['xiaoqum']);
								$("#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();
			});
			var istxt ='{$_GET['txt']}';
			if(istxt){
				$("#sousuo").val('{$_GET['txt']}');
				$('#submit_one').click();
			}
		});
	</script>
</block>