Browse Source

修改患者信息相关页面

linehang 7 years ago
parent
commit
567da37b37

+ 1 - 1
html/home/html/huanzhe.html

@ -36,7 +36,7 @@
		
		<script type="text/html" id="pati_list_tmpl">
			{{each list as value j}}
			<li class="n-list-link list-arrow-r n-list-cover" data-patient-code="{{value.code}}">
			<li class="n-list-link list-arrow-r n-list-cover" data-patient-code="{{value.code}}" data-patient-phone="{{value.phone}]}" data-patient-address="{{value.address}]}">
				<div class="patient-face patient-face-new">
					<img src="{{value.photo}}"> 
				</div>

+ 7 - 4
html/home/js/huanzhe.js

@ -10,11 +10,12 @@ var baseInfo = null,
var $patientListWrapper = $('#patient_list_wrap'),
	$patientList = $('#pati_list'),
	// 搜索无结果时显示
	$noResultWrap = $('#no_result_wrap');
	$noResultWrap = $('#no_result_wrap'),
	patientInfo = null;
// 分页查询当前页数
var curPage = 0,
 	pageSize = 5,
 	pageSize = 15,
 	myScroll = null,
 	hasMore = true;
	
@ -102,13 +103,15 @@ initScroller = function() {
bindEvents = function () {
	$patientList.on('tap','li[data-patient-code]',function(e) {
		var code = $(this).attr("data-patient-code");
		var mobile = $(this).attr("data-patient-phone");
		var address = $(this).attr("data-patient-address");
		if(baseEnv.webview.origin=="suifang") {//“随访”功能
			if(baseEnv.webview.follow_type == 1){
	            openWebview("../../suifang/html/add_plan.html",{patientInfo: code,chooseDate:baseEnv.webview.chooseDate});
	            openWebview("../../suifang/html/add_plan.html",{patientInfo: {code:code,mobile:mobile,address:address},chooseDate:baseEnv.webview.chooseDate});
	            return false;
	        }
	        if(baseEnv.webview.follow_type == 2){
	            openWebview("../../suifang/html/follow_way.html",{patientInfo: code});
	            openWebview("../../suifang/html/follow_way.html",{patientInfo: {code:code,mobile:mobile,address:address}});
	            return false;
	        }
		}else{

+ 2 - 1
html/huanzhe/html/fuwujilu.html

@ -22,7 +22,8 @@
		<div class="demo-comtop">
			<a class="mui-action-back">返回</a>
			<h1>
				<span id="Dtitle" ></span><label class="lin-down-arrow"></label>
				<span id="Dtitle" >服务记录</span>
				<!--<label class="lin-down-arrow"></label>-->
			</h1>
			<a href="javascript: void(0);" id="statistics_btn" class="c-fff" onclick="openStatistics(this)">统计</a>
		</div>

+ 6 - 8
html/huanzhe/html/huanzeziliao.html

@ -66,12 +66,10 @@
						</h4>
						<div style="display: -webkit-box;-webkit-box-align: center;">
							<span class="c-909090 c-f14">
							{{if expensesStatus1==1}}
							已缴费
							{{else if expensesStatus1==2}}
							已退费
							{{else if expensesStatus1==0}}
							未缴费
							{{if openid}}
							已关注
							{{else}}
							未关注
							{{/if}}
							</span>
							{{if openid}}
@ -125,14 +123,14 @@
						<div class="c-nowrap">{{ssc}}</div>
					</div>
				</li>
				<li class="c-list-text">
				<!--<li class="c-list-text">
					<div class="c-list-value">
						<h4>医疗保险号</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-nowrap">{{medicareNumber}}</div>
					</div>
				</li>
				</li>-->
				<li class="c-list-text phoneNumber">
					<div class="c-list-value">
						<h4>手机号码</h4>

+ 6 - 56
html/huanzhe/html/huanzhexinxi.html

@ -37,7 +37,7 @@
					</div>
					<ul class="c-list c-border-tb c-loper" id="list">
						<li class="c-list-text c-list-cover ewmli c-hide" id="fwjl" onclick="fwjl()">
							<div class="div-title"><span class="label">服务记录</span><span class="fr mr5 c-909090 c-nowrap c-t-right jkjl-link">咨询、代预约、随访、指导、健康教育</span></div>
							<div class="div-title"><span class="label">服务记录</span><span class="fr mr5 c-909090 c-nowrap c-t-right jkjl-link">咨询、随访、指导、健康教育</span></div>
							<div class="c-arrow-r"></div>
						</li>
					</ul>					
@ -62,35 +62,7 @@
							<img src="../images/jiankangtijian_icon.png">
						    <span class="f-f14">健康体检</span> 
						</div>
						<!--<div class="template-item div-xufangjilu-btn" id="xfjl">    
							<img src="../images/xufangjilu_juming_icon.png"> 
						    <span class="f-f14">续方记录</span>  
						</div>-->
						<div class="template-item div-manbing-btn" style="display: none;" id="mbda">    
                            <img src="../images/manbingdangan_icon.png">
                            <span class="f-f14">慢病档案</span>  
                        </div>
						<div class="template-item div-fybj-btn" style="display: none;" id="fybj">    
							<img src="../images/chanjianjilu_juming_icon.png"> 
						    <span class="f-f14">产检记录</span>  
						</div>
						<!--<div class="template-item div-myjl-btn" id="myjl">    
							<img src="../images/mianyijilu_juming_icon.png"> 
						    <span class="f-f14">免疫记录</span>  
						</div>-->
					</div>
					<ul class="mt10 template-ul">
						<li>
							<div class="template-item" id="tzsb" onclick="openwdsb()">
								<img src="../images/tizheng_icon1.png">
							    <span class="f-f14">健康记录</span>
							</div>
							<div class="template-item" style="border-right:0px;" id="family" onclick="jtcy();">
								<img src="../images/jianting_icon.png">
							    <span class="f-f14">家庭成员</span>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
@ -132,7 +104,7 @@
		<div class="modal-overlay"></div>
		
		<!--底部内容开始-->
		<div id="footer" class="c-hide bgc-fff">
		<div id="footer" class="bgc-fff">
			<div class="ui-grid btn-wrap c-border-top ">
			    <div class="ui-col-1 ui-grid ptb2">
			        <div class="ui-col-1 div-dianhua c-t-center">
@ -151,9 +123,6 @@
			    <div class="ui-col-1 ui-grid h46 lh46">
			        <div class="ui-col-1 div-suifang-btn c-t-center bgc-17b3ec" >
                        <a href="javascript:;" class="c-fff f-fs16">随访</a>
                    </div>
                    <div class="ui-col-1 div-dyy-btn c-t-center bgc-02cfb9" >
                        <a href="javascript:;" class="c-fff f-fs16">代预约</a>
                    </div>
			    </div>
			</div>
@ -193,12 +162,10 @@
					</h4>
					<div style="display: -webkit-box;-webkit-box-align: center;">
						<span class="c-909090 c-f14">
						{{if expensesStatus1==1}}
						已缴费
						{{else if expensesStatus1==2}}
						已退费
						{{else if expensesStatus1==0}}
						未缴费
						{{if openid}}
							已关注
						{{else}}
							未关注
						{{/if}}
						</span>
						{{if openid}}
@ -231,23 +198,6 @@
				</div>
				<div class="l-arrow-r-1"></div>
			</div>
			<ul id="serviceTypes" class="c-list c-border-tb c-loper">
				<li class="c-list-text c-list-cover">
					<div class="div-title"><span class="label">服务类型</span>
						<select id="selFuwu" class="width-100 c-boxs c-hide" multiple></select>
					</div>
					<div class="c-arrow-r"></div>
				</li>
			</ul>
			<div id="smallTipSev">变更服务类型需重新选择居民标签</div>
			<ul id="diseasesWrap" class="c-list c-loper">
				<li class="c-list-text c-list-cover ewmli" onclick="toSelectJb()">
					<div class="div-title"><span class="label">居民标签</span>
						<span class="fr mr5 c-909090 c-nowrap c-t-right jkjl-link" id="diseases"></span>
					</div>
					<div class="c-arrow-r"></div>
				</li>
			</ul>	
		</script>
		<script type="text/htmo" id="recent_event_tmpl">
			{{each list as v i}}

+ 32 - 32
html/huanzhe/js/fuwujilu.js

@ -4,7 +4,7 @@ var teamCode = "";
var scrollerObArr=[],baseEnv;
var menuData = [{code:"1",name:"咨询",url:"doctor/consult/list_by_team",page: 1,template: 'zixun_tmpl'},
				{code:"2",name:"随访",url:"doctor/followup/list_by_team",page: 1,template: 'suifang_tmpl'},
				{code:"3",name:"代预约",url:"third/guahao/GetPatientReservationList",page: 1,template: 'daiyuyue_tmpl'},
//				{code:"3",name:"代预约",url:"third/guahao/GetPatientReservationList",page: 1,template: 'daiyuyue_tmpl'},
				{code:"4",name:"指导",url:"doctor/health/guidance/list_by_team",page: 1,template: 'zhidao_tmpl'},
				{code:"5",name:"健康教育",url:"doctor/jkEdu/article/PC/fetchPatientArticlePushedList",page: 1,template: 'edu_tmpl'}];
var pageSize = 11;//比显示条数多1,用来判断是否还有更多数据
@ -503,37 +503,37 @@ new Promise(function(resolve, reject) {
	})
})
.then(function() {
	plus.nativeUI.showWaiting();
	// TODO 团队选择
	return getReqPromise("doctor/family_contract/patient_doctor_teams",{
		patient: patiCode
	}).then(function(res) {
		if(res.status == 200) {
			var data = res.data,teams = [];
			 // 是否有签约关系 1:有  0:无,此时jtTeam与ssTeam都没有
			if(data.hasSign=="1") {
				data.ssTeam && (function() {
					var team = data.ssTeam.team;
					team.hasSign = data.ssTeam.hasSign; // 医生与患者是否有签约关系
					team.isLeader = data.ssTeam.isLeader; // 是否是团队长
					teams.push(team)
				})();
				data.jtTeam && (function() {
					var team = data.jtTeam.team;
					team.hasSign = data.jtTeam.hasSign; // 医生与患者是否有签约关系
					team.isLeader = data.jtTeam.isLeader; // 是否是团队长
					teams.push(team)
				})();
			}
		}
		$('.lin-sel-group').html(template('teams_tmpl', {data:teams}));
		//初始默认选中第一个团队信息
		var $select = $(".lin-sel-group li").eq(activeIndex);
		var code = parseInt($select.attr("data-code"));
        $(".lin-sel-group li").removeClass("checked");
        $select.addClass("checked");
        $("#Dtitle").html($select.find("label").html()).attr("data-index",code);
	})
//	plus.nativeUI.showWaiting();
//	// TODO 团队选择
//	return getReqPromise("doctor/family_contract/patient_doctor_teams",{
//		patient: patiCode
//	}).then(function(res) {
//		if(res.status == 200) {
//			var data = res.data,teams = [];
//			 // 是否有签约关系 1:有  0:无,此时jtTeam与ssTeam都没有
//			if(data.hasSign=="1") {
//				data.ssTeam && (function() {
//					var team = data.ssTeam.team;
//					team.hasSign = data.ssTeam.hasSign; // 医生与患者是否有签约关系
//					team.isLeader = data.ssTeam.isLeader; // 是否是团队长
//					teams.push(team)
//				})();
//				data.jtTeam && (function() {
//					var team = data.jtTeam.team;
//					team.hasSign = data.jtTeam.hasSign; // 医生与患者是否有签约关系
//					team.isLeader = data.jtTeam.isLeader; // 是否是团队长
//					teams.push(team)
//				})();
//			}
//		}
//		$('.lin-sel-group').html(template('teams_tmpl', {data:teams}));
//		//初始默认选中第一个团队信息
//		var $select = $(".lin-sel-group li").eq(activeIndex);
//		var code = parseInt($select.attr("data-code"));
//      $(".lin-sel-group li").removeClass("checked");
//      $select.addClass("checked");
//      $("#Dtitle").html($select.find("label").html()).attr("data-index",code);
//	})
 
})
.then(function() {

+ 2 - 0
html/huanzhe/js/fuwutongji.js

@ -27,6 +27,7 @@ new Promise(function(resolve, reject) {
		resolve(true);
	})
}).then(function() {
	plus.nativeUI.showWaiting();
	initData();
}).catch(function(e) {
	console && console.error(e);
@ -43,6 +44,7 @@ function initData(){
        } else {
            mui.toast(res.msg);
        }
        plus.nativeUI.closeWaiting();
    }).catch(function(e) {
        console && console.error(e);
    });

+ 23 - 23
html/huanzhe/js/huanzeziliao.js

@ -83,29 +83,29 @@ function getPatientInfo() {
			}
			data.photo = patiPhoto;
			//取家庭签约团队
			sendGet("/doctor/admin-teams/team/members/" + patiCode, {}, null, function(res1) {
				if(res1.status == 200 && res1.data.teamId) {
					//					res1.data.isLeader = true; //测试用
					data.teamName = res1.data.teamName;
					data.Modifqk = data.ssDoctor || !res1.data.isLeader ? false : true;
					data.ModifyJgs = res1.data.isLeader;
					oldQy = res1.data;
					$("#pati_info").html(template("info_tmpl", data));
					$doctorJGInput = $('#healthManagement input');
					$doctorQkInput = $('#dortor_qke input');
					setExpenses(); //初始化政府补贴下拉框
					if(res1.data.isLeader && $doctorJGInput.length > 0)
						getTeamMember(oldQy.teamId); // 初始化健管师下拉框
					if(data.ssDoctor) {
						$(".no").show();
					}
				} else
					mui.toast("获取居民签约团队失败!");
			})
			$("#pati_info").html(template("info_tmpl", data));
//			//取家庭签约团队
//			sendGet("/doctor/admin-teams/team/members/" + patiCode, {}, null, function(res1) {
//				if(res1.status == 200 && res1.data.teamId) {
//					//					res1.data.isLeader = true; //测试用
//					data.teamName = res1.data.teamName;
//					data.Modifqk = data.ssDoctor || !res1.data.isLeader ? false : true;
//					data.ModifyJgs = res1.data.isLeader;
//					oldQy = res1.data;
//
//					$("#pati_info").html(template("info_tmpl", data));
//					$doctorJGInput = $('#healthManagement input');
//					$doctorQkInput = $('#dortor_qke input');
//					setExpenses(); //初始化政府补贴下拉框
//					if(res1.data.isLeader && $doctorJGInput.length > 0)
//						getTeamMember(oldQy.teamId); // 初始化健管师下拉框
//					if(data.ssDoctor) {
//						$(".no").show();
//					}
//
//				} else
//					mui.toast("获取居民签约团队失败!");
//			})
		} else {
			mui.toast(res.msg);
		}

+ 0 - 363
html/huanzhe/js/huanzhexinxi.js

@ -21,11 +21,6 @@ mui.plusReady(function() {
	patiCode = self.patiCode;
	doctorCode = JSON.parse(plus.storage.getItem("docInfo")).code; 
	overdue = self.overdue;
	var docType = plus.storage.getItem("docType");  
	if(docType!=3){//健康医生不查看家庭成员
		$(".jtcyli").show()
	}
    $("#pati_info").attr("code",patiCode);
    localStorage.removeItem('updateService'); 
    getPatiInfo();
@ -47,34 +42,6 @@ function getPatiInfo(){
		function(res){ 
			if(res.status == 200){
				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();
				dealPatiInfoTmpl(oPatiInfo);
				$(".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() {
    //阻尼系数
@ -324,55 +145,10 @@ function initScroller() {
 * 拼接居民信息模板
 */
function dealPatiInfoTmpl(patiInfoObj) {
	signType = patiInfoObj.signType;
	$("#pati_info_wrap").html(template("pati_info_tmpl", patiInfoObj));
	$('#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 =[];			
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){
	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() {
	openWebview("jiuzhenjilu.html",{patiInfo: oPatiInfo})
});
@ -910,28 +576,10 @@ function bindEvents(){
    $("#fz").on('tap', fz);
    //干预
    $("#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', "#diseasesWrap", toSelectJb);
    
    //健康教育
    $(".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);
    //随访
@ -939,20 +587,9 @@ function bindEvents(){
        // openWebview("../../suifang/html/choose_suifang.html", {patiCode: oPatiInfo.code});
        openWebview("../../suifang/html/suifang_list.html", {patientCode: oPatiInfo.code});
    });
     
    
    //显示更过操作
    $(".header-link").on('tap', function(){
        mui('#sheet1').popover('toggle');
    });
    
    /*提醒续签*/
    $("#remindXQ").on('tap', function(){
        mui("#sheet1").popover('toggle');
        if($(this).hasClass("ytx")){//今日已提醒
            mui.toast("居民今天已经收到过提醒了哦,不可再次提醒");
        }else{//今日未提醒
            sendRenewRemind();
        }
    });
}

+ 2 - 1
html/suifang/html/suifang_list.html

@ -20,7 +20,8 @@
		<div class="demo-comtop">
			<a class="mui-action-back">返回</a>
			<h1>
				<span id="Dtitle" ></span><label class="lin-down-arrow"></label>
				<span id="Dtitle" >随访列表</span>
				<!--<label class="lin-down-arrow"></label>-->
			</h1>
		</div>
	</div>

+ 31 - 31
html/suifang/js/suifang_list.js

@ -304,37 +304,37 @@ new Promise(function(resolve, reject) {
	})
})
.then(function() {
	plus.nativeUI.showWaiting();
	// TODO 团队选择
	return getReqPromise("doctor/family_contract/patient_doctor_teams",{
		patient: patiCode
	}).then(function(res) {
		if(res.status == 200) {
			var data = res.data,teams = [];
			 // 是否有签约关系 1:有  0:无,此时jtTeam与ssTeam都没有
			if(data.hasSign=="1") {
				data.ssTeam && (function() {
					var team = data.ssTeam.team;
					team.hasSign = data.ssTeam.hasSign; // 医生与患者是否有签约关系
					team.isLeader = data.ssTeam.isLeader; // 是否是团队长
					teams.push(team)
				})();
				data.jtTeam && (function() {
					var team = data.jtTeam.team;
					team.hasSign = data.jtTeam.hasSign; // 医生与患者是否有签约关系
					team.isLeader = data.jtTeam.isLeader; // 是否是团队长
					teams.push(team)
				})();
			}
		}
		$('.lin-sel-group').html(template('teams_tmpl', {data:teams}));
		//初始默认选中第一个团队信息
		var $select = $(".lin-sel-group li").eq(activeIndex);
		var code = $select.attr("data-code");
        $(".lin-sel-group li").removeClass("checked");
        $select.addClass("checked");
        $("#Dtitle").html($select.find("label").html()).attr("data-index",code);
	})
//	plus.nativeUI.showWaiting();
//	// TODO 团队选择
//	return getReqPromise("doctor/family_contract/patient_doctor_teams",{
//		patient: patiCode
//	}).then(function(res) {
//		if(res.status == 200) {
//			var data = res.data,teams = [];
//			 // 是否有签约关系 1:有  0:无,此时jtTeam与ssTeam都没有
//			if(data.hasSign=="1") {
//				data.ssTeam && (function() {
//					var team = data.ssTeam.team;
//					team.hasSign = data.ssTeam.hasSign; // 医生与患者是否有签约关系
//					team.isLeader = data.ssTeam.isLeader; // 是否是团队长
//					teams.push(team)
//				})();
//				data.jtTeam && (function() {
//					var team = data.jtTeam.team;
//					team.hasSign = data.jtTeam.hasSign; // 医生与患者是否有签约关系
//					team.isLeader = data.jtTeam.isLeader; // 是否是团队长
//					teams.push(team)
//				})();
//			}
//		}
//		$('.lin-sel-group').html(template('teams_tmpl', {data:teams}));
//		//初始默认选中第一个团队信息
//		var $select = $(".lin-sel-group li").eq(activeIndex);
//		var code = $select.attr("data-code");
//      $(".lin-sel-group li").removeClass("checked");
//      $select.addClass("checked");
//      $("#Dtitle").html($select.find("label").html()).attr("data-index",code);
//	})
 
})
.then(function() {