<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
	<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 房佳（专业的新房分销ERP管理系统）
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| Copyright (c) 2008-2019 http://fj.ytsofts.cn/ All rights reserved.
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 本系统由淮南市银泰软件科技有限公司提供技术支持
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| QQ号：984784483
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
		<meta http-equiv="Cache-Control" content="no-siteapp"/>
		<link rel="Bookmark" href="/Public/favicon.ico">
		<link rel="Shortcut Icon" href="/Public/favicon.ico"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/H-ui.admin.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/lib/Hui-iconfont/1.0.8/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/style.css"/>
		
	<link rel="stylesheet" type="text/css" href="/Public/lib/layui/css/layui.css">
	<style type="text/css">
		.kyrz{
			height: 600px;
			overflow-y: auto;
			overflow-x: hidden;
		}
		.kyrz::-webkit-scrollbar:vertical{
			width: 10px;
			background-color: #F5F5F5;
		}
		.kyrz::-webkit-scrollbar-track:vertical{
			-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
			background-color: #F5F5F5;
			border-radius: 10px;
		}
		.kyrz::-webkit-scrollbar-thumb:vertical{
			border-radius: 10px;
			background-image: -webkit-gradient(
				linear,
				left bottom,
				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>

	</head>
	<body>
		
	<div class="col-xs-12 col-sm-12 col-md-12">
		<div class="row cl" style="margin: 10px 0px;">
			<div>&nbsp;</div>
			<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
			<div class="formControls col-xs-10 col-sm-10 col-md-10">
				<?php if(($keyuan['isdel']) == "2"): if(($keyuan['zhuangtai']) == "1"): if(($is_rbacgx) == "1"): ?><div style="width: 72px;float: left;">
								<a href="javascript:;" onclick="layer_show('客户编辑','<?php echo U('Kyneirong/editKeyuan',array('id'=>$keyuan['id'],'kywhr'=>$kywhr));?>','950')" style="text-decoration:none;">
									<i class="Hui-iconfont" style="font-size:50px; line-height:10px;">
										&#xe6df;
									</i>
									<strong><p style="color:black;">修改信息</p></strong>
								</a>
							</div><?php endif; ?>
						<?php if(($is_rbachf) == "1"): ?><div style="width: 72px;float: left;">
								<a href="javascript:;" onclick="layer_show('写回访','<?php echo U('Kyneirong/genjin',array('kyid'=>$keyuan['id'],'kywhr'=>$kywhr));?>','950','500')" style="text-decoration:none">
									<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
										&#xe70c;
									</i>
									<strong><p style="color:black;">&nbsp;写回访</p></strong>
								</a>
							</div><?php endif; ?>
						<?php if(($is_rbaclf) == "1"): ?><div style="width: 72px;float: left;">
								<a href="javascript:;" onclick="layer_show('写来访','<?php echo U('Kyneirong/daikan',array('kyid'=>$keyuan['id'],'kywhr'=>$kywhr));?>','800','500')" style="text-decoration:none">
									<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
										&#xe6a9;
									</i>
									<strong><p style="color:black;">&nbsp;写来访</p></strong>
								</a>
							</div><?php endif; ?>
						<?php if(($is_rbactx) == "1"): ?><div style="width: 72px;float: left;">
								<a href="javascript:;" onclick="layer_show('写提醒','<?php echo U('Kyneirong/tixing',array('kyid'=>$keyuan['id'],'kywhr'=>$kywhr));?>','800','500')" style="text-decoration:none">
									<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
										&#xe6c5;
									</i>
									<strong><p style="color:black;">写提醒</p></strong>
								</a>
							</div><?php endif; endif; ?>
					<?php if(($keyuan['zhuangtai']) == "3"): ?><div style="width: 72px;float: left;color: red">
							<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
								&#xe6a7;
							</i>
							<strong>已成交</strong>
						</div><?php endif; ?>
					<?php if(($keyuan['zhuangtai']) == "1"): if(($is_rbacsc) == "1"): ?><div style="width: 72px;float: left;">
								<a href="javascript:;" onclick="delkeyuan(this,'<?php echo ($keyuan['id']); ?>','<?php echo ($kywhr); ?>')" style="text-decoration:none">
									<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
										&#xe6e2;
									</i>
									<strong><p style="color:black;">&nbsp;&nbsp;删除</p></strong>
								</a>
							</div><?php endif; endif; endif; ?>
				<div style="width: 72px;float: left;">
					<a title="刷新" href="javascript:location.replace(location.href);" onclick="" style="text-decoration:none">
						<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
							&#xe68f;
						</i>
						<strong><p style="color:black;">&nbsp;&nbsp;刷新</p></strong>
					</a>
				</div>
				<div style="width: 72px;float: left;">
					<a title="关闭" href="javascript:;" onclick="parent.removeIframe()" style="text-decoration:none">
						<i class="Hui-iconfont" style="font-size:50px;line-height:10px;">
							&#xe706;
						</i>
						<strong><p style="color:black;">&nbsp;&nbsp;关闭</p></strong>
					</a>
				</div>
			</div>
		</div>
		<div id="tab_demo" class="HuiTab">
			<div class="row cl">
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div id="tab_demo" class="formControls col-xs-10 col-sm-10 col-md-10">
					<div class="tabBar clearfix">
						<span style="font-size:15px">基本信息</span>
						<span style="font-size:15px">需求小区</span>
						<span style="font-size:15px">录入信息</span>
						<span style="font-size:15px">回访记录</span>
						<span style="font-size:15px">来访记录</span>
						<span style="font-size:15px">提醒记录</span>
						<span style="font-size:15px">日志</span>
					</div>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="row cl">
					<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
					<div id="tab_demo" class="formControls col-xs-10 col-sm-10 col-md-10">
						<div style="float: left;width:69.5%;">
							<table border="1">
								<tr>
									<th style="color:black;font-size:15px">
										<div style="line-height:10PX;">&nbsp;</div>
										<div style="font-size:30px;" align="center" class="formControls col-xs-12 col-sm-12 col-md-12">
											<strong>[<?php echo ($keyuan['xqbianhao']); ?>]<?php echo ($xiaoqum); ?></strong>
										</div>
										<div style="line-height:5PX;">&nbsp;</div>
										<div class="formControls col-xs-12 col-sm-12 col-md-12">
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													客户姓名：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php echo ($keyuan['khxingming']); ?>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													客户等级：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php echo ($kydengji); ?>
											</div>
										</div>
										<div style="line-height:5PX;">&nbsp;</div>
										<div class="formControls col-xs-12 col-sm-12 col-md-12">
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													需求小区：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php echo ($keyuan["xqxiaoqu"]); ?>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													需求价格：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php if($keyuan["xqjiage1"] and $keyuan["xqjiage2"]): echo ($keyuan["xqjiage1"]); ?>元~<?php echo ($keyuan["xqjiage2"]); ?>元
													<?php elseif($keyuan["xqjiage1"]): ?>
													<?php echo ($keyuan["xqjiage1"]); ?>元以上
													<?php elseif($keyuan["xqjiage2"]): ?>
													<?php echo ($keyuan["xqjiage2"]); ?>元以下<?php endif; ?>
											</div>
										</div>
										<div style="line-height:5PX;">&nbsp;</div>
										<div class="formControls col-xs-12 col-sm-12 col-md-12">
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													需求面积：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php if($keyuan["xqmianji1"] and $keyuan["xqmianji2"]): echo ($keyuan["xqmianji1"]); ?>m²~<?php echo ($keyuan["xqmianji2"]); ?>m²
													<?php elseif($keyuan["xqmianji1"]): ?>
													<?php echo ($keyuan["xqmianji1"]); ?>m²以上
													<?php elseif($keyuan["xqmianji2"]): ?>
													<?php echo ($keyuan["xqmianji2"]); ?>m²以下<?php endif; ?>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													需求户型：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php if($keyuan["xqhuxing1"] and $keyuan["xqhuxing2"]): echo ($keyuan["xqhuxing1"]); ?>室~<?php echo ($keyuan["xqhuxing2"]); ?>室
													<?php elseif($keyuan["xqhuxing1"]): ?>
													<?php echo ($keyuan["xqhuxing1"]); ?>室以上
													<?php elseif($keyuan["xqhuxing2"]): ?>
													<?php echo ($keyuan["xqhuxing2"]); ?>室以下<?php endif; ?>
											</div>
										</div>
										<div style="line-height:5PX;">&nbsp;</div>
										<div class="formControls col-xs-12 col-sm-12 col-md-12">
											<div style="margin:0;padding:0;" class="formControls col-xs-2 col-sm-2 col-md-2">
												<span style="float: right;color: #757575">
													需求楼层：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-4 col-sm-4 col-md-4">
												<?php if($keyuan["louceng1"] and $keyuan["louceng2"]): echo ($keyuan["louceng1"]); ?>~<?php echo ($keyuan["louceng2"]); ?>层
													<?php elseif($keyuan["louceng1"]): ?>
													<?php echo ($keyuan["louceng1"]); ?>层以上
													<?php elseif($keyuan["louceng2"]): ?>
													<?php echo ($keyuan["louceng2"]); ?>层以下<?php endif; ?>
											</div>
										</div>
										<div style="line-height:10PX;">&nbsp;</div>
									</th>
								</tr>
								<tr>
									<th>
										<div style="line-height:10PX;">&nbsp;</div>
										<div class="formControls col-xs-12 col-sm-12 col-md-12">
											<div style="margin:0;padding:0;" class="formControls col-xs-3 col-sm-2 col-md-1">
												<span style="float: right;color: #757575">
													备注：
												</span>
											</div>
											<div style="margin:0;padding:0;" class="formControls col-xs-9 col-sm-10 col-md-11">
												<?php echo ($keyuan['beizhu']); ?>
											</div>
										</div>
										<div style="line-height:10PX;">&nbsp;</div>
									</th>
								</tr>
							</table>
						</div>
						<div style="float:right;width:30%;">
							<?php if($keyuan['zhuangtai'] == 3): ?><div>
									<table border="1">
										<tr>
											<th style="font-size:15px;color: black" >
												<div class="formControls col-xs-10 col-sm-10 col-md-10" >
													<span style="color: #757575">
														成交房源:
													</span>
													<?php echo ($kycjxq['fybianhao']); ?>
													<div style="line-height:5PX;"></div>
												</div>
											</th>
										</tr>
									</table>
								</div><?php endif; ?>
							<div style="line-height:5PX;">&nbsp;</div>
							<div>
								<table border="1">
									<tr>
										<th style="font-size:18px;color: black">
											<div style="line-height:5PX;">&nbsp;</div>
											&nbsp;&nbsp;&nbsp;最近7天：
											<h1 align="center"><?php echo ($daikanshu); ?>次带看</h1>
											<div style="line-height:5PX;">&nbsp;</div>
										</th>
									</tr>
								</table>
							</div>
							<div style="line-height:5PX;">&nbsp;</div>
							<div>
								<table border="1">
									<tr>
										<th style="font-size:15px;color: black">
											<div class="formControls col-xs-10 col-sm-10 col-md-10">
												<div style="line-height:5PX;">&nbsp;</div>
												<span style="color: #757575">
													客户：
												</span>
												<?php echo ($keyuan["khxingming"]); echo ($kehulx); ?>
												<div style="line-height:5PX;"></div>
												<i class="Hui-iconfont" style="color: #757575">&#xe6a3;</i>
												<a href="tel:<?php echo ($keyuan['dianhua']); ?>" style="text-decoration: none;color: red;">
													<?php echo ($keyuan["dianhua"]); ?>
												</a>
												<div style="line-height:5PX;"></div>
												<i class="Hui-iconfont" style="color: #757575">&#xe6a3;</i>
												<a href="tel:<?php echo ($keyuan['dianhua2']); ?>" style="text-decoration: none;color: red;">
													<?php echo ($keyuan["dianhua2"]); ?>
												</a>
												<div style="line-height:5PX;">&nbsp;</div>
											</div>
										</th>
									</tr>
								</table>
							</div>
							<div style="line-height:5PX;">&nbsp;</div>
							<div style="text-align: center;">
								<?php if(($keyuan['isdel']) == "2"): if(($keyuan['zhuangtai']) == "1"): if(($is_rbacxq) == "1"): ?><a class="layui-btn layui-btn-danger" href="javascript:;" onclick="layer_show('修改客户详细信息','<?php echo U('Kyneirong/xgkhxxxx',array('id'=>$keyuan['id'],'kywhr'=>$kywhr));?>','666')" style="text-decoration:none;background: tomato;">
												<i class="Hui-iconfont">&#xe60c;</i> 修改详情
											</a><?php endif; endif; endif; ?>
								<?php if(($is_rbacck) == "1"): ?><a class="layui-btn layui-btn-danger" href="javascript:;" onclick="layer_show('客户详细信息','<?php echo U('Kyneirong/ckkhxxxx',array('id'=>$keyuan['id'],'kywhr'=>$kywhr));?>','666')" style="text-decoration:none;background: yellowgreen;margin-left: 20px;">
										<i class="Hui-iconfont">&#xe720;</i> 客户详情
									</a><?php endif; ?>
							</div>
							<div style="line-height:5PX;">&nbsp;</div>
							<div>
								<table border="1">
									<tr>
										<th style="color: #757575;font-size:15px">
											&nbsp;相关用户
										</th>
										<th></th>
										<th></th>
									</tr>
									<tr>
										<th style="width:80px;color:black;font-size:15px">
											<div align="right" style="color: #757575;">
												录入人：&nbsp;
											</div>
										</th>
										<th style="color:black;font-size:15px">
											&nbsp;&nbsp;&nbsp;<?php echo ($luru['bmming']); ?>-<?php echo ($luru["ygmingcheng"]); ?>
											<div style="line-height:5PX;"></div>
											<span style="color: #757575">
												&nbsp;&nbsp;&nbsp;电话:
											</span>
											<span style="color: black">
												&nbsp;&nbsp;&nbsp;
												<a href="tel:<?php echo ($luru['dianhua']); ?>" style="text-decoration: none;color: red;">
													<?php echo ($luru['dianhua']); ?>
												</a>
											</span>
										</th>
										<th></th>
									</tr>
									<tr>
										<th style="width:80px;color:black;font-size:15px">
											<div align="right" style="color: #757575;">
												经办人：&nbsp;
											</div>
										</th>
										<th style="color:black;font-size:15px">
											&nbsp;&nbsp;&nbsp;<?php echo ($weihu['bmming']); ?>-<?php echo ($weihu["ygmingcheng"]); ?>
											<div style="line-height:5PX;"></div>
											<span style="color: #757575">
												&nbsp;&nbsp;&nbsp;电话:
											</span>
											<span style="color: black">
												&nbsp;&nbsp;&nbsp;
												<a href="tel:<?php echo ($weihu['dianhua']); ?>" style="text-decoration: none;color: red;">
													<?php echo ($weihu['dianhua']); ?>
												</a>
											</span>
										</th>
										<th>
											<?php if(($keyuan['isdel']) == "2"): if(($keyuan['zhuangtai']) == "1"): ?><div align="center">
														<?php if(($is_rbacwh) == "1"): ?><a title="变更经办人" href="javascript:;" onclick="layer_show('变更经办人','<?php echo U('Kyneirong/bgwhr',array('id'=>$keyuan['id'],'kywhr'=>$kywhr));?>','540','400')" style="text-decoration:none;background: peru;" class="layui-btn layui-btn-danger layui-btn-small">
																<i class="Hui-iconfont">&#xe692;</i> 变更经办人
															</a><?php endif; ?>
													</div><?php endif; endif; ?>
										</th>
									</tr>
									<tr>
										<th style="width:80px;color:black;font-size:15px">
											<div align="right" style="color: #757575;">
												经纪人：&nbsp;
											</div>
										</th>
										<th style="color:black;font-size:15px">
											&nbsp;&nbsp;&nbsp;<?php echo ($keyuan['jingjiren']); ?>
										</th>
										<th></th>
									</tr>
								</table>
							</div>
						</div>
					</div>
				</div>
				<div>&nbsp;</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr>
								<th scope="col" colspan="12" style="color:black;font-size:16px">
									<strong>需求小区</strong>
								</th>
							</tr>
							<tr class="text-c">
								<th style="color:black;font-size:15px">
									<strong>小区名</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>项目经理</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>指定销售</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>添加人</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(($bxq) == "1"): ?><tr class="text-c">
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($bxqm); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($bxqjlm); ?></strong>
									</td>
									<td>
										<strong><?php echo ($weihu["ygmingcheng"]); ?></strong>
									</td>
									<td>
										<strong><?php echo ($weihu["ygmingcheng"]); ?></strong>
									</td>
								</tr><?php endif; ?>
							<?php if(is_array($xqxiaoqu)): foreach($xqxiaoqu as $key=>$xq): ?><tr class="text-c">
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($xq['xiaoqum']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($xq['xmjlm']); ?></strong>
									</td>
									<td>
										<strong><?php echo ($xq['xqzdxs']); ?></strong>
									</td>
									<td>
										<strong><?php echo ($xq['xqtjr']); ?></strong>
									</td>
								</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr>
								<th scope="col" colspan="12" style="color:black;font-size:16px">
									<strong>录入信息</strong>
								</th>
							</tr>
							<tr class="text-c">
								<th style="color:black;font-size:15px">
									<strong>录入人</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>录入时间</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>客户姓名</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>电话一</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>电话二</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>经纪人</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>需求户型</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>需求价格</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>需求面积</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>需求楼层</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>需求小区</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>需求备注</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($kydclr)): foreach($kydclr as $key=>$lr): ?><tr class="text-c">
									<td>
										<strong><?php echo ($lr["lururen"]); ?></strong>
									</td>
									<td>
										<strong><?php echo ($lr["lurusj"]); ?></strong>
									</td>
									<td>
										<strong><?php echo ($lr["khxm"]); ?></strong>
									</td>
									<td>
										<strong><?php echo ($lr["dianhua"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd1ys']); ?>"><?php echo ($lr["dianhua2"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd2ys']); ?>"><?php echo ($lr["jingjiren"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd3ys']); ?>"><?php echo ($lr["huxing"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd4ys']); ?>"><?php echo ($lr["jiage"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd5ys']); ?>"><?php echo ($lr["mianji"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd6ys']); ?>"><?php echo ($lr["louceng"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd7ys']); ?>"><?php echo ($lr["xqxiaoqu"]); ?></strong>
									</td>
									<td>
										<strong style="<?php echo ($lr['zd8ys']); ?>"><?php echo ($lr["beizhu"]); ?></strong>
									</td>
								</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr>
								<th scope="col" colspan="12" style="color:black;font-size:16px">
									<strong>回访记录</strong>
								</th>
							</tr>
							<tr class="text-c">
								<th style="color:black;font-size:15px">
									<strong>录入时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>回访时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>回访方式</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>回访人</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>所在部门</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>回访内容</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>状态</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>操作</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($kygenjin)): foreach($kygenjin as $key=>$gj): ?><tr class="text-c">
									<td style="font-size:12px;color:black;">
										<strong><?php echo (date('Y-m-d H:i',$gj['time'])); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo (date('Y-m-d H:i',$gj['gjshijian'])); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong>
											<?php if(is_array($genjinfs)): foreach($genjinfs as $key=>$vv): if($gj["genjinfs"] == $vv["lxid"]): echo ($vv['lxming']); endif; endforeach; endif; ?>
										</strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($gj['ygmingcheng']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($gj['bmming']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($gj['gjneirong']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<?php if($gj["zhuangtai"]): ?>有效
											<?php else: ?>
											待审核<?php endif; ?>
									</td>
									<td>
										<?php if((_rbac_btn_show(851,0,$gj['gjuid'])) or (_rbac_node_show(852))): ?><a class="layui-btn layui-btn-small" title="客户回访图片" href="javascript:;" onclick="layer_show('客户回访图片','<?php echo U('ajax/glphotos',array('kyhf'=>$gj['id'],'gltplx'=>'5'));?>','500','210')" style="text-decoration:none;background: darkviolet;">
												<i class="Hui-iconfont">&#xe613;</i> 图片
											</a><?php endif; ?>
									</td>
								</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr>
								<th scope="col" colspan="12" style="color:black;font-size:16px">
									<strong>来访记录</strong>
								</th>
							</tr>
							<tr class="text-c">
								<th style="color:black;font-size:15px;display:none">
									<strong>图片</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>录入时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>来访时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>来访小区</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>接待人</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>所在部门</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>来访内容</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($kydaikan)): foreach($kydaikan as $key=>$dk): ?><tr class="text-c">
									<td style="font-size:12px;color:black;display:none">
										<strong><?php echo ($dk['tupian']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo (date('Y-m-d H:i',$dk['time'])); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo (date('Y-m-d H:i',$dk['dkshijian'])); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($dk['fybh']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($dk['ygmingcheng']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($dk['bmming']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($dk['kehupj']); ?></strong>
									</td>
								</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr>
								<th scope="col" colspan="12" style="color:black;font-size:16px">
									<strong>提醒记录</strong>
								</th>
							</tr>
							<tr class="text-c">
								<th style="color:black;font-size:15px">
									<strong>提醒时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>提醒人</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>所在部门</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>提醒内容</strong>
								</th>
								<th style="color:black;font-size:15px;">
									<strong>添加人</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($kytixing)): foreach($kytixing as $key=>$tx): ?><tr class="text-c">
									<td style="font-size:12px;color:black;">
										<strong><?php echo (date('Y-m-d H:i',$tx['txshijian'])); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($tx['ygmingcheng']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($tx['bmming']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<strong><?php echo ($tx['txneirong']); ?></strong>
									</td>
									<td style="font-size:12px;color:black;">
										<?php $txtjr=M('yonghu')->where(array('id'=>$tx['adduid']))->getField('ygmingcheng'); ?>
										<strong><?php echo ($txtjr); ?></strong>
									</td>
								</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
			<div class="tabCon">
				<div>&nbsp;</div>
				<div class="formControls col-xs-1 col-sm-1 col-md-1"></div>
				<div class="formControls col-xs-10 col-sm-10 col-md-10 kyrz">
					<table class="table table-border table-bordered table-hover table-bg">
						<thead>
							<tr class="text-c">
								<th style="color:black;font-size:15px">
									<strong>时间</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>用户</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>操作类型</strong>
								</th>
								<th style="color:black;font-size:15px">
									<strong>日志内容</strong>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($volist)): $i = 0; $__LIST__ = $volist;if( count($__LIST__)==0 ) : echo "没有日志" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr class="text-c">
									<td style="font-size:12px;color:black;">
										<?php $shij=time()-$v["addtime"];if($shij>259200){echo (date('Y-m-d H:i:s',$v["addtime"]));}else{ echo format_date($v["addtime"]);} ?>
										<?php echo (date('Y-m-d H:i:s',$v['addtime'])); ?>
									</td>
									<td style="font-size:12px;color:black;">
										<?php echo ($v["ygmingcheng"]); ?>
									</td>
									<td style="font-size:12px;color:black;">
										<?php if(($v['cz_type']) == "1"): ?>新增<?php endif; ?>
										<?php if(($v['cz_type']) == "2"): ?>基础修改<?php endif; ?>
										<?php if(($v['cz_type']) == "3"): ?>转为私客<?php endif; ?>
										<?php if(($v['cz_type']) == "4"): ?>转为公客<?php endif; ?>
										<?php if(($v['cz_type']) == "5"): ?>写回访<?php endif; ?>
										<?php if(($v['cz_type']) == "7"): ?>核心修改<?php endif; ?>
										<?php if(($v['cz_type']) == "8"): ?>删除<?php endif; ?>
										<?php if(($v['cz_type']) == "9"): ?>变更维护人<?php endif; ?>
										<?php if(($v['cz_type']) == "12"): ?>上传图片<?php endif; ?>
										<?php if(($v['cz_type']) == "13"): ?>删除图片<?php endif; ?>
										<?php if(($v['cz_type']) == "14"): ?>封盘<?php endif; ?>
										<?php if(($v['cz_type']) == "15"): ?>开盘<?php endif; ?>
										<?php if(($v['cz_type']) == "16"): ?>写提醒<?php endif; ?>
										<?php if(($v['cz_type']) == "17"): ?>写来访<?php endif; ?>
										<?php if(($v['cz_type']) == "20"): ?>下载图片<?php endif; ?>
										<?php if(($v['cz_type']) == "24"): ?>变更状态<?php endif; ?>
										<?php if(($v['cz_type']) == "25"): ?>设置图片类型<?php endif; ?>
										<?php if(($v['cz_type']) == "26"): ?>设置意向房屋<?php endif; ?>
									</td>
									<td style="font-size:12px;color:black;">
										<?php echo ($v["neirong"]); ?>
									</td>
								</tr><?php endforeach; endif; else: echo "没有日志" ;endif; ?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

		<script type="text/javascript" src="/Public/lib/jquery/1.9.1/jquery.min.js"></script> 
		<script type="text/javascript" src="/Public/lib/layer/2.4/layer.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui/js/H-ui.min.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui.admin/js/H-ui.admin.js"></script>
		<script>
			$(document).ready(function(){
				$(document).bind("contextmenu",function(e){
					return false;
				});
			});
		</script>
		
	<script src="/Public/lib/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript">
		jQuery.Huitab =function(tabBar,tabCon,class_name,tabEvent,i){
			var $tab_menu=$(tabBar);
			//初始化操作
			$tab_menu.removeClass(class_name);
			$(tabBar).eq(i).addClass(class_name);
			$(tabCon).hide();
			$(tabCon).eq(i).show();
			$tab_menu.bind(tabEvent,function(){
				$tab_menu.removeClass(class_name);
				$(this).addClass(class_name);
				var index=$tab_menu.index(this);
				$(tabCon).hide();
				$(tabCon).eq(index).show()
			})
		}
		$(function(){
			$.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")
		});
	</script>
	<script type="text/javascript">
		function delkeyuan(obj,id,kywhr){
			layer.confirm('您确定要删除此客户吗？',function(index){
				$.ajax({
					type: 'POST',
					url: '<?php echo U('Kyneirong/delkeyuan');?>',
					data:{'id':id,'kywhr':kywhr},
					dataType: 'json',
					success: function(data){
						if (data.status) {
							layer.msg(data.info, {icon: 1}, function(){});
						}else{
							layer.msg(data.info, function(){
								//关闭后的操作
							});
						}
					},
					error:function(data) {
						console.log(data.msg);
					},
				});
			});
		}
	</script>

	</body>
</html>