Pārlūkot izejas kodu

提交修改11.19测试反馈bug

刘远航 4 gadi atpakaļ
vecāks
revīzija
500a06a358
4 mainītis faili ar 80 papildinājumiem un 24 dzēšanām
  1. 25 12
      pages/Scheduling.vue
  2. 27 4
      pages/patient/patientxq.vue
  3. 27 7
      pages/zixun/xiangqing.vue
  4. 1 1
      pages/zixun/zixun.vue

+ 25 - 12
pages/Scheduling.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -332,8 +332,8 @@
 				console.log('老得:', this.oldWeek);
 				console.log('新的', res.data);
 				if (res.status == 0) {
-					if (typeof res.data[0] != undefined && typeof res.data[0] != 'undefined') {
-						let data = res.data;
+					if (typeof res.data.list[0] != undefined && typeof res.data[0] != 'undefined') {
+						let data = res.data.list;
 						let arr = [];
 						for (let i = 0; i < this.oldWeek.length; i++) {
 							for (let p = 0; p < data.length; p++) {
@@ -410,7 +410,7 @@
 				var bData = new Date();
 				bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * (8 - bData.getDay() + (7 * e[0].value)))
 				for (let i = 0; i < 7; i++) {
-					var week = (bData.getMonth() + 1) + "-" + bData.getDate();
+					var week = (bData.getMonth() + 1) + "-" + this.Appendzero(bData.getDate());
 					bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * 1);
 					this.hospitalWeek[i].value = week
 					this.saveList[i].schedule_date = '2020-' + week
@@ -486,11 +486,15 @@
 						duration: 2000,
 						title: '排班成功'
 					})
+					uni.switchTab({
+						url: '/pages/index/index'
+					})
+				}else{
+					uni.showModal({
+						duration:2000,
+						title:res.message,
+					})
 				}
-
-				uni.switchTab({
-					url: '/pages/index/index'
-				})
 			},
 			//获取时间
 			getTime() {
@@ -513,11 +517,11 @@
 				aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * (7 - aData.getDay()))
 				for (let i = 0; i < 4; i++) {
 					aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * 1)
-					var week1 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + aData.getDate();
+					var week1 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + this.Appendzero(aData.getDate());
 					console.log('第', i + 1, '个周一的时间', week1) //周一的时间
 					//周日
 					aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * (aData.getDay() + 5))
-					var week2 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + aData.getDate();
+					var week2 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + this.Appendzero(aData.getDate());
 					console.log('第', i + 1, '个周日的时间', week2) //周日的时间
 					this.list[i].label = week1 + ' - ' + week2 //给选择器数组
 				}
@@ -525,7 +529,8 @@
 				var bData = new Date();
 				bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * (8 - bData.getDay()))
 				for (let i = 0; i < 7; i++) {
-					var week = (bData.getMonth() + 1) + "-" + bData.getDate();
+					var week = (bData.getMonth() + 1) + "-" + this.Appendzero(bData.getDate());
+					console.log('号:',week)
 					bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * 1);
 					this.hospitalWeek[i].value = week
 					this.saveList[i].schedule_date = '2020-' + week
@@ -561,6 +566,11 @@
 				// alert(week)
 				// return currentdate;
 			},
+			
+			Appendzero(obj){
+			            if(obj<10) return "0" +""+ obj;
+			            else return obj;
+			        },
 
 			getTemplate: async function() {
 				let that = this;
@@ -570,10 +580,13 @@
 					'start_date': startTime,
 					'end_date': endTime
 				});
+			 
 				if (res.status == 0) {
-					if (typeof res.data[0] != undefined && typeof res.data[0] != 'undefined') {
-						let data = res.data;
+					this.fixed = res.data.save_flag
+					if (typeof res.data.list[0] != undefined && typeof res.data.list[0] != 'undefined') {
+						let data = res.data.list;
 						let arr = [];
+					 
 						for (let i = 0; i < this.hospitalWeek.length; i++) {
 							for (let p = 0; p < data.length; p++) {
 								if (this.hospitalWeek[i].value == data[p].schedule_date) {

+ 27 - 4
pages/patient/patientxq.vue

xqd
@@ -247,12 +247,35 @@
 
 		},
 		methods: {
-			phone(){
+			phone:async function(){
 				//打电话
-				
-				
-				
+				let res = await this.$request.post("patient/callPhoneSure",{'user_id':this.user_id});
+				if(res.status==0){
+					let phone = res.data;
+					// 去拨打电话即可
+					uni.makePhoneCall({
+					 	// 手机号
+					    phoneNumber: phone, 
+						// 成功回调
+						success: (res) => {
+							console.log('调用成功!')	
+						},
+						// 失败回调
+						fail: (res) => {
+							uni.showModal({
+								title:"拨打电话调用失败",
+							})
+						}
+					  });
+				}else{
+					uni.showToast({
+						title:res.message,
+						icon:'none',
+						duration:3000
+					})
+				}
 			},
+			
 			//点击档案
 			clickda(e) {
 				console.log(this.dalist[e.currentTarget.dataset.index])

+ 27 - 7
pages/zixun/xiangqing.vue

xqd xqd xqd xqd xqd xqd
@@ -229,6 +229,7 @@
 		},
 		data() {
 			return {
+				user_id:'',
 				pageid: '',
 				patient_id: '',
 				/**********************      图文咨询,包括某些电话咨询      *********************/
@@ -285,11 +286,24 @@
 		},
 		methods: {
 			phone:async function(){
-
-				let res = await this.$request.post("patient/callPhones",{'patient_id':this.patient_id});
+				let res = await this.$request.post("patient/callPhones",{'patient_id':this.patient_id,'user_id':this.user_id});
 				if(res.status==0){
 					let phone = res.data;
 					// 去拨打电话即可
+					uni.makePhoneCall({
+					 	// 手机号
+					    phoneNumber: phone, 
+						// 成功回调
+						success: (res) => {
+							console.log('调用成功!')	
+						},
+						// 失败回调
+						fail: (res) => {
+							uni.showModal({
+								title:"拨打电话调用失败",
+							})
+						}
+					  });
 					console.log(res);
 				}else{
 					uni.showToast({
@@ -305,6 +319,7 @@
 					
 					let list = res.data;
 					this.info = res.data
+					this.user_id = list.user_id
 					this.orderID = list.order_sn;
 					this.patient_id = list.patient_id;
 					this.zl = list.product_type;
@@ -314,6 +329,7 @@
 					this.placeTime = list.created_at;
 					this.xiadankh = list.nickname;
 					this.receivingTime = list.receiving_time
+					
 
 					if (list.product_type == 2) {
 						// 图文咨询:
@@ -321,7 +337,9 @@
 						this.potolList = list.medical_imgs;
 					} else {
 						this.callTime = list.one_call;
-						this.callList = list.call_list
+						this.callList = list.call_list;
+						 
+						this.xphone = list.secret_no;
 					}
 					this.zt = list.order_status;
 
@@ -396,14 +414,16 @@
 				if(that.bz!=''){
 					if(that.by!=''){
 						if(that.jl!=''){
-							let datas = {'order_id':order_id,'symptoms':bingzheng,'pathogen':bingyin,'suggest':jianyi,'patient_id':that.patient_id};
-							if(this.zl==1){
-								datas['xphone'] = this.xphone;
-							}
 							that.formshow = false
 							let bingzheng=that.bz;
 							let bingyin=that.by;
 							let jianyi=that.jl;
+							let datas = {'order_id':order_id,'symptoms':bingzheng,'pathogen':bingyin,'suggest':jianyi,'patient_id':that.patient_id};
+							if(this.zl==1){
+								datas['xphone'] = this.xphone;
+							}
+					 
+						
 							let res = await that.$request.post('patient/orderPatientok',datas);
 							if(res.status==0){
 								uni.showToast({

+ 1 - 1
pages/zixun/zixun.vue

xqd
@@ -80,11 +80,11 @@
 	export default {
 		onShow() {
 			// this.getLists(this.num,this.value1,this.value2)
+			this.getLists(this.num,this.value1,this.value2)
 			
 		},
 		onLoad(e) {
 			// 获取列表
-			this.getLists(this.num,this.value1,this.value2)
 		},
 		data() {
 			return {