38d22421 by 任超

style:预约结果

1 parent e76ce27f
......@@ -33,9 +33,9 @@
/* -------------------------------预约日期---------------------------------------- */
.appoint_time {
width: 1200px;
height: 50px;
height: 90px;
margin: 0 auto;
padding: 0 50px;
padding: 0 130px;
box-sizing: border-box;
position: relative;
margin-top: 30px;
......@@ -52,6 +52,13 @@
color: #fff;
cursor: pointer;
}
.swiper-slide li:nth-child(1) {
margin-top: 23px;
}
.swiper-slide li:nth-child(2) {
font-size: 16px;
font-weight: 600;
}
.swiper-slide li {
height: 20px;
font-size: 14px;
......@@ -82,6 +89,10 @@
}
/* -------------分割线----------------------- */
.timeTitle {
display: block;
line-height: 20px;
}
.site-title {
margin: 20px 0;
}
......@@ -267,7 +278,7 @@
}
.next_button {
text-align: center;
margin: 20px 0;
margin: 30px 0;
}
.next_button button {
width: 140px;
......@@ -340,13 +351,16 @@
/* ----------------------------------------------- */
.business_item .item_time {
float: left;
width: 200px;
background-color: #0091FF;
color: #fff;
width: 150px;
margin-right: 15px;
height: 130px;
height: 90px;
text-align: center;
line-height: 130px;
background: #FCFCFC;
border-radius: 2px;
border: 1px solid #DEDEDE;
box-sizing: border-box;
padding-top: 28px;
color: #6D7278;
}
.business_item{
margin-bottom: 10px;
......@@ -355,19 +369,21 @@
.business_item ul {
display: inline-block;
width: 80%;
margin-bottom: 15px;
}
.business_item ul li {
width: 33%;
width: 150px;
height: 90px;
display: inline-block;
background-color:#eee;
color: #fff;
border-radius: 3px;
text-align: center;
margin: 5px 0;
box-sizing: border-box;
color: #666;
cursor: pointer;
padding: 7px 0;
position: relative;
background: #FFFFFF;
border-radius: 2px;
border: 1px solid #DEDEDE;
}
.business_item ul li .mask {
position: absolute;
......@@ -391,4 +407,10 @@
font-size: 12px;
text-align: center;
line-height: 14px;
}
.swiper-button-next, .swiper-container-rtl .swiper-button-prev {
right: 45px;
}
.swiper-button-prev, .swiper-container-rtl .swiper-button-next {
left: 45px;
}
\ No newline at end of file
......
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
var latitude =undefined
var longitude =undefined
var orgname = undefined
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
//监听导航点击
element.on('nav(demo)', function (elem) {
layer.msg(elem.text());
});
});
// 地图
var map = new BMap.Map('container');
var point = new BMap.Point(longitude, latitude);
map.centerAndZoom(point, 15);
// 创建点标记
var marker = new BMap.Marker(point);
map.addOverlay(marker);
// 创建信息窗口
var opts = {
width: 200,
height: 100,
title: orgname
};
var infoWindow = new BMap.InfoWindow( orgname, opts);
// 点标记添加点击事件
map.openInfoWindow(infoWindow, point); // 开启信息窗口
marker.addEventListener('click', function () {
map.openInfoWindow(infoWindow, point); // 开启信息窗口
});
map.enableScrollWheelZoom();
getAppointmentDetail()
getAppointmentDetail()
});
// GET 根据预约信息标识码appointmentId查看预约详情
function getAppointmentDetail(){
function getAppointmentDetail() {
$.ajax({
type: "get", //提交方式
url:
......@@ -41,37 +14,48 @@ function getAppointmentDetail(){
appointmentId: GetRequest(),
},
dataType: "json",
//数据,这里使用的是Json格式进行传输
success: function (result) {
//返回数据根据结果进行相应的处理
if (result.code == 200) {
var renegeCounttotal =undefined
console.log('ff',result)
$('#username').text(result.data.username)
$('#zjhm').text(result.data.zjhm)
$('#orgName').text(result.data.orgName)
$('#hbShortname').text(result.data.hbShortname)
$('#reservationNumber').text(result.data.reservationNumber)
console.log(result.data.bookingDate.substr(0,4))
var year = result.data.bookingDate.substr(0,4) + '年'
var month = result.data.bookingDate.substr(4,2) + '月'
var day= result.data.bookingDate.substr(6,2) + '日'
var startTime= result.data.startTime + '至'
var endTime= result.data.endTime
var yysjtotal = year + month + day + startTime + endTime
$('#yysj').text(yysjtotal)
if(result.data.renegeCount == null){
renegeCounttotal = 0
}else{
renegeCounttotal = result.data.renegeCount
var renegeCounttotal;
$('#username').text(result.data.username);
$('#zjhm').text(result.data.zjhm);
$('#orgName').text(result.data.orgName);
$('#hbShortname').text(result.data.hbShortname);
$('#reservationNumber').text(result.data.reservationNumber);
var year = result.data.bookingDate.substr(0, 4) + '年';
var month = result.data.bookingDate.substr(4, 2) + '月';
var day = result.data.bookingDate.substr(6, 2) + '日';
var startTime = result.data.startTime + '至';
var endTime = result.data.endTime;
var yysjtotal = year + month + day + startTime + endTime;
$('#yysj').text(yysjtotal);
if (result.data.renegeCount == null) {
renegeCounttotal = 0;
} else {
renegeCounttotal = result.data.renegeCount;
}
$('#renegeCount').html(renegeCounttotal)
$('#renegeCount').css('color','red')
longitude= result.data.longitude
latitude= result.data.latitude
orgname= result.data.orgName
}
$('#renegeCount').html(renegeCounttotal);
$('#renegeCount').css('color', 'red');
// 地图
var map = new BMap.Map('container');
var point = new BMap.Point( result.data.longitude, result.data.latitude);
map.centerAndZoom(point, 15);
// 创建点标记
var marker = new BMap.Marker(point);
map.addOverlay(marker);
// 创建信息窗口
var opts = {
width: 200,
height: 100
};
var infoWindow = new BMap.InfoWindow(result.data.orgName, opts);
// 点标记添加点击事件
map.openInfoWindow(infoWindow, point); // 开启信息窗口
marker.addEventListener('click', function () {
map.openInfoWindow(infoWindow, point); // 开启信息窗口
});
map.enableScrollWheelZoom();
}
},
});
}
......@@ -89,4 +73,3 @@ function GetRequest() {
}
return theRequest.appointmentId;
}
\ No newline at end of file
......
......@@ -69,7 +69,6 @@ function getAppointmentDay() {
}
//渲染预约日期列表
function RenderbookingDateList(data) {
let DateConnect = "";
......@@ -125,7 +124,13 @@ function RenderBusinessList(data) {
let businessContent = "";
$.each(data.appointmentPeriodBusinessList, function (index, item) {
businessContent += '<div class="business_item">';
businessContent += '<div class="item_time"><span>上午</span> <span>' + item.startTime + '</span><span>-</span><span>' + item.endTime + '</span></div>';
businessContent += '<div class="item_time">'
if(getTime(item.startTime)){
businessContent += '<h3 class="timeTitle">下午</h3>'
}else {
businessContent += '<h3 class="timeTitle">上午</h3>'
}
businessContent += '<span>' + item.startTime + '</span><span>-</span><span>' + item.endTime + '</span></div>';
businessContent += '<ul>';
$.each(item.orgBusinessList, function (childIndex, childItem) {
//存在预约记录
......@@ -157,6 +162,16 @@ function RenderBusinessList(data) {
businessDiv.html(businessContent);
}
function getTime(time){
var isTime;
if((time.split(":")[0]-0)>12) {
isTime = true;
}else {
isTime = false;
}
return isTime;
}
// 根据办事大厅机构ID、用户ID检查用户是否存在预约限制
function checkAppointment() {
let msg;
......
......@@ -99,7 +99,7 @@
</li>
<li>
<span>预约时间:</span>
<p id="yysj">2020年10月16日上午 11:00</p>
<p id="yysj"></p>
</li>
</ul>
</div>
......
......@@ -77,34 +77,14 @@
<div class="next_button">
<button type="button" class="layui-btn layui-btn-normal">
<!-- <a href="./yyxz.html" title="上一步">
上一步
</a> -->
<a href="./xzqy.html" title="上一步"> 上一步 </a>
</button>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript" src="../staticJs/common.js"></script>
<script type="text/javascript" src="../staticJs/down.js"></script>
<script src="../staticJs/swiper-bundle.min.js"></script>
<script type="text/javascript" src="../staticJs/yysj.js"></script>
<!-- <script id="date" type="text/html">
{{# layui.each(d.dateList, function(index, item){ }}
{{# if(item.isSelect){ }}
<ul class="swiper-slide layui-bg-gray active1">
<li>{{item.week}}</li>
<li>{{item.jyjh}}</li>
</ul>
{{# } }}
{{# if(!item.isSelect){ }}
<ul class="swiper-slide layui-bg-gray">
<li>{{item.week}}</li>
<li>{{item.jyjh}}</li>
</ul>
{{# } }} {{# }); }}
</script> -->
\ No newline at end of file
<script type="text/javascript" src="../staticJs/yysj.js"></script>
\ No newline at end of file
......