<extend name="Common/index" />
<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 开单大师（专业的房产ERP管理系统）
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| © 2018 http://www.kaidandashi.com All rights reserved.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 本系统由淮南市银泰软件科技有限公司提供技术支持
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| QQ号：1264399051
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<block name="css">
	<style>
		.pagination {
			margin: 20px 0;
		}
		.pagination ul {
			display: inline-block;
			list-style:none;
			*display: inline;
			/* IE7 inline-block hack */
			*zoom: 1;
			margin-left: 0;
			margin-bottom: 0;
			-webkit-border-radius: 4px;
			-moz-border-radius: 4px;
			border-radius: 4px;
			-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
			-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
			box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
		}
		.pagination ul > li {
			display: inline;
		}
		.pagination ul > li > a,
		.pagination ul > li > span,
		.pagination #lastspan {
			float: left;
			padding: 4px 12px;
			line-height: 20px;
			text-decoration: none;
			background-color: #ffffff;
			border: 1px solid #dddddd;
			border-left-width: 0;
		}
		.pagination ul > li > a:hover,
		.pagination ul > li > a:focus,
		.pagination ul > .active > a,
		.pagination ul > .active > span {
			background-color: #f5f5f5;
		}
		.pagination ul > .active > a,
		.pagination ul > .active > span {
				color: #999999;
				cursor: default;
		}
		.pagination ul > .disabled > span,
		.pagination ul > .disabled > a,
		.pagination ul > .disabled > a:hover,
		.pagination ul > .disabled > a:focus {
			color: #999999;
			background-color: transparent;
			cursor: default;
		}
		.pagination ul > li:first-child > a,
		.pagination ul > li:first-child > span {
			border-left-width: 1px;
			-webkit-border-top-left-radius: 4px;
			-moz-border-radius-topleft: 4px;
			border-top-left-radius: 4px;
			-webkit-border-bottom-left-radius: 4px;
			-moz-border-radius-bottomleft: 4px;
			border-bottom-left-radius: 4px;
		}
		.pagination ul > li:last-child > a,
		.pagination ul > li:last-child > span,
		.pagination #lastspan {
			-webkit-border-top-right-radius: 4px;
			-moz-border-radius-topright: 4px;
			border-top-right-radius: 4px;
			-webkit-border-bottom-right-radius: 4px;
			-moz-border-radius-bottomright: 4px;
			border-bottom-right-radius: 4px;
		}
		.pagination-centered {
			text-align: center;
		}
		.pagination-right {
			text-align: right;
		}
		.pagination-large ul > li > a,
		.pagination-large ul > li > span,
		.pagination-large #lastspan{
			padding: 11px 19px;
			font-size: 17.5px;
		}
		.pagination-large ul > li:first-child > a,
		.pagination-large ul > li:first-child > span {
			-webkit-border-top-left-radius: 6px;
			-moz-border-radius-topleft: 6px;
			border-top-left-radius: 6px;
			-webkit-border-bottom-left-radius: 6px;
			-moz-border-radius-bottomleft: 6px;
			border-bottom-left-radius: 6px;
		}
		.pagination-large ul > li:last-child > a,
		.pagination-large ul > li:last-child > span,
		.pagination-large #lastspan {
			-webkit-border-top-right-radius: 6px;
			-moz-border-radius-topright: 6px;
			border-top-right-radius: 6px;
			-webkit-border-bottom-right-radius: 6px;
			-moz-border-radius-bottomright: 6px;
			border-bottom-right-radius: 6px;
		}
		.pagination-mini ul > li:first-child > a,
		.pagination-small ul > li:first-child > a,
		.pagination-mini ul > li:first-child > span,
		.pagination-small ul > li:first-child > span {
			-webkit-border-top-left-radius: 3px;
			-moz-border-radius-topleft: 3px;
			border-top-left-radius: 3px;
			-webkit-border-bottom-left-radius: 3px;
			-moz-border-radius-bottomleft: 3px;
			border-bottom-left-radius: 3px;
		}
		.pagination-mini ul > li:last-child > a,
		.pagination-small ul > li:last-child > a,
		.pagination-mini ul > li:last-child > span,
		.pagination-small ul > li:last-child > span {
			-webkit-border-top-right-radius: 3px;
			-moz-border-radius-topright: 3px;
			border-top-right-radius: 3px;
			-webkit-border-bottom-right-radius: 3px;
			-moz-border-radius-bottomright: 3px;
			border-bottom-right-radius: 3px;
		}
		.pagination-small ul > li > a,
		.pagination-small ul > li > span {
			padding: 2px 10px;
			font-size: 11.9px;
		}
		.pagination-mini ul > li > a,
		.pagination-mini ul > li > span {
			padding: 0 6px;
			font-size: 10.5px;
		}
		.xqqy{
			max-width: 180px;
			overflow-x: auto;
			overflow-y: hidden;
			white-space:nowrap;
		}
		.xqqy::-webkit-scrollbar:horizontal{
			height: 10px;
			background-color: #F5F5F5;
		}
		.xqqy::-webkit-scrollbar-track:horizontal{
			-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
			box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
			background-color: #F5F5F5;
			border-radius: 10px;
		}
		.xqqy::-webkit-scrollbar-thumb:horizontal{
			border-radius: 10px;
			background-image: -webkit-gradient(
				linear,
				right top,
				left top,
				color-stop(0.44, rgb(122,153,217)),
				color-stop(0.72, rgb(73,125,189)),
				color-stop(0.86, rgb(28,58,148))
			);
		}
	</style>
	<link rel="stylesheet" href="__PUBLIC__/lib/layui/css/layui.css" media="all">
</block>
<block name="content">
	<div style="overflow: auto;">
		<table class="table table-border table-bordered table-hover table-bg" id="table" style="margin-bottom:20px;">
			<thead>
				<tr class="text-c">
					<th>编号</th>
					<th>状态</th>
					<th>客户姓名</th>
					<th>需求小区</th>
					<th>需求面积</th>
					<th>户型</th>
					<th>经办人</th>
					<th>咨询电话</th>
					<th>录入时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody id="table1">
				<volist name="keyuan" id="es">
					<?php
						if ($es['fzky']) {
							$kywhr=$es['fzxs'];
						} else {
							$kywhr=$es['weihurenid'];
						}
					?>
					<tr class="text-c" data-href="{:U('Keyuan1/neirong1',array('id'=>$es['id'],'kywhr'=>$kywhr))}" data-title="<if condition='$es.xqbianhao'>{$es.xqbianhao}</if>" <if condition="_rbac_btn_show(75,0,$kywhr)"> ondblclick="Hui_admin_tabb(this) </if>">
						<td id="td">
							<if condition="_rbac_btn_show(75,0,$kywhr)">
								<a data-href="{:U('Keyuan1/neirong1',array('id'=>$es['id'],'kywhr'=>$kywhr))}" data-title="<if condition='$es.bianhao'>{$es.xqbianhao}</if>" href="javascript:;" style="text-decoration: none;color: red;">
									{$es.xqbianhao}
								</a>
								<else/>{$es.xqbianhao}
							</if>
							<if condition='($es["zhuangtai"] eq 5)'>
								<span class="layui-btn layui-btn-mini" style="cursor: default;background: tan">
									缓
								</span>
							</if>
						</td>
						<td>
							{:get_peizhi("khzhuangtai",$es["zhuangtai"])}
						</td>
						<td>
							{$es.khxingming}{:get_peizhi("yezhulx",$es["kehulx"])}
						</td>
						<td>
							<if condition='$es["xqxiaoqu"]'>
								{$es.xqxiaoqu}
								<else/>-
							</if>
						</td>
						<td>
							<if condition='$es["xqmianji1"] and $es["xqmianji2"]'>
								{$es["xqmianji1"]}m²
								~
								{$es["xqmianji2"]}m²
								<elseif condition='$es["xqmianji1"]'/>
								{$es["xqmianji1"]}m²以上
								<elseif condition='$es["xqmianji2"]'/>
								{$es["xqmianji2"]}m²以下
								<else/>-
							</if>
						</td>
						<td>
							<if condition='$es["xqhuxing1"] and $es["xqhuxing2"]'>
								{$es["xqhuxing1"]}室
								~
								{$es["xqhuxing2"]}室
								<elseif condition='$es["xqhuxing1"]'/>
								{$es["xqhuxing1"]}室以上
								<elseif condition='$es["xqhuxing2"]'/>
								{$es["xqhuxing2"]}室以下
								<else/>-
							</if>
						</td>
						<td>
							{$es["weihuren"]}
						</td>
						<td>
							<?php
								$dh=M('yonghu')->where(array('id'=>$es['weihurenid']))->find();
							?>
							<a href="tel:{$dh['dianhua']}" style="text-decoration: none;color: red;">
								{$dh["dianhua"]}
							</a>
						</td>
						<td>
							{$es['lurusj']|date='Y-m-d H:i:s',###}
						</td>
						<td class="f-14" id="td">
							<if condition="_rbac_btn_show(75,0,$kywhr)">
								<a class="layui-btn layui-btn-mini" title="客户详情" data-href="{:U('Keyuan1/neirong1',array('id'=>$es['id'],'kywhr'=>$kywhr))}" data-title="<if condition='$es.bianhao'>{$es.xqbianhao}</if>" href="javascript:;" style="text-decoration:none;background: yellowgreen;">
									<i class="Hui-iconfont">&#xe720;</i> 详情
								</a>
							</if>
						</td>
					</tr>
				</volist>
			</tbody>
		</table>
	</div>
	<div class="pagination" style="width:100%;height:30px;margin:0 auto;background:#fff;position:fixed;bottom:0;text-align:center;">
		{$page}
	</div>
</block>
<block name="js">
	<script type="text/javascript" src="__PUBLIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript">
		function admin_del(obj,id){
			layer.confirm('客户删除须谨慎，确认要永久删除此房源吗？',function(index){
				$.ajax({
					type: 'POST',
					url: '{:U('kyneirong/yjdelky')}',
					data: {'id':id},
					dataType: 'json',
					success: function(data){
						if (data.status) {
							$(obj).parents("tr").remove();
							layer.msg(data.info,{icon:1,time:1000});
						}else{
							layer.msg(data.info,function(){
								
							});
						}
					},
					error:function(data) {
						console.log(data.msg);
					},
				});
			});
		}
		function admin_huifu(obj,id){
			layer.confirm('客户恢复须谨慎，确认要恢复吗？',function(index){
				$.ajax({
					type: 'POST',
					url: '{:U('kyneirong/huifuky')}',
					data: {'id':id},
					dataType: 'json',
					success: function(data){
						if (data.status) {
							$(obj).parents("tr").remove();
							layer.msg(data.info,{icon:1,time:1000});
						}else{
							layer.msg(data.info,function(){
								
							});
						}
					},
					error:function(data) {
						console.log(data.msg);
					},
				});
			});
		}
	</script>
</block>
        
        
        
        
        