|  | @ -283,7 +283,7 @@
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           toSelectDoctor() {
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             top.layer.open({
 | 
	
		
			
				|  |  |               type: 2,
 | 
	
		
			
				|  |  |               area: ['500px', '700px'],
 | 
	
	
		
			
				|  | @ -307,9 +307,9 @@
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           reservationFn() {
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  |             const nowDate = new Date().getTime()
 | 
	
		
			
				|  |  |             const serviceDate = new Date(this.time + " "+ this.time1[0]).getTime()
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |             var nowDate = new Date().getTime()
 | 
	
		
			
				|  |  |             var serviceDate = new Date(this.time + " "+ this.time1[0]).getTime()
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             if (!vm.serveAddress) {
 | 
	
		
			
				|  |  |               vm.$message.warning('请输入上门地址')
 | 
	
		
			
				|  |  |               return
 | 
	
	
		
			
				|  | @ -331,7 +331,7 @@
 | 
	
		
			
				|  |  |               return
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  |             const params = {
 | 
	
		
			
				|  |  |             var params = {
 | 
	
		
			
				|  |  |               dataJson: JSON.stringify({
 | 
	
		
			
				|  |  |                 rehabilitationDetailId: this.detailId,
 | 
	
		
			
				|  |  |                 patientCode: this.patient,
 | 
	
	
		
			
				|  | @ -346,7 +346,7 @@
 | 
	
		
			
				|  |  |               })
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             const packageItemArr = []
 | 
	
		
			
				|  |  |             var packageItemArr = []
 | 
	
		
			
				|  |  |             this.serviceList.forEach(function (item) {
 | 
	
		
			
				|  |  |               packageItemArr.push({
 | 
	
		
			
				|  |  |                 type: 1,
 | 
	
	
		
			
				|  | @ -390,14 +390,16 @@
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if(this.relationCode){
 | 
	
		
			
				|  |  |               // 内部 代预约
 | 
	
		
			
				|  |  |               this.createSend(param)
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |               // 外部 代预约
 | 
	
		
			
				|  |  |               this.saveRehabilitationOperateRecord(params, param)
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           saveRehabilitationOperateRecord(params, param) {
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             var url = 'doctor/specialist/rehabilitation/saveRehabilitationOperateRecord'
 | 
	
		
			
				|  |  |             httpRequest.post(url, { data: params }).then(function (res) {
 | 
	
		
			
				|  |  |               if (res.status == 200) {
 | 
	
	
		
			
				|  | @ -411,20 +413,25 @@
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           createSend(param) {
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             var url = 'doctor/serviceOrder/proxyCreate'
 | 
	
		
			
				|  |  |             httpRequest.post(url, { data: param }).then(function (res) {
 | 
	
		
			
				|  |  |               if (res.status == 200) {
 | 
	
		
			
				|  |  |                 vm.$message.success('预约成功!')
 | 
	
		
			
				|  |  |                 var index = parent.layer.getFrameIndex(window.name)
 | 
	
		
			
				|  |  |                 parent.layer.close(index) 
 | 
	
		
			
				|  |  |                 if(vm.relationCode){
 | 
	
		
			
				|  |  |                   // 内部
 | 
	
		
			
				|  |  |                   vm.createOperateRecord()
 | 
	
		
			
				|  |  |                 }else{
 | 
	
		
			
				|  |  |                   vm.updateNoteAndImageRehabilitationOperate("代预约成功")
 | 
	
		
			
				|  |  |                   // 外部
 | 
	
		
			
				|  |  |                 } 
 | 
	
		
			
				|  |  |               } else {
 | 
	
		
			
				|  |  |                 vm.$message.error(res.msg)
 | 
	
		
			
				|  |  |               }
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           createOperateRecord(vm,cb){
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |           createOperateRecord(cb){
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             var url = "doctor/specialist/rehabilitation/saveRehabilitationOperateRecord",
 | 
	
		
			
				|  |  |                 obj = {
 | 
	
		
			
				|  |  |                     rehabilitationDetailId: vm.detailId,
 | 
	
	
		
			
				|  | @ -440,38 +447,50 @@
 | 
	
		
			
				|  |  |             var params = {
 | 
	
		
			
				|  |  |                 dataJson: JSON.stringify(obj)
 | 
	
		
			
				|  |  |             };
 | 
	
		
			
				|  |  |             plus.nativeUI.showWaiting();
 | 
	
		
			
				|  |  |             sendPost(url, params, null, function(res){
 | 
	
		
			
				|  |  |                 if (res.status == 200) {
 | 
	
		
			
				|  |  |                         cb&&cb() 
 | 
	
		
			
				|  |  |                 }else{
 | 
	
		
			
				|  |  |             httpRequest.post(url, {data:params}).then(function(res){
 | 
	
		
			
				|  |  |               if (res.status == 200) {
 | 
	
		
			
				|  |  |                 console.log("vm.done()");
 | 
	
		
			
				|  |  |                 
 | 
	
		
			
				|  |  |                   vm.done()
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 plus.nativeUI.closeWaiting();
 | 
	
		
			
				|  |  |             });
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           updateNoteAndImageRehabilitationOperate(text) {
 | 
	
		
			
				|  |  |             const vm = this
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             var params = {
 | 
	
		
			
				|  |  |               planDetailId: detailId,
 | 
	
		
			
				|  |  |               planDetailId: vm.detailId,
 | 
	
		
			
				|  |  |               node: text,
 | 
	
		
			
				|  |  |               image: ''
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (vm.detailInfo.type == '6') {
 | 
	
		
			
				|  |  |               params.relationCode = vm.followId || ''
 | 
	
		
			
				|  |  |               params.flag = vm.followFlag || ''
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             plus.nativeUI.showWaiting('提交中..')
 | 
	
		
			
				|  |  |             var uRl =
 | 
	
		
			
				|  |  |               '/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
 | 
	
		
			
				|  |  |             sendPost(uRl, params, null, function (res) {
 | 
	
		
			
				|  |  |               plus.nativeUI.closeWaiting()
 | 
	
		
			
				|  |  |               if (res.status == 200) {
 | 
	
		
			
				|  |  |                 freeListGet(vm)
 | 
	
		
			
				|  |  |               } else {
 | 
	
		
			
				|  |  |                 mui.toast(res.msg || '服务记录失败')
 | 
	
		
			
				|  |  |             httpRequest.post(uRl,{data:params}).then(function(res){
 | 
	
		
			
				|  |  |               if(res.status == 200){
 | 
	
		
			
				|  |  |                 var index = parent.layer.getFrameIndex(window.name)
 | 
	
		
			
				|  |  |                 parent.layer.close(index)
 | 
	
		
			
				|  |  |               }else{
 | 
	
		
			
				|  |  |                 vm.$message.error(res.msg || '服务记录失败')
 | 
	
		
			
				|  |  |               }
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           }
 | 
	
		
			
				|  |  |           },
 | 
	
		
			
				|  |  |           done(){
 | 
	
		
			
				|  |  |             var vm = this
 | 
	
		
			
				|  |  |             var url = "/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate"
 | 
	
		
			
				|  |  |             var params = {
 | 
	
		
			
				|  |  |               planDetailId: vm.detailId,
 | 
	
		
			
				|  |  |               node: vm.notes || "",
 | 
	
		
			
				|  |  |               image: ""
 | 
	
		
			
				|  |  |             };
 | 
	
		
			
				|  |  |             if(vm.relationCode){
 | 
	
		
			
				|  |  |               params.relationCode = vm.relationCode
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             httpRequest.post(url,{data:params}).then(function(res){
 | 
	
		
			
				|  |  |               if(res.status == 200){
 | 
	
		
			
				|  |  |                 var index = parent.layer.getFrameIndex(window.name)
 | 
	
		
			
				|  |  |                 parent.layer.close(index)
 | 
	
		
			
				|  |  |               }
 | 
	
		
			
				|  |  |             })
 | 
	
		
			
				|  |  |           } 
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |       })
 | 
	
		
			
				|  |  |     </script>
 |