|  | @ -21,11 +21,6 @@ mui.plusReady(function() {
 | 
												
													
														
															|  | 	patiCode = self.patiCode;
 |  | 	patiCode = self.patiCode;
 | 
												
													
														
															|  | 	doctorCode = JSON.parse(plus.storage.getItem("docInfo")).code; 
 |  | 	doctorCode = JSON.parse(plus.storage.getItem("docInfo")).code; 
 | 
												
													
														
															|  | 	overdue = self.overdue;
 |  | 	overdue = self.overdue;
 | 
												
													
														
															|  | 	var docType = plus.storage.getItem("docType");  
 |  | 
 | 
												
													
														
															|  | 	if(docType!=3){//健康医生不查看家庭成员
 |  | 
 | 
												
													
														
															|  | 		$(".jtcyli").show()
 |  | 
 | 
												
													
														
															|  | 	}
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     $("#pati_info").attr("code",patiCode);
 |  |     $("#pati_info").attr("code",patiCode);
 | 
												
													
														
															|  |     localStorage.removeItem('updateService'); 
 |  |     localStorage.removeItem('updateService'); 
 | 
												
													
														
															|  |     getPatiInfo();
 |  |     getPatiInfo();
 | 
												
											
												
													
														
															|  | @ -47,34 +42,6 @@ function getPatiInfo(){
 | 
												
													
														
															|  | 		function(res){ 
 |  | 		function(res){ 
 | 
												
													
														
															|  | 			if(res.status == 200){
 |  | 			if(res.status == 200){
 | 
												
													
														
															|  | 				oPatiInfo = res.data; 
 |  | 				oPatiInfo = res.data; 
 | 
												
													
														
															|  | 				oPatiInfo.signType = 0;    
 |  | 
 | 
												
													
														
															|  | 				
 |  | 
 | 
												
													
														
															|  | 				jtAdminTeamId = res.data.jtAdminTeam;
 |  | 
 | 
												
													
														
															|  | 				
 |  | 
 | 
												
													
														
															|  | 				//判断居民类型 如果是慢病病人 则续方管理模块出现否则隐藏
 |  | 
 | 
												
													
														
															|  | 				for(var i in oPatiInfo.serverTypes){
 |  | 
 | 
												
													
														
															|  | 					if(oPatiInfo.serverTypes[i].server_type==4||oPatiInfo.serverTypes[i].server_type==5){
 |  | 
 | 
												
													
														
															|  | 						$("#mbda").show();    
 |  | 
 | 
												
													
														
															|  | 					}
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 				//判断居民是否为女性 则产检模块出现否则隐藏
 |  | 
 | 
												
													
														
															|  | 				if(oPatiInfo.sex == 2){
 |  | 
 | 
												
													
														
															|  | 					$("#fybj").show();    
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 				
 |  | 
 | 
												
													
														
															|  | 				if(oPatiInfo.ssDoctor==doctorCode || oPatiInfo.ssDoctorHealth==doctorCode){ 
 |  | 
 | 
												
													
														
															|  | 					oPatiInfo.signType = 1; 
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 				if(oPatiInfo.jtDoctor==doctorCode || oPatiInfo.jtDoctorHealth==doctorCode){ 
 |  | 
 | 
												
													
														
															|  | 					oPatiInfo.signType = oPatiInfo.signType == 1 ? 3 : 2;
 |  | 
 | 
												
													
														
															|  | 					oPatiInfo.expensesStatus1 = oPatiInfo.expensesStatus; 
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 				//服务类型
 |  | 
 | 
												
													
														
															|  | 				if(oPatiInfo.serverTypes){
 |  | 
 | 
												
													
														
															|  | 					$.map(oPatiInfo.serverTypes,function(item,index){
 |  | 
 | 
												
													
														
															|  | 						jtServerCode.push(item.server_type)
 |  | 
 | 
												
													
														
															|  | 					})
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 				bindEvents();
 |  | 				bindEvents();
 | 
												
													
														
															|  | 				dealPatiInfoTmpl(oPatiInfo);
 |  | 				dealPatiInfoTmpl(oPatiInfo);
 | 
												
													
														
															|  | 				$(".div-dianhua").attr("data-mobile",oPatiInfo.mobile).attr("data-phone",oPatiInfo.phone); 
 |  | 				$(".div-dianhua").attr("data-mobile",oPatiInfo.mobile).attr("data-phone",oPatiInfo.phone); 
 | 
												
											
												
													
														
															|  | @ -152,152 +119,6 @@ function isWeiXinRemind (data) {
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | }
 |  | }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | //查询某个患者今天是否已提醒
 |  | 
 | 
												
													
														
															|  | function isYitixing(){
 |  | 
 | 
												
													
														
															|  | 	sendPost("/doctor/family_contract/is_patient_remind_expenses",{patient:patiCode},null,function(res){
 |  | 
 | 
												
													
														
															|  | 		if(res.status==200){
 |  | 
 | 
												
													
														
															|  | 			if(res.data==1){//data为1已提醒 为0未提醒
 |  | 
 | 
												
													
														
															|  | 				$("#remindPay").addClass("ytx");
 |  | 
 | 
												
													
														
															|  | 				//则显示“已提醒缴费"
 |  | 
 | 
												
													
														
															|  | 				$("#remindPay a").text("已提醒缴费");
 |  | 
 | 
												
													
														
															|  | 			}else{
 |  | 
 | 
												
													
														
															|  | 				$("#remindPay").removeClass("ytx");
 |  | 
 | 
												
													
														
															|  | 				$("#remindPay a").text("提醒缴费");
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 	})
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | //缴费提醒
 |  | 
 | 
												
													
														
															|  | function jiaofeitixing(){
 |  | 
 | 
												
													
														
															|  | 	sendPost("/doctor/family_contract/expenses_remind",{patient:patiCode,isAll:"0"},null,function(res){
 |  | 
 | 
												
													
														
															|  | 		mui.toast(res.msg);
 |  | 
 | 
												
													
														
															|  | 		if(res.status==200){
 |  | 
 | 
												
													
														
															|  | 			isYitixing();//查询某个患者今天是否已提醒
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 	})
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | //提醒缴费
 |  | 
 | 
												
													
														
															|  | $("#remindPay").on("tap",function(){
 |  | 
 | 
												
													
														
															|  |     mui("#sheet1").popover('toggle');
 |  | 
 | 
												
													
														
															|  | 	if($(this).hasClass("ytx")){//今日已提醒
 |  | 
 | 
												
													
														
															|  | 		mui.toast("居民今天已经收到过缴费提醒了哦,不可再次提醒");
 |  | 
 | 
												
													
														
															|  | 	}else{//今日未提醒,则缴费提醒
 |  | 
 | 
												
													
														
															|  | 		jiaofeitixing();
 |  | 
 | 
												
													
														
															|  | 	}
 |  | 
 | 
												
													
														
															|  | })
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | /*提醒续签*/
 |  | 
 | 
												
													
														
															|  | function sendRenewRemind(){
 |  | 
 | 
												
													
														
															|  |     var url = "/doctor/sign/remindPatientRenew",
 |  | 
 | 
												
													
														
															|  |         params = {patient: oPatiInfo.code};
 |  | 
 | 
												
													
														
															|  |     sendPost(url, params, null, function(res){
 |  | 
 | 
												
													
														
															|  |         if(res.status == 200){
 |  | 
 | 
												
													
														
															|  |             if(res.data == 1 || res.data == 2){
 |  | 
 | 
												
													
														
															|  |                 $("#remindXQ").find("a").text("已提醒续签");
 |  | 
 | 
												
													
														
															|  |                 $("#remindXQ").addClass("ytx");
 |  | 
 | 
												
													
														
															|  |             }
 |  | 
 | 
												
													
														
															|  |             mui.toast(res.msg);
 |  | 
 | 
												
													
														
															|  |         }else{
 |  | 
 | 
												
													
														
															|  |             mui.toast(res.msg)
 |  | 
 | 
												
													
														
															|  |         }
 |  | 
 | 
												
													
														
															|  |     }, "post", "", true);
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | ////获取服务类型
 |  | 
 | 
												
													
														
															|  | function getServiceDropdown(){
 |  | 
 | 
												
													
														
															|  | 	sendPost("/doctor/sign/getSigndict",{}, null, function(res){
 |  | 
 | 
												
													
														
															|  | 		if(res.status == 200){
 |  | 
 | 
												
													
														
															|  |             fillServiceDropdown(res); 
 |  | 
 | 
												
													
														
															|  |         }else{
 |  | 
 | 
												
													
														
															|  |             mui.toast(res.msg)
 |  | 
 | 
												
													
														
															|  |         }
 |  | 
 | 
												
													
														
															|  |      }, "get", "", true);
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | //普通 老年 高血 糖尿 孕妇 儿童 贫困 计生 重性 残疾 结核 
 |  | 
 | 
												
													
														
															|  | function filterSer(name){
 |  | 
 | 
												
													
														
															|  | 	var $li = $('.dw-bf').find('div.dw-li');
 |  | 
 | 
												
													
														
															|  | 	$li.addClass('dw-v');
 |  | 
 | 
												
													
														
															|  | 	var nameArr = name.split(',');
 |  | 
 | 
												
													
														
															|  | 	$.map(nameArr,function(item,index){
 |  | 
 | 
												
													
														
															|  | 		if(item.trim() == '普通人群'){
 |  | 
 | 
												
													
														
															|  | 			var arr = [2,3,6,7,8,9,10]
 |  | 
 | 
												
													
														
															|  | 			$.map(arr,function(it,index){
 |  | 
 | 
												
													
														
															|  | 				$li.eq(it).removeClass('dw-v')
 |  | 
 | 
												
													
														
															|  | 			})
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 		if(item.trim() == '老年人'){
 |  | 
 | 
												
													
														
															|  | 			var arr = [4,5]
 |  | 
 | 
												
													
														
															|  | 			$.map(arr,function(it,index){
 |  | 
 | 
												
													
														
															|  | 				$li.eq(it).removeClass('dw-v')
 |  | 
 | 
												
													
														
															|  | 			})
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 		if(item.trim() == '高血压' ||item.trim() == '糖尿病'||item.trim() == '贫困人口'||item.trim() == '计生特殊人群'||item.trim() == '重性精神疾病'||item.trim() == '残疾人'||item.trim() == '结核病' ){
 |  | 
 | 
												
													
														
															|  | 			var arr = [0]
 |  | 
 | 
												
													
														
															|  | 			$.map(arr,function(it,index){
 |  | 
 | 
												
													
														
															|  | 				$li.eq(it).removeClass('dw-v')
 |  | 
 | 
												
													
														
															|  | 			})
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 		if(item.trim() == '0-6岁儿童'){
 |  | 
 | 
												
													
														
															|  | 			var arr = [1,4]
 |  | 
 | 
												
													
														
															|  | 			$.map(arr,function(it,index){
 |  | 
 | 
												
													
														
															|  | 				$li.eq(it).removeClass('dw-v')
 |  | 
 | 
												
													
														
															|  | 			})
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 		if(item.trim() == '孕产妇'){
 |  | 
 | 
												
													
														
															|  | 			var arr = [1,5]
 |  | 
 | 
												
													
														
															|  | 			$.map(arr,function(it,index){
 |  | 
 | 
												
													
														
															|  | 				$li.eq(it).removeClass('dw-v')
 |  | 
 | 
												
													
														
															|  | 			})
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 	})	
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | ////设置服务类型下拉
 |  | 
 | 
												
													
														
															|  | function fillServiceDropdown(data){ 
 |  | 
 | 
												
													
														
															|  |     var $serviceSel = $('#selFuwu'),
 |  | 
 | 
												
													
														
															|  | 		data = data.data,
 |  | 
 | 
												
													
														
															|  | 		has = false,
 |  | 
 | 
												
													
														
															|  | 		saveOldData ='',
 |  | 
 | 
												
													
														
															|  | 		html=""; 
 |  | 
 | 
												
													
														
															|  |     for(i=0; i<data.length; i++){
 |  | 
 | 
												
													
														
															|  |     	has = false;
 |  | 
 | 
												
													
														
															|  |     	for(j=0;j<jtServerCode.length;j++){
 |  | 
 | 
												
													
														
															|  |     		if(jtServerCode[j] == data[i].code){
 |  | 
 | 
												
													
														
															|  |     			html += '<option selected value="'+data[i].code+'">'+data[i].name+'</option>';
 |  | 
 | 
												
													
														
															|  |     			has = true;
 |  | 
 | 
												
													
														
															|  |     		}
 |  | 
 | 
												
													
														
															|  |     	}
 |  | 
 | 
												
													
														
															|  |     	if(!has){
 |  | 
 | 
												
													
														
															|  |     		html += '<option value="'+data[i].code+'">'+data[i].name+'</option>'
 |  | 
 | 
												
													
														
															|  |     	}
 |  | 
 | 
												
													
														
															|  |     }
 |  | 
 | 
												
													
														
															|  |     $serviceSel.html(html);
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     $serviceSel.mobiscroll().select({
 |  | 
 | 
												
													
														
															|  |         theme: 'ios',
 |  | 
 | 
												
													
														
															|  |         lang: 'zh',
 |  | 
 | 
												
													
														
															|  |         display: 'bottom',
 |  | 
 | 
												
													
														
															|  |         rows:6,
 |  | 
 | 
												
													
														
															|  |         placeholder: '请选择服务类型',
 |  | 
 | 
												
													
														
															|  |         onSelect: function ( valueText, inst) {
 |  | 
 | 
												
													
														
															|  |         	if(valueText != saveOldData){
 |  | 
 | 
												
													
														
															|  |         		currService = inst._tempValue?inst._tempValue.join(','):'';
 |  | 
 | 
												
													
														
															|  | 				localStorage.setItem('updateService',currService);
 |  | 
 | 
												
													
														
															|  | 				$('#smallTipSev').show(); 
 |  | 
 | 
												
													
														
															|  | 				$("#diseases").html("无");
 |  | 
 | 
												
													
														
															|  |         	}
 |  | 
 | 
												
													
														
															|  | 		},
 |  | 
 | 
												
													
														
															|  | 		onChange: function (event, inst){
 |  | 
 | 
												
													
														
															|  | 			filterSer(event)
 |  | 
 | 
												
													
														
															|  |     	},
 |  | 
 | 
												
													
														
															|  |     	onShow: function (event, inst) {
 |  | 
 | 
												
													
														
															|  |     		saveOldData = inst;
 |  | 
 | 
												
													
														
															|  | 			filterSer(inst)
 |  | 
 | 
												
													
														
															|  |     	}
 |  | 
 | 
												
													
														
															|  |     })
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | // 滚动条实例初始化
 |  | // 滚动条实例初始化
 | 
												
													
														
															|  | function initScroller() {
 |  | function initScroller() {
 | 
												
													
														
															|  |     //阻尼系数
 |  |     //阻尼系数
 | 
												
											
												
													
														
															|  | @ -324,55 +145,10 @@ function initScroller() {
 | 
												
													
														
															|  |  * 拼接居民信息模板
 |  |  * 拼接居民信息模板
 | 
												
													
														
															|  |  */
 |  |  */
 | 
												
													
														
															|  | function dealPatiInfoTmpl(patiInfoObj) {
 |  | function dealPatiInfoTmpl(patiInfoObj) {
 | 
												
													
														
															|  | 	signType = patiInfoObj.signType;
 |  | 
 | 
												
													
														
															|  | 	$("#pati_info_wrap").html(template("pati_info_tmpl", patiInfoObj));
 |  | 	$("#pati_info_wrap").html(template("pati_info_tmpl", patiInfoObj));
 | 
												
													
														
															|  | 	$('#view_wrap').show();
 |  | 	$('#view_wrap').show();
 | 
												
													
														
															|  | 	initPatientData(3);
 |  | 
 | 
												
													
														
															|  | 	getServiceDropdown();
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | /*
 |  | 
 | 
												
													
														
															|  |  * 获取患者续签状态
 |  | 
 | 
												
													
														
															|  |  */
 |  | 
 | 
												
													
														
															|  | function getPatientRenewInfo(patiInfo){
 |  | 
 | 
												
													
														
															|  |     var url = "/doctor/sign/checkCanRenew",
 |  | 
 | 
												
													
														
															|  |         params = {patient: patiInfo.code};
 |  | 
 | 
												
													
														
															|  |     
 |  | 
 | 
												
													
														
															|  |     sendGet(url, params, null, function(res){
 |  | 
 | 
												
													
														
															|  |         if(res.status == 200){
 |  | 
 | 
												
													
														
															|  |             var state = res.data.code;
 |  | 
 | 
												
													
														
															|  |             if(state != "1" && state != "2"){
 |  | 
 | 
												
													
														
															|  |                 oPatiInfo.isRenewable = 0;
 |  | 
 | 
												
													
														
															|  |             }else{
 |  | 
 | 
												
													
														
															|  |                 oPatiInfo.isRenewable = 1;
 |  | 
 | 
												
													
														
															|  |             }
 |  | 
 | 
												
													
														
															|  |             //增加判断说是否显示右上角”更多”的图片
 |  | 
 | 
												
													
														
															|  |             if(oPatiInfo.expensesStatus == "1" && oPatiInfo.openid && !oPatiInfo.isRenewable){
 |  | 
 | 
												
													
														
															|  |                 $(".header-link").hide();
 |  | 
 | 
												
													
														
															|  |             }else{
 |  | 
 | 
												
													
														
															|  |                 $(".header-link").show();
 |  | 
 | 
												
													
														
															|  |                 isWeiXinRemind(oPatiInfo);
 |  | 
 | 
												
													
														
															|  |                 if(oPatiInfo && oPatiInfo.expensesStatus!=1 && oPatiInfo.expensesStatus!=2){
 |  | 
 | 
												
													
														
															|  |                     if(oPatiInfo.signType!=1) {
 |  | 
 | 
												
													
														
															|  |                         $("#remindPay").show();
 |  | 
 | 
												
													
														
															|  |                         isYitixing();//查询某个患者今天是否已提醒
 |  | 
 | 
												
													
														
															|  |                     }
 |  | 
 | 
												
													
														
															|  |                 }
 |  | 
 | 
												
													
														
															|  |                 if(oPatiInfo.isRenewable){
 |  | 
 | 
												
													
														
															|  |                     $("#remindXQ").show();
 |  | 
 | 
												
													
														
															|  |                     if(oPatiInfo.isRemindRenew == "1"){
 |  | 
 | 
												
													
														
															|  |                         $("#remindXQ").find("a").text("已提醒续签");
 |  | 
 | 
												
													
														
															|  |                         $("#remindXQ").addClass("ytx");
 |  | 
 | 
												
													
														
															|  |                     }
 |  | 
 | 
												
													
														
															|  |                 }
 |  | 
 | 
												
													
														
															|  |             }
 |  | 
 | 
												
													
														
															|  |         }else{
 |  | 
 | 
												
													
														
															|  |             mui.toast(res.msg);
 |  | 
 | 
												
													
														
															|  |         }
 |  | 
 | 
												
													
														
															|  |     }, true);
 |  | 
 | 
												
													
														
															|  | }
 |  | }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | /*
 |  | /*
 | 
												
													
														
															|  |  * 查看居民资料
 |  |  * 查看居民资料
 | 
												
													
														
															|  |  */
 |  |  */
 | 
												
											
												
													
														
															|  | @ -519,87 +295,7 @@ function toSelectJb(){
 | 
												
													
														
															|  | }
 |  | }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | var labelName =[];			
 |  | var labelName =[];			
 | 
												
													
														
															|  | function initPatientData(){
 |  | 
 | 
												
													
														
															|  |  	sendPost("doctor/family_contract/doctor_patient_sign_exist", {doctor: doctorCode, patient: patiCode}, null, function(res){
 |  | 
 | 
												
													
														
															|  |  		if(res.status==200){
 |  | 
 | 
												
													
														
															|  |  			if(res.data.status==-1 || res.data.status==0){
 |  | 
 | 
												
													
														
															|  |  				qyRelation = 0;
 |  | 
 | 
												
													
														
															|  |  				//没有签约关系
 |  | 
 | 
												
													
														
															|  |  				//判断医生是否是该患者所在的团队的团队长
 |  | 
 | 
												
													
														
															|  |  				var teamInfo = JSON.parse(plus.storage.getItem('teamInfo')),
 |  | 
 | 
												
													
														
															|  |  				    isTeamLeader = false;
 |  | 
 | 
												
													
														
															|  |  				for(var i=0; i<teamInfo.data.length; i++){
 |  | 
 | 
												
													
														
															|  |  				    var item = teamInfo.data[i];
 |  | 
 | 
												
													
														
															|  |  				    if(item.id == jtAdminTeamId){
 |  | 
 | 
												
													
														
															|  |  				        isTeamLeader = true;
 |  | 
 | 
												
													
														
															|  |  				        break;
 |  | 
 | 
												
													
														
															|  |  				    }
 |  | 
 | 
												
													
														
															|  |  				}
 |  | 
 | 
												
													
														
															|  |  				if(isTeamLeader){
 |  | 
 | 
												
													
														
															|  |  				    $('#diseasesWrap').show();
 |  | 
 | 
												
													
														
															|  |                     $('#serviceTypes').show();
 |  | 
 | 
												
													
														
															|  |  				}else{
 |  | 
 | 
												
													
														
															|  |  				    $('#diseasesWrap').hide();
 |  | 
 | 
												
													
														
															|  |                     $('#serviceTypes').hide();
 |  | 
 | 
												
													
														
															|  |  				}
 |  | 
 | 
												
													
														
															|  |  				
 |  | 
 | 
												
													
														
															|  |  				if(overdue){
 |  | 
 | 
												
													
														
															|  |  				    //获取患者是否可续签的状态
 |  | 
 | 
												
													
														
															|  |                     getPatientRenewInfo(oPatiInfo);
 |  | 
 | 
												
													
														
															|  |  				}
 |  | 
 | 
												
													
														
															|  |  			} else {
 |  | 
 | 
												
													
														
															|  |  				qyRelation = 1;
 |  | 
 | 
												
													
														
															|  |  				//获取患者是否可续签的状态
 |  | 
 | 
												
													
														
															|  |                 getPatientRenewInfo(oPatiInfo);
 |  | 
 | 
												
													
														
															|  |  				$('#footer').show();
 |  | 
 | 
												
													
														
															|  |  				$('#diseasesWrap').show();
 |  | 
 | 
												
													
														
															|  |  				$('#serviceTypes').show();
 |  | 
 | 
												
													
														
															|  |    				initPatiLabels();//修复bug#【医生端】居民信息:居民标签经常显示为无。
 |  | 
 | 
												
													
														
															|  |  			}
 |  | 
 | 
												
													
														
															|  |  		} else {
 |  | 
 | 
												
													
														
															|  |  			$('#diseasesWrap').hide();
 |  | 
 | 
												
													
														
															|  |  			queryFailed(res);
 |  | 
 | 
												
													
														
															|  |  		}
 |  | 
 | 
												
													
														
															|  |  	},'POST','',true);
 |  | 
 | 
												
													
														
															|  |  	
 |  | 
 | 
												
													
														
															|  |  	getReqPromise("doctor/family_contract/patient_doctor_teams",{patient:patiCode},'POST', true)
 |  | 
 | 
												
													
														
															|  |  	.then(function(res) {
 |  | 
 | 
												
													
														
															|  |  		if(res.status==200) { 
 |  | 
 | 
												
													
														
															|  |  			var data = res.data;
 |  | 
 | 
												
													
														
															|  |  			// 当当前医生与用户无签约关系(不包括签约团队的团队长),则不显示服务记录
 |  | 
 | 
												
													
														
															|  |  			if(data.hasSign=="1") { 
 |  | 
 | 
												
													
														
															|  |  				$('#fwjl').show();
 |  | 
 | 
												
													
														
															|  |  			} else {
 |  | 
 | 
												
													
														
															|  |  				$('#fwjl').hide();
 |  | 
 | 
												
													
														
															|  |  			}
 |  | 
 | 
												
													
														
															|  |  		} else {
 |  | 
 | 
												
													
														
															|  |  			mui.toast(res.msg);
 |  | 
 | 
												
													
														
															|  |  		}
 |  | 
 | 
												
													
														
															|  |  	}).catch(function(e){
 |  | 
 | 
												
													
														
															|  |  		console && console.error(e); 
 |  | 
 | 
												
													
														
															|  |  	})
 |  | 
 | 
												
													
														
															|  |  	
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | function initPatiLabels(){
 |  | 
 | 
												
													
														
															|  | 	sendPostNoAsync("/doctor/patient_label_info/patient_label",{labelType:"",patient:patiCode},queryFailed,function(res){
 |  | 
 | 
												
													
														
															|  | 		if(res.status==200){
 |  | 
 | 
												
													
														
															|  | 			for(var j in res.data){
 |  | 
 | 
												
													
														
															|  | 				if(res.data[j].labelType==3||res.data[j].labelType==4){ 
 |  | 
 | 
												
													
														
															|  | 					labelName.push(res.data[j].labelName); 
 |  | 
 | 
												
													
														
															|  | 				}
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 			if(labelName.length>0){
 |  | 
 | 
												
													
														
															|  | 				$("#diseases").html(_.uniq(labelName).join(",")); 
 |  | 
 | 
												
													
														
															|  | 			}else{
 |  | 
 | 
												
													
														
															|  | 				$("#diseases").html("无"); 
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 		}else{
 |  | 
 | 
												
													
														
															|  | 			queryFailed(res); 
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 	});
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | function queryFailed(res){
 |  | function queryFailed(res){
 | 
												
													
														
															|  | 	if(res.msg){
 |  | 	if(res.msg){
 | 
												
											
												
													
														
															|  | @ -611,36 +307,6 @@ function queryFailed(res){
 | 
												
													
														
															|  | 	}			
 |  | 	}			
 | 
												
													
														
															|  | }	
 |  | }	
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | function loadRecentEvents() {
 |  | 
 | 
												
													
														
															|  | 	template.helper("toJson", function(v, i) {
 |  | 
 | 
												
													
														
															|  | 		
 |  | 
 | 
												
													
														
															|  | 		return JSON.stringify(v);
 |  | 
 | 
												
													
														
															|  | 	});
 |  | 
 | 
												
													
														
															|  | 	// strSSID: "B09036263193"
 |  | 
 | 
												
													
														
															|  | 	getReqPromise(healthProfileServer+"wlyy_service/record/outpatient",{
 |  | 
 | 
												
													
														
															|  | 		strSSID: oPatiInfo.ssc,
 |  | 
 | 
												
													
														
															|  | 		startNum: 0,
 |  | 
 | 
												
													
														
															|  | 		endNum: 50
 |  | 
 | 
												
													
														
															|  | 	},'GET',true).then(function(res){
 |  | 
 | 
												
													
														
															|  | 		if(res.status == 200) {
 |  | 
 | 
												
													
														
															|  | 			var list = JSON.parse(res.data); 
 |  | 
 | 
												
													
														
															|  | 			if(list && list.length) { 
 |  | 
 | 
												
													
														
															|  | 				$('#no_result_wrap').hide(); 
 |  | 
 | 
												
													
														
															|  | 				$('#recent_events').show();
 |  | 
 | 
												
													
														
															|  | 				$('#recent_events').append(template('recent_event_tmpl',{list: list.slice(0,4)}));
 |  | 
 | 
												
													
														
															|  | 				$('#more_event').show();
 |  | 
 | 
												
													
														
															|  | 				iscroller.refresh();
 |  | 
 | 
												
													
														
															|  | 			} else {
 |  | 
 | 
												
													
														
															|  | 				$('#recent_events').hide();
 |  | 
 | 
												
													
														
															|  | 				$('#more_event').hide();
 |  | 
 | 
												
													
														
															|  | 				$('#no_result_wrap').show();
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 		} else {
 |  | 
 | 
												
													
														
															|  | 			mui.toast(res.msg);
 |  | 
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 	}).catch(function(e) { console && console.error(e)});
 |  | 
 | 
												
													
														
															|  | }
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | $('#more_event').on('tap',function() {
 |  | $('#more_event').on('tap',function() {
 | 
												
													
														
															|  | 	openWebview("jiuzhenjilu.html",{patiInfo: oPatiInfo})
 |  | 	openWebview("jiuzhenjilu.html",{patiInfo: oPatiInfo})
 | 
												
													
														
															|  | });
 |  | });
 | 
												
											
												
													
														
															|  | @ -910,28 +576,10 @@ function bindEvents(){
 | 
												
													
														
															|  |     $("#fz").on('tap', fz);
 |  |     $("#fz").on('tap', fz);
 | 
												
													
														
															|  |     //干预
 |  |     //干预
 | 
												
													
														
															|  |     $("#gy").on('tap', gy);
 |  |     $("#gy").on('tap', gy);
 | 
												
													
														
															|  |     //转慢病
 |  | 
 | 
												
													
														
															|  | //  $("#zmbicon").on('tap', adddoc);
 |  | 
 | 
												
													
														
															|  |     //体征设备2
 |  | 
 | 
												
													
														
															|  |     $("#tzsbicon").on('tap', openwdsb);
 |  | 
 | 
												
													
														
															|  |     
 |  | 
 | 
												
													
														
															|  |     $("#pati_info_wrap").on('tap', '#pati_info', toInfo);
 |  |     $("#pati_info_wrap").on('tap', '#pati_info', toInfo);
 | 
												
													
														
															|  |     $("#pati_info_wrap").on('tap', "#diseasesWrap", toSelectJb);
 |  |     $("#pati_info_wrap").on('tap', "#diseasesWrap", toSelectJb);
 | 
												
													
														
															|  |     
 |  | 
 | 
												
													
														
															|  |     //健康教育
 |  |     //健康教育
 | 
												
													
														
															|  |     $(".div-jkjy-btn").on('tap', jkjy);
 |  |     $(".div-jkjy-btn").on('tap', jkjy);
 | 
												
													
														
															|  |     //代预约
 |  | 
 | 
												
													
														
															|  |     $(".div-dyy-btn").on('tap', dyy);
 |  | 
 | 
												
													
														
															|  |     //续方记录
 |  | 
 | 
												
													
														
															|  | //   $(".div-xufangjilu-btn").on('tap', xfjl); 
 |  | 
 | 
												
													
														
															|  |     //慢病管理
 |  | 
 | 
												
													
														
															|  |     $(".div-manbing-btn").on('tap', function(){
 |  | 
 | 
												
													
														
															|  |         openWebview("../../mbgl/html/jumin-manbingdangan.html", {patient: oPatiInfo.code});
 |  | 
 | 
												
													
														
															|  |     })
 |  | 
 | 
												
													
														
															|  |      //产检计划
 |  | 
 | 
												
													
														
															|  |      $('.div-fybj-btn').on('tap', fybj)
 |  | 
 | 
												
													
														
															|  |      //免疫记录
 |  | 
 | 
												
													
														
															|  |      $('.div-myjl-btn').on('tap', myjl)
 |  | 
 | 
												
													
														
															|  |     //新增指导
 |  |     //新增指导
 | 
												
													
														
															|  |     $(".div-add-guide-btn").on('tap', jkzd);
 |  |     $(".div-add-guide-btn").on('tap', jkzd);
 | 
												
													
														
															|  |     //随访
 |  |     //随访
 | 
												
											
												
													
														
															|  | @ -939,20 +587,9 @@ function bindEvents(){
 | 
												
													
														
															|  |         // openWebview("../../suifang/html/choose_suifang.html", {patiCode: oPatiInfo.code});
 |  |         // openWebview("../../suifang/html/choose_suifang.html", {patiCode: oPatiInfo.code});
 | 
												
													
														
															|  |         openWebview("../../suifang/html/suifang_list.html", {patientCode: oPatiInfo.code});
 |  |         openWebview("../../suifang/html/suifang_list.html", {patientCode: oPatiInfo.code});
 | 
												
													
														
															|  |     });
 |  |     });
 | 
												
													
														
															|  |      
 |  | 
 | 
												
													
														
															|  |     
 |  | 
 | 
												
													
														
															|  |     //显示更过操作
 |  |     //显示更过操作
 | 
												
													
														
															|  |     $(".header-link").on('tap', function(){
 |  |     $(".header-link").on('tap', function(){
 | 
												
													
														
															|  |         mui('#sheet1').popover('toggle');
 |  |         mui('#sheet1').popover('toggle');
 | 
												
													
														
															|  |     });
 |  |     });
 | 
												
													
														
															|  |     
 |  |     
 | 
												
													
														
															|  |     /*提醒续签*/
 |  | 
 | 
												
													
														
															|  |     $("#remindXQ").on('tap', function(){
 |  | 
 | 
												
													
														
															|  |         mui("#sheet1").popover('toggle');
 |  | 
 | 
												
													
														
															|  |         if($(this).hasClass("ytx")){//今日已提醒
 |  | 
 | 
												
													
														
															|  |             mui.toast("居民今天已经收到过提醒了哦,不可再次提醒");
 |  | 
 | 
												
													
														
															|  |         }else{//今日未提醒
 |  | 
 | 
												
													
														
															|  |             sendRenewRemind();
 |  | 
 | 
												
													
														
															|  |         }
 |  | 
 | 
												
													
														
															|  |     });
 |  | 
 | 
												
													
														
															|  | }
 |  | }
 |