我的预约接口联调
Showing
10 changed files
with
352 additions
and
176 deletions
| ... | @@ -348,6 +348,10 @@ | ... | @@ -348,6 +348,10 @@ |
| 348 | text-align: center; | 348 | text-align: center; |
| 349 | line-height: 130px; | 349 | line-height: 130px; |
| 350 | } | 350 | } |
| 351 | .business_item{ | ||
| 352 | margin-bottom: 10px; | ||
| 353 | overflow: hidden; | ||
| 354 | } | ||
| 351 | .business_item ul { | 355 | .business_item ul { |
| 352 | display: inline-block; | 356 | display: inline-block; |
| 353 | width: 80%; | 357 | width: 80%; |
| ... | @@ -372,10 +376,10 @@ | ... | @@ -372,10 +376,10 @@ |
| 372 | width: 100%; | 376 | width: 100%; |
| 373 | height: 100%; | 377 | height: 100%; |
| 374 | } | 378 | } |
| 375 | .business_item ul .item_appoint:hover { | 379 | /* .business_item ul .item_appoint:hover { |
| 376 | background-color: #0091FF; | 380 | background-color: #0091FF; |
| 377 | color: #fff; | 381 | color: #fff; |
| 378 | } | 382 | } */ |
| 379 | .isAppoint { | 383 | .isAppoint { |
| 380 | cursor:not-allowed!important; | 384 | cursor:not-allowed!important; |
| 381 | } | 385 | } | ... | ... |
| ... | @@ -38,3 +38,23 @@ function GetQueryString(name) { | ... | @@ -38,3 +38,23 @@ function GetQueryString(name) { |
| 38 | var r = window.location.search.substr(1).match(reg); | 38 | var r = window.location.search.substr(1).match(reg); |
| 39 | if (r!=null) return (r[2]); return null; | 39 | if (r!=null) return (r[2]); return null; |
| 40 | } | 40 | } |
| 41 | // 存储cookie | ||
| 42 | function setCookie(resdata,duration){ | ||
| 43 | var date = new Date(); | ||
| 44 | date.setTime(date.getTime() + duration*24*3600*1000); | ||
| 45 | document.cookie = "myCookie=" + JSON.stringify(resdata) | ||
| 46 | + "; expires=" +date.toGMTString() + "; path=/"; | ||
| 47 | // document.cookie = " myCookie =" + JSON.stringify(resdata) + ';expires=' + date.toGMTString(); | ||
| 48 | }; | ||
| 49 | |||
| 50 | //获取cookie | ||
| 51 | function getCookie(){ | ||
| 52 | var str = document.cookie; | ||
| 53 | if(str == ''){ | ||
| 54 | return false | ||
| 55 | }else{ | ||
| 56 | $('.PersonLogin').css('pointer-events', 'none') | ||
| 57 | var arr = str.replace(/(\s)+/g,'').split('='); | ||
| 58 | return JSON.parse(arr[1]); | ||
| 59 | } | ||
| 60 | }; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -75,3 +75,4 @@ document.writeln(""); | ... | @@ -75,3 +75,4 @@ document.writeln(""); |
| 75 | document.writeln("</html>"); | 75 | document.writeln("</html>"); |
| 76 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); | 76 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); |
| 77 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); | 77 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); |
| 78 | |||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -32,8 +32,11 @@ $(document).on('click', '#loginButton', function(){ | ... | @@ -32,8 +32,11 @@ $(document).on('click', '#loginButton', function(){ |
| 32 | userLoginRequest.username = username | 32 | userLoginRequest.username = username |
| 33 | userLoginRequest.password = password | 33 | userLoginRequest.password = password |
| 34 | clicklogin(userLoginRequest) | 34 | clicklogin(userLoginRequest) |
| 35 | // layer.closeAll() | 35 | layer.closeAll() |
| 36 | }); | 36 | }); |
| 37 | $(function(){ | ||
| 38 | $('.PersonLogin').html(getCookie().username) | ||
| 39 | }) | ||
| 37 | // 点击注册的时候 | 40 | // 点击注册的时候 |
| 38 | $(document).on('click', '#registerButton', function(){ | 41 | $(document).on('click', '#registerButton', function(){ |
| 39 | // layer.closeAll() | 42 | // layer.closeAll() |
| ... | @@ -49,11 +52,16 @@ function clicklogin(data){ | ... | @@ -49,11 +52,16 @@ function clicklogin(data){ |
| 49 | dataType: "json", | 52 | dataType: "json", |
| 50 | data:JSON.stringify(data),//***关键****** | 53 | data:JSON.stringify(data),//***关键****** |
| 51 | success: function (result) {//返回数据根据结果进行相应的处理 | 54 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 52 | if (result.code == 200 && result.data != null) { | 55 | console.log(222,result) |
| 53 | console.log(232323,result) | 56 | if(result.code ==200 && result.data!==null){ |
| 57 | setCookie(result.data) | ||
| 58 | $('.PersonLogin').html(getCookie().username) | ||
| 59 | }else if(result.code ==500){ | ||
| 60 | window.open(`${localhostPaht}/staticViews/register.html`,'_self') | ||
| 54 | } | 61 | } |
| 55 | } | 62 | } |
| 56 | }); | 63 | }); |
| 57 | } | 64 | } |
| 58 | 65 | ||
| 59 | 66 | ||
| 67 | |||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -3,7 +3,7 @@ $(function () { | ... | @@ -3,7 +3,7 @@ $(function () { |
| 3 | var province = undefined | 3 | var province = undefined |
| 4 | var city = undefined | 4 | var city = undefined |
| 5 | // 办事大厅 | 5 | // 办事大厅 |
| 6 | var halloffice = '不夜城' | 6 | var jgid = '不夜城' |
| 7 | $('.area_list li').click(function () { | 7 | $('.area_list li').click(function () { |
| 8 | $(".area_list li").removeClass("activeRegion") | 8 | $(".area_list li").removeClass("activeRegion") |
| 9 | $(this).addClass("activeRegion"); | 9 | $(this).addClass("activeRegion"); |
| ... | @@ -137,6 +137,8 @@ $(function () { | ... | @@ -137,6 +137,8 @@ $(function () { |
| 137 | $(this).addClass("active2"); | 137 | $(this).addClass("active2"); |
| 138 | var index = $(this).index(); | 138 | var index = $(this).index(); |
| 139 | console.log(4444,index) | 139 | console.log(4444,index) |
| 140 | jgid = $(this).data('id') | ||
| 141 | console.log(jgid) | ||
| 140 | }) | 142 | }) |
| 141 | infoWindow.addEventListener('close', function (type, target, point) { | 143 | infoWindow.addEventListener('close', function (type, target, point) { |
| 142 | $('.office_halls li').eq(0).removeClass('hallActive') | 144 | $('.office_halls li').eq(0).removeClass('hallActive') |
| ... | @@ -153,7 +155,7 @@ $(function () { | ... | @@ -153,7 +155,7 @@ $(function () { |
| 153 | _initData() | 155 | _initData() |
| 154 | // 下一步 | 156 | // 下一步 |
| 155 | $('.nextButton').click(function(){ | 157 | $('.nextButton').click(function(){ |
| 156 | window.open("./yysj.html?halloffice="+halloffice+"","_self") | 158 | window.open("./yysj.html?jgid="+jgid+"","_self") |
| 157 | }) | 159 | }) |
| 158 | }) | 160 | }) |
| 159 | function _initData() { | 161 | function _initData() { | ... | ... |
| 1 | $(function () { | 1 | $(function () { |
| 2 | var latitude =undefined | ||
| 3 | var longitude =undefined | ||
| 4 | var orgname = undefined | ||
| 2 | layui.use('element', function () { | 5 | layui.use('element', function () { |
| 3 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 | 6 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 |
| 4 | //监听导航点击 | 7 | //监听导航点击 |
| ... | @@ -8,7 +11,7 @@ $(function () { | ... | @@ -8,7 +11,7 @@ $(function () { |
| 8 | }); | 11 | }); |
| 9 | // 地图 | 12 | // 地图 |
| 10 | var map = new BMap.Map('container'); | 13 | var map = new BMap.Map('container'); |
| 11 | var point = new BMap.Point(108.95346, 34.265725); | 14 | var point = new BMap.Point(longitude, latitude); |
| 12 | map.centerAndZoom(point, 15); | 15 | map.centerAndZoom(point, 15); |
| 13 | // 创建点标记 | 16 | // 创建点标记 |
| 14 | var marker = new BMap.Marker(point); | 17 | var marker = new BMap.Marker(point); |
| ... | @@ -17,13 +20,73 @@ $(function () { | ... | @@ -17,13 +20,73 @@ $(function () { |
| 17 | var opts = { | 20 | var opts = { |
| 18 | width: 200, | 21 | width: 200, |
| 19 | height: 100, | 22 | height: 100, |
| 20 | title: '不夜城' | 23 | title: orgname |
| 21 | }; | 24 | }; |
| 22 | var infoWindow = new BMap.InfoWindow('大唐不夜城', opts); | 25 | var infoWindow = new BMap.InfoWindow( orgname, opts); |
| 23 | // 点标记添加点击事件 | 26 | // 点标记添加点击事件 |
| 24 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 | 27 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 |
| 25 | marker.addEventListener('click', function () { | 28 | marker.addEventListener('click', function () { |
| 26 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 | 29 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 |
| 27 | }); | 30 | }); |
| 28 | map.enableScrollWheelZoom(); | 31 | map.enableScrollWheelZoom(); |
| 32 | getAppointmentDetail() | ||
| 29 | }); | 33 | }); |
| 34 | // GET 根据预约信息标识码appointmentId查看预约详情 | ||
| 35 | function getAppointmentDetail(){ | ||
| 36 | $.ajax({ | ||
| 37 | type: "get", //提交方式 | ||
| 38 | url: | ||
| 39 | portal.api_url + "/portal/appointmentmh/getAppointmentDetail", | ||
| 40 | data: { | ||
| 41 | appointmentId: GetRequest(), | ||
| 42 | }, | ||
| 43 | dataType: "json", | ||
| 44 | //数据,这里使用的是Json格式进行传输 | ||
| 45 | success: function (result) { | ||
| 46 | //返回数据根据结果进行相应的处理 | ||
| 47 | if (result.code == 200) { | ||
| 48 | var renegeCounttotal =undefined | ||
| 49 | console.log('ff',result) | ||
| 50 | $('#username').text(result.data.username) | ||
| 51 | $('#zjhm').text(result.data.zjhm) | ||
| 52 | $('#orgName').text(result.data.orgName) | ||
| 53 | $('#hbShortname').text(result.data.hbShortname) | ||
| 54 | $('#reservationNumber').text(result.data.reservationNumber) | ||
| 55 | console.log(result.data.bookingDate.substr(0,4)) | ||
| 56 | var year = result.data.bookingDate.substr(0,4) + '年' | ||
| 57 | var month = result.data.bookingDate.substr(4,2) + '月' | ||
| 58 | var day= result.data.bookingDate.substr(6,2) + '日' | ||
| 59 | var startTime= result.data.startTime + '至' | ||
| 60 | var endTime= result.data.endTime | ||
| 61 | var yysjtotal = year + month + day + startTime + endTime | ||
| 62 | $('#yysj').text(yysjtotal) | ||
| 63 | if(result.data.renegeCount == null){ | ||
| 64 | renegeCounttotal = 0 | ||
| 65 | }else{ | ||
| 66 | renegeCounttotal = result.data.renegeCount | ||
| 67 | } | ||
| 68 | $('#renegeCount').html(renegeCounttotal) | ||
| 69 | $('#renegeCount').css('color','red') | ||
| 70 | |||
| 71 | longitude= result.data.longitude | ||
| 72 | latitude= result.data.latitude | ||
| 73 | orgname= result.data.orgName | ||
| 74 | } | ||
| 75 | }, | ||
| 76 | }); | ||
| 77 | } | ||
| 78 | function GetRequest() { | ||
| 79 | var url = location.search; //获取url中"?"符后的字串 | ||
| 80 | var theRequest = new Object(); | ||
| 81 | if (url.indexOf("?") != -1) { | ||
| 82 | var str = url.substr(1); | ||
| 83 | strs = str.split("?"); | ||
| 84 | for (var i = 0; i < strs.length; i++) { | ||
| 85 | theRequest[strs[i].split("=")[0]] = decodeURIComponent( | ||
| 86 | strs[i].split("=")[1] | ||
| 87 | ); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | return theRequest.appointmentId; | ||
| 91 | } | ||
| 92 | |||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | |||
| 2 | $(function () { | 1 | $(function () { |
| 3 | var Date = undefined; | 2 | var Date = undefined; |
| 4 | var appuintText = undefined | 3 | var appuintText = undefined; |
| 5 | var bustime = undefined; | 4 | var bustime = undefined; |
| 6 | // 国有房屋无业点击选中记录 | ||
| 7 | var busIndex = undefined | ||
| 8 | // 办事中心 | ||
| 9 | var halloffice = undefined | ||
| 10 | var data = { | ||
| 11 | 'dateList': [ | ||
| 12 | { | ||
| 13 | week: '星期一', | ||
| 14 | date: '10月15号' | ||
| 15 | }, | ||
| 16 | { | ||
| 17 | week: '星期二', | ||
| 18 | date: '10月16号' | ||
| 19 | }, | ||
| 20 | { | ||
| 21 | week: '星期三', | ||
| 22 | date: '10月17号' | ||
| 23 | }, | ||
| 24 | { | ||
| 25 | week: '星期二', | ||
| 26 | date: '10月18号' | ||
| 27 | }, | ||
| 28 | { | ||
| 29 | week: '星期五', | ||
| 30 | date: '10月19号' | ||
| 31 | }, | ||
| 32 | { | ||
| 33 | week: '星期六', | ||
| 34 | date: '10月19号' | ||
| 35 | } | ||
| 36 | ], | ||
| 37 | "busList": [{ | ||
| 38 | startTime: "09:30", | ||
| 39 | endTime: "10:30", | ||
| 40 | orgBusinessList: [ | ||
| 41 | { | ||
| 42 | shortName: "一般抵押登记", | ||
| 43 | isyy: 1, | ||
| 44 | residueNumber: "约满" | ||
| 45 | }, | ||
| 46 | { | ||
| 47 | shortName: "查封/解封登记", | ||
| 48 | isyy: 1, | ||
| 49 | residueNumber: "约满" | ||
| 50 | }, | ||
| 51 | { | ||
| 52 | shortName: "有证房抵押首次登记", | ||
| 53 | isyy: 1, | ||
| 54 | residueNumber: "约满" | ||
| 55 | }, | ||
| 56 | { | ||
| 57 | shortName: "商品房抵押登记", | ||
| 58 | isyy: 0, | ||
| 59 | residueNumber: "余3位" | ||
| 60 | } | ||
| 61 | ] | ||
| 62 | }], | ||
| 63 | }; | ||
| 64 | 5 | ||
| 65 | // 获取当前选中的日期 | 6 | // 国有房屋无业点击选中记录 |
| 66 | data.dateList[0].isSelect = true | 7 | var busIndex = undefined; |
| 67 | for (var i = 0; i < data.dateList.length; i++) { | 8 | // 机构id |
| 68 | if (data.dateList[i].isSelect) { | 9 | var jgid = undefined; |
| 69 | Date = data.dateList[i].date | 10 | getAppointmentDay(); |
| 70 | bustime = data.dateList[i].week | 11 | layui.use("element", function () { |
| 71 | } | ||
| 72 | }; | ||
| 73 | |||
| 74 | layui.use('element', function () { | ||
| 75 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 | 12 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 |
| 76 | //监听导航点击 | 13 | //监听导航点击 |
| 77 | element.on('nav(demo)', function (elem) { | 14 | element.on("nav(demo)", function (elem) { |
| 78 | layer.msg(elem.text()); | 15 | layer.msg(elem.text()); |
| 79 | }); | 16 | }); |
| 80 | }); | 17 | }); |
| 18 | |||
| 81 | function a(i) { | 19 | function a(i) { |
| 82 | Date = data.dateList[i].date | 20 | Date = data.dateList[i].jyjh; |
| 83 | bustime = data.dateList[i].week | 21 | bookingDate = data.dateList[i].bookingDate; |
| 84 | $(".swiper-slide").eq(i).addClass('active1').siblings().removeClass('active1'); | 22 | bustime = data.dateList[i].week; |
| 23 | getAppointmentPeriodAndBusiness() | ||
| 24 | $(".swiper-slide") | ||
| 25 | .eq(i) | ||
| 26 | .addClass("active1") | ||
| 27 | .siblings() | ||
| 28 | .removeClass("active1"); | ||
| 85 | } | 29 | } |
| 86 | 30 | var swiper = new Swiper(".swiper-container", { | |
| 87 | layui.use('laytpl', function () { | ||
| 88 | laytpl = layui.laytpl; | ||
| 89 | var getTpl = document.getElementById('date').innerHTML | ||
| 90 | , view = document.getElementById('swiperDate'); | ||
| 91 | laytpl(getTpl).render(data, function (html) { | ||
| 92 | view.innerHTML = html; | ||
| 93 | }); | ||
| 94 | |||
| 95 | var getTpl1 = document.getElementById('business_item').innerHTML | ||
| 96 | , view1 = document.getElementById('business_list'); | ||
| 97 | laytpl(getTpl1).render(data, function (html) { | ||
| 98 | view1.innerHTML = html; | ||
| 99 | }); | ||
| 100 | }); | ||
| 101 | var swiper = new Swiper('.swiper-container', { | ||
| 102 | slidesPerView: 5, | 31 | slidesPerView: 5, |
| 103 | spaceBetween: 20, | 32 | spaceBetween: 20, |
| 104 | slidesPerGroup: 1, | 33 | slidesPerGroup: 1, |
| ... | @@ -106,55 +35,83 @@ $(function () { | ... | @@ -106,55 +35,83 @@ $(function () { |
| 106 | observeParents: true, | 35 | observeParents: true, |
| 107 | on: { | 36 | on: { |
| 108 | click: function (swiper) { | 37 | click: function (swiper) { |
| 109 | var index = swiper['clickedIndex']; | 38 | var index = swiper["clickedIndex"]; |
| 110 | console.log(index) | ||
| 111 | a(index); | 39 | a(index); |
| 112 | } | 40 | }, |
| 113 | }, | 41 | }, |
| 114 | loopFillGroupWithBlank: true, | 42 | loopFillGroupWithBlank: true, |
| 115 | navigation: { | 43 | navigation: { |
| 116 | nextEl: '.swiper-button-next', | 44 | nextEl: ".swiper-button-next", |
| 117 | prevEl: '.swiper-button-prev', | 45 | prevEl: ".swiper-button-prev", |
| 118 | }, | 46 | }, |
| 119 | }); | 47 | }); |
| 120 | function handle(){ | 48 | function handle() { |
| 121 | layui.use('layer', function () { | 49 | layui.use("layer", function () { |
| 122 | layer.open({ | 50 | layer.open({ |
| 123 | type: 1, | 51 | type: 1, |
| 124 | title: '请确认以下信息', | 52 | title: "请确认以下信息", |
| 125 | shadeClose: true, | 53 | shadeClose: false, |
| 126 | area: ['500px', '320px'], | 54 | area: ["500px", "320px"], |
| 127 | scrollbar: false, | 55 | scrollbar: false, |
| 128 | skin: 'confimInfo', | 56 | skin: "confimInfo", |
| 129 | content: '<div class="infoContent">' | 57 | content: |
| 130 | + '<ul>' | 58 | '<div class="infoContent">' + |
| 131 | + '<li><span>姓名</span>:任超</li>' | 59 | "<ul>" + |
| 132 | + '<li><span>身份证号</span>:610124193335522</li>' | 60 | "<li><span>姓名</span>:" + getCookie().username +"</li>" + |
| 133 | + '<li><span>联系电话</span>:18740677386</li>' | 61 | "<li><span>身份证号</span>:"+getCookie().zjhm+"</li>" + |
| 134 | + '</ul>' | 62 | "<li><span>联系电话</span>:"+getCookie().phone +"</li>" + |
| 135 | + '<div class="listItem"><h3>大厅名称:</h3>'+halloffice+'</div>' | 63 | "</ul>" + |
| 136 | + '<div class="listItem"><h3>预约业务:</h3>' + appuintText + '</div>' | 64 | '<div class="listItem"><h3>大厅名称:</h3>' + |
| 137 | + '<div class="listItem"><h3>预约时间:</h3>' + Date + ' ' + bustime + '</div>' | 65 | hallname + |
| 138 | + '<div class="confimButton"><button type="button" class="layui-btn cancel layui-btn-primary">取消</button><button type="button" class="layui-btn confim layui-btn-normal">确定</button></div>' | 66 | "</div>" + |
| 139 | + '</div>' | 67 | '<div class="listItem"><h3>预约业务:</h3>' + |
| 68 | appuintText + | ||
| 69 | "</div>" + | ||
| 70 | '<div class="listItem"><h3>预约时间:</h3>' + | ||
| 71 | Date + | ||
| 72 | " " + | ||
| 73 | bustime + | ||
| 74 | "</div>" + | ||
| 75 | '<div class="confimButton"><button type="button" class="layui-btn cancel layui-btn-primary">取消</button><button type="button" class="layui-btn confim layui-btn-normal">确定</button></div>' + | ||
| 76 | "</div>", | ||
| 77 | }); | ||
| 78 | }); | ||
| 79 | } | ||
| 80 | function detailHandle(){ | ||
| 81 | layui.use("layer", function () { | ||
| 82 | layer.open({ | ||
| 83 | type: 1, | ||
| 84 | title: "请确认以下信息", | ||
| 85 | shadeClose: false, | ||
| 86 | area: ["500px", "320px"], | ||
| 87 | scrollbar: false, | ||
| 88 | skin: "confimInfo", | ||
| 89 | content:'123', | ||
| 90 | }); | ||
| 140 | }); | 91 | }); |
| 141 | }) | ||
| 142 | } | 92 | } |
| 143 | // 业务选择 | 93 | // 业务选择 |
| 144 | $(document).on('click', '.business_item ul .item_appoint', function () { | 94 | $(document).on("click", ".business_item ul .item_appoint ", function (e) { |
| 145 | halloffice = GetRequest() | 95 | console.log(5555) |
| 146 | appuintText = $(this).find('h3').text() | 96 | jgid = GetRequest(); |
| 147 | handle() | 97 | appuintText = $(this).find("h3").text(); |
| 98 | periodRulesId = $(this).data('id') | ||
| 99 | console.log('aaa',periodRulesId) | ||
| 100 | checkAppointment() | ||
| 101 | handle(); | ||
| 102 | }); | ||
| 103 | $(document).on("click", ".cancel", function () { | ||
| 104 | layer.closeAll(); | ||
| 105 | }); | ||
| 106 | $(document).on("click", ".confim", function () { | ||
| 107 | if(flag){ | ||
| 108 | var paramsobj = {} | ||
| 109 | paramsobj.jgid = GetRequest() | ||
| 110 | paramsobj.periodRulesId = periodRulesId | ||
| 111 | paramsobj.userid = getCookie().userid | ||
| 112 | makeAppointment(paramsobj) | ||
| 113 | } | ||
| 148 | }); | 114 | }); |
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | $(document).on('click', '.cancel', function () { | ||
| 153 | layer.closeAll() | ||
| 154 | }) | ||
| 155 | $(document).on('click', '.confim', function () { | ||
| 156 | window.location.href = "./yyjg.html" | ||
| 157 | }) | ||
| 158 | }); | 115 | }); |
| 159 | function GetRequest() { | 116 | function GetRequest() { |
| 160 | var url = location.search; //获取url中"?"符后的字串 | 117 | var url = location.search; //获取url中"?"符后的字串 |
| ... | @@ -163,8 +120,146 @@ function GetRequest() { | ... | @@ -163,8 +120,146 @@ function GetRequest() { |
| 163 | var str = url.substr(1); | 120 | var str = url.substr(1); |
| 164 | strs = str.split("?"); | 121 | strs = str.split("?"); |
| 165 | for (var i = 0; i < strs.length; i++) { | 122 | for (var i = 0; i < strs.length; i++) { |
| 166 | theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]); | 123 | theRequest[strs[i].split("=")[0]] = decodeURIComponent( |
| 124 | strs[i].split("=")[1] | ||
| 125 | ); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | return theRequest.jgid; | ||
| 129 | } | ||
| 130 | function getAppointmentDay() { | ||
| 131 | $.ajax({ | ||
| 132 | type: "get", //提交方式 | ||
| 133 | url: portal.api_url + "/portal/appointmentmh/getAppointmentDay", //路径 | ||
| 134 | data: { | ||
| 135 | jgid: GetRequest(), | ||
| 136 | }, | ||
| 137 | dataType: "json", | ||
| 138 | success: function (result) { | ||
| 139 | //返回数据根据结果进行相应的处理 | ||
| 140 | if (result.code == 200 && result.data != null) { | ||
| 141 | data.dateList = result.data.listTime; | ||
| 142 | layui.use("laytpl", function () { | ||
| 143 | laytpl = layui.laytpl; | ||
| 144 | var getTpl = document.getElementById("date").innerHTML, | ||
| 145 | view = document.getElementById("swiperDate"); | ||
| 146 | laytpl(getTpl).render(data, function (html) { | ||
| 147 | view.innerHTML = html; | ||
| 148 | }); | ||
| 149 | }); | ||
| 150 | } | ||
| 151 | }, | ||
| 152 | }); | ||
| 153 | } | ||
| 154 | // 根据办事大厅机构ID、日期、用户ID,查询可预约的业务 GET | ||
| 155 | function getAppointmentPeriodAndBusiness() { | ||
| 156 | $.ajax({ | ||
| 157 | type: "get", //提交方式 | ||
| 158 | url: | ||
| 159 | portal.api_url + "/portal/appointmentmh/getAppointmentPeriodAndBusiness", // | ||
| 160 | data: { | ||
| 161 | jgid: GetRequest(), | ||
| 162 | userid: getCookie().userid, | ||
| 163 | bookingDate: bookingDate, | ||
| 164 | }, | ||
| 165 | dataType: "json", | ||
| 166 | //数据,这里使用的是Json格式进行传输 | ||
| 167 | success: function (result) { | ||
| 168 | //返回数据根据结果进行相应的处理 | ||
| 169 | if (result.code == 200 && result.data != null) { | ||
| 170 | console.log(result.data) | ||
| 171 | data.busList = result.data.appointmentPeriodBusinessList | ||
| 172 | // console.log(2222,data.busList) | ||
| 173 | // if(result.data.choosePeriodRulesId!==null){ | ||
| 174 | // if(2){ | ||
| 175 | // // for循环找到对应的id 打开,其余都设置为禁用 | ||
| 176 | // } | ||
| 177 | // }else if(result.data.choosePeriodRulesId ==null){ | ||
| 178 | // // step 1: 如果等于0 | ||
| 179 | // for(var i =0;i<result.data.appointmentPeriodBusinessList.length;i++){ | ||
| 180 | // for(var j=0;j<result.data.appointmentPeriodBusinessList[i].orgBusinessList.length; j++){ | ||
| 181 | // if(result.data.appointmentPeriodBusinessList[i].orgBusinessList[j].residueNumber ==0){ | ||
| 182 | // result.data.appointmentPeriodBusinessList[i].orgBusinessList[j].disabled = true | ||
| 183 | // } | ||
| 184 | // } | ||
| 185 | // } | ||
| 186 | // data.busList = result.data.appointmentPeriodBusinessList | ||
| 187 | // console.log(11111, data.busList) | ||
| 188 | // } | ||
| 189 | if(data.busList.length >0){ | ||
| 190 | data.busList.forEach((item,index)=>{ | ||
| 191 | hallname = item.orgBusinessList[0].jgName | ||
| 192 | }) | ||
| 193 | } | ||
| 194 | layui.use("laytpl", function () { | ||
| 195 | laytpl = layui.laytpl; | ||
| 196 | var getTpl1 = document.getElementById("business_item").innerHTML, | ||
| 197 | view1 = document.getElementById("business_list"); | ||
| 198 | laytpl(getTpl1).render(data, function (html) { | ||
| 199 | view1.innerHTML = html; | ||
| 200 | }); | ||
| 201 | }); | ||
| 202 | } | ||
| 203 | }, | ||
| 204 | }); | ||
| 205 | } | ||
| 206 | // 根据办事大厅机构ID、用户ID检查用户是否可预约抢号 | ||
| 207 | function checkAppointment(){ | ||
| 208 | $.ajax({ | ||
| 209 | type: "get", //提交方式 | ||
| 210 | async:false, | ||
| 211 | url: | ||
| 212 | portal.api_url + "/portal/appointmentmh/checkAppointment", | ||
| 213 | data: { | ||
| 214 | jgid: GetRequest(), | ||
| 215 | userid: getCookie().userid, | ||
| 216 | }, | ||
| 217 | dataType: "json", | ||
| 218 | //数据,这里使用的是Json格式进行传输 | ||
| 219 | success: function (result) { | ||
| 220 | //返回数据根据结果进行相应的处理 | ||
| 221 | if (result.code == 200) { | ||
| 222 | return flag = result.data | ||
| 223 | }else if(result.code ==210){ | ||
| 224 | return layer.msg( result.message) | ||
| 225 | } | ||
| 226 | }, | ||
| 227 | }); | ||
| 228 | } | ||
| 229 | // 用户预约抢号 POST | ||
| 230 | function makeAppointment(data){ | ||
| 231 | $.ajax({ | ||
| 232 | type: "post", //提交方式 | ||
| 233 | async:false, | ||
| 234 | url: portal.api_url + "/portal/appointmentmh/makeAppointment",//路径 | ||
| 235 | headers:{//***关键****** | ||
| 236 | 'Content-Type': 'application/json;charset=UTF-8', | ||
| 237 | }, | ||
| 238 | dataType: "json", | ||
| 239 | data:JSON.stringify(data),//***关键****** | ||
| 240 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
| 241 | if(result.code ==200 && result.data!==null){ | ||
| 242 | appointmentId = result.data | ||
| 243 | window.location.href = "./yyjg.html?appointmentId="+ appointmentId | ||
| 167 | } | 244 | } |
| 168 | } | 245 | } |
| 169 | return theRequest.halloffice; | 246 | }); |
| 170 | } | 247 | } |
| 248 | |||
| 249 | var bookingDate = undefined; | ||
| 250 | var flag = undefined; | ||
| 251 | var msg = undefined; | ||
| 252 | var hallname = undefined; | ||
| 253 | var periodRulesId = undefined | ||
| 254 | var appointmentId = undefined | ||
| 255 | var periodRulesId = undefined | ||
| 256 | var data = { | ||
| 257 | dateList: [], | ||
| 258 | busList: [ | ||
| 259 | { | ||
| 260 | startTime: "", | ||
| 261 | endTime: "", | ||
| 262 | orgBusinessList: [], | ||
| 263 | }, | ||
| 264 | ], | ||
| 265 | }; | ... | ... |
| ... | @@ -90,7 +90,7 @@ | ... | @@ -90,7 +90,7 @@ |
| 90 | </div> | 90 | </div> |
| 91 | <div class="footer_button"> | 91 | <div class="footer_button"> |
| 92 | <button type="button" class="layui-btn layui-btn-normal"> | 92 | <button type="button" class="layui-btn layui-btn-normal"> |
| 93 | <a href="../yyxz/index.html" title="上一步"> | 93 | <a href="./yyxz.html" title="上一步"> |
| 94 | 上一步 | 94 | 上一步 |
| 95 | </a> | 95 | </a> |
| 96 | </button> | 96 | </button> | ... | ... |
| ... | @@ -67,12 +67,12 @@ | ... | @@ -67,12 +67,12 @@ |
| 67 | <div class="title"> | 67 | <div class="title"> |
| 68 | <h3> | 68 | <h3> |
| 69 | 预约成功!您的预约号: | 69 | 预约成功!您的预约号: |
| 70 | <span>952567654</span> | 70 | <span id='reservationNumber'></span> |
| 71 | </h3> | 71 | </h3> |
| 72 | <p>请记录下您的预约号,以便后续的预约服务。</p> | 72 | <p>请记录下您的预约号,以便后续的预约服务。</p> |
| 73 | </div> | 73 | </div> |
| 74 | <ul> | 74 | <ul> |
| 75 | <li>1.您曾经失约(0)次,请留意您本次的预约时间和业务类型,切勿迟到或失约。</li> | 75 | <li>1.您曾经失约<span id='renegeCount'></span>次,请留意您本次的预约时间和业务类型,切勿迟到或失约。</li> |
| 76 | <li>2.如确需取消预约,请提前1天登陆系统办理</li> | 76 | <li>2.如确需取消预约,请提前1天登陆系统办理</li> |
| 77 | <li>3.请凭预约号及相关证件,按预约时间提前10分钟到选定的不动产登记中心办理业务</li> | 77 | <li>3.请凭预约号及相关证件,按预约时间提前10分钟到选定的不动产登记中心办理业务</li> |
| 78 | </ul> | 78 | </ul> |
| ... | @@ -83,23 +83,23 @@ | ... | @@ -83,23 +83,23 @@ |
| 83 | <ul> | 83 | <ul> |
| 84 | <li> | 84 | <li> |
| 85 | <span>姓名:</span> | 85 | <span>姓名:</span> |
| 86 | <p>任超</p> | 86 | <p id="username"></p> |
| 87 | </li> | 87 | </li> |
| 88 | <li> | 88 | <li> |
| 89 | <span>身份证号:</span> | 89 | <span>身份证号:</span> |
| 90 | <p>6101245646546</p> | 90 | <p id='zjhm'></p> |
| 91 | </li> | 91 | </li> |
| 92 | <li> | 92 | <li> |
| 93 | <span>办事大厅:</span> | 93 | <span>办事大厅:</span> |
| 94 | <p>碑林区办事大厅</p> | 94 | <p id="orgName"></p> |
| 95 | </li> | 95 | </li> |
| 96 | <li> | 96 | <li> |
| 97 | <span>预约业务:</span> | 97 | <span>预约业务:</span> |
| 98 | <p>二手房过户</p> | 98 | <p id="hbShortname"></p> |
| 99 | </li> | 99 | </li> |
| 100 | <li> | 100 | <li> |
| 101 | <span>预约时间:</span> | 101 | <span>预约时间:</span> |
| 102 | <p>2020年10月16日上午 11:00</p> | 102 | <p id="yysj">2020年10月16日上午 11:00</p> |
| 103 | </li> | 103 | </li> |
| 104 | </ul> | 104 | </ul> |
| 105 | </div> | 105 | </div> | ... | ... |
| ... | @@ -89,7 +89,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -89,7 +89,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
| 89 | 89 | ||
| 90 | <div class="next_button"> | 90 | <div class="next_button"> |
| 91 | <button type="button" class="layui-btn layui-btn-normal"> | 91 | <button type="button" class="layui-btn layui-btn-normal"> |
| 92 | <a href="./yyxz.html" title="上一步"> | 92 | <!-- <a href="./yyxz.html" title="上一步"> |
| 93 | 上一步 | ||
| 94 | </a> --> | ||
| 95 | <a href="./xzqy.html" title="上一步"> | ||
| 93 | 上一步 | 96 | 上一步 |
| 94 | </a> | 97 | </a> |
| 95 | </button> | 98 | </button> |
| ... | @@ -109,13 +112,13 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -109,13 +112,13 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
| 109 | {{# if(item.isSelect){ }} | 112 | {{# if(item.isSelect){ }} |
| 110 | <ul class="swiper-slide layui-bg-gray active1"> | 113 | <ul class="swiper-slide layui-bg-gray active1"> |
| 111 | <li>{{item.week}}</li> | 114 | <li>{{item.week}}</li> |
| 112 | <li>{{item.date}}</li> | 115 | <li>{{item.jyjh}}</li> |
| 113 | </ul> | 116 | </ul> |
| 114 | {{# } }} | 117 | {{# } }} |
| 115 | {{# if(!item.isSelect){ }} | 118 | {{# if(!item.isSelect){ }} |
| 116 | <ul class="swiper-slide layui-bg-gray"> | 119 | <ul class="swiper-slide layui-bg-gray"> |
| 117 | <li>{{item.week}}</li> | 120 | <li>{{item.week}}</li> |
| 118 | <li>{{item.date}}</li> | 121 | <li>{{item.jyjh}}</li> |
| 119 | </ul> | 122 | </ul> |
| 120 | {{# } }} | 123 | {{# } }} |
| 121 | {{# }); }} | 124 | {{# }); }} |
| ... | @@ -130,35 +133,15 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -130,35 +133,15 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
| 130 | <span>-</span> | 133 | <span>-</span> |
| 131 | <span>{{item.endTime}}</span> | 134 | <span>{{item.endTime}}</span> |
| 132 | </div> | 135 | </div> |
| 133 | <ul> | 136 | <ul > |
| 134 | {{# layui.each(item.orgBusinessList, function(index1, item1){ }} | 137 | {{# layui.each(item.orgBusinessList, function(index1, item1){ }} |
| 135 | {{# if(item1.isyy==0){ }} | 138 | <li class="item_appoint" data-id='{{item1.periodRulesId}}'> |
| 136 | <li class="item_appoint"> | ||
| 137 | <h3> | ||
| 138 | {{item1.shortName}} | ||
| 139 | </h3> | ||
| 140 | {{# if(item1.isyy==1){ }} | ||
| 141 | <p style="color:#FF5722">({{item1.residueNumber}})</p> | ||
| 142 | {{# } }} | ||
| 143 | {{# if(item1.isyy==0){ }} | ||
| 144 | <p style="color:#5FB878">({{item1.residueNumber}})</p> | ||
| 145 | {{# } }} | ||
| 146 | </li> | ||
| 147 | {{# } }} | ||
| 148 | {{# if(item1.isyy==1){ }} | ||
| 149 | <li class="isAppoint"> | ||
| 150 | <h3> | 139 | <h3> |
| 151 | {{item1.shortName}} | 140 | {{item1.shortName}} |
| 152 | </h3> | 141 | </h3> |
| 153 | {{# if(item1.isyy==1){ }} | 142 | <p style="color:#5FB878">(剩{{item1.residueNumber}}票)</p> |
| 154 | <p style="color:#FF5722">({{item1.residueNumber}})</p> | ||
| 155 | {{# } }} | ||
| 156 | {{# if(item1.isyy==0){ }} | ||
| 157 | <p style="color:#5FB878">({{item1.residueNumber}})</p> | ||
| 158 | {{# } }} | ||
| 159 | </li> | 143 | </li> |
| 160 | {{# } }} | 144 | {{# }) }} |
| 161 | {{# }); }} | ||
| 162 | </ul> | 145 | </ul> |
| 163 | </div> | 146 | </div> |
| 164 | {{# }); }} | 147 | {{# }); }} | ... | ... |
-
Please register or sign in to post a comment