Browse Source

修改康复随访和编辑服务项

yht2016 5 years ago
parent
commit
e8a018361b

+ 8 - 0
api/followup_api.js

@ -17,6 +17,14 @@
        addFollowupPlan(data){
            return httpRequest.post('doctor/followup/addFollowupPlan',{data:data})
        }, 
        //保存临时随访
        addFollowup(data){
            return httpRequest.post('/doctor/followup/addFollowup',{data:data})
        },  
        //保存访视
        saveFollowup(data){
            return httpRequest.post('/doctor/followup/saveFollowup',{data:data})
        },
	}
    exports.followUpAPI = followUpAPI;
})(window)

+ 4 - 0
api/recover_api.js

@ -64,6 +64,10 @@
		createRehabilitationPlan: function(data) {
			return httpRequest.post("doctor/specialist/rehabilitationPlan/createRehabilitationPlan", {data: data})
		},
		// 编辑居民康复计划详情
		updateRehabilitationPlan: function(data) {
			return httpRequest.post("doctor/specialist/rehabilitationPlan/updateRehabilitationPlan", {data: data})
		},
		// 根据患者获取专科医生跟技管师
		findPatientSignSpecialistInfo: function(data) {
			return httpRequest.get("doctor/specialist/findPatientSignSpecialistInfo", {data: data})

+ 5 - 3
app/followup/js/followup_newplan.js

@ -256,7 +256,8 @@ new Vue({
                  })
                  if(res.data&&res.data.length>0){
                    var relationCode = res.data[0].id
                    window.parent.closeFollowUpLayer(vm.planDetaiId, relationCode)
                    var flag = 1 ;//标记(1随访2临时随访)
                    window.parent.closeFollowUpLayer(vm.planDetaiId, relationCode, flag)
                  }
                }else{
                  layer.msg(res.msg, {
@ -297,8 +298,9 @@ new Vue({
                    icon: 1
                  })
                  if(res.data&&res.data.length>0){
                    var relationCode = res.data[0].id
                    window.parent.closeFollowUpLayer(vm.planDetaiId, relationCode)
                    var relationCode = res.data
                    var flag = 2 ;//标记(1随访2临时随访)
                    window.parent.closeFollowUpLayer(vm.planDetaiId, relationCode, flag)
                  }
                }else{
                  layer.msg(res.msg, {

+ 154 - 83
app/recover/html/new_recover.html

@ -11,6 +11,11 @@
		<link rel="stylesheet" type="text/css" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
		<link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
		<script src="../../../js/esModule.js" type="text/javascript"></script>
		<style>
			.c-row{
				width: 100%;
			}
		</style>
	</head>
	<body class="m0">
	<div id="app" v-cloak>
@ -40,7 +45,7 @@
		        			<img :src="setPatImg(patiInfo.photo)" alt="居民头像" />
		        		</div>
		        		<h3 class="ptb10 m0 c-f16">{{patiInfo.name}}</h3>
		        		<span class="c-position-a set-qiehuan cur-pit" @click="selectPatient()"></span>
		        		<span v-if="!isEditConfig" class="c-position-a set-qiehuan cur-pit" @click="selectPatient()"></span>
		        	</div>
		        	<h4 class="h30 m0 c-f14 c-border-b f-w500">基本信息</h4>
		        	<ul class="c-333 m0 p0 pb20">
@ -55,47 +60,13 @@
		        		<li class="pt10"><span class="c-999">全科医生:</span>{{patiInfo.ssDoctorName || patiInfo.jtDoctorName}}</li>
		        		<li class="pt10"><span class="c-999">健&ensp;管&ensp;师:</span>{{patiInfo.ssDoctorHealthName || patiInfo.jtDoctorHealthName}}</li>
		        	</ul>
		        	<!-- <h4 class="h30 m0 c-f14 c-border-b">诊疗信息</h4> -->
		        	<!-- <ul class="c-333 m0 p0 pb20" >
	        			<div class="input-group mtb10" >
	        				<label style="transform: translateY(50%); color: #999999;font-weight: normal;">就诊事件:</label>
							<div class="input-group-btn" style="width: 80%; transform: translateY(50%);top: -5px;">
								<button style="width:223px;padding: 0; text-overflow: ellipsis; overflow: hidden;" v-bind:disabled="edit" type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									{{diagnosisInfo[indexOrder].orgName}}
									<span class="caret" style="position: absolute; top: 50%; right: 20px; margin-top: -2px;"></span>
								</button>
								<ul class="dropdown-menu" style="min-width: 206px;" >
									<li class="c-f14 c-border-b" style="text-align: center; padding: 2px;cursor:pointer;" v-for="(v, i) in diagnosisInfo" @click="orderHospital(i)" v-html="v.orgName"></li>
								</ul>
							</div>
						</div>
		        		<li class="pt10" style="display: flex;" id="department">
		        			<label class="c-999" style="font-weight: normal;">入院科室:</label>
		        			<input class="form-control" v-bind:disabled="edit" v-bind:value="nodata == true? '请输入': subsidiaryInfo.data.department" style=" text-align: center; height: 22px; border-radius: 3px; width: 80%;">
		        		</li>
		        		<li class="pt10" style="display: flex;" id="attendingDoctor">
		        			<label class="c-999" style="font-weight: normal;">主治医师:</label>
		        			<input class="form-control" v-bind:disabled="edit" v-bind:value="nodata == true? '请输入': subsidiaryInfo.data.attendingDoctor" style="text-align: center; height: 22px; border-radius: 3px; width: 80%;">
		        		</li>
		        		<li class="pt10" style="display: flex;" id="admissionDiagnosis">
		        			<label class="c-999" style="font-weight: normal;">入院诊断:</label>
		        			<input class="form-control" v-bind:disabled="edit" v-bind:value="nodata == true? '请输入': subsidiaryInfo.data.admissionDiagnosis" style="text-align: center; height: 22px; border-radius: 3px; width: 80%;">
		        		</li>
		        		<li class="pt10" style="display: flex;" id="dischargeDiagnosis">
		        			<label class="c-999" style="font-weight: normal;">出院诊断:</label>
		        			<input class="form-control" v-bind:disabled="edit" v-bind:value="nodata == true? '请输入': subsidiaryInfo.data.dischargeDiagnosis" style="text-align: center; height: 22px; border-radius: 3px; width: 80%;">
		        		</li>
		        	</ul> -->
		        	<!-- <h4 class="h30 m0 c-f14 c-border-b c-999">医嘱小结</h4> -->
		        	<!-- <textarea v-bind:disabled="edit" class="tipText m0 pt10 c-333 mt10" style="height: 200px; width: 100%; border:1px solid #e1e1e1; resize:none;text-indent:28px" v-html="subsidiaryInfo.data.dischargeOrder"></textarea> -->
		        	<!-- <button type="button" class="btn btn-default fr" style="width: 60px; background: #12B7F5; border-radius: 0px ;border: 0px ;" @click="editdiagnosis()" v-html="edit == true? '编辑':'保存'"></button> -->
					<h4 class="h30 m0 c-f14 c-border-b f-w500" style="overflow: hidden;">
						康复建议
						<span class="click-text" @click="editAdviceTextarea">
						<span v-if="!isEditConfig" class="click-text" @click="editAdviceTextarea">
							{{isEdit == true? '编辑':'保存'}}
						</span>
					</h4>
					<textarea v-bind:disabled="isEdit" v-model="adviceContent" class="m0 p10 c-333 mt10" :class="{'bg-f5f5fa':isEdit, 'bd-red':showAdviceContentTip}" style="width: 100%;height: 200px; width: 100%; border:1px solid #e1e1e1; resize:none;" placeholder="请输入您的康复建议..."></textarea>
					<textarea v-bind:disabled="isEdit||isEditConfig" v-model="adviceContent" class="m0 p10 c-333 mt10" :class="{'bg-f5f5fa':isEdit, 'bd-red':showAdviceContentTip}" style="width: 100%;height: 200px; width: 100%; border:1px solid #e1e1e1; resize:none;" placeholder="请输入您的康复建议..."></textarea>
					<h4 class="h30 m0 c-f14 c-border-b f-w500" style="overflow: hidden;">
						住院病历
					</h4>
@ -109,11 +80,11 @@
							</div>
						</div>
					</div>
					<button  type="button" class="btn btn-default fr" style="width: 100%; background: #12B7F5; border-radius: 0px ;border: 0px ;padding: 10px;margin-top: 15px;" @click="addMedicalRecords()">添加住院病历</button>
					<button v-if="!isEditConfig" type="button" class="btn btn-default fr" style="width: 100%; background: #12B7F5; border-radius: 0px ;border: 0px ;padding: 10px;margin-top: 15px;" @click="addMedicalRecords()">添加住院病历</button>
				</div>
	        </div>
	        <div class="fl c-h100 w-100-400">
	        	<div class="c-h100 plr5" v-if="!isPlan">
	        	<div class="c-h100 plr5" v-if="!isPlan&&!isEditConfig">
		        	<h4 class="m0 pl15 lh40 c-border-b f-w500 c-position-r"><span class="c-position-a set-blue-span"></span>配置康复计划</h4>
		        	<div style="overflow: hidden; height: calc(100% - 41px);">
		        		<div style="overflow: auto; height: 100%;">
@ -129,7 +100,7 @@
			        </div>
		        </div>
		        <div class="clearfix c-h100" v-else>
		        	<div class="fl w-100-400 c-h100">
		        	<div class="fl c-h100" :class="{'c-row':isEditConfig, 'w-100-400':!isEditConfig}">
		        		<div class="plr5 c-h100-79">
		        			<h4 class="m0 pl15 lh40 c-border-b set-label f-w500 c-position-r">
		        				<em class="c-position-a set-blue-span"></em>
@ -141,7 +112,7 @@
		        					<li class="mt10 plr10 ptb5 c-border b-r-3 clearfix" v-for="(detail, index) in templateDetail" :key="index">
										<div v-if="detail.code=='2'||detail.code=='3'">
											<div class="fl w-100-78 c-333">
												<p :class='detail.isTimeSame ? "m0 p0 mb10 txt-ells cur-pit c-red" : "m0 p0 mb10 txt-ells cur-pit"' @click="lookProject(detail)">{{detail.name}}</p>
												<p :class='detail.isTimeSame ? "m0 p0 mb10 txt-ells cur-pit c-red" : "m0 p0 mb10 txt-ells cur-pit"'>{{detail.name}}</p>
												<div class="clearfix">
													<p class="w400 m0 mb10 p0 fl"><span class="c-999">医&emsp;&emsp;院:</span>{{docInfo.hospitalName}}</p>
													<p class="m0 p0 mb10 fl"><span class="c-999">费&emsp;&emsp;用:</span>0.00</p>
@ -167,7 +138,7 @@
										</div>
										<div v-else>
											<div class="fl w-100-78 c-333"> 
												<p :class='detail.isTimeSame ? "m0 p0 mb10 txt-ells cur-pit c-red" : "m0 p0 mb10 txt-ells cur-pit"' @click="lookProject(detail)">{{detail.name}}</p>
												<p :class='detail.isTimeSame ? "m0 p0 mb10 txt-ells cur-pit c-red" : "m0 p0 mb10 txt-ells cur-pit"'>{{detail.name}}</p>
												<div class="clearfix">
													<p class="w400 m0 mb10 p0 fl"><span class="c-999">医&emsp;&emsp;院:</span>{{detail.executeHospitalName}}</p>
													<p class="m0 p0 mb10 fl"><span class="c-999">费&emsp;&emsp;用:</span>0.00</p>
@ -222,9 +193,9 @@
												</div>
											</div>
											<div class='fr w60 c-t-right clearfix'>
												<p v-if="detail.frequencyName!='不限频次'" class="m0 p0 mb10">×{{mul(detail.executeTime.length, detail.frequency.count)}}</p>
												<div class="clearfix mb10"><span class="fr sub-tap cur-pit" @click="subTemplate(index, detail)"></span></div>
												<div v-if="detail.frequencyName!='不限频次'" class="clearfix"><span class="fr fuzhi-tap cur-pit" @click="copyTemplate(index, detail)"></span></div>
												<p v-if="detail.frequencyCode" class="m0 p0 mb10">×{{mul(detail.executeTime.length, detail.frequency.count)}}</p>
												<div v-if="detail.frequencyCode" class="clearfix mb10"><span class="fr sub-tap cur-pit" @click="subTemplate(index, detail)"></span></div>
												<div v-if="detail.frequencyCode" class="clearfix"><span class="fr fuzhi-tap cur-pit" @click="copyTemplate(index, detail)"></span></div>
											</div>
										</div>
		        					</li>
@ -238,12 +209,13 @@
	        				<p class="m0 p0 pl20 ptb10 c-border-b set-label">支付方式:<span class="ml10 pl20 active">按服务支付</span><em class="c-red ml20">(按选择支付方式完成收费)</em></p>
	        				<div class="pl20 lh40">总费用:
	        					<span class="c-red c-f16">¥{{allFee}}</span>
	        					<span class="fr lh30 cur-pit plr15 c-t-center c-fff" :class="havePlan ? 'bgc-12b7f5' : 'bgc-d7dce6'" @click="createRehabilitationPlan()">生成计划</span>
	        					<span v-if="!isEditConfig" class="fr lh30 cur-pit plr15 c-t-center c-fff" :class="havePlan ? 'bgc-12b7f5' : 'bgc-d7dce6'" @click="createRehabilitationPlan()">生成计划</span>
								<span v-else class="fr lh30 cur-pit plr15 c-t-center c-fff" :class="havePlan ? 'bgc-12b7f5' : 'bgc-d7dce6'" @click="updateRehabilitationPlan()">完成编辑</span>
	        					<span class="fr lh30 cur-pit plr15 c-t-center bgc-green c-fff" @click="canclePlan()">取消</span>
	        				</div>
	        			</div>
		        	</div>
		        	<div class="fr w400 c-h100 c-border-l">
		        	<div v-if="!isEditConfig" class="fr w400 c-h100 c-border-l">
		        		<div class="plr5 c-h100">
		        			<h4 class="m0 pl15 lh40 c-border-b c-position-r f-w500">
		        				<em class="c-position-a set-blue-span"></em>添加其他项目
@ -346,7 +318,6 @@
                	surefont: '添加',
                	isTest: false,
					pati: null,
					teamCode: null,
                	isPlan: false,
                	proIndex1: null,
                	proIndex2: null,
@ -376,6 +347,7 @@
                	searchKey: null,
                	havePlan: false,
                	frequencyList: [],
					frequencyListObj: {},
                	diagnosisInfo:"",
                	indexOrder:0,
                	profileRes:[],
@ -393,8 +365,28 @@
					curMedicalRecordsIndex: -1,
					diseaseCodeArr: [],
					diseaseNameArr: [],
					isEditServiceItem: httpData['isEditServiceItem']||false
					teamCode: httpData['teamCode'],
					isEditConfig: httpData['isEditConfig']||false,
					planId: httpData['planId'],
					planDetailId: httpData['planDetailId'],
					service:{
						relationRecordImg:{},
						messageList:{},
					},
				},
                mounted: function() {
                	this.selectFrequencys()
                	if(httpData.patient) {
                		this.isPlan = false
                		this.allFee = 0
                		this.templateDetail = []
						this.pati = {patient: httpData.patient}
                		this.getPatientInfo()
					} 
					if(this.teamCode){
						this.findTemplateList()
					}
                },
				watch: {
					adviceContent: function(){
						var vm = this
@ -410,21 +402,52 @@
						}
					}
				},
                mounted: function() {
                	this.selectFrequencys()
                	if(httpData.patient) {
                		this.isPlan = false
                		this.allFee = 0
                		this.templateDetail = []
						this.pati = {patient: httpData.patient}
                		this.getPatientInfo()
					} 
					if(httpData.teamCode){
						this.teamCode = httpData.teamCode
						this.findTemplateList()
					}
                },
                methods: {
					getServiceItem: function() {
						var vm = this;
						var loadding = top.layer.load(0, {
							shade: false
						}); //0代表加载的风格,支持0-2
						rehaAPI.serviceItem({
							planDetailId: vm.planDetailId
						}).then(function(res) {
							top.layer.close(loadding);
							if(res.status == 200) {
								vm.service = res.data;
								var o1 = {}
								o1.isSelect = true
								o1.selectDoc = false
								o1.selectDate = 1
								o1.value14 = []
								o1.value15 = null
								o1.executeTime = []
								// 默认频次
								o1.selectFre = false
								if(vm.service.frequencyCode!=''){
									o1.frequencyCode = vm.service.frequencyCode
									o1.frequencyName = vm.frequencyListObj[vm.service.frequencyCode]
									o1.frequency = vm.frequencyList[1]
								} else {
									o1.frequencyCode = ''
									o1.frequencyName = '不限频次'
									o1.frequency = vm.frequencyList[0]
								}
								o1.frequencyList = vm.frequencyList
								o1.timeType = 0
								o1.remark = vm.service.remark
								o1.executeDoctor = vm.service.executeDoctorCode
								o1.executeDoctorName = vm.service.executeDoctorName
								o1.executeHospitalName = vm.service.hospitalName
								o1.docList = vm.jDlist
								o1.code = vm.service.type
								o1.name = vm.service.title
								vm.templateDetail.push(o1)
								vm.judgeHavePlan()
							} else {
								showErrorMessage(res.msg)
							}
						})
					},
					// 添加住院病历
					addMedicalRecords: function(){
						var vm = this
@ -505,8 +528,6 @@
                		var sec_params = {
                			patient: vm.pati.patient,
							event:vm.diagnosisInfo[index].id || "",
//							patient:"3b26a7905e034c36a5ba8e65bdc0dc7f",
//							event:"26eec2df-caa9-4b7e-9993-0ad7ae8d0a15",
							catalog:'0213',
							serial:"1"
		                	}
@ -618,6 +639,9 @@
							layer.close(loadding)
							if(res.status == 200) {
								vm.frequencyList = [{code:'', name: '不限频次'}].concat(res.data)
								$.each(res.data, function(index, item){
									vm.frequencyListObj[item.code]=item.name
								})
							} else {
								showErrorMessage(res.msg);
							}
@ -656,6 +680,9 @@
								if(!vm.teamCode){
									vm.findPatientSignSpecialistInfo()
								}
								if(vm.planId){
									vm.getServiceItem()
								}
							} else {
								showErrorMessage(res.msg);
							}
@ -733,7 +760,6 @@
												o1.value14 = []
												o1.value15 = null
												o1.executeTime = []
												o1.selectDateRange = []
												// 默认频次
												o1.selectFre = false
												o1.frequencyCode = vm.frequencyList[0].code
@ -805,6 +831,10 @@
			    		this.templateDetail[index].frequency = list
			    		this.templateDetail[index] = this.templateDetail[index]
			    		this.isTest = !this.isTest
						// if(this.templateDetail[index].frequencyCode==''&&this.isEditConfig){
						// 	var obj = this.templateDetail[index]
						// 	this.templateDetail = [].push(obj)
						// }
						this.judgeHavePlan()
			    	},
			    	// 选择时间段
@ -886,7 +916,6 @@
						this.selectProjectDetail.value14 = []
						this.selectProjectDetail.value15 = null
                		this.selectProjectDetail.executeTime = []
                		this.selectProjectDetail.selectDateRange = []
                		// 频次选择
                		this.selectProjectDetail.selectFre = false
                		this.selectProjectDetail.frequencyCode = this.frequencyList[0].code
@ -907,19 +936,6 @@
						this.judgeHavePlan()
						
                	},
                	// 查看项目
                	lookProject: function(o) {
                		this.selectPatientIndex = layer.open({
							type: 2,
							area: ['400px', '500px'],
							shade: 0.5,
							title: '查看项目',
							closeBtn: 1,
							shift: 5,
							shadeClose: false, //点击遮罩关闭层
							content: "select-project.html?projectId=" + o.id
						});
                	},
                	// 选择居民
                	selectPatient: function() {
                		this.selectPatientIndex = layer.open({
@ -1078,7 +1094,6 @@
                			endTime: arr[1],
                			length: i
                		}
                		this.templateDetail[index].selectDateRange.push(obj)
                		this.templateDetail[index].value15 = null
						this.isTest = !this.isTest
						this.judgeHavePlan()
@ -1098,14 +1113,12 @@
							if(this.templateDetail[k].code=='2'||this.templateDetail[k].code=='3'){
								arr.push(true)
							} else if(this.templateDetail[k].frequencyCode){
								console.log('this.templateDetail[k].frequencyCode', this.templateDetail[k].frequencyCode)
								if(this.templateDetail[k].executeTime[0]) {
									arr.push(true)
								}else {
									arr.push(false)
								}
							} else {
								console.log('this.templateDetail[k].frequencyCode', this.templateDetail[k].frequencyCode)
								arr.push(true)
							}
						}
@ -1116,6 +1129,64 @@
							this.havePlan = false
						}
                	},
					// 编辑居民康复计划详情
					updateRehabilitationPlan: function(){
						var vm = this
						var loadding = layer.load(0, {shade: false}),
						data = {
							planId: vm.planId,
							hospitalServiceItemId: vm.service.type,
							detail: [],	
						};
						$.each(vm.templateDetail, function(index, o) {
							var obj;
							if(o.code=='2'||o.code=='3'||!o.frequencyCode){
								obj = {
									id: vm.planDetailId,
									hospitalServiceItemId: o.code,
									type: 2,
									doctor: vm.jDlist[0].code,
									doctorName: vm.jDlist[0].name,
									executeTimes: '',
									frequencyCode: '',
									timeType: 0,
									remark: o.remark || ''
								}
							}else{
								if(o.executeTime.length) {
									var executeTime = []
									$.each(o.executeTime, function(ind, v) {
										v += ' 00:00'
										executeTime.push(v)
									});
									obj = {
										id: vm.planDetailId,
										hospitalServiceItemId: o.code, // 服务项code
										type: 2,
										doctor: o.executeDoctor,
										doctorName: o.executeDoctorName,
										executeTimes: executeTime.length>0?executeTime.join(","):'',
										frequencyCode: o.frequencyCode,
										timeType: o.timeType,
										remark: o.remark || ''
									}
								}
							}
							data.detail.push(obj)
						});
						var params = {
							json: JSON.stringify(data)
						}
						recoverAPI.updateRehabilitationPlan(params).then(function(res){
							layer.close(loadding)
							if(res.status ==200){
								showSuccessMessage('保存成功!')
								window.history.go(-1)
							} else {
								showErrorMessage(res.msg);
							}
						})
					},
                	createRehabilitationPlan: function() {
						var vm = this
						if(!this.adviceContent){

+ 2 - 1
app/recover/html/personal-manage.html

@ -10,6 +10,7 @@
		<link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css">
		<link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
		<link rel="stylesheet" href="../css/common.css" />
		<link rel="stylesheet" type="text/css" href="../../rehabilitation/css/rehabilitation_management.css" />
		<link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
		<link rel="stylesheet" type="text/css" href="../css/personal-manage.css" />
	</head>
@ -132,7 +133,7 @@
					</div>
	    			<h4 class="m0 pl15 pr5 lh40 c-border-tb clearfix c-position-r"><em class="c-position-a set-blue-span"></em>康复相关记录<span class="fr w80 c-333 c-f12 c-t-center">已完成:{{finishData.planDetailFinish}}</span></h4>
					<div style="height:calc(100% - 271px);overflow: hidden; overflow-y: auto;">
						<server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="recoverPatInfo.patientInfo.patientName" :patientcode="recoverPatInfo.patientInfo.patientCode" :planid="planId" :serveriteminfo="serverItemInfo" @onclose="showServerItemDetail=false"></server-items-detail>
						<server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="recoverPatInfo.patientInfo.patientName" :patientcode="recoverPatInfo.patientInfo.patientCode" :planid="planId" :plandetailid="serverItemInfo.id" @onclose="showServerItemDetail=false"></server-items-detail>
						<div v-if="!showServerItemDetail" style="height:calc(100% - 100px);overflow: hidden; overflow-y: auto;" class="recover-list">
							<ul class="p0 m0 c-h100 c-999">
								<li class="clearfix plr10 cur-pit record-li" v-for="(plan, index) in planDetailList" :class="{'bgc-dff5fc c-12b7f5':plan.istaDay}" @click="lookProject(plan)">

+ 14 - 12
app/rehabilitation/html/guide_the_message.html

@ -24,7 +24,8 @@
		         	</div>
					<div v-else class="label-group">
		         		<span class="pull-right mt5" v-if="service.recordStatus==1"><i class="icon icon-gouxuan icon-18 mr5"></i>{{service.recordStatus==1?'已完成':'未完成'}}</span>
		         		<span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
		         		<span class="label-blue" v-if="service.shortCompleteTime">{{service.shortCompleteTime}}</span>
						<span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
					</div>
		          </div>
		          <!--<span class="icon icon-arrow-down ml50"></span>-->
@ -54,7 +55,7 @@
	      			<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">
		      				<div class="pull-right" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0">
		      					<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>
@ -77,8 +78,7 @@
					<!-- operate: 是否完成任务 0 未完成 1 已完成 isMyTask: 0 不是自己的任务 1是自己的任务 status: 0 未完成 1已完成 2已预约-->
					<!-- planStatus:计划的状态 0 已终止 1进行中 2已完成 -->
					<!-- type: 服务项code 1 电话/短信关怀 2康复咨询 3远程健康监测 4 上门服务 5康复指导 6 康复随访 7 复诊-->
					<div class="flex-box btns-group clearfix" v-if="service.planStatus!=0">
						<!-- <button class="btn btn-yuyue" v-if="service.type==1 && service.status!=1 && service.isMyTask==1 && oprateType != 1" @click="goToFinish(service.planDetaiId)">确认完成</button> -->
					<div v-if="islimit&&service.planStatus!=0" class="flex-box btns-group clearfix"> <!-- 限制频次 -->
						<button class="btn btn-yuyue" v-if="service.type==4 && service.status!=1 && service.isMyTask==1" @click="sendSpecialistWeixinMessage(4)">提醒患者</button>
						<button class="btn btn-yuyue" v-if="service.type==5 && service.status!=1 && service.isMyTask==1" @click="kfzd()">发送指导</button>
						<button class="btn btn-yuyue" v-if="service.type==6 && service.status!=1 && service.isMyTask==1 && service.operate==0"  @click="sfjh()" style="width: auto">创建随访计划</button>
@ -86,11 +86,13 @@
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.status==1" @click="qwapp" style="width: auto">查看随访结果</button>
						<button class="btn btn-yuyue" v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && service.isZK" @click="sendSpecialistWeixinMessage(7)">提醒患者</button>
						<button class="btn btn-disabled" v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && !service.isZK" @click="qwapp">代预约</button>
						<!-- <button class="btn btn-yuyue" v-if="service.type==5 && service.status!=1 && service.isMyTask==1" @click="jkjy(service.patient,service.planDetaiId)">健康教育</button> -->  
						<!-- <button class="btn btn-zhidao" v-if="service.type==1 && service.status!=1 && service.isMyTask==1" @click="fwm(service.planDetaiId,service.patient)">服务码</button> -->
					</div>
					<div v-if="!islimit&&service.planStatus!=0" class="flex-box btns-group clearfix"> <!-- 不限制频次 -->
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.recordStatus!=1 && service.isMyTask==1 && service.operate==1" @click="qwapp" style="width: auto">记录随访表单</button>
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.recordStatus==1" @click="qwapp" style="width: auto">查看随访结果</button>
					</div>
	      		</div>
	      		<div class="complete-info" v-if="service.status==1">
	      		<div class="complete-info" v-if="(islimit&&service.status==1)||(!islimit&&service.recordStatus==1)">
	      			<div class="complete-title">完成情况</div>
	      			<div class="ptb10">
	      				<p class="f14 mb5"><span class="c-999">完成时间:</span>{{service.completeTime}}</p>
@ -99,12 +101,12 @@
	      		</div>
	      		<div class="note-info pt10" v-if="service.type==1">
	      			<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>
	      			<textarea v-if="((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1" class="form-control" style="resize: none;" rows="4" placeholder="可备注您的服务记录" v-model="service.node"></textarea>
	      			<div v-if="((islimit&&service.status==1) || (!islimit&&service.recordStatus==1))">{{service.node || '暂无服务记录'}}</div>
	      		</div>
	      		<div class="note-info ptb10" v-if="service.type==1">
	      			<p class="f14 c-333">相关记录</p>
	      			<ul class="upload-box"  v-if="service.status!=1 && service.isMyTask==1">
	      			<ul class="upload-box"  v-if="((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1">
	      				<li class="flex-box" v-for="(img,index) in upImgs">
	      					<div class="upload-img-box">      						
		      					<img :src="img.baseUrl" />
@ -116,14 +118,14 @@
	      					<input type="file" @change="upLoadImgToBase64" class="upload-img" />
	      				</li>
	      			</ul>
	      			<ul class="upload-box" v-if="service.status==1 && service.relationRecordImg && service.relationRecordImg.length">
	      			<ul class="upload-box" v-if="((islimit&&service.status==1) || (!islimit&&service.recordStatus==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">
	      			<div class="upload-box" v-if="((islimit&&service.status==1) || (!islimit&&service.recordStatus==1)) && service.relationRecordImg && !service.relationRecordImg.length">
	      				<p>暂无相关记录</p>
	      			</div>
				</div>

+ 1 - 1
app/rehabilitation/html/rehabilitation_management.html

@ -333,7 +333,7 @@
								</div>
							</div>
						</div>
						<server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="planInfo.patientName" :patientcode="planInfo.patientCode" :planid="planId" :serveriteminfo="serverItemInfo" @onclose="showServerItemDetail=false"></server-items-detail>
						<server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="planInfo.patientName" :patientcode="planInfo.patientCode" :planid="planId" :plandetailid="serverItemInfo.id" @onclose="showServerItemDetail=false"></server-items-detail>
					</div>
				</div>
			</div>

+ 4 - 0
app/rehabilitation/js/guide_the_message.js

@ -182,6 +182,10 @@ top.rehabilitationGuideVue = new Vue({
					vm.service = res.data;
					var isZK=loginDoctor.doctorType==1?true:false;
					vm.service.isZK=isZK;
					if(vm.service.completeTime){
						var l = vm.service.completeTime.length
						vm.service.shortCompleteTime = vm.service.completeTime.substr(l-5, l-1)
					}
					if(vm.service.isMyTask==1){//执行者										
						vm.service.isCK=true;//无法显示按钮
						if(loginDoctor.uid==vm.service.specialistDoctorCode){//说明我自己是创建者

+ 51 - 25
component/rehabilitation/server-items-detail.js

@ -28,8 +28,9 @@ function showInfoMessage(msg) {
		icon: 6
	})
}
function closeFollowUpLayer(planDetaiId, relationCode){
	_vm.closeAllLayer('创建随访计划', planDetaiId, 6, relationCode)
var previewLayerIndex, followupLayerIndex, KFZDlayerIndex;
function closeFollowUpLayer(planDetaiId, relationCode, flag){
	_vm.closeAllLayer('创建随访计划', planDetaiId, 6, relationCode, flag)
}
function closeKFZDlayer(planDetaiId){
	_vm.closeAllLayer('发送康复指导', planDetaiId, 5)
@ -39,11 +40,11 @@ var _vm
Vue.component('server-items-detail', {
    template: '<div class="p15 ui-grid ui-grid-vertical" style="height:calc(100%);position: relative;">\
					<div class="icon-group">\
						<i class="icon-edit el-icon-edit-outline mr15"></i>\
						<i class="icon-edit el-icon-edit-outline mr15" @click="goToEditConfig"></i>\
						<i class="icon-close el-icon-close" @click="onClose"></i>\
					</div>\
    				<div class="c-t-center c-f18 c-333 mt15">服务内容-{{serveriteminfo.name}}</div>\
					<div class="c-t-center c-f17 c-666 mt10">{{patientname}}患者{{serveriteminfo.name}}计划</div>\
    				<div class="c-t-center c-f18 c-333 mt15">服务内容-{{service.title}}</div>\
					<div class="c-t-center c-f17 c-666 mt10">{{patientname}}患者{{service.title}}计划</div>\
					<div class="c-333 ptb10 c-f17 mt10">指导留言</div>\
            		<div class="c-f14 c-666" v-if="!message.isImg">{{message.content}}</div>\
            		<div class="mt10" v-else><img :src="message.content" @click="previewImg(message.content)" style="width:60px;height:60px;"  :data-preview-src="message.content" data-preview-group="1"/></div>\
@ -138,12 +139,12 @@ Vue.component('server-items-detail', {
					<div class="c-t-center mt15">\
						<button v-if="service.isZk&&service.executeDoctorCode!=docInfo.uid" class="btn btn-12b7f5" @click="zdly(service)">指导留言</button>\
						<button v-else-if="!service.isZk&&service.executeDoctorCode==docInfo.uid" class="btn btn-12b7f5" @click="zdly(service)">查看留言</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'1\'" class="btn btn-yuyue" @click="addCompleteRecord()">添加完成记录</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'4\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,4)">发送提醒</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'5\'" class="btn btn-yuyue" @click="kfzd()">发送康复指导</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'6\'" class="btn btn-yuyue" @click="excuteServerItem(6)">创建随访计划</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'7\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,7)">发送提醒</button>\
						<button v-if="!service.isZk&&serveriteminfo.code==\'7\'" class="btn btn-12b7f5" @click="qwapp">代预约</button>\
						<button v-if="!service.isZk&&service.type==\'1\'" class="btn btn-yuyue" @click="addCompleteRecord()">添加完成记录</button>\
						<button v-if="!service.isZk&&service.type==\'4\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,4)">发送提醒</button>\
						<button v-if="!service.isZk&&service.type==\'5\'" class="btn btn-yuyue" @click="kfzd()">发送康复指导</button>\
						<button v-if="!service.isZk&&service.type==\'6\'" class="btn btn-yuyue" @click="sfjh()">创建随访计划</button>\
						<button v-if="!service.isZk&&service.type==\'7\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,7)">发送提醒</button>\
						<button v-if="!service.isZk&&service.type==\'7\'" class="btn btn-12b7f5" @click="qwapp">代预约</button>\
					</div>\
					<div id="completeRecord" style="display: none; padding: 15px 15px 0;">\
						<div class="note-info pt10">\
@ -167,7 +168,7 @@ Vue.component('server-items-detail', {
						</div>\
					</div>\
    			</div>',
    props: ['patientname','patientcode', 'planid', 'serveriteminfo'],
    props: ['patientname','patientcode', 'planid', 'plandetailid'],
    data: function() {
        return {
			ynow: currentGMT.getFullYear(),//年份
@ -192,7 +193,6 @@ Vue.component('server-items-detail', {
				messageList:{},
			},
			message:{isImg:false,content:""},
			KFZDlayerIndex: undefined,
			islimit: false
        }
    },
@ -210,7 +210,7 @@ Vue.component('server-items-detail', {
    methods: {
		initData: function(){
			var vm = this
			this.planDetaiId = this.serveriteminfo.id
			this.planDetaiId = this.plandetailid
			this.getServiceItem()
		},
		getServiceItem: function() {
@ -258,15 +258,19 @@ Vue.component('server-items-detail', {
				}
			})
		},
		closeAllLayer: function(name, planDetaiId, type, relationCode){
		goToEditConfig: function(){
			var vm = this
			location.href = "../../recover/html/new_recover.html?patient=" + vm.patientcode + '&isEditConfig=true&planId='+vm.planid+'&planDetailId='+vm.planDetaiId
		},
		closeAllLayer: function(name, planDetaiId, type, relationCode, flag){
			if(name=='预览康复指导'){
				layer.close()
			} else if(name=='创建随访计划'){
				this.saveRehabilitationOperateRecord(planDetaiId, type, relationCode)
				layer.close()
				this.saveRehabilitationOperateRecord(planDetaiId, type, relationCode, flag)
				layer.close(followupLayerIndex)
			} else if(name=='发送康复指导'){
				this.saveRehabilitationOperateRecord(planDetaiId, type)
				layer.close(this.KFZDlayerIndex)
				layer.close(KFZDlayerIndex)
			}
		},
		// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
@ -312,7 +316,7 @@ Vue.component('server-items-detail', {
		addCompleteRecord: function(){
			var vm = this
			var detailId = this.planDetaiId
			var type = vm.serveriteminfo.code
			var type = vm.service.type
			$("#completeRecord").css('display','block')
			this.layerIndex = layer.open({
				type: 1,
@ -462,7 +466,7 @@ Vue.component('server-items-detail', {
				executeStartTime: vm.isFastSearch ? '' : __days[0].date+'-'+__days[0].day+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
				executeEndTime: vm.isFastSearch ? '' : (__days.concat()).pop().date+'-'+lastDay+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
				planId:vm.planid,//计划id
				searchTask: vm.serveriteminfo.code,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访)
				searchTask: vm.service.type,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访)
				status: null,//任务状态(0未完成,1已完成,2已预约)
			}
			rehaAPI.calendarPlanDetail(params).then(function(res){
@ -589,7 +593,7 @@ Vue.component('server-items-detail', {
				executeEndTime:__days[0].date+'-'+__days[0].day+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
				executeStartTime:(__days.concat()).pop().date+'-'+lastDay+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
				planId:vm.planid,//计划id
				searchTask:vm.serveriteminfo.code, // 服务项
				searchTask:vm.service.type, // 服务项
				status: null, //任务状态(0未完成,1已完成,2已预约)
			}
			rehaAPI.calendarPlanDetailList(params).then(function(res){
@ -621,7 +625,7 @@ Vue.component('server-items-detail', {
			var vm = this
			var params = {
				planId: this.planid,
				code: vm.serveriteminfo.code,
				code: vm.service.type,
				page: 1,
				pagesize: 10000
			}
@ -683,7 +687,7 @@ Vue.component('server-items-detail', {
		//康复指导
		kfzd:function(){
			var vm=this
			this.KFZDlayerIndex = layer.open({
			KFZDlayerIndex = layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['660px', '650px'],
@ -700,6 +704,26 @@ Vue.component('server-items-detail', {
				}
			});
		},
		// 康复随访计划
		sfjh: function(){
			var vm=this
			followupLayerIndex = layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['660px', '650px'],
				shade: 0.5,
				title: '随访计划',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content:'../../followup/html/followup_newplan.html?patient='+vm.patientcode+'&planDetaiId='+vm.planDetaiId+'&planId='+vm.planid,
				end: function() { // 未点击确定按钮,点击关闭按钮  
					vm.initData()    
				}
			});
		},
		upLoadImgToBase64: function() {
			var vm = this;
			var img1 = event.target.files[0];
@ -747,7 +771,7 @@ Vue.component('server-items-detail', {
				})
			}
		},
		saveRehabilitationOperateRecord:function(planDetailId, type, relationCode){
		saveRehabilitationOperateRecord:function(planDetailId, type, relationCode, flag){
			var vm=this
			var patientName = vm.patientname
			var patientCode = vm.patientcode
@ -763,7 +787,9 @@ Vue.component('server-items-detail', {
				relationRecordType: type,
				relationRecordCode: '',
				relationRecordImg: '',
				status: 0
				status: flag&&flag==2?1:0, // 改记录的状态
				relationCode: relationCode, //业务id
				flag: flag,//标记(1随访2临时随访)
			}
			rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
				if(res.status==200){