yingzhou 6 years ago
parent
commit
9d78d89c35

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

@ -119,7 +119,7 @@
				    </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">确认完成</button>
	      			<button class="btn btn-zhidao" @click="qrwc(service.patient,service.type)">确认完成</button>
	      		</div>
	      	</div>
		</div>

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

@ -159,10 +159,38 @@
					//			             		vm.uploadImg(vm.upImgArr);
				}
			},
			qrwc: function() {
			qrwc: function(patient,type) {
				var vm = this;
				vm.uploadImg(vm.upImgArr, vm.updateNoteAndImageRehabilitationOperate);
				vm.saveRehabilitationOperateRecord(patient,type);
			},
			saveRehabilitationOperateRecord:function(patient,type){
	        	var vm=this;
	        	var userInfo = JSON.parse(window.localStorage.getItem(httpRequest.agentName)); 
	        	var _type;
	        	if(type==0){
	        		_type=5
	        	}
	        	console.log(vm.planid)
	        	if(type!=0) return ;//只有上传需要新增
	        	var params={
	        		rehabilitationDetailId:vm.planid,
					node:null,
					patientCode:patient,
					doctorCode:userInfo.uid,
					relationRecordType:_type,
					relationRecordCode:'',
					relationRecordImg:null,
					status:0
	        	}
	        	rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
	        		var icon=5;
	        		if(res.status==200){
	        			icon=1;
	        			vm.uploadImg(vm.upImgArr, vm.updateNoteAndImageRehabilitationOperate);
	        		}
	        	})
	        	
	        },
			//上传图片
			uploadImg: function(data, cb) {
				var vm = this;