Browse Source

康复管理 提醒患者 增加提示

yht2016 5 years ago
parent
commit
6f64e10809

+ 30 - 17
app/rehabilitation/js/guide_the_message.js

@ -40,6 +40,7 @@ top.rehabilitationGuideVue = new Vue({
		pId: httpData['pId'],
		oprateType: httpData['oprateType'], // oprateType 1 查看单个服务项
		patient: httpData['patient'],
		patientName: decodeURI(httpData['patientName']),
		layerIndex: undefined
	},
	mounted: function() {
@ -49,25 +50,37 @@ top.rehabilitationGuideVue = new Vue({
		// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
		sendSpecialistWeixinMessage: function(type){
			var vm = this
			var _type = type == 4? 4:type==7?3:''
			var loading = layer.load(0, {shade: false})
			var params = {
				patient: vm.patient,
				doctor: docInfo.code,
				type: _type,
				relationCode: vm.planid,
				planId: vm.pId
			var text = ''
			if(type==4){ // 上门服务
				text = '请问您是否确认提醒'+vm.patientName+'居民预约上门护理服务?'
			} else if(type==7){ // 康复复诊
				text = '请问您是否确认提醒'+vm.patientName+'居民进行复诊?'
			}
			rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
				layer.close(loading)
				if(res.status == 200){
					showSuccessMessage('提交成功!')
					if(_type == 3 || _type == 4){ // 提醒患者后,即认为是已完成
						vm.saveRehabilitationOperateRecord(vm.planid, type)
					}
				} else {
					showErrorMessage(res.msg)
			var current=layer.confirm(text, {
				btn: ['确定', '取消'],
				title: "提示"
			}, function (index) {
				var _type = type == 4? 4:type==7?3:''
				var loading = layer.load(0, {shade: false})
				var params = {
					patient: vm.patient,
					doctor: docInfo.code,
					type: _type,
					relationCode: vm.planid,
					planId: vm.pId
				}
				rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
					layer.close(loading)
					if(res.status == 200){
						showSuccessMessage('提交成功!')
						if(_type == 3 || _type == 4){ // 提醒患者后,即认为是已完成
							vm.saveRehabilitationOperateRecord(vm.planid, type)
						}
					} else {
						showErrorMessage(res.msg)
					}
				})
				layer.close(current); //再执行关闭
			})
		},
		//健康指导

+ 2 - 2
app/rehabilitation/js/rehabilitation_management.js

@ -222,7 +222,7 @@
					  closeBtn:1,
					  shift: 5,
					  shadeClose: false, //点击遮罩关闭层
					  content: '../../rehabilitation/html/guide_the_message.html?planid='+planids+'&oprateType=1'+'&pId='+httpData['planId']+'&patient='+vm.patientCode
					  content: '../../rehabilitation/html/guide_the_message.html?planid='+planids+'&oprateType=1'+'&pId='+httpData['planId']+'&patient='+vm.patientCode+'&patientName='+vm.planInfo.patientName,
					});
					return ;
				}
@ -236,7 +236,7 @@
				  closeBtn:1,
				  shift: 5,
				  shadeClose: false, //点击遮罩关闭层
				  content: '../../rehabilitation/html/service_item_content.html?planids='+planids+'&planId='+httpData['planId']+'&patient='+vm.patientCode,
				  content: '../../rehabilitation/html/service_item_content.html?planids='+planids+'&planId='+httpData['planId']+'&patient='+vm.patientCode+'&patientName='+vm.planInfo.patientName,
				  end:function(){
				  	vm.goToLoadData(true);	
				  }

+ 31 - 17
app/rehabilitation/js/service_item_content.js

@ -30,6 +30,7 @@ data:{
	planId: httpData['planId'],
	planids: httpData['planids'],
	patient: httpData['patient'],
	patientName: decodeURI(httpData['patientName']),
	serviceData:[
		{
			relationRecordImg:{},
@ -50,26 +51,39 @@ methods:{
	// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
	sendSpecialistWeixinMessage: function(planDetaiId, type){
		var vm = this
		var _type = type == 4? 4:type==7?3:''
		var loading = layer.load(0, {shade: false})
		var params = {
			patient: vm.patient,
			doctor: docInfo.code,
			type: _type,
			relationCode: planDetaiId,
			planId: vm.planId
		var text = ''
		if(type==4){ // 上门服务
			text = '请问您是否确认提醒'+vm.patientName+'居民预约上门护理服务?'
		} else if(type==7){ // 康复复诊
			text = '请问您是否确认提醒'+vm.patientName+'居民进行复诊?'
		}
		rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
			layer.close(loading)
			if(res.status == 200){
				showSuccessMessage('提交成功!')
				if(_type==3 || _type==4){ // 提醒患者后,即认为是已完成
					vm.saveRehabilitationOperateRecord(planDetaiId, type)
				}
			} else {
				showErrorMessage(res.msg)
		var current=layer.confirm(text, { 
			btn: ['确定', '取消'],
			title: "提示"
		}, function (index) {
			var _type = type == 4? 4:type==7?3:''
			var loading = layer.load(0, {shade: false})
			var params = {
				patient: vm.patient,
				doctor: docInfo.code,
				type: _type,
				relationCode: planDetaiId,
				planId: vm.planId
			}
			rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
				layer.close(loading)
				if(res.status == 200){
					showSuccessMessage('提交成功!')
					if(_type==3 || _type==4){ // 提醒患者后,即认为是已完成
						vm.saveRehabilitationOperateRecord(planDetaiId, type)
					}
				} else {
					showErrorMessage(res.msg)
				}
			})
			layer.close(current); //再执行关闭
		})
	},
	viewDetial:function(type,code){
		var vm=this;