<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>完成项目服务</title>
		<link rel="stylesheet" href="../../../css/bootstrap.min.css" />
	    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css"/>
	    <link rel="stylesheet" type="text/css" href="../../../css/cross.css"/>
	    <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" href="../css/guide_the_message.css" />
	</head>
	<body>
		<div id="app" v-cloak role="tablist" aria-multiselectable="true">
		  <div class="panelcurPage">
		    <div class="panel-heading" style="border-bottom: 1px solid #d7dce6;" role="tab">
		      <h4 class="panel-title">
		        <a role="button" class="flex-box">
		          <div class="flex-box-item service-top">
		          	<p class="service-name"><!--<span class="service-index">1</span>--><span>{{service.title}}</span></p>
		         	<div class="label-group">
		         		<span class="pull-right mt5" v-if="service.statusName=='已完成'"><i class="icon icon-gouxuan icon-18 mr5"></i>{{service.statusName}}</span>
		         		<span class="label-blue">{{service.shortExecuteTime}}</span>
		         		<span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
		         	</div>
		          </div>
		          <!--<span class="icon icon-arrow-down ml50"></span>-->
		        </a>
		      </h4>
		    </div>
		    <div class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
		      	<div class="panel-body">
		      		<div class="service-content">{{service.content}}</div>
		      		<div class="service-address ptb20">
		      			<div class="flex-box">
		      				<div class="flex-box-item">
		      					<p class="m0">服务地点：{{service.hospitalName}}</p>
		      					<p class="m0">服务时间：{{service.executeTime | formatDate}}</p>
		      				</div>
		      				<div class="flex-box-item">
		      					<p class="m0 yslb">执行人：<span v-for="(doctor,index) in service.executeDoctorList">{{doctor}}</span></p>
		      					<p class="m0">服务收费：{{service.expense}}元</p>
		      				</div>
		      			</div>
		      		</div>
		   		</div>
	       </div>
		  </div>
	   		<div class="panel-body">
	      		<div class="service-operation">
	      			<div style="border-bottom: 1px solid #D7D4F0;">
	      				<div class="pb10">
		      				指导与汇报记录&emsp;<span class="view-detail" v-if="service.messageList && service.messageList.length" :class="{active:isCollapse}" @click="chakan"><i class="icon icon-check mr5 icon-16"></i>{{isCollapse?'收起详情':'查看详情'}}</span>
		      				<div class="pull-right" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0 && service.status!=1">
		      					<span class="view-detail" @click="zdly(service)" v-if="service.isCreate && (service.isMyTask!=1)">指导留言</span>
		      					<span class="view-detail" @click="zdly(service)" v-if="service.isCK && service.isMyTask==1">查看留言</span>
		      				</div>
	      				</div>
			      		<div class="record-list mb10" :class="{active:isCollapse}">
		      				<div class="record-item" v-for="item in service.messageList">
		      					<div class="flex-box c-999 f14">
			      					<div class="flex-box-item">
			      						{{item.adminTeamName}}
			      					</div>
			      					<div class="flex-box-item">
			      						{{item.createTime}}
			      					</div>
			      				</div>
				      			<div class="f14 c-333" v-html="getContent(item.content,item.contentType)"></div>
		      				</div>
		      			</div>
		      			<p class="c-999" style="margin-top: -10px;" v-if="service.messageList && !service.messageList.length">暂无记录</p>
	      			</div>
	      			<div class="flex-box btns-group clearfix" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0 && service.status!=1">
	      				<button class="btn btn-yuyue" v-if="service.reserve==1 && service.status!=2 && service.isMyTask==1" @click="qwapp">转诊预约</button>
	      				<button class="btn btn-yuyue" v-if="service.type==2 && service.operate!=1 && !service.isZK && service.isMyTask==1" @click="jkjy(service.patient,service.planDetaiId)">健康教育</button>
	      				<button class="btn btn-yuyue" v-if="service.type==3 && service.operate!=1 && !service.isZK && service.isMyTask==1" @click="jkzd(service.planDetaiId,service.patient)">健康指导</button>
	      				<button class="btn btn-yuyue" v-if="service.type==4 && service.operate!=1 && !service.isZK && service.isMyTask==1" @click="qwapp">随访</button>
	      				<button class="btn btn-zhidao" v-if="service.type==1 && service.operate!=1 && service.isMyTask==1" @click="fwm(service.planDetaiId,service.patient)">服务码</button>
	      			</div>
	      		</div>
	      		<div class="complete-info" v-if="service.status==1">
	      			<div class="complete-title">完成情况</div>
	      			<div class="ptb10">
	      				<p class="f14 mb5"><span class="c-999">完成时间：</span>{{service.completeTime}}</p>
	      				<p class="f14 mb5"><span class="c-999">执行医生：</span>{{service.operatorDoctorName}}</p>
	      			</div>
	      		</div>
	      		<div class="note-info pt10">
	      			<p class="f14 c-333">服务完成笔记</p>
	      			<textarea v-if="service.status!=1  && service.isMyTask==1" class="form-control" style="resize: none;" rows="4" placeholder="可备注您的服务记录" v-model="service.node"></textarea>
	      			<div v-if="service.status==1">{{service.node || '暂无服务记录'}}</div>
	      		</div>
	      		<div class="note-info ptb10" v-if="service.isMyTask==1">
	      			<p class="f14 c-333">相关记录</p>
	      			<ul class="upload-box"  v-if="service.status!=1">
	      				<li class="flex-box" v-for="(img,index) in upImgs">
	      					<div class="upload-img-box">      						
		      					<img :src="img.baseUrl" />
	      					</div>
	      					<a class="delete-img" @click="deleteImg(index)">&times;</a>
	      				</li>
	      				<li class="flex-box" v-if="upImgs.length<5">
	      					<span class="add-img">＋</span>
	      					<input type="file" @change="upLoadImgToBase64" class="upload-img" />
	      				</li>
	      			</ul>
	      			<ul class="upload-box" v-if="service.status==1 && service.relationRecordImg && service.relationRecordImg.length">
	      				<li class="flex-box" v-for="img in service.relationRecordImg">
	      					<div class="upload-img-box">      						
		      					<img :src="img | getImgUrl" />
	      					</div>
	      				</li>
	      			</ul>
	      			<div class="upload-box" v-if="service.status==1 && service.relationRecordImg && !service.relationRecordImg.length">
	      				<p>暂无相关记录</p>
	      			</div>
	      		</div>
	      		<div class="note-info pt10" v-if="(service.type==2 || service.type==3 || service.type==4) && service.relationRecordCode">
	      			<p class="f14 c-333">关联记录</p>
	      			<p class="guanlian-list text-center c-333" @click="viewDetial(service.type,service.relationRecordCode)">
	      				<span class="pull-right"><i class="icon icon-arrow-right"></i></span>{{service.type==2?'健康文章':(service.type==3?'健康指导':'随访记录')}} {{service.completeTimeShort}}
	      			</p>
	      		</div>
	      		<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
				    <div id="innerdiv" style="position:absolute;">
				        <img id="bigimg" style="border:5px solid #fff;" src="" />
				    </div>
				</div>
	      		<div class="text-center ptb50" v-if="service.status!=1 && service.isMyTask==1 && (service.operate==1 || service.type==0)">
	      			<button class="btn btn-zhidao" @click="qrwc(service.patient,service.type)">确认完成</button>
	      		</div>
	      	</div>
		</div>
		<script type="text/javascript" src="../../../js/vue.js"></script>
		<script type="text/javascript" src="../../../js/jquery-2.2.4.js" ></script>
		<script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/toastr/toastr.min.js"></script>
		<script type="text/javascript" src="../../../api/http-request.js"></script>
		<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="../js/guide_the_message.js"></script>
	</body>
</html>
