<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>

<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	<meta name="author" content="" />
	<meta name="viewport"
		content="width=device-width,height=device-height, user-scalable=no,initial-scale=1, minimum-scale=1, maximum-scale=1,target-densitydpi=device-dpi ">
	<meta name="robots" content="" />
	<title>访客预约</title>
	<script type="text/javascript" src="${ctx }/scripts/jquery/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="${ctx }/scripts/lib/plugins/qrcode/jquery.qrcode.min.js"></script>
	<script type="text/javascript" src="${ctx }/scripts/visitor/exif.js?v=4.0"></script>
	<script type="text/javascript" src="${ctx }/scripts/mobileBUGFix.mini.js?v=4.0"></script>
	<script type="text/javascript" src="${ctx }/scripts/visitor/visitorinfo.js?v=2.1213"></script>
	<link rel="stylesheet" href="${ctx }/styles/visitor/visitorinfo.css?v=20221107" type="text/css">
	<link rel="stylesheet" type="text/css" href="${ctx }/styles/visitor/loadview.css" />
	<link rel="stylesheet" href="${ctx }/styles/visitor/layer.css" type="text/css">
	<script type="text/javascript" src="${ctx }/scripts/visitor/controlOptionMenu.js?v=4.0"></script>
	<script type="text/javascript" src="${ctx }/scripts/visitor/layer.js?v=4.0"></script>
</head>
<input type="hidden" id="ctx" value="${ctx }" />
<input type="hidden" id="imageServer" value="${imageServer }" />

<body>
	<input type="hidden" id="ctx" value="${ctx }" />
	<form:form action="${ctx }/wechat/visitor/updateVisitorInfo" method="post" id="updateuserform" style="width: 100%"
		class="clearfix">

		<input type="hidden" name="visitorId" value="${visitorInfo.visitorId }" id="visitorId" />
		<input type="hidden" name="imageUrl" value="${visitorInfo.imageUrL }" id="imageUrl" />
		<input type="hidden" name="openId" value="${openId }" id="openId">
		<input type="hidden" name="qrCode" value="${qrCode}" id="qrCode">
		<input type="hidden" id="visitorQrCode" value="${visitorQrCode}" />
		<input type="hidden" id="passType" value="${passType}" />
		<input type="hidden" name="orgId" id="orgId" value="${organization.id}" />
		<div class="bottomView" style="background:transparent;box-shadow: none;">
			<c:if test="${organization.id != 615&&organization.id != 969&&organization.id != 1247}">
				<div>
					<c:if test="${fn:contains(passType,'0')}">
						<div class="clearfix">
							<p class="title" style="">
								<c:if test="${visitorInfo.visitorAccount==0 }">
									<c:if test="${empty visitorInfo.imageUrL }">
										请使用密码进入
									</c:if>
								</c:if>
								<c:if test="${visitorInfo.visitorAccount==0 }">
									<c:if test="${not empty visitorInfo.imageUrL }">
										直接刷脸进入,无需排队
									</c:if>
								</c:if>
								<c:if test="${visitorInfo.visitorAccount==1 }">
									<c:if test="${empty visitorInfo.imageUrL }">
										添加头像, 直接刷脸进入,无需排队
									</c:if>
								</c:if>
							</p>
							<p class="reservationCode" style="">预约码</p>
							<p class="reservationCodeNum" style="">${visitorInfo.visitorPassword }</p>
							<p class="titles" style="">通行卡兑换凭证</p>
							<p class="reservationCodeTime" style="">有效时间：${dateweek }&nbsp;${visitorInfo.week }&nbsp;
									${visitorInfo.toDate }</p>
						</div>
					</c:if>
					<c:if test="${fn:contains(passType,'2')}">
						<div class="qrcode_wrap"
							 style="margin-top: 20px;font-size: 18px;color: #019C61;background: #ffffff;border-radius: 10px;margin-bottom: 20px;">
							<p class="qrcode_title">通行码</p>
							<p style="font-size: 15px;color: #333333;text-align:center;padding-bottom:10px">可在闸机二维码读头设备处扫码通行</p>
							<div class="qrcode_img_wrap">
								<div id="visitorCode"></div>
							</div>
							<p class="qrcode_tip ">二维码当日有效，截止当日时间23:59:59</p>
						</div>
					</c:if>
					<c:if test="${fn:contains(passType,'3')}">
						<div class="qrcode_wrap"
							 style="margin-top: 20px;font-size: 18px;color: #019C61;background: #ffffff;border-radius: 10px;margin-bottom: 20px;">
							<p class="qrcode_title">请在客服处扫码打印访客单</p>
							<div class="qrcode_img_wrap">
								<div id="code"></div>
							</div>
							<p class="qrcode_tip ">二维码当日有效，截止当日时间23:59:59</p>
						</div>
					</c:if>
				</div>
			</c:if>
			<div class="net net_box" id="headradius" style="padding-top: 20px;border-radius: 10px">
				<c:if test="${organization.id == 615||organization.id == 969||organization.id == 1247}">
					<img id="headimg" type="hidden"  style="margin-left: 15px;width: calc(100% - 30px);"
						 src="https://superdesk.avic-s.com/super_cloud/attachment/visitorImg/visitor_image.png?v=20221107" />
				</c:if>
				<c:if test="${organization.id != 615&&organization.id != 969&&organization.id != 1247}">
					<div id="headtext" type="hidden" class="welcome-text">
						<div style="flex: 1;">欢迎到访</div>
						<div class="welcome-img"></div>
					</div>
				</c:if>
				<div class="headTime head_font">
					${visitorInfo.toDate }&nbsp;${visitorInfo.week }&nbsp;&nbsp;共<span style="color: #019C61;">${visitorInfo.count}</span>位同行
				</div>
				<div class="box-line"></div>
				<div class="surveyed_init">访客信息</div>
				<div class="user-info-box">
					<div class="info-cell">
						<div class="info-title">访客姓名：</div>
						<div>${visitorInfo.visitorName }</div>
					</div>
					<div class="info-cell">
						<div class="info-title">手机号码：</div>
						<div>${visitorInfo.visitorPhone}</div>
					</div>
				</div>
				<c:if test="${not empty visitorInfo.clientUserName}">
					<div class="surveyed_init">被访信息</div>
					<div class="user-info-box">
						<div class="info-cell">
							<div class="info-title">被&nbsp;&nbsp;访&nbsp;人：</div>
							<div>${visitorInfo.clientUserName }</div>
						</div>
						<div class="info-cell">
							<div class="info-title">手机号码：</div>
							<div><a style="color:#019C61;" href="tel:${visitorInfo.clientPhone}">${visitorInfo.clientPhone}</a></div>
						</div>
						<div class="info-cell">
							<div class="info-title">公司地址：</div>
							<div>${visitorInfo.clientAddress}</div>
						</div>
					</div>
				</c:if>

				<div class="floatingHead">
					<!-- <c:choose>
						<c:when test="${fn:contains(passType,'4')}">
							<div>
								<span class="peerName" style="">${visitorInfo.visitorName }</span>
								<a href="tel:${visitorInfo.visitorPhone }" class="peerPhoto"
									style="text-decoration: none;">${visitorInfo.visitorPhone }</a>
							</div>
						</c:when>

						<c:when test="${fn:contains(passType,'2')}">
							<div class="passType_pic">
								<span class="peerName" style="">${visitorInfo.visitorName }:</span>
								<a href="tel:${visitorInfo.visitorPhone }" class="peerPhoto"
									style="text-decoration: none;">${visitorInfo.visitorPhone }</a>
							</div>
						</c:when>

						<c:otherwise>
							<div>
								<span class="peerName" style="">${visitorInfo.visitorName }</span>
								<a href="tel:${visitorInfo.visitorPhone }" class="peerPhoto"
									style="text-decoration: none;">${visitorInfo.visitorPhone }</a>
							</div>
						</c:otherwise>

					</c:choose> -->

					<input type="hidden" id="updateImageUrl" name="updateImageUrl" />
					<input type="hidden" id="updateShowImageUrl" name="updateShowImageUrl" />
					<input type="hidden" id="updateImageFacePlusId" name="updateImageFacePlusId" />
					<!-- face++ -->
					<!-- <c:if test="${fn:contains(passType,'4')}">
						<div id="showImage" style='width: 25%;height: 2rem;'>
							<c:if test="${visitorInfo.visitorAccount==1 }">
								<span class="headPortraitSpan"></span>
								<input type="file" id="fileClick" class="headPortrait" pictype="30010003" data-role="none"
									accept="image/*" style="opacity: 0;">
							</c:if>
							<c:if test="${visitorInfo.visitorAccount==0 }">
								<c:if test="${not empty visitorInfo.imageUrL }">
									<img src="${visitorInfo.imageUrL }" alt=''
										style='max-width: 4rem;width: auto;height: 4rem;position: absolute;left: 2.5rem;top: 2rem;z-index: 2;'>
								</c:if>
								<c:if test="${empty visitorInfo.imageUrL }">
									<span class="headPortraitSpanb"></span>
								</c:if>
							</c:if>
						</div>
					</c:if> -->

				</div>
			</div>
		</div>
		<!-- face++ -->
		<c:if test="${fn:contains(passType,'1')}">
			<c:if test="${visitorInfo.visitorAccount==1 }">
				<input class="confirmBtn" type="button" value="确认" id="updateVIsitorUser" />
			</c:if>
		</c:if>
	</form:form>
	<!-- face++ -->
	<c:if test="${fn:contains(passType,'1')}">
		<div id="tcc" class="tcbj1" style="display:none;">
			<div class="tcck1">
				<div class="load-container load4">
					<div class="loader">Loading...</div>
				</div>
			</div>
		</div>
		<div class="visitormask">
			<div class="visitorcon">
				<p>预约成功</p>
				<a href="javascript:$('.visitormask').hide();" title="确定">确定</a>
			</div>
		</div>
	</c:if>
</body>
<script type="text/javascript">

	$(document).ready(function () {
		$(window).resize(infinite);
		infinite();
		if ($('#orgId').val() != 615&&$('#orgId').val() != 969&&$('#orgId').val() != 1247) {
			$('#code').qrcode({
				width: 138,
				height: 138,
				text: $('#qrCode').val()
			})
			$('#visitorCode').qrcode({
				width: 138,
				height: 138,
				text: $('#visitorQrCode').val()
			})
		}

		console.log('显示详情')
		$("#detailsbtn").click(function () {
			console.log('显示详情111');
			var _this = $(this);
			$(".openOrColse").slideToggle("slow");
			if (!_this.hasClass("detailsup")) {
				_this.addClass("detailsup");
			} else {
				_this.removeClass("detailsup");
			}
		});
		function infinite() {
			var htmlWidth = $('html').width();
			if (htmlWidth >= 320) {
				$("html").css({
					"font-size": "12px"
				});
			} else {
				$("html").css({
					"font-size": 12 / 320 * htmlWidth + "px"
				});
			}
		}
	});

</script>

</html>
