yyjg.js
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
$('.layui-breadcrumb a').eq(1).attr('href',GetQueryString('href'));
$('.layui-breadcrumb a').eq(1).attr('title', decodeURI(GetQueryString('title')));
$('.layui-breadcrumb a').eq(1).text(decodeURI(GetQueryString('title')));
getAppointmentDetail()
});
// GET 根据预约信息标识码appointmentId查看预约详情
function getAppointmentDetail() {
$.ajax({
type: "get", //提交方式
url:
portal.api_url + "/portal/appointmentmh/getAppointmentDetail",
data: {
appointmentId: GetQueryString('appointmentId'),
},
dataType: "json",
success: function (result) {
if (result.code == 200) {
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);
$('.qrcode img').attr('src',result.data.qrcode);
if (result.data.renegeCount == null) {
renegeCounttotal = 0;
} else {
renegeCounttotal = result.data.renegeCount;
}
$('#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();
}
},
});
}