Ver código fonte

提交修复

liuyuanhang 4 anos atrás
pai
commit
ebdd96350a

+ 67 - 12
pages/index/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -46,7 +46,7 @@
 							</view>
 							<view bindtap="" class="m-flex tl f14 m-ycenter">
 								<view class="m-gray-big f20 fb">{{docterInfo.eva_num}}</view>
-								<view class="m-gray-letter mt5 f12">评价(张)</view>
+								<view class="m-gray-letter mt5 f12">评价</view>
 							</view>
 							<view bindtap="" class="m-flex tl f14 m-ycenter">
 								<view class="m-gray-big f20 fb">{{docterInfo.score}}</view>
@@ -212,7 +212,7 @@
 				docterInfo: {
 					name: "未登录",
 					avatar: "",
-					eva_num: "",
+					eva_num: "0",
 					is_then: "",
 					label: "",
 					sign: "",
@@ -224,6 +224,9 @@
 				docterMessageList: [],
 				//认证弹窗
 				rzModal: false,
+				mzModal:false,
+				twModel:false,
+				dhModel:false,
 
 				//没登录头像
 				nosrc: '../../static/login/moren.png',
@@ -271,6 +274,8 @@
 			this.getDocterInfo();
 			// 获取当前登录人接收消息
 			this.getDocterMessage();
+			
+			this.getStatus();
 		},
 
 		mounted() {
@@ -526,7 +531,32 @@
 					})
 					return false;
 				} else {
-					return true
+					if(this.docterInfo.is_then!=1){
+						uni.showModal({
+							title: "提示",
+							content: "请您先认证",
+							confirmText: "去认证",
+							showCancel: false,
+							success() {
+								uni.navigateTo({
+									url: '/pages/login/doctorRenzheng'
+								})
+							}
+						})
+						return false;
+					}else{
+						return true;
+					}
+					
+				}
+			},
+			getStatus:async function(){
+				let res = await this.$request.post('doctor/getSettingList',{'type':1});
+				 
+				if(res.status==0){
+					this.mzModal = res.data.is_appoint
+					this.dhModel = res.data.is_phone
+					this.twModel = res.data.is_chat
 				}
 			},
 
@@ -564,17 +594,34 @@
 			//跳转患者咨询
 			zixun() {
 				if (this.judgerenzheng()) {
-					uni.navigateTo({
-						url: '/pages/zixun/zixun'
-					})
+					 if(this.twModel&&this.dhModel){
+						uni.navigateTo({
+							url: '/pages/zixun/zixun'
+						}) 
+					 }else{
+						 uni.showToast({
+						 	title:'您未开启图文和电话咨询',
+						 	icon:'none'
+						 })
+					 }
+					
 				}
 			},
 			//排班
 			pb() {
+				this.getStatus();
 				if (this.judgerenzheng()) {
-					uni.navigateTo({
-						url: '/pages/Scheduling'
-					})
+					if(this.mzModal){
+						uni.navigateTo({
+							url: '/pages/Scheduling'
+						})
+					}else{
+						uni.showToast({
+							title:'您未开启门诊',
+							icon:'none'
+						})
+					}
+					
 				}
 			},
 			//意见
@@ -588,9 +635,17 @@
 			//门诊
 			mz() {
 				if (this.judgerenzheng()) {
-					uni.navigateTo({
-						url: '/pages/menzhen/menzhen'
-					})
+					if(this.mzModal){
+						uni.navigateTo({
+							url: '/pages/menzhen/menzhen'
+						})
+					}else{
+						uni.showToast({
+							title:'您未开启门诊',
+							icon:'none'
+						})
+					}
+					
 				}
 			},
 			//个人信息 右上角的编辑按钮

+ 10 - 5
pages/information/information.vue

xqd xqd xqd xqd
@@ -61,6 +61,7 @@
 					placeholder1:'请输入个人标签,用于展示给患者',
 					//输入域值
 					areaValue:'',
+					url:'',
 					//输入域占位符
 					placeholder2:'请填写服务范围、经验等信息,用于展示给患者。'
 				}
@@ -84,7 +85,7 @@
 				//输入框焦点消失事件
 				bindTextAreaBlur({detail}){
 					console.log(detail.value)
-					this.areaValue = detail.value
+					this.placeholder2 = detail.value
 				},
 				//输入框焦点消失事件
 				inputTextAreaBlur(e){
@@ -94,7 +95,8 @@
 
 				//保存按钮
 				bc:async function(e){
-					let res = await this.$request.post('doctor/doctorInfoEdit',{'intro':this.areaValue,'avatar':this.src,'sign':this.placeholder1})
+					 
+					let res = await this.$request.post('doctor/doctorInfoEdit',{'intro':this.placeholder2,'avatar':this.url,'sign':this.placeholder1})
 					if(res.status==0){
 						uni.showToast({
 						    title: '修改成功',
@@ -113,15 +115,18 @@
 					return false;
 				},
 				ChooseImage() {
+					let that =this;
 				    uni.chooseImage({
 				     count: 1, //默认9
 				     sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
 				     sourceType: ['album', 'camera'], //从相册选择
 				     success: (res) => {
-				      this.imgList = res.tempFilePaths
+				      that.imgList = res.tempFilePaths
 					  console.log('我是file:',res.tempFilePaths[0])
-					  this.$request.upload("Common/uploadFile",this.imgList[0],{}).then(res=>{
-						  console.log(res)
+					  that.$request.upload("Common/uploadFile",that.imgList[0],{}).then(res=>{
+						 
+						  that.url = imglocal+JSON.parse(res).data.url;
+						   
 					  })
 				     }
 				    });

+ 23 - 6
pages/menzhen/menzhen.vue

xqd xqd xqd
@@ -13,14 +13,28 @@
 			<view class="list_view">
 				<!-- 状态 0待履行 1已完成 -->
 				<view class="flex align-center" style="margin-bottom: 30rpx;">
+					 
+					<view style="width: 70%;" v-if="item.zt == 1" class="flex align-center">
+						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
+						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">未支付</view>
+					</view>
+					<view style="width: 70%;" v-if="item.zt == 2" class="flex align-center">
+						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
+						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">待接单</view>
+					</view>
+					<view style="width: 70%;" v-if="item.zt == 3" class="flex align-center">
+						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
+						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">进行中</view>
+					</view>
 					<view style="width: 70%;" v-if="item.zt == 4" class="flex align-center">
 						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
-						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">待履行</view>
+						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">已完成</view>
 					</view>
-					<view style="width: 70%;" v-else-if="item.zt == 5" class="flex align-center">
-						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #b8b8b8;margin-right: 20rpx;"></view>
-						<view style="color: #b8b8b8;font-size: 30rpx;font-weight:bold ;">已完成</view>
+					<view style="width: 70%;" v-if="item.zt == 5" class="flex align-center">
+						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
+						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">已取消</view>
 					</view>
+				 
 					<view style="width: 30%;" class="flex align-center">
 						<view style="font-size: 28rpx;padding: 8rpx 24rpx;border-radius: 20rpx;background-color: #F6F6F6;">门诊预约</view>
 					</view>
@@ -58,7 +72,10 @@
 
 <script>
 	export default {
-		onLoad(e) {
+		// onLoad(e) {
+		// 	this.getLists(this.num,this.value1,this.value2)
+		// },
+		onShow(e){
 			this.getLists(this.num,this.value1,this.value2)
 		},
 		data() {
@@ -174,7 +191,7 @@
 			xiangqing(e) {
 				console.log(this.list[e.currentTarget.dataset.index])
 				uni.navigateTo({
-					url: 'menzhenxq?data=' + this.list[e.currentTarget.dataset.index]
+					url: 'menzhenxq?data=' + this.list[e.currentTarget.dataset.index].id
 				})
 			}
 		},

+ 110 - 8
pages/menzhen/menzhenxq.vue

xqd xqd xqd xqd xqd
@@ -50,14 +50,17 @@
 			</view>
 			<view class="nr">
 				<view class="left">订单状态:</view>
-				<view class="right" v-if="zt==0">未履行</view>
-				<view class="right" v-else-if="zt==1">已完成</view>
+				<view class="right" v-if="zt==1">未支付</view>
+				<view class="right" v-else-if="zt==2">待接单</view>
+				<view class="right" v-else-if="zt==3">进行中</view>
+				<view class="right" v-else-if="zt==4">已完成</view>
+				<view class="right" v-else-if="zt==5">已取消</view>
 			</view>
 		</view>
 		<u-gap height="30" bg-color="#f6f6f6"></u-gap>
 		<!-- 底部按钮 -->
 		<!-- 当订单状态为未接单  zt==0 -->
-		<view class="bottomButton" v-if="zt == 0">
+		<view class="bottomButton" v-if="zt <= 2">
 			<!-- 左边的首页按钮 -->
 			<view style="width: 20%;" class="flex align-center justify-center">
 				<u-icon name="home" size="50" @click="home"></u-icon>
@@ -65,12 +68,24 @@
 			<!-- 右边的其他按钮 -->
 			<view style="width: 80%;" class="flex justify-end align-center">
 				<view class="b">
-					<u-button shape="circle" :custom-style="btStyle" @click="queren">确认单</u-button>
+					<u-button shape="circle" :custom-style="btStyle" @click="queren">确认单</u-button>
 				</view>
 			</view>
 		</view>
 		<!-- 当订单状态为  zt==1 -->
-		<view class="bottomButton" v-else-if="zt == 1">
+		<view class="bottomButton" v-else-if="zt == 3">
+			<!-- 左边的首页按钮 -->
+			<view style="width: 20%;" class="flex align-center justify-center">
+				<u-icon name="home" size="50" @click="home"></u-icon>
+			</view>
+			<!-- 右边的其他按钮 -->
+			<view style="width: 80%;" class="flex justify-end align-center">
+				<view class="b">
+					<u-button shape="circle" :custom-style="btStyle" @click="querenok" >确认完成</u-button>
+				</view>
+			</view>
+		</view>
+		<view class="bottomButton" v-else-if="zt > 3">
 			<!-- 左边的首页按钮 -->
 			<view style="width: 20%;" class="flex align-center justify-center">
 				<u-icon name="home" size="50" @click="home"></u-icon>
@@ -82,18 +97,34 @@
 				</view>
 			</view>
 		</view>
+		
+		
 	</view>
 </template>
 
 <script>
 	export default {
 		onLoad(options) {
+			let ids = options.data;
+			if(ids!=''&&ids!=0){
+				this.xhrId = ids;
+				// 执行渲染
+				this.getInfos(ids);
+				
+			}else{
+				uni.showToast({
+					title:'请求错误',
+					icon:'none'
+				})
+			}
+			console.log('详情:',options);
 		},
 		mounted() {
 
 		},
 		data() {
 			return {
+				xhrId:0,
 				// 上部数据
 				orderID: 'ZX202000010', //订单号
 
@@ -106,6 +137,7 @@
 				placeTime: '', //下单时间
 				xiadankh: '张大', //下单客户
 				zt: 0, // 状态 0未履行 1已完成
+				local:'',
 				
 				//下部按钮样式
 				bStyle: {
@@ -123,9 +155,79 @@
 			}
 		},
 		methods: {
-			// 确认订单
-			queren(e) {
-				this.zt = 1
+			
+			/**
+			 * 详情渲染
+			 * @author Liu Yuanhang
+			 * @param {Object} id
+			 */
+			getInfos:async function(id){
+					// 获取信息
+			  let res = await this.$request.post("patient/orderPatientDetail",{patient_id:id});
+			  if(res.status==0){
+				    let datas = res.data;
+				    this.orderID = datas.order_sn;
+				    this.name = datas.name;
+					this.age = datas.numbirthday;
+					this.ID = datas.card_number;
+					this.appointment = datas.appoint_time;
+					this.placeTime = datas.created_at;
+					this.xiadankh = datas.nickname;
+					this.zt = datas.order_status;
+					this.local = datas.organization;
+				
+			  }else{
+				  uni.showToast({
+				  	title:res.message,
+				  	duration:3000
+				  })
+				  return false;
+			  }
+			
+			},
+			
+			/**
+			 * 接单
+			 * @author Liu Yuanhang
+			 * @param {Object} e
+			 */
+			queren:async function(e) {
+				this.zt = 3;
+				let res  = await this.$request.post("patient/putOrderPatient",{order_id:this.xhrId});
+				console.log('接单:',res);
+				if(res.status==0){
+					uni.showToast({
+						title:"接单成功!",
+						duration:3000
+					})
+				}else{
+					uni.showToast({
+						title:res.message,
+						duration:3000
+					})
+				}
+			},
+			
+			/**
+			 * 门诊预约完成订单
+			 * @author Liu Yuanhang
+			 */
+			querenok:async function(){
+				this.zt = 4;
+				let res  = await this.$request.post("patient/mzPatientok",{order_id:this.xhrId});
+				console.log('完成接单:',res);
+				if(res.status==0){
+					uni.showToast({
+						title:"操作成功!",
+						duration:3000
+					})
+				}else{
+					uni.showToast({
+						title:res.message,
+						duration:3000
+					})
+				}
+				console.log('确认订单完成')
 			},
 			home(e){
 				uni.switchTab({

+ 9 - 5
pages/opinion/opinion.vue

xqd
@@ -73,25 +73,29 @@
 		methods: {
 			timeSort(e){
 				this.sort = !this.sort
+				this.list = []
+				 
+				//调用接口 页数 类型 状态
 				if(this.sort){//正序
-					
+					this.getList(1)
 				}else{//倒序
-					
+					this.getList(2)
 				}
 				
 			},
 			next(e){
 				console.log()
 				uni.navigateTo({
-					url:'opiniondetails?id='+this.list[e.currentTarget.dataset.index].id
+					url:'opiniondetails?id='+this.list[e.currentTarget.dataset.index].id+'&type=1'
 				})
 			},
 			/**
 			 * 渲染患者列表
 			 */
-			getList:async function(){
+			getList:async function(orderby=0){
+				let obj = {"curPage":1,'pageSize':10,'orders':orderby};
 				let that = this;
-				let res = await that.$request.post('suggest/suggestList',{"curPage":1,'pageSize':10});
+				let res = await that.$request.post('suggest/suggestList',obj);
 				if(res.status==0 && res.data!=''){
 					let data = res.data;
 					console.log('我是data',data); 

+ 16 - 7
pages/opinion/opiniondetails.vue

xqd xqd
@@ -110,13 +110,19 @@
 	export default {
 		onLoad(options) {
 			let id = options.id
-			
-			if(id!='' && typeof id!=undefined){
-				this.getDetaile(id);
-				
+			if(options.type==1){
+				if(id!='' && typeof id!=undefined){
+					this.getDetaile(id);
+					
+				}
+				this.sugg_id = options.id;
+			}else{
+				if(id!='' && typeof id!=undefined){
+					this.getDetaile(id,2);
+					
+				}
 			}
 			
-			this.sugg_id = options.id;
 			// console.log(options)
 		},
 		mounted() {
@@ -146,10 +152,13 @@
 			addyj(e) {
 				 this.formshow = true
 			},
-			getDetaile:async function(id){
-				let res = await this.$request.post('suggest/getSuggestDetail',{'suggest_id':id});
+			getDetaile:async function(id,type=1){
+				let obj = {'suggest_id':id,'type':type}
+			 
+				let res = await this.$request.post('suggest/getSuggestDetail',obj);
 				if(res.status==0 && res.data!=''){
 					let data = res.data;
+					this.sugg_id = data.id;
 					this.name=data.patient_name;
 					this.xiadankh=data.username;
 					this.age=data.birthday;

+ 1 - 1
pages/zixun/xiangqing.vue

xqd
@@ -326,7 +326,7 @@
 			//查看意见
 			ckyj(e){
 				uni.navigateTo({
-					url:'/pages/opinion/opiniondetails'
+					url:'/pages/opinion/opiniondetails?id='+this.pageid+'&type=2'
 				})
 			},
 			//首页