<?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 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"/>
		<!--[if lt IE 9]>
		<script type="text/javascript" src="/Public/lib/html5shiv.js"></script>
		<script type="text/javascript" src="/Public/lib/respond.min.js"></script>
		<![endif]-->
		<link rel="stylesheet" href="/Public/lib/layui1/css/layui.css" >
		<style type="text/css">
			.bghui{
				background-color: #FCFCFC;
			}
			.f20{
				font-size:18px;font-family:'Microsoft Yahei';
			}
			.layui-tab-title li{
				font-size:18px;font-family:'Microsoft Yahei';
			}
			.layui-col-space10>* {
				padding: 0px 5px;
			}
			.layui-tab {
				margin:10px 0 0 0 ;
			}
			.layui-table img {
				max-width: 150px;
			}
			table td,table th li{
				text-align:center;
			}
			.dizhi {
				max-width: 180px;
			}
			table tbody tr td li {
				width:100%;
				white-space:nowrap;
				text-overflow:ellipsis;
				-o-text-overflow:ellipsis;
				overflow: hidden;
			}
		</style>
		<title>我的桌面</title>
	</head>
	<body class="bghui">
		<div class="layui-container">
			<div class="layui-card" style="margin:0 0 5px 0;">
				<div class="layui-card-header f20">快捷按钮</div>
				<div class="layui-card-body">
					<div class="">
						<div class="layui-row">
							<div class="layui-col-md3" style="text-align: center;">
								<a data-href="<?php echo U('admin/xinfang/xiaoqu');?>" data-title="小区查询" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class="layui-btn layui-btn-radius layui-btn-primary">
									小区查询
								</a>
							</div>
							<div class="layui-col-md3" style="text-align: center;">
								<a data-href="<?php echo U('admin/keyuan1/index');?>" data-title="客户管理" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class="layui-btn layui-btn-radius layui-btn-primary" >
									客户查询
								</a>
							</div>
							<div class="layui-col-md3" style="text-align: center;">
								<a onClick="layer_show('新增客户','<?php echo U('Keyuan1/addKeyuan',array('mmzl'=>1));?>',1024,764)" class="layui-btn layui-btn-radius layui-btn-primary">
									新增客户
								</a>
							</div>
							<div class="layui-col-md3" style="text-align: center;">
								<a class="layui-btn layui-btn-radius layui-btn-primary black" href="javascript:location.replace(location.href);">
									刷新页面
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-container">
			<div class="layui-row layui-col-space10">
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">个人最新预定</div>
						<div class="layui-card-body" style="height: 200px;">
							<table class="layui-table" lay-even lay-skin="nob" lay-size="sm" style="margin-top: -3px;">
									<colgroup>
									<col width="80">
									<col width="180">
									<col>
								</colgroup>
								<thead>
									<tr>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">编号</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">地址</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">预定时间</li></th>
									</tr>
								</thead>
								<tbody>
									<?php if(is_array($yuding)): foreach($yuding as $key=>$c): ?><tr>
											<td><li><a data-href="<?php echo U('admin/xinfang/neirong',array('id'=>$c['id']));?>" data-title="预定<?php echo ($c['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($c['cjbianhao']); ?></li></a></td>
											<td><li class="dizhi"><a data-href="<?php echo U('admin/xinfang/neirong',array('id'=>$c['id']));?>" data-title="预定<?php echo ($c['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($c['dizhi']); ?></a></li></td>
											<td><li><?php echo (date("Y-m-d",$c['ydshijian'])); ?></li></td>
										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">个人最新成交</div>
						<div class="layui-card-body" style="height: 200px;">
							<table class="layui-table" lay-even lay-skin="nob" lay-size="sm" style="margin-top: -3px;">
									<colgroup>
									<col width="80">
									<col width="180">
									<col>
								</colgroup>
								<thead>
									<tr>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">编号</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">地址</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">成交时间</li></th>
									</tr>
								</thead>
								<tbody>
									<?php if(is_array($chengjiao)): foreach($chengjiao as $key=>$c): ?><tr>
											<td><li><a data-href="<?php echo U('admin/chengjiao/neirong',array('id'=>$c['id']));?>" data-title="成交<?php echo ($c['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($c['cjbianhao']); ?></li></a></td>
											<td><li class="dizhi"><a data-href="<?php echo U('admin/chengjiao/neirong',array('id'=>$c['id']));?>" data-title="成交<?php echo ($c['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($c['dizhi']); ?></a></li></td>
											<td><li><?php echo (date("Y-m-d",$c['cjtime'])); ?></li></td>
										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">个人信息</div>
						<div class="layui-card-body" style="height:200px">
							<table class="layui-table" lay-even lay-skin="nob">
								<tbody>
									<tr>
										<td>
											<div>
												<?php if($useri["touxiang"] == 1): ?><a href="javascript:;" onClick="layer_show('上传头像','<?php echo U('Index/avatar');?>',600,400);">
														<img id="useravatar" src="/Upload/Avatar/<?php echo session('gongsiid');?>/<?php echo session('username');?>_200.jpg?v=<?php echo mt_rand(1,1000000); ?>" class="img-responsive radius" alt="用户头像" style="width:120px;height: 120px;">
													</a>
													<?php else: ?>
													<a href="javascript:;" onClick="layer_show('上传头像','<?php echo U('Index/avatar');?>',600,400);">
														<img id="useravatar" src="/Public/static/h-ui/images/ucnter/avatar-default.jpg" class="img-responsive radius" alt="用户头像" style="width:120px;height: 155px;">
													</a><?php endif; ?>
											</div>
											<span>点击上图上传头像</span>
										</td>
										<td>
											<div class="col-md-7 col-sm-7 col-xs-7">
												<div style="margin:10px;text-align:left;">
													<span>姓名：</span>
													<span class="pd-15"><?php echo ($useri['ygmingcheng']); ?></span>
												</div>
												<div style="margin:10px;text-align:left;">
													<span>工号：</span>
													<span class="pd-15"><?php echo ($useri['ygbianhao']); ?></span>
												</div>
												<div style="margin:10px;text-align:left;">
													<span>部门：</span>
													<span class="pd-15" title="<?php echo bumen($useri['bumen']);?>"><?php echo ($bmming); ?></span>
												</div>
												<div style="margin:10px;text-align:left;">
													<span>职务：</span>
													<span class="pd-15"><?php echo ($remark); ?></span>
												</div>
												<div style="margin:10px;text-align:left;">
													<span>电话：</span>
													<span class="pd-15"><?php echo ($useri['dianhua']); ?></span>
												</div>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-row layui-col-space10" style="margin-top:-15px;">
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">本项目最新预定</div>
						<div class="layui-card-body" style="height: 200px;">
							<table class="layui-table" lay-even lay-skin="nob" lay-size="sm" style="margin-top: -3px;">
									<colgroup>
									<col width="80">
									<col width="180">
									<col>
								</colgroup>
								<thead>
									<tr>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">预定人</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">地址</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">预定时间</li></th>
									</tr>
								</thead>
								<tbody>
									<?php if(is_array($mdyuding)): foreach($mdyuding as $key=>$md): ?><tr>
											<td><li><a data-href="<?php echo U('admin/xinfang/neirong',array('id'=>$md['id']));?>" data-title="预定<?php echo ($md['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($md['ygmingcheng']); ?></li></a></td>
											<td><li class="dizhi"><a data-href="<?php echo U('admin/xinfang/neirong',array('id'=>$md['id']));?>" data-title="预定<?php echo ($md['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($md['dizhi']); ?></li></a></td>
											<td><li><?php echo (date("Y-m-d",$md['ydshijian'])); ?></li></td>
										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">本项目最新成交</div>
						<div class="layui-card-body" style="height: 200px;">
							<table class="layui-table" lay-even lay-skin="nob" lay-size="sm" style="margin-top: -3px;">
									<colgroup>
									<col width="80">
									<col width="180">
									<col>
								</colgroup>
								<thead>
									<tr>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">成交人</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">地址</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">成交时间</li></th>
									</tr>
								</thead>
								<tbody>
									<?php if(is_array($mdchengjiao)): foreach($mdchengjiao as $key=>$md): ?><tr>
											<td><li><a data-href="<?php echo U('admin/chengjiao/neirong',array('id'=>$md['id']));?>" data-title="成交<?php echo ($md['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($md['ygmingcheng']); ?></li></a></td>
											<td><li class="dizhi"><a data-href="<?php echo U('admin/chengjiao/neirong',array('id'=>$md['id']));?>" data-title="成交<?php echo ($md['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($md['dizhi']); ?></li></a></td>
											<td><li><?php echo (date("Y-m-d",$md['cjtime'])); ?></li></td>
										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="layui-col-md4">
					<div class="layui-card layui-tab layui-tab-card">
						<div class="layui-card-header f20">准意向客户</div>
						<div class="layui-card-body" style="height: 200px;">
							<table class="layui-table" lay-even lay-skin="nob" lay-size="sm" style="margin-top: -3px;">
									<colgroup>
									<col width="80">
									<col width="100">
									<col>
								</colgroup>
								<thead>
									<tr>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">客户姓名</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">编号</li></th>
										<th><li style="color:#009688;font-size:12px;font-weight:bold;">七天带看</li></th>
									</tr>
								</thead>
								<tbody>
									<?php if(is_array($yixiang)): foreach($yixiang as $key=>$y): ?><tr>
											<td><a data-href="<?php echo U('admin/keyuan1/neirong1',array('id'=>$y['id']));?>" data-title="成交<?php echo ($y['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($y["khxingming"]); ?></a></td>
											<td><a data-href="<?php echo U('admin/keyuan1/neirong1',array('id'=>$y['id']));?>" data-title="成交<?php echo ($y['cjbianhao']); ?>" href="javascript:;" onClick="parent.Hui_admin_tab(this)" class=""><?php echo ($y["xqbianhao"]); ?></a></td>
											<td><?php echo ($y["count"]); ?>次</td>
										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
						</div>
					</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/lib/layui1/layui.js" charset="utf-8"></script>
		<script>
			layui.use('element', function(){
				var element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
			});
			function layer_show(title,url,w,h){
				layer.open({
					type: 2,
					offset: '30px',
					area: [w+'px', h +'px'],
					fix: false, //不固定
					maxmin: false,
					skin: 'layui-layer-rim',
					shade:0.4,
					title: title,
					content: url
				});
			}
		</script>
	</body>
</html>