38d22421 by 任超

style:预约结果

1 parent e76ce27f
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
33 /* -------------------------------预约日期---------------------------------------- */ 33 /* -------------------------------预约日期---------------------------------------- */
34 .appoint_time { 34 .appoint_time {
35 width: 1200px; 35 width: 1200px;
36 height: 50px; 36 height: 90px;
37 margin: 0 auto; 37 margin: 0 auto;
38 padding: 0 50px; 38 padding: 0 130px;
39 box-sizing: border-box; 39 box-sizing: border-box;
40 position: relative; 40 position: relative;
41 margin-top: 30px; 41 margin-top: 30px;
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
52 color: #fff; 52 color: #fff;
53 cursor: pointer; 53 cursor: pointer;
54 } 54 }
55 .swiper-slide li:nth-child(1) {
56 margin-top: 23px;
57 }
58 .swiper-slide li:nth-child(2) {
59 font-size: 16px;
60 font-weight: 600;
61 }
55 .swiper-slide li { 62 .swiper-slide li {
56 height: 20px; 63 height: 20px;
57 font-size: 14px; 64 font-size: 14px;
...@@ -82,6 +89,10 @@ ...@@ -82,6 +89,10 @@
82 } 89 }
83 90
84 /* -------------分割线----------------------- */ 91 /* -------------分割线----------------------- */
92 .timeTitle {
93 display: block;
94 line-height: 20px;
95 }
85 .site-title { 96 .site-title {
86 margin: 20px 0; 97 margin: 20px 0;
87 } 98 }
...@@ -267,7 +278,7 @@ ...@@ -267,7 +278,7 @@
267 } 278 }
268 .next_button { 279 .next_button {
269 text-align: center; 280 text-align: center;
270 margin: 20px 0; 281 margin: 30px 0;
271 } 282 }
272 .next_button button { 283 .next_button button {
273 width: 140px; 284 width: 140px;
...@@ -340,13 +351,16 @@ ...@@ -340,13 +351,16 @@
340 /* ----------------------------------------------- */ 351 /* ----------------------------------------------- */
341 .business_item .item_time { 352 .business_item .item_time {
342 float: left; 353 float: left;
343 width: 200px; 354 width: 150px;
344 background-color: #0091FF;
345 color: #fff;
346 margin-right: 15px; 355 margin-right: 15px;
347 height: 130px; 356 height: 90px;
348 text-align: center; 357 text-align: center;
349 line-height: 130px; 358 background: #FCFCFC;
359 border-radius: 2px;
360 border: 1px solid #DEDEDE;
361 box-sizing: border-box;
362 padding-top: 28px;
363 color: #6D7278;
350 } 364 }
351 .business_item{ 365 .business_item{
352 margin-bottom: 10px; 366 margin-bottom: 10px;
...@@ -355,19 +369,21 @@ ...@@ -355,19 +369,21 @@
355 .business_item ul { 369 .business_item ul {
356 display: inline-block; 370 display: inline-block;
357 width: 80%; 371 width: 80%;
372 margin-bottom: 15px;
358 } 373 }
359 .business_item ul li { 374 .business_item ul li {
360 width: 33%; 375 width: 150px;
376 height: 90px;
361 display: inline-block; 377 display: inline-block;
362 background-color:#eee;
363 color: #fff; 378 color: #fff;
364 border-radius: 3px;
365 text-align: center; 379 text-align: center;
366 margin: 5px 0; 380 box-sizing: border-box;
367 color: #666; 381 color: #666;
368 cursor: pointer; 382 cursor: pointer;
369 padding: 7px 0;
370 position: relative; 383 position: relative;
384 background: #FFFFFF;
385 border-radius: 2px;
386 border: 1px solid #DEDEDE;
371 } 387 }
372 .business_item ul li .mask { 388 .business_item ul li .mask {
373 position: absolute; 389 position: absolute;
...@@ -391,4 +407,10 @@ ...@@ -391,4 +407,10 @@
391 font-size: 12px; 407 font-size: 12px;
392 text-align: center; 408 text-align: center;
393 line-height: 14px; 409 line-height: 14px;
410 }
411 .swiper-button-next, .swiper-container-rtl .swiper-button-prev {
412 right: 45px;
413 }
414 .swiper-button-prev, .swiper-container-rtl .swiper-button-next {
415 left: 45px;
394 } 416 }
...\ No newline at end of file ...\ No newline at end of file
......
1 layui.use('element', function () {
2 let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
3 });
1 $(function () { 4 $(function () {
2 var latitude =undefined 5 getAppointmentDetail()
3 var longitude =undefined
4 var orgname = undefined
5 layui.use('element', function () {
6 let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
7 //监听导航点击
8 element.on('nav(demo)', function (elem) {
9 layer.msg(elem.text());
10 });
11 });
12 // 地图
13 var map = new BMap.Map('container');
14 var point = new BMap.Point(longitude, latitude);
15 map.centerAndZoom(point, 15);
16 // 创建点标记
17 var marker = new BMap.Marker(point);
18 map.addOverlay(marker);
19 // 创建信息窗口
20 var opts = {
21 width: 200,
22 height: 100,
23 title: orgname
24 };
25 var infoWindow = new BMap.InfoWindow( orgname, opts);
26 // 点标记添加点击事件
27 map.openInfoWindow(infoWindow, point); // 开启信息窗口
28 marker.addEventListener('click', function () {
29 map.openInfoWindow(infoWindow, point); // 开启信息窗口
30 });
31 map.enableScrollWheelZoom();
32 getAppointmentDetail()
33 }); 6 });
34 // GET 根据预约信息标识码appointmentId查看预约详情 7 // GET 根据预约信息标识码appointmentId查看预约详情
35 function getAppointmentDetail(){ 8 function getAppointmentDetail() {
36 $.ajax({ 9 $.ajax({
37 type: "get", //提交方式 10 type: "get", //提交方式
38 url: 11 url:
...@@ -41,37 +14,48 @@ function getAppointmentDetail(){ ...@@ -41,37 +14,48 @@ function getAppointmentDetail(){
41 appointmentId: GetRequest(), 14 appointmentId: GetRequest(),
42 }, 15 },
43 dataType: "json", 16 dataType: "json",
44 //数据,这里使用的是Json格式进行传输
45 success: function (result) { 17 success: function (result) {
46 //返回数据根据结果进行相应的处理
47 if (result.code == 200) { 18 if (result.code == 200) {
48 var renegeCounttotal =undefined 19 var renegeCounttotal;
49 console.log('ff',result) 20 $('#username').text(result.data.username);
50 $('#username').text(result.data.username) 21 $('#zjhm').text(result.data.zjhm);
51 $('#zjhm').text(result.data.zjhm) 22 $('#orgName').text(result.data.orgName);
52 $('#orgName').text(result.data.orgName) 23 $('#hbShortname').text(result.data.hbShortname);
53 $('#hbShortname').text(result.data.hbShortname) 24 $('#reservationNumber').text(result.data.reservationNumber);
54 $('#reservationNumber').text(result.data.reservationNumber) 25 var year = result.data.bookingDate.substr(0, 4) + '年';
55 console.log(result.data.bookingDate.substr(0,4)) 26 var month = result.data.bookingDate.substr(4, 2) + '月';
56 var year = result.data.bookingDate.substr(0,4) + '年' 27 var day = result.data.bookingDate.substr(6, 2) + '日';
57 var month = result.data.bookingDate.substr(4,2) + '月' 28 var startTime = result.data.startTime + '至';
58 var day= result.data.bookingDate.substr(6,2) + '日' 29 var endTime = result.data.endTime;
59 var startTime= result.data.startTime + '至' 30 var yysjtotal = year + month + day + startTime + endTime;
60 var endTime= result.data.endTime 31 $('#yysj').text(yysjtotal);
61 var yysjtotal = year + month + day + startTime + endTime 32 if (result.data.renegeCount == null) {
62 $('#yysj').text(yysjtotal) 33 renegeCounttotal = 0;
63 if(result.data.renegeCount == null){ 34 } else {
64 renegeCounttotal = 0 35 renegeCounttotal = result.data.renegeCount;
65 }else{
66 renegeCounttotal = result.data.renegeCount
67 } 36 }
68 $('#renegeCount').html(renegeCounttotal) 37 $('#renegeCount').html(renegeCounttotal);
69 $('#renegeCount').css('color','red') 38 $('#renegeCount').css('color', 'red');
70 39 // 地图
71 longitude= result.data.longitude 40 var map = new BMap.Map('container');
72 latitude= result.data.latitude 41 var point = new BMap.Point( result.data.longitude, result.data.latitude);
73 orgname= result.data.orgName 42 map.centerAndZoom(point, 15);
74 } 43 // 创建点标记
44 var marker = new BMap.Marker(point);
45 map.addOverlay(marker);
46 // 创建信息窗口
47 var opts = {
48 width: 200,
49 height: 100
50 };
51 var infoWindow = new BMap.InfoWindow(result.data.orgName, opts);
52 // 点标记添加点击事件
53 map.openInfoWindow(infoWindow, point); // 开启信息窗口
54 marker.addEventListener('click', function () {
55 map.openInfoWindow(infoWindow, point); // 开启信息窗口
56 });
57 map.enableScrollWheelZoom();
58 }
75 }, 59 },
76 }); 60 });
77 } 61 }
...@@ -89,4 +73,3 @@ function GetRequest() { ...@@ -89,4 +73,3 @@ function GetRequest() {
89 } 73 }
90 return theRequest.appointmentId; 74 return theRequest.appointmentId;
91 } 75 }
92
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -69,7 +69,6 @@ function getAppointmentDay() { ...@@ -69,7 +69,6 @@ function getAppointmentDay() {
69 } 69 }
70 70
71 71
72
73 //渲染预约日期列表 72 //渲染预约日期列表
74 function RenderbookingDateList(data) { 73 function RenderbookingDateList(data) {
75 let DateConnect = ""; 74 let DateConnect = "";
...@@ -125,7 +124,13 @@ function RenderBusinessList(data) { ...@@ -125,7 +124,13 @@ function RenderBusinessList(data) {
125 let businessContent = ""; 124 let businessContent = "";
126 $.each(data.appointmentPeriodBusinessList, function (index, item) { 125 $.each(data.appointmentPeriodBusinessList, function (index, item) {
127 businessContent += '<div class="business_item">'; 126 businessContent += '<div class="business_item">';
128 businessContent += '<div class="item_time"><span>上午</span> <span>' + item.startTime + '</span><span>-</span><span>' + item.endTime + '</span></div>'; 127 businessContent += '<div class="item_time">'
128 if(getTime(item.startTime)){
129 businessContent += '<h3 class="timeTitle">下午</h3>'
130 }else {
131 businessContent += '<h3 class="timeTitle">上午</h3>'
132 }
133 businessContent += '<span>' + item.startTime + '</span><span>-</span><span>' + item.endTime + '</span></div>';
129 businessContent += '<ul>'; 134 businessContent += '<ul>';
130 $.each(item.orgBusinessList, function (childIndex, childItem) { 135 $.each(item.orgBusinessList, function (childIndex, childItem) {
131 //存在预约记录 136 //存在预约记录
...@@ -157,6 +162,16 @@ function RenderBusinessList(data) { ...@@ -157,6 +162,16 @@ function RenderBusinessList(data) {
157 businessDiv.html(businessContent); 162 businessDiv.html(businessContent);
158 } 163 }
159 164
165 function getTime(time){
166 var isTime;
167 if((time.split(":")[0]-0)>12) {
168 isTime = true;
169 }else {
170 isTime = false;
171 }
172 return isTime;
173 }
174
160 // 根据办事大厅机构ID、用户ID检查用户是否存在预约限制 175 // 根据办事大厅机构ID、用户ID检查用户是否存在预约限制
161 function checkAppointment() { 176 function checkAppointment() {
162 let msg; 177 let msg;
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
99 </li> 99 </li>
100 <li> 100 <li>
101 <span>预约时间:</span> 101 <span>预约时间:</span>
102 <p id="yysj">2020年10月16日上午 11:00</p> 102 <p id="yysj"></p>
103 </li> 103 </li>
104 </ul> 104 </ul>
105 </div> 105 </div>
......
...@@ -77,34 +77,14 @@ ...@@ -77,34 +77,14 @@
77 77
78 <div class="next_button"> 78 <div class="next_button">
79 <button type="button" class="layui-btn layui-btn-normal"> 79 <button type="button" class="layui-btn layui-btn-normal">
80 <!-- <a href="./yyxz.html" title="上一步">
81 上一步
82 </a> -->
83 <a href="./xzqy.html" title="上一步"> 上一步 </a> 80 <a href="./xzqy.html" title="上一步"> 上一步 </a>
84 </button> 81 </button>
85 </div> 82 </div>
86 </div> 83 </div>
87 </div> 84 </div>
88 </body> 85 </body>
89
90 </html> 86 </html>
91 <script type="text/javascript" src="../staticJs/common.js"></script> 87 <script type="text/javascript" src="../staticJs/common.js"></script>
92 <script type="text/javascript" src="../staticJs/down.js"></script> 88 <script type="text/javascript" src="../staticJs/down.js"></script>
93 <script src="../staticJs/swiper-bundle.min.js"></script> 89 <script src="../staticJs/swiper-bundle.min.js"></script>
94 <script type="text/javascript" src="../staticJs/yysj.js"></script>
95
96 <!-- <script id="date" type="text/html">
97 {{# layui.each(d.dateList, function(index, item){ }}
98 {{# if(item.isSelect){ }}
99 <ul class="swiper-slide layui-bg-gray active1">
100 <li>{{item.week}}</li>
101 <li>{{item.jyjh}}</li>
102 </ul>
103 {{# } }}
104 {{# if(!item.isSelect){ }}
105 <ul class="swiper-slide layui-bg-gray">
106 <li>{{item.week}}</li>
107 <li>{{item.jyjh}}</li>
108 </ul>
109 {{# } }} {{# }); }}
110 </script> -->
...\ No newline at end of file ...\ No newline at end of file
90 <script type="text/javascript" src="../staticJs/yysj.js"></script>
...\ No newline at end of file ...\ No newline at end of file
......