Browse Source

我的就诊,预约记录,这两个取消订单还未完成
密码修改对接完成

chenyue 7 years ago
parent
commit
d86a301b33

+ 27 - 4
api/http-request.js

@ -29,7 +29,7 @@
        socketUrl = "http://172.19.103.88:3000";
//      server = "http://192.168.131.133:8080/";
		
//		server = "http://192.168.131.215:10001"; //冬梅
//		server = "http://192.168.131.215:10001/"; //冬梅
//      server = "http://192.168.131.127:8060/"; //逸祥
//      server = "http://192.168.131.24:8080/"; //仕杰
//      imserver = "http://192.168.131.24:3000/api/v2"
@ -157,7 +157,7 @@
    }
    function toLoginPage() {
        if(location.href.indexOf('login.html') > -1) {
        if(location.href.indexOf('login.html') > -1||location.href.indexOf('register.html') > -1) {
            return;
        }
        setTimeout(function() {
@ -277,7 +277,29 @@
                        }
                    },
                    error: function (xhr, type, errorThrown) {
                        errTip(xhr.status);
                        reject(xhr, type, errorThrown)
                    },
                    success: function (res) {
                        resolve(res)
                    },
                }, options));
        })
    }    
    function httpPut(url, options) {
        //发送ajax请求
        return new Promise(function (resolve, reject) {
            $.ajax(server + url,
                $.extend({}, {
                    type: 'PUT',
                    dataType: 'JSON',
                    beforeSend: function (request) {
                        var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
                        if (oauthInfo) {
                            request.setRequestHeader("accessToken", oauthInfo.accessToken);
                            request.setRequestHeader("token", oauthInfo.accessToken);
                        }
                    },
                    error: function (xhr, type, errorThrown) {
                        reject(xhr, type, errorThrown)
                    },
                    success: function (res) {
@ -286,7 +308,7 @@
                }, options));
        })
    }
    
    httpRequest = {
        agentName: agentName,
@ -306,6 +328,7 @@
        failCodeHandle: failCodeHandle,
        httpPostContent:httpPostContent,
        httpPutContent:httpPutContent,
        put:httpPut,
        loginIm: function(data){
            return imHttpPost('/users/login', data);
        },

+ 17 - 2
api/patient/jiuzhen-api.js

@ -2,9 +2,24 @@
	var jiuzhenAPI = {
		// 我的就诊
		getRemind: function(data) {
			return httpRequest.get("/basic/api/v1.0/MessageRemindByType",{data: data})
			return httpRequest.get("basic/api/v1.0/MessageRemindByNotifie", {
				data: data
			})
		}, //查询挂号单列表
		queryRegOrderInfos: function(data) {
			return httpRequest.get("basic/api/v1.0/appointment/registration/search", {
				data: data
			});
		}, //查询挂号单详情
		getRegOrderInfo: function(data) {
			return httpRequest.get("basic/api/v1.0/appointment/registration/" + data);
		},
		cancelOrder: function(data) {
			return httpRequest.get("basic/api/v1.0/appointment/registration/updateState", {
				data: data
			});
		},
	}
	
	exports.jiuzhenAPI = jiuzhenAPI;
})(window)

+ 1 - 1
api/patient/login-api.js

@ -2,7 +2,7 @@
    var loginAPI = {
        //获取accessToken
        accessToken: function(data) {
			return httpRequest.post("/authentication/oauth/login",{data: data})
			return httpRequest.post("authentication/oauth/login",{data: data})
		},
        //查询用户信息
        getUserInfo: function(data){

+ 12 - 12
api/patient/mine-api.js

@ -3,51 +3,51 @@
	var mineAPI = {
		// 修改密码
		passwordReset: function(data) {
			return httpRequest.put("/basic/api/v1.0/users/admin/"+data.userId+"/password_reset",{data: data})
			return httpRequest.put("basic/api/v1.0/users/admin/"+data.userId+"/password_reset",{data: data})
		},
		// 修改个人资料
		userInforUpdate: function(data) {
			return httpRequest.httpPutContent("/basic/api/v1.0/users",{data: JSON.stringify(data)})
			return httpRequest.httpPutContent("basic/api/v1.0/users",{data: JSON.stringify(data)})
		},
		checkPhone:function(data){
			return httpRequest.get("/basic/api/v1.0/user/telephone/existence",{data:{telephone:data} })
			return httpRequest.get("basic/api/v1.0/user/telephone/existence",{data:{telephone:data} })
		},
		//校验原密码
		checkOldPass:function(data){
			var userInfo = JSON.parse(plus.storage.getItem("userAgent"));
			var userInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
			data['user_name'] = userInfo.loginCode
			return httpRequest.get("/basic/api/v1.0/users/verification",{data:data})
			return httpRequest.get("basic/api/v1.0/users/verification",{data:data})
		},
		// 新增意见
		adviceAdd: function(data) {
			setId(data);
			return httpRequest.postContent("/basic/api/v1.0/portalFeedback",{data: JSON.stringify(data)})
			return httpRequest.postContent("basic/api/v1.0/portalFeedback",{data: JSON.stringify(data)})
		},
		//获取行业列表
		workListGet:function(data){
			return httpRequest.get("/basic/api/v1.0/dictionaries/entries",{data: data})
			return httpRequest.get("basic/api/v1.0/dictionaries/entries",{data: data})
		},
		// 获取意见列表
		adviceGet: function(data) {
			return httpRequest.get("/basic/api/v1.0/portalFeedback/",{data:data})
			return httpRequest.get("basic/api/v1.0/portalFeedback/",{data:data})
		},
		// 根据ID获取反馈意见
		adviceDetailGet: function(data) {
			return httpRequest.get("/basic/api/v1.0/portalFeedback/admin/",{data:data})
			return httpRequest.get("basic/api/v1.0/portalFeedback/admin/",{data:data})
		},
		//获取地址列表
		addressGet: function (pid) {
			return httpRequest.get("/basic/api/v1.0/geography_entries/pid/"+pid)
			return httpRequest.get("basic/api/v1.0/geography_entries/pid/"+pid)
		},
	}
	//给对象设置asstoken
	function setAccessToken(data){   
		var loginInfo = JSON.parse(plus.storage.getItem("oauthInfo"));
		var loginInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
		data.accessToken = loginInfo.accessToken;
	}
	//给对象设置userId
	function setId(data){
		var userInfo = JSON.parse(plus.storage.getItem("userAgent"));
		var userInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
		data.userId = userInfo.id;
	}
	exports.mineAPI = mineAPI;

+ 0 - 1
component/login-register/login.js

@ -110,7 +110,6 @@
						return false;
					}
					var data = {
						grant_type: httpRequest.grant_type,
						client_id: httpRequest.client_id,
						username: vm.account,
						password: vm.password

+ 86 - 31
component/mine/change-password.js

@ -1,38 +1,39 @@
(function() {
	Vue.component('change-password', {
		template: `<div id="password" class="pl30 hidden">
						<div class="pb10 c-border-b c-f20">
							修改密码
						</div>
						<form id="passwordForm" class="" onsubmit="return false">
							<div class="w3-row mt25 form-group">
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">旧密码</div>
								<div class="w3-rest pl15">
									<input type="password" class="form-control" style="width:310px;" name="oldpassword" autocomplete="off">
								</div>
							</div>
							<div class="w3-row mt25 form-group">
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">新密码</div>
								<div class="w3-rest pl15">
									<input type="password" class="form-control" style="width:310px;" name="newpassword" autocomplete="off">
								</div>
							</div>
							<div class="w3-row mt25 form-group">
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">确认密码</div>
								<div class="w3-rest pl15">
									<input type="password" class="form-control" style="width:310px;" name="confirm_password" autocomplete="off">
								</div>
							</div>
							<div class="c-t-center mt50">
								<button type="submit" class="btn btn-theme c-f16" style="width:144px;height: 50px;" @click="changePassword()">确 定</button>
								<button type="button" class="btn btn-default c-f16 ml20" style="width:144px;height: 50px;" @click="gotosetting()">取 消</button>
							</div>
						</form>
					</div>`,
		template: '<div id="password" class="pl30 hidden">\
						<div class="pb10 c-border-b c-f20">修改密码\</div>\
						<form id="passwordForm" class="" onsubmit="return false">\
							<div class="w3-row mt25 form-group">\
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">旧密码</div>\
								<div class="w3-rest pl15">\
									<input  id="oldpassword" type="password" class="form-control" style="width:310px;" name="oldpassword" autocomplete="off"  maxlength="16"  minlength="8" v-model="oldPassword">\
								</div>\
							</div>\
							<div class="w3-row mt25 form-group">\
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">新密码</div>\
								<div class="w3-rest pl15">\
									<input id="newpassword" type="password" class="form-control" style="width:310px;" name="newpassword" autocomplete="off"  maxlength="16"  minlength="8" v-model="newPassword">\
									<p class="remark">8-16位,不允许空格</p>\
								</div>\
							</div>\
							<div class="w3-row mt25 form-group">\
								<div class="w3-col c-f16 m5 c-t-right c-909090" style="width:80px;">确认密码</div>\
								<div class="w3-rest pl15">\
									<input  id="confirm_password" type="password" class="form-control" style="width:310px;" name="confirm_password" autocomplete="off"  maxlength="16"  minlength="8" v-model="confirmPassword">\
								</div>\
							</div>\
							<div class="c-t-center mt50">\
								<button type="submit" class="btn btn-theme c-f16" style="width:144px;height: 50px;" @click="changePassword()">确 定</button>\
								<button type="button" class="btn btn-default c-f16 ml20" style="width:144px;height: 50px;" @click="gotosetting()">取 消</button>\
							</div>\
						</form>\
					</div>',
		props: [],
		data: function() {
			return {
				
				oldPassword:"",
				newPassword:"",
				confirmPassword:"",				
			}
		},
		mounted: function() {
@ -44,9 +45,63 @@
				$("#security").removeClass("hidden")
			},
			changePassword:function(){
				
				var vm = this
				var flag = $("#passwordForm").valid();
				if(!flag) {
					//没有通过验证
					return;
				}
				var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
				mineAPI.checkOldPass({
					password:this.oldPassword
				}).then(function(res){
					mineAPI.passwordReset({
						userId: oauthInfo.id,
						password: vm.confirmPassword
					}).then(function(res) {
						if(res) {
							alert("密码修改成功,请重新登录系统");							
							vm.existUser();
						} else {
							alert("密码修改失败");
						}
					}).catch(function(err){
						alert("密码修改失败");
					})
				}).catch(function(err){
					alert("原密码错误!");
				})			
			},
			existUser: function() {
				sessionStorage.removeItem("oauthInfo");
				sessionStorage.removeItem("userAgent");
				window.location.href="../../../page/login/html/login.html"
			}
		},
		watch: {
			oldPassword: function(newVal, oldVal) {
				var val = newVal.toString();
				var reg = /\s+/g; //去除空格
				if(reg.test(val)) {
					this.oldPassword = oldVal;
				}
			},
			newPassword: function(newVal, oldVal) {
				var val = newVal.toString();
				var reg = /\s+/g; //去除空格
				if(reg.test(val)) {
					this.newPassword = oldVal;
				}
			},
			confirmPassword: function(newVal, oldVal) {
				var val = newVal.toString();
				var reg = /\s+/g; //去除空格
				if(reg.test(val)) {
					this.confirmPassword = oldVal;
				}
			}
		}
	})
})()

+ 18 - 11
component/mine/personal-dialog-form.js

@ -14,21 +14,28 @@
		// 取消预约
		cancelAppointment: function(id) {
			return new Promise(function(resolve, reject) {
				var layerid = top.layer.confirm('<div><h3 class="c-t-center mt10">是否确认取消预约?</h3><div class="quxiaobox">取消须知:<div class="c-909090">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div></div></div>', {
				var layerid = top.layer.confirm('<div><h3 class="c-t-center mt10">是否确认取消预约?</h3><div class="quxiaobox">取消须知:<div class="c-909090">过多的退号可能导致您在一段时间内无法预约,我们对预约和退号频次达到一定数量的帐户将采取限制措施:每个帐号每个月下单满10笔时且退号满5笔时限制该帐户当月预约权限.</div></div></div>', {
					title: '取消预约',
					area: ['500px', '370px'],
					btn: ['确定', '取消'] //按钮
				}, function() {
					//					agentAPI.delCompany({
					//						id: companyId
					//					}).then(function(res) {
					//						if(res.successMsg == "find success") {
					//							top.toastr.success("删除成功!")
					//						} else {
					//							top.toastr.error("删除失败!")
					//						}
					//						resolve(layerid)
					//					})
					var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
					appointmentAPI.cancelOrder({
						orderId: id,
						thirdPartyUserId: oauthInfo.id
					}).then(function(res) {
						if(res.Code == "10000") {
							jiuzhenAPI.cancelOrder({
								id: id,
								state: 99
							}).then(function(res) {
								alert("取消成功!")
							})
						} else {
							alert("取消失败!")
						}
						resolve(layerid)
					})
					resolve(layerid)
				}, function() {

+ 73 - 71
component/mine/personal-info.js

@ -1,76 +1,78 @@
(function() {
	Vue.component('personal-info', {
		template: `<div class="container ptb20 ">
				<div class="row w3-row">
					<left-menu :code="code"></left-menu>
					<div class="pl251">
						<div class="bgc-fff c-border ptb30">
							<form class="mainbox" id="form" role="form" onsubmit="return false;" enctype="multipart/form-data" id="newInterfaceForm">
								<div class="c-t-center mb10">
									<img :src="userinfo.imgRemotePath || defaultImg" class="img-circle" width="100" height="100" id="personalImg" />
									<div class="c-f14 c-909090 pt15">
										<span>修改头像</span>
										<input type="file" @change="uploadImg($event)" class="c-vam c-inline-block type-hide pl105" accept="image/jpg,image/jpeg,image/png" style="height:150px;margin-top:-150px;"></div>
								</div>
								<div class="w3-row mt50 form-group" style="height: 40px;">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">姓&emsp;&emsp;名</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control" v-model="userinfo.realName" name="realName">
									</div>
								</div>
								<div class="w3-row form-group">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">性&emsp;&emsp;别</div>
									<div class="w3-rest pl15 c-f14">
										<input type="radio" name="gender"  value="0" v-model="userinfo.gender">&emsp;男&emsp;
										<input type="radio" name="gender"  value="1" v-model="userinfo.gender">&emsp;女
									</div>
								</div>
								<div class="w3-row  mt25 form-group">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">手机号码</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control" v-model="userinfo.telephone" name="telephone">
									</div>
								</div>
								<div class="w3-row mt25 form-group">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">身份证号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control" v-model="userinfo.idCardNo" name="idCardNo">
									</div>
								</div>
								<div class="w3-row mt25 form-group">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">社保卡号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control" v-model="userinfo.ssid" name="ssid">
									</div>
								</div>
								<div class="w3-row mt25 form-group">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">医疗保险号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control" v-model="userinfo.micard" name="micard">
									</div>
								</div>
								<div class="w3-row mt25 form-group">
									<div class="w3-col c-323232 c-f16 m5 c-t-right" style="width:80px;">行&emsp;&emsp;业</div>
									<div class="pl105" data-toggle="modal" data-target="#selindustry">
										<input id="industry" placeholder="请选择行业" type="text" class="form-control" name="industry"  v-model="userinfo.profession" name="profession"><span class="caret selcaret"></span>
									</div>
								</div>
								<div class="w3-row mt25">
									<div class="w3-col c-323232 c-f16 m5 c-t-right" style="width:80px;">家庭住址</div>
									<div class="pl105">										
											<selsect-address ref="getAddress"></selsect-address>
										<textarea class="form-control mt10 form-group"  v-model="userinfo.street" name="street"></textarea>
									</div>
								</div>
								<div class="c-t-center ">
									<button type="submit" class="btn btn-theme c-f16 mtb30" style="width:144px;" @click="update()">保 存</button>
								</div>
							</form>
							<select-industry ref="getIndustry"></select-industry>
						</div>
					</div>
				</div>
			</div>`,
		template: '<div class="container ptb20 ">\
				<div class="row w3-row">\
					<left-menu :code="code"></left-menu>\
					<div class="pl251">\
						<div class="bgc-fff c-border ptb30">\
							<form class="mainbox" id="form" role="form" onsubmit="return false;" enctype="multipart/form-data" id="newInterfaceForm">\
								<div class="c-t-center mb10">\
									<img :src="userinfo.imgRemotePath || defaultImg" class="img-circle" width="100" height="100" id="personalImg" />\
									<div class="c-f14 c-909090 pt15">\
										<span>修改头像</span>\
										<input type="file" @change="uploadImg($event)" class="c-vam c-inline-block type-hide pl105" accept="image/jpg,image/jpeg,image/png" style="height:150px;margin-top:-150px;"></div>\
								</div>\
								<div class="w3-row mt50 form-group" style="height: 40px;">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">姓&emsp;&emsp;名</div>\
									<div class="w3-rest pl15">\
										<input type="text" class="form-control" v-model="userinfo.realName" name="realName">\
									</div>\
								</div>\
								<div class="w3-row form-group">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">性&emsp;&emsp;别</div>\
									<div class="w3-rest pl15 c-f14">\
										<input type="radio" name="gender"  value="0" v-model="userinfo.gender">&emsp;男&emsp;\
										<input type="radio" name="gender"  value="1" v-model="userinfo.gender">&emsp;女\
									</div>\
								</div>\
								<div class="w3-row  mt25 form-group">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">手机号码</div>\
									<div class="w3-rest pl15">\
										<input type="text" class="form-control" v-model="userinfo.telephone" name="telephone">\
									</div>\
								</div>\
								<div class="w3-row mt25 form-group">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">身份证号</div>\
									<div class="w3-rest pl15">\
										<input type="text" class="form-control" v-model="userinfo.idCardNo" name="idCardNo" readonly="readonly">\
									</div>\
								</div>\
								<div class="w3-row mt25 form-group">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">社保卡号</div>\
									<div class="w3-rest pl15">\
										<input type="text" class="form-control" v-model="userinfo.ssid" name="ssid">\
									</div>\
								</div>\
								<div class="w3-row mt25 form-group">\
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">医疗保险号</div>\
									<div class="w3-rest pl15">\
										<input type="text" class="form-control" v-model="userinfo.micard" name="micard">\
									</div>\
								</div>\
								<div class="w3-row mt25 form-group">\
									<div class="w3-col c-323232 c-f16 m5 c-t-right" style="width:80px;">行&emsp;&emsp;业</div>\
									<div class="pl105" data-toggle="modal" data-target="#selindustry">\
										<input id="industry" placeholder="请选择行业" type="text" class="form-control" name="industry"  v-model="userinfo.profession" name="profession"><span class="caret selcaret"></span>\
									</div>\
								</div>\
								<div class="w3-row mt25">\
									<div class="w3-col c-323232 c-f16 m5 c-t-right" style="width:80px;">家庭住址</div>\
									<div class="pl105">\
										<selsect-address ref="getAddress"></selsect-address>\
										<div  class="form-group">\
											<textarea class="form-control mt10"  v-model="userinfo.street" name="street"></textarea>\
										</div>\
									</div>\
								</div>\
								<div class="c-t-center ">\
									<button type="submit" class="btn btn-theme c-f16 mtb30" style="width:144px;" @click="update()">保 存</button>\
								</div>\
							</form>\
							<select-industry ref="getIndustry"></select-industry>\
						</div>\
					</div>\
				</div>\
			</div>',
		props: [],
		data: function() {
			return {

+ 243 - 185
component/mine/record.js

@ -1,204 +1,262 @@
(function() {
	Vue.component('record', {
		template: `<div class="container ptb20">
				<div class="row w3-row">
					<left-menu :code="code"></left-menu>
					<div class="pl251">
						<div class="bgc-fff c-border" style="min-height: 706px;">
							<ul class="nav nav-tabs c-inline-block width-100" role="tablist" id="recordlist">
								<li role="presentation" class="active">
									<a href="#home" aria-controls="home" role="tab" data-toggle="tab" id="_home">待就诊</a>
								</li>
								<li role="presentation">
									<a href="#history" aria-controls="history" role="tab" data-toggle="tab" id="_history">历史记录</a>
								</li>
							</ul>
							<div class="tab-content plr25 ptb8">
								<div role="tabpanel" class="tab-pane active" id="home">
									<div class="list-body" v-for="record in records">
										<div class="list-header"><span>预约时间</span><span class="pl20">{{record.time}}</span></div>
										<div class="div-table">
											<div class="table-row">
												<div class="table-cell">
													<div class="w3-row">
														<div class="w3-col pl15" style="width:95px">
															<img :src="record.photo" class="img-circle" width="80" height="80" />
														</div>
														<div class="w3-rest c-t-left pl20 c-f14 ">
															<div class="mt15">
																<span class="c-f16">{{record.doctor}}</span>
																<span class="plr10">{{record.zhiwu}}</span>
																<span class="c-909090">{{record.keshi}}</span>
															</div>
															<div class="mt10 c-909090">{{record.yiyuan}}</div>
														</div>
													</div>
												</div>
												<div class="table-cell c-f16">
													<div class="mt15">
														{{record.othertime}}
													</div>
													<div class="mt10">
														{{record.othertime1}}
													</div>
												</div>
												<div class="table-cell c-f16 mt25">{{record.bingren}}
												</div>
												<div class="table-cell">
													<div class="cancelbtn" @click="cancelbtn(record.id)">取消预约</div>
													<div class="mt10" style="color:#0AD8C8" data-toggle="modal" data-target="#appointmentinfo">查看详情</span>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div role="tabpanel" class="tab-pane" id="history">
									<div class="list-body" v-for="record in records">
										<div class="list-header"><span>预约时间</span><span class="pl20">{{record.time}}</span></div>
										<div class="div-table">
											<div class="table-row">
												<div class="table-cell">
													<div class="w3-row">
														<div class="w3-col pl15" style="width:95px">
															<img :src="record.photo" class="img-circle" width="80" height="80" />
														</div>
														<div class="w3-rest c-t-left pl20 c-f14 ">
															<div class="mt15">
																<span class="c-f16">{{record.doctor}}</span>
																<span class="plr10">{{record.zhiwu}}</span>
																<span class="c-909090">{{record.keshi}}</span>
															</div>
															<div class="mt10 c-909090">{{record.yiyuan}}</div>
														</div>
													</div>
												</div>
												<div class="table-cell c-f16">
													<div class="mt15">
														{{record.othertime}}
													</div>
													<div class="mt10">
														{{record.othertime1}}
													</div>
												</div>
												<div class="table-cell c-f16 mt25">{{record.bingren}}
												</div>
												<div class="table-cell">
													<div class="mt10" style="color:#0AD8C8" data-toggle="modal" data-target="#appointmentinfo">查看详情</span>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div id="page" class="page_div"></div>
						</div>
					</div>
				</div>
				<div class="modal fade" id="appointmentinfo" tabindex="-1" role="dialog" aria-labelledby="appointmentinfoLabel">
					<div class="modal-dialog" role="document">
						<div class="modal-content">
							<div class="modal-header bgc-f9f9f9">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
								<h4 class="modal-title" id="appointmentinfoLabel">挂号明细</h4>
							</div>
							<div class="modal-body">
								<div class="bgc-fff">
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">订单号</div>
										<div class="w3-rest">18721839005577</div>
									</div>
									<div class="w3-row modal-list" style="border:none;">
										<div class="w3-col" style="width:120px;">订单状态</div>
										<div class="w3-rest">待就诊</div>
									</div>
									<div class="w3-row modal-list bgc-f9f9f9" style="color:#323232;border:none;">预约信息</div>
									<div class="w3-row c-border-b modal-list">
										<div class="w3-col" style="width:120px;">预约医院</div>
										<div class="w3-rest">福建省立医院</div>
									</div>
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">预约科室</div>
										<div class="w3-rest">睡眠眼科</div>
									</div>
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">就诊日期</div>
										<div class="w3-rest">2018-04-04 上午</div>
									</div>
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">就诊时间</div>
										<div class="w3-rest">07:50</div>
									</div>
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">就诊序号</div>
										<div class="w3-rest">2</div>
									</div>
									<div class="w3-row modal-list" style="border:none;">
										<div class="w3-col" style="width:120px;">退号截止时间</div>
										<div class="w3-rest">2018-04-04 23:59:00</div>
									</div>
									<div class="w3-row modal-list bgc-f9f9f9" style="color:#323232;border:none;">就诊人信息</div>
									<div class="w3-row modal-list">
										<div class="w3-col" style="width:120px;">姓名</div>
										<div class="w3-rest">郑绩</div>
									</div>
									<div class="w3-row  modal-list">
										<div class="w3-col" style="width:120px;">证件号</div>
										<div class="w3-rest">35040319850707201X</div>
									</div>
									<div class="w3-row  modal-list">
										<div class="w3-col" style="width:120px;">手机号</div>
										<div class="w3-rest">137******96</div>
									</div>
									<div class="c-t-center">
										<button type="button" class="btn btn-default c-f16 mt30 mb20" style="width:144px;" @click="hideModel()">关 闭</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>`,
		template: '<div class="container ptb20">\
				<div class="row w3-row">\
					<left-menu :code="code"></left-menu>\
					<div class="pl251">\
						<div class="bgc-fff c-border" style="min-height: 706px;">\
							<ul class="nav nav-tabs c-inline-block width-100" role="tablist" id="recordlist">\
								<li role="presentation" class="active">\
									<a href="#home" aria-controls="home" role="tab" data-toggle="tab" id="_home">待就诊</a>\
								</li>\
								<li role="presentation">\
									<a href="#history" aria-controls="history" role="tab" data-toggle="tab" id="_history">历史记录</a>\
								</li>\
							</ul>\
							<div class="tab-content plr25 ptb8">\
								<div role="tabpanel" class="tab-pane active" id="home">\
									<template v-if="records.length>0">\
										<div class="list-body" v-for="record in records">\
											<div class="list-header"><span>预约时间</span><span class="pl20">{{record.orderCreateTime}}</span></div>\
												<div class="div-table">\
													<div class="table-row">\
														<div class="table-cell">\
															<div class="w3-row">\
																<div class="w3-col pl15" style="width:95px">\
																	<img :src="record.photoUri || defaultImg" class="img-circle" width="80" height="80" />\
																</div>\
																<div class="w3-rest c-t-left pl20 c-f14 ">\
																	<div class="mt15">\
																		<span class="c-f16">{{record.doctorName}}</span>\
																		<span class="plr10">{{record.doctorName}}</span>\
																		<span class="c-909090">{{record.deptName}}</span>\
																	</div>\
																	<div class="mt10 c-909090">{{record.hospitalName}}</div>\
																</div>\
															</div>\
														</div>\
														<div class="table-cell c-f16">\
															<div class="mt15">{{record.registerDate}}</div>\
															<div class="mt10">{{record.serialNo}},{{record.commendTime}}</div>\
														</div>\
														<div class="table-cell c-f16 mt25">{{record.patientName}}</div>\
														<div class="table-cell">\
															<div class="cancelbtn" @click="cancelbtn(record.orderId)">取消预约</div>\
															<div class="mt10" style="color:#0AD8C8"  @click="getinfo(record.id)">查看详情</span>\
														</div>\
													</div>\
												</div>\
											</div>\
										</div>\
									</template>\
									<div v-else class="c-t-center mtb100">\
										<img src="../../../images/queshengye-.png" />\
									</div>\
									<div id="homepage" class="page_div" v-if="!ishomeNull"></div>\
								</div>\
								<div role="tabpanel" class="tab-pane" id="history">\
									<template v-if="historyrecords.length>0">\
										<div class="list-body" v-for="record in historyrecords">\
											<div class="list-header"><span>预约时间</span><span class="pl20">{{record.orderCreateTime}}</span></div>\
											<div class="div-table">\
												<div class="table-row">\
													<div class="table-cell">\
														<div class="w3-row">\
															<div class="w3-col pl15" style="width:95px">\
																<img :src="record.photoUri|| defaultImg" class="img-circle" width="80" height="80" />\
															</div>\
															<div class="w3-rest c-t-left pl20 c-f14 ">\
																<div class="mt15">\
																	<span class="c-f16">{{record.doctorName}}</span>\
																	<span class="plr10">{{record.deptName}}</span>\
																	<span class="c-909090">{{record.deptName}}</span>\
																</div>\
																<div class="mt10 c-909090">{{record.hospitalName}}</div>\
															</div>\
														</div>\
													</div>\
													<div class="table-cell c-f16">\
														<div class="mt15">{{record.registerDate}}</div>\
														<div class="mt10">{{record.serialNo}},{{record.commendTime}}</div>\
													</div>\
													<div class="table-cell c-f16 mt25">{{record.patientName}}</div>\
													<div class="table-cell">\
														<div class="mt10">{{record.stateDesc}}</span>\
														<div class="mt10" style="color:#0AD8C8"  @click="getinfo(record.id)">查看详情</span>\
														</div>\
													</div>\
												</div>\
											</div>\
										</div>\
									</template>\
									<div v-else class="c-t-center mtb100">\
										<img src="../../../images/queshengye-.png" />\
									</div>\
									<div id="historypage" class="page_div" v-if="!ishistoryNull"></div>\
								</div>\
							</div>\
						</div>\
				</div>\
				<div class="modal fade" id="appointmentinfo" tabindex="-1" role="dialog" aria-labelledby="appointmentinfoLabel">\
					<div class="modal-dialog" role="document">\
						<div class="modal-content">\
							<div class="modal-header bgc-f9f9f9">\
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\
								<h4 class="modal-title" id="appointmentinfoLabel">挂号明细</h4>\
							</div>\
							<div class="modal-body">\
								<div class="bgc-fff">\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">订单号</div>\
										<div class="w3-rest">{{recordinfo.orderId}}</div>\
									</div>\
									<div class="w3-row modal-list" style="border:none;">\
										<div class="w3-col" style="width:120px;">订单状态</div>\
										<div class="w3-rest">{{recordinfo.stateDesc}}</div>\
									</div>\
									<div class="w3-row modal-list bgc-f9f9f9" style="color:#323232;border:none;">预约信息</div>\
									<div class="w3-row c-border-b modal-list">\
										<div class="w3-col" style="width:120px;">预约医院</div>\
										<div class="w3-rest">{{recordinfo.hospitalName}}</div>\
									</div>\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">预约科室</div>\
										<div class="w3-rest">{{recordinfo.deptName}}</div>\
									</div>\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">就诊日期</div>\
										<div class="w3-rest">{{recordinfo.registerDate}} {{recordinfo.timeId}}</div>\
									</div>\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">就诊时间</div>\
										<div class="w3-rest">{{recordinfo.commendTime}}</div>\
									</div>\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">就诊序号</div>\
										<div class="w3-rest">{{recordinfo.serialNo}}</div>\
									</div>\
									<div class="w3-row modal-list" style="border:none;">\
										<div class="w3-col" style="width:120px;">退号截止时间</div>\
										<div class="w3-rest">{{recordinfo.invalidDate}}</div>\
									</div>\
									<div class="w3-row modal-list bgc-f9f9f9" style="color:#323232;border:none;">就诊人信息</div>\
									<div class="w3-row modal-list">\
										<div class="w3-col" style="width:120px;">姓名</div>\
										<div class="w3-rest">{{recordinfo.patientName}}</div>\
									</div>\
									<div class="w3-row  modal-list">\
										<div class="w3-col" style="width:120px;">证件号</div>\
										<div class="w3-rest">{{recordinfo.cardNo}}</div>\
									</div>\
									<div class="w3-row  modal-list">\
										<div class="w3-col" style="width:120px;">手机号</div>\
										<div class="w3-rest">{{recordinfo.phoneNo}}</div>\
									</div>\
									<div class="c-t-center">\
										<button type="button" class="btn btn-default c-f16 mt30 mb20" style="width:144px;" @click="hideModel()">关 闭</button>\
									</div>\
								</div>\
							</div>\
						</div>\
					</div>\
				</div>\
			</div>',
		props: [],
		data: function() {
			return {
				code: "record",
				records: [{
					time: "2017年11月11日 13:13:13",
					photo: "../image/touxiang.jpg",
					doctor: "张三",
					zhiwu: "主任医生",
					keshi: "骨科",
					yiyuan: "上饶医院",
					othertime: "2018-04-04上午",
					othertime1: "第2号,07:50",
					bingren: "李花花",
					id: "1",
				}, {
					time: "2017年11月11日 13:13:13",
					photo: "../image/touxiang.jpg",
					doctor: "张三",
					zhiwu: "主任医生",
					keshi: "骨科",
					yiyuan: "上饶医院",
					othertime: "2018-04-04上午",
					othertime1: "第2号,07:50",
					bingren: "李花花",
					id: "1",
				}, ]
				records: [],
				historyrecords: [],
				recodestype: '2',
				historytype: '',
				recordinfo: {},
				defaultImg: "../../../images/moren_touxiang_img.png",
				ishomeNull: false,
				ishistoryNull: false,
			}
		},
		mounted: function() {
			var vm = this
			vm.getlist(1, vm.recodestype)
			vm.getlist(1, vm.historytype)
		},
		methods: {
			getlist: function(pageNo, types) {
				var vm = this
				var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
				var filters = "userId=" + oauthInfo.id
				if(types == '2') {
					filters += ";state=" + types
				}
				var param = {
					fields: '',
					filters: filters,
					sort: '+registerDate',
					page: pageNo,
					size: 5
				}
				jiuzhenAPI.queryRegOrderInfos(param).then(function(res) {
					if(types == '2') {
						vm.records = res.detailModelList
						if(res.totalCount == 0) {
							vm.ishomeNull = true
						} else {
							vm.inithomePage(pageNo, res.totalPage, res.totalCount)
						}
					} else if(types == '') {
						vm.historyrecords = res.detailModelList
						vm.inithistoryPage(pageNo, res.totalPage, res.totalCount)
						if(res.totalCount == 0) {
							vm.ishistoryNull = true
						} else {
							vm.inithistoryPage(pageNo, res.totalPage, res.totalCount)
						}
					}
				})
			},
			cancelbtn: function(id) {
				personalDialogForm.cancelAppointment(id).then(function(layerid) {
					top.layer.close(layerid)
				})
			},
			hideModel:function(){
			inithomePage: function(pageNo, total, size) {
				var vm = this
				//分页初始化
				$("#homepage").paging({
					pageNo: pageNo,
					totalPage: total,
					totalSize: size,
					callback: function(num) {
						//回调的页数
						vm.getlist(num, vm.recodestype)
					}
				})
			},
			inithistoryPage: function(pageNo, total, size) {
				var vm = this
				//分页初始化
				$("#historypage").paging({
					pageNo: pageNo,
					totalPage: total,
					totalSize: size,
					callback: function(num) {
						//回调的页数
						vm.getlist(num, vm.historytype)
					}
				})
			},
			getinfo: function(orderid) {
				var vm = this
				jiuzhenAPI.getRegOrderInfo(orderid).then(function(res) {
					vm.recordinfo = res.obj
					vm.openmodel()
				})
			},
			openmodel: function() {
				$('#appointmentinfo').modal('show')
			},
			hideModel: function() {
				$('#appointmentinfo').modal('hide')
			}
		},

+ 19 - 14
component/mineJiuZhen/mineJiuZhen-dialog-form.js

@ -7,33 +7,38 @@
				title: '满意度调查',
				shadeClose: false,
				closeBtn: true, //显示关闭按钮
				area: ['500px','714px'],
				area: ['500px', '714px'],
				btn: [], //按钮
				content: '../../../page/mineJiuZhen/html/satisfaction.html', //iframe的url
				end: function() {
					location.reload();
					
				}
			});
		},
		// 取消预约
		cancelAppointment: function(id) {
		cancelAppointment: function(id,orderid) {
			return new Promise(function(resolve, reject) {
				var layerid = top.layer.confirm('<div><h3 class="c-t-center mt10">是否确认取消预约?</h3><div class="quxiaobox">取消须知:<div class="c-909090">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div></div></div>', {
				var layerid = top.layer.confirm('<div><h3 class="c-t-center mt10">是否确认取消预约?</h3><div class="quxiaobox">取消须知:<div class="c-909090">过多的退号可能导致您在一段时间内无法预约,我们对预约和退号频次达到一定数量的帐户将采取限制措施:每个帐号每个月下单满10笔时且退号满5笔时限制该帐户当月预约权限。</div></div></div>', {
					title: '取消预约',
					area: ['500px', '370px'],
					btn: ['确定', '取消'] //按钮
				}, function() {
					//					agentAPI.delCompany({
					//						id: companyId
					//					}).then(function(res) {
					//						if(res.successMsg == "find success") {
					//							top.toastr.success("删除成功!")
					//						} else {
					//							top.toastr.error("删除失败!")
					//						}
					//						resolve(layerid)
					//					})
					var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
					appointmentAPI.cancelOrder({
						orderId: orderid,
						thirdPartyUserId: oauthInfo.id
					}).then(function(res) {
						if(res.Code == "10000") {
							jiuzhenAPI.cancelOrder({
								id: id,
								state: 99
							}).then(function(res) {alert("取消成功!")})
						} else {
							alert("取消失败!")
						}
						resolve(layerid)
					})
					resolve(layerid)
				}, function() {

BIN
images/queshengye-.png


+ 9 - 0
page/mine/css/record.css

@ -18,6 +18,15 @@ cancelbtnbody {
	overflow: hidden
}
.w60{
	width:60px !important;
	position: relative;
	top:10px;
	right: 30px;
}
.w60:hover{
	color:#0AD8C8;
}
.div-table {
	display: table;
	width: 100%;

+ 4 - 0
page/mine/css/security-setting.css

@ -79,3 +79,7 @@ body {
	color:#333;
	background: #F4F6FA;
}
.remark {
	color: #a8a8a8;
	font-size: 12px;
}

+ 2 - 0
page/mine/html/record.html

@ -35,6 +35,8 @@
		<script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/artDialog/6.0.5/api/js/dialog-plus.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/layer/layer.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../api/patient/appointment-api.js"></script>
		<script src="../../../api/patient/jiuzhen-api.js"></script>
		<script src="../../../js/paging.js"></script>
		<script src="../../../component/common/event-bus.js"></script>
		<script src="../../../component/common/footer.js"></script>

+ 1 - 0
page/mine/html/security-setting.html

@ -35,6 +35,7 @@
		<script src="../../../api/http-request.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../plugins/artDialog/6.0.5/api/js/dialog-plus.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../js/selector.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../api/patient/mine-api.js" type="text/javascript " charset="utf-8 "></script>
		<script src="../../../component/common/footer.js "></script>
		<script src="../../../component/common/header.js "></script>
		<script src="../../../component/mine/left-menu.js "></script>

+ 4 - 4
page/mine/js/personal-info.js

@ -38,7 +38,6 @@ $.validator.setDefaults({
			ssid: {
				required: !0,
				noNull: !0,
				validNumWord:!0,
			}, 
			idCardNo: {
				required: !0,
@ -48,6 +47,7 @@ $.validator.setDefaults({
			telephone: {
				required: !0,
				noNull: !0,
				istelephone:!0,
			}, 
			profession: {
				required: !0,
@ -98,7 +98,7 @@ jQuery.validator.addMethod("validSSC", function(value, element) {
	var reg =/^([a-zA-Z]{1}[a-zA-Z0-9]{8}|[0-9]{12})$/
	return this.optional(element) || reg.test(value);
}, "请填写有效的医保卡卡号!");
jQuery.validator.addMethod("validNumWord", function(value, element) {
	var reg =/^[0-9a-zA-Z]+$/
jQuery.validator.addMethod("istelephone", function(value, element) {
	var reg =/^1[3|4|5|6|7|8][0-9]\d{4,8}$/
	return this.optional(element) || reg.test(value);
}, "请填写有效的社保卡号!");
}, "请填写有效的手机号码!");

+ 0 - 11
page/mine/js/record.js

@ -27,18 +27,7 @@ new Vue({
//		}, ]
	},
	mounted: function() {
		//分页初始化
		$("#page").paging({
			pageNo: 1,
			totalPage: 50,
			totalSize: 20,
			callback: function(num) {
				//回调的页数
				alert("查询第"+num+"页");
			}
		})
		
		EventBus.$emit("jump-step",{step:3});//step:跳转的步数
	},
	methods: {

+ 1 - 1
page/mineJiuZhen/css/mineJiuZhen.css

@ -81,7 +81,7 @@ body {
	font-size: 16px;
	margin-right: 0;
	border: none;
	height: 47px;
	height: 47.5px;
}
.list-body {

+ 22 - 20
page/mineJiuZhen/html/mineJiuZhen.html

@ -37,45 +37,45 @@
						<div role="tabpanel" class="tab-pane active" id="home">
							<template v-if="records.length>0">
								<div class="list-body" v-for="record in records">
									<div class="list-header"><span>就诊时间</span><span class="pl20">{{record.time}}</span></div>
									<div class="list-header"><span>就诊时间</span><span class="pl20">{{record.mRegistration.register_date}} {{record.mRegistration.time_id_desc}} {{record.mRegistration.commend_time}}</span></div>
									<div class="w3-row">
										<div class="w3-col" style="width:150px;float: right;padding-top: 30px;">
											<div class="cancelbtn" @click="cancelbtn(record.id)">取消预约</div>
											<div class="cancelbtn" @click="cancelbtn(record.id,record.mRegistration.order_id)">取消预约</div>
										</div>
										<div class="w3-rest">
											<div class="div-table">
												<div class="table-row">
													<div class="table-cell">
														<div class="c-909090">医院</div>
														<div>{{record.yiyuan}}</div>
														<div>{{record.mRegistration.hospital_name}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">科室</div>
														<div>{{record.keshi}}</div>
														<div>{{record.mRegistration.dept_name}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">主任医师</div>
														<div>{{record.doctor}}</div>
														<div class="c-909090">医师</div>
														<div>{{record.mRegistration.doctor_name}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">挂号方式</div>
														<div>{{record.type}}</div>
														<div>预约挂号</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>								
								<div id="page1" class="page_div"></div>
								</div>
							</template>
							<div v-else class="c-t-center mtb100">
								<img src="../../../images/wushuju_icon.png" />
								<img src="../../../images/queshengye-.png" />
							</div>
							<div id="homepage" class="page_div"></div>
						</div>
						<div role="tabpanel" class="tab-pane" id="history">
							<template v-if="history.length>0">
							<template v-if="historyrecords.length>0">
								<div class="list-body" v-for="record in historyrecords">
									<div class="list-header"><span>就诊时间</span><span class="pl20">{{record.time}}</span></div>
									<div class="list-header"><span>就诊时间</span><span class="pl20">{{record.registerDate}}</span></div>
									<div class="w3-row">
										<div class="w3-col" style="width:150px;float: right;padding-top: 30px;">
											<div class="satisfactionbtn" @click="satisfactionbtn(record.id)">满意度调查</div>
@ -85,29 +85,30 @@
												<div class="table-row">
													<div class="table-cell">
														<div class="c-909090">医院</div>
														<div>{{record.yiyuan}}</div>
														<div>{{record.hospitalName}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">科室</div>
														<div>{{record.keshi}}</div>
														<div>{{record.deptName}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">主任医师</div>
														<div>{{record.doctor}}</div>
														<div>{{record.doctorName}}</div>
													</div>
													<div class="table-cell">
														<div class="c-909090">挂号方式</div>
														<div>{{record.type}}</div>
														<div>预约挂号</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div id="page2" class="page_div"></div></template>
							<div v-else class="c-t-center mtb100">
								<img src="../../../images/wushuju_icon.png" />
							</div>
								<div v-else class="c-t-center mtb100">
									<img src="../../../images/queshengye-.png" />
								</div>
								<div id="historypage" class="page_div"></div>
							</template>
						</div>
					</div>
				</div>
@ -128,6 +129,7 @@
		<script src="../../../plugins/layer/layer.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../js/paging.js"></script>
		<script src="../../../api/patient/jiuzhen-api.js"></script>
		<script src="../../../api/patient/appointment-api.js"></script>
		<script src="../../../component/common/event-bus.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../component/mineJiuZhen/mineJiuZhen-dialog-form.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../component/common/header.js" type="text/javascript" charset="utf-8"></script>

+ 71 - 52
page/mineJiuZhen/js/mineJiuZhen.js

@ -2,72 +2,91 @@ new Vue({
	el: "#app",
	data: {
		records: [],
		historyrecords:[],
		historyrecords: [],
		recodestype: '101',
		historytype: '100',
		ishomeNull: false,
		ishistoryNull: false,
	},
	mounted: function() {
		var vm=this
		//分页初始化
		$("#page1").paging({
			pageNo: 1,
			totalPage: 50,
			totalSize: 20,
			callback: function(num) {
				//回调的页数
				vm.getlist(num)
//				alert("查询第" + num + "页");
			}
		}) //分页初始化
		$("#page2").paging({
			pageNo: 1,
			totalPage: 50,
			totalSize: 20,
			callback: function(num) {
				//回调的页数
				vm.gethistory(num)
//				alert("查询第" + num + "页");
			}
		})
		EventBus.$emit("jump-step", {
			step: 3
		}); //step:跳转的步数
		this.initlist(this.pageNo)
		var vm = this
		vm.getlist(1, vm.recodestype)
		vm.getlist(1, vm.historytype)
	},
	methods: {
		initlist: function(pageNo) {
		getlist: function(pageNo, types) {
			var vm = this
			vm.getlist(1)
			vm.gethistory(1)
		},
		getlist:function(pageNo){
			var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
			var param = {
				type: '101',
				appid: httpRequest.client_id,
				type: types,
				appId: httpRequest.client_id,
				toUserId: oauthInfo.id,
				page: pageNo,
				size: 5
				size: 5,
				typeId: 7,
			}
			jiuzhenAPI.getRemind(param).then(function(res) {
				vm.records = res.detailModelList
				if(types == '101') {
					vm.records = res.detailModelList
					if(res.totalCount == 0) {
						vm.ishomeNull = true
					} else {
						vm.inithomePage(pageNo, Math.ceil(res.obj.total / 5), res.obj.total)
					}
				} else if(types == '100') {
					vm.historyrecords = res.detailModelList
					vm.historyrecords = res.detailModelList.map(function(v) {
						var content = JSON.parse(v.content);
						for(var i = 0; i < content.length; i++) {
							var aaa = content[i].code
							if(content[i].code == 'registerDate') {
								v.registerDate = content[i].value
							} else if(content[i].code == 'deptName') {
								v.deptName = content[i].value
							} else if(content[i].code == 'doctorName') {
								v.doctorName = content[i].value
							} else if(content[i].code == 'hospitalName') {
								v.hospitalName = content[i].value
							}
						}
						return v
					})
					if(res.totalCount == 0) {
						vm.ishomeNull = true
					} else {
						vm.inithistoryPage(pageNo, Math.ceil(res.obj.total / 5), res.obj.total)
					}
				}
			})
		},
		gethistory:function(pageNo){
			var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
			var param = {
				type: '100',
				appid: httpRequest.client_id,
				toUserId: oauthInfo.id,
				page: pageNo,
				size: 5
			}
			jiuzhenAPI.getRemind(param).then(function(res) {
				vm.historyrecords = res.detailModelList
		inithomePage: function(pageNo, total, size) {
			var vm = this
			//分页初始化
			$("#homepage").paging({
				pageNo: pageNo,
				totalPage: total,
				totalSize: size,
				callback: function(num) {
					//回调的页数
					vm.getrecords(num)
				}
			})
		}
		cancelbtn: function(id) {
			mineJiuZhenDialogForm.cancelAppointment(id).then(function(layerid) {
		},
		inithistoryPage: function(pageNo, total, size) {
			var vm = this
			//分页初始化
			$("#historypage").paging({
				pageNo: pageNo,
				totalPage: total,
				totalSize: size,
				callback: function(num) {
					//回调的页数
					vm.gethistory(num, vm.monthtimes)
				}
			})
		},
		cancelbtn: function(id, orderid) {
			mineJiuZhenDialogForm.cancelAppointment(id, orderid).then(function(layerid) {
				top.layer.close(layerid)
			})
		},