liuyuanhang 5 vuotta sitten
vanhempi
commit
bc2b87b3ea
5 muutettua tiedostoa jossa 137 lisäystä ja 148 poistoa
  1. BIN
      .DS_Store
  2. 19 18
      pages/Scheduling.vue
  3. 2 0
      pages/login/doctorRenzheng.vue
  4. 109 63
      pages/zixun/xiangqing.vue
  5. 7 67
      pages/zixun/zixun.vue

BIN
.DS_Store


+ 19 - 18
pages/Scheduling.vue

xqd xqd xqd
@@ -132,6 +132,7 @@
 	export default {
 		onLoad() {
 			this.time = this.getTime();
+			this.gethospitalList();
 			console.log(this.time)
 		},
 		data() {
@@ -260,19 +261,7 @@
 				}],
 				//选择医院
 				hospital: '',
-				hospitalList: [{
-					value: '1',
-					label: '不选择'
-				}, {
-					value: '2',
-					label: '医院'
-				}, {
-					value: '3',
-					label: '醫院'
-				}, {
-					value: '4',
-					label: 'hospital'
-				}],
+				hospitalList: [],
 				hospitalshow: false,
 				//当前点击的位置
 				position: {
@@ -342,12 +331,24 @@
 			      var currentdate =  year + seperator1 + month + seperator1 + strDate 
 				  
 				  
-				  var dateArray = nowTime.split("-");
-				  var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
-				  var week = "星期" + "日一二三四五六".charAt(date.getDay());
-				  this.nowWeek = week // 赋值本地数据
-				  alert(week)
+				  // var dateArray = nowTime.split("-");
+				  // var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
+				  // var week = "星期" + "日一二三四五六".charAt(date.getDay());
+				  // this.nowWeek = week // 赋值本地数据
+				  // alert(week)
 				  return currentdate;
+			},
+			
+			/**
+			 * 获取医院
+			 */
+			gethospitalList:async function(){
+				let that = this;
+				let res = await that.$request.post("doctor/organizationList");
+				if(res.status==0){
+					that.hospitalList = res.data
+				}
+				console.log('我是医院',res);
 			}
 		}
 	}

+ 2 - 0
pages/login/doctorRenzheng.vue

xqd
@@ -664,6 +664,8 @@
 			},
 			// 保存
 			bc: async function() {
+				console.log(this.province);
+				return false;
 				// 提交需要参数
 				let froms = {
 					doctor_name: '', //姓名

+ 109 - 63
pages/zixun/xiangqing.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -73,9 +73,8 @@
 				</view>
 				<view class="nr" v-if="zl ==2">
 					<view class="left">图片:</view>
-					<view class="right">
-						<image style="width: 124rpx;height: 124rpx;margin-right: 10rpx;" :src="photo1"></image>
-						<image style="width: 124rpx;height: 124rpx;margin-right: 10rpx;" :src="photo2"></image>
+					<view class="right" v-for="(item,index) in potolList" :key="index">
+						<image style="width: 124rpx;height: 124rpx;margin-right: 10rpx;" :src="item"></image>
 					</view>
 				</view>
 			</view>
@@ -97,10 +96,12 @@
 				<view class="right">{{receivingTime}}</view>
 			</view>
 			<view class="nr">
+				 
 				<view class="left">订单状态:</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-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>已取消</view>
 			</view>
 		</view>
@@ -128,7 +129,7 @@
 		<u-gap height="30" bg-color="#f6f6f6"></u-gap>
 		<!-- 底部按钮 -->
 		<!-- 当订单状态为未接单  zt==1 -->
-		<view class="bottomButton" v-if="zt == 1">
+		<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>
@@ -136,12 +137,12 @@
 			<!-- 右边的其他按钮 -->
 			<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" :value="pageid" @click="queren">确认订单</u-button>
 				</view>
 			</view>
 		</view>
 		<!-- 当订单状态为  zt==1 -->
-		<view class="bottomButton" v-else-if="zt == 2">
+		<view class="bottomButton" v-else-if="zl == 2 && zt == 3">
 			<!-- 左边的首页按钮 -->
 			<view style="width: 20%;" class="flex align-center justify-center">
 				<u-icon name="home" size="50" @click="home"></u-icon>
@@ -156,8 +157,27 @@
 				</view>
 			</view>
 		</view>
+		
+		<!-- 状态是进行中并且是电话咨询 -->
+		<view class="bottomButton" v-else-if="zl == 1 && 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="bStyle" @click="huihu">拨打电话</u-button>
+				</view>
+				<view class="b">
+					<u-button shape="circle" :custom-style="btStyle" @click="formshow = true">完成订单</u-button>
+				</view>
+			</view>
+		</view>
+		
+		
 		<!-- 当订单状态为未接单  zt==1 -->
-		<view class="bottomButton" v-else-if="zt ==3">
+		<view class="bottomButton" v-else-if="zt ==4">
 			<!-- 左边的首页按钮 -->
 			<view style="width: 20%;" class="flex align-center justify-center">
 				<u-icon name="home" size="50" @click="home"></u-icon>
@@ -178,34 +198,37 @@
 <script>
 	export default {
 		onLoad(options) {
-			this.photo1 = 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png' //证件照
-			this.photo2 = 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png' //证件照
-			this.placeTime = '2020年10月28日11:35:06' //下单时间
-			this.receivingTime = '' //接单时间
+			console.log('获取ID:',options.data);
+			this.pageid = options.data
+			this.getInfo(options.data);
 		},
 		mounted() {
 
 		},
 		data() {
 			return {
+				pageid:'',
+				patient_id:'',
 				/**********************      图文咨询,包括某些电话咨询      *********************/
 				// 上部数据
-				orderID: 'ZX202000010', //订单号
+				orderID: '', //订单号
 				zl: 1, //种类  1电话咨询 2图文咨询
 
 				//中部数据
-				name: '张一', //名字
-				age: '一岁零2个月', //年龄
-				ID: '513021198904041789', //身份证
+				name: '', //名字
+				age: '', //年龄
+				ID: '', //身份证
 				//病情描述
-				ms: '病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述病情描述。',
-				photo1: '', //证件照
-				photo2: '', //证件照
+				ms: '',
+				potolList:['https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png',
+							'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png'
+							],
+				
 
 				//下部数据
 				placeTime: '', //下单时间
 				receivingTime: '', //接单时间
-				xiadankh: '张大', //下单客户
+				xiadankh: '', //下单客户
 				zt: 1, // 状态
 				// 1未接单	
 				// 2进行中   显示未会话
@@ -214,32 +237,7 @@
 				//底部按钮样式
 				/*********************     电话咨询必要数据          *****************************/
 				callTime: '', //拨打时间
-				callList: [{
-					frequency: '通话5', //次数
-					start: '2020年10月29日13:27:18', //开始时间
-					end: '2020年10月29日13:27:33', //结束时间
-					duration: '03:28:37', //通话时长
-				}, {
-					frequency: '通话4', //次数
-					start: '2020年10月29日13:27:18', //开始时间
-					end: '2020年10月29日13:27:33', //结束时间
-					duration: '03:28:37', //通话时长
-				}, {
-					frequency: '通话3', //次数
-					start: '2020年10月29日13:27:18', //开始时间
-					end: '2020年10月29日13:27:33', //结束时间
-					duration: '03:28:37', //通话时长
-				}, {
-					frequency: '通话2', //次数
-					start: '2020年10月29日13:27:18', //开始时间
-					end: '2020年10月29日13:27:33', //结束时间
-					duration: '03:28:37', //通话时长
-				}, {
-					frequency: '通话1', //次数
-					start: '2020年10月29日13:27:18', //开始时间
-					end: '2020年10月29日13:27:33', //结束时间
-					duration: '03:28:37', //通话时长
-				}],
+				callList: [],
 
 				//下部按钮样式
 				bStyle: {
@@ -262,9 +260,49 @@
 			}
 		},
 		methods: {
+			getInfo:async function(id){
+				let res = await this.$request.post("patient/orderPatientDetail",{'patient_id':id});
+		
+				if(res.status==0){
+					let list = res.data;
+					this.orderID = list.order_sn;
+					this.patient_id = list.patient_id;
+					this.zl = list.product_type;
+					this.name = list.name;
+					this.age = list.numbirthday;
+					this.ID = list.card_number;
+					this.placeTime = list.created_at;
+					this.xiadankh = list.nickname;
+					this.receivingTime = list.receiving_time
+					if(list.prototype==2){
+						// 图文咨询:
+						this.ms = list.symptoms;
+						this.potolList = list.medical_imgs;
+					}else{
+						this.callTime = list.one_call;
+						this.callList = list.call_list
+					}
+					this.zt = list.order_status;
+					
+				}
+			},
 			// 确认订单
-			queren(e) {
-				this.zt = 2
+			queren:async function(e) {
+				let that=this;
+				let order_id = that.pageid
+				let res = await that.$request.post('patient/putOrderPatient',{'order_id':order_id});
+				if(res.status==0){
+					uni.showModal({
+						title: "提示",
+						content: "接单成功!",
+						confirmText: "确定",
+						showCancel: false,
+						success() {
+							that.getInfo(order_id)
+						}
+					})
+				}
+				that.zt = 2
 			},
 			//完成订单
 			
@@ -296,19 +334,27 @@
 				this.jl = e.detail.value
 			},
 			//意见单  确认
-			qr(e){
-				console.log(this.bz)
-				console.log(this.by)
-				console.log(this.jl)
-				
-				if(this.bz!=''){
-					if(this.by!=''){
-						if(this.jl!=''){
-							this.formshow = false
-							this.zt = 3
-							this.bz=''
-							this.by=''
-							this.jl=''
+			qr:async function(e){
+				let that=this;	
+				let order_id = that.pageid
+				if(that.bz!=''){
+					if(that.by!=''){
+						if(that.jl!=''){
+							that.formshow = false
+							let bingzheng=that.bz;
+							let bingyin=that.by;
+							let jianyi=that.jl;
+							let res = await that.$request.post('patient/orderPatientok',{'order_id':order_id,'symptoms':bingzheng,'pathogen':bingyin,'suggest':jianyi,'patient_id':that.patient_id});
+							if(res.status==0){
+								uni.showToast({
+									title:"操作成功",
+									duration:3000,
+									success() {
+										that.getInfo(order_id)
+									}
+								})
+							}
+						
 						}else{
 							uni.showToast({
 								title:'请填写结论',

+ 7 - 67
pages/zixun/zixun.vue

xqd xqd xqd xqd xqd
@@ -57,15 +57,15 @@
 						</view>
 						<view class="nr">
 							<view class="left">年龄:</view>
-							<view class="right">{{item.age}}</view>
+							<view class="right">{{item.birthday}}</view>
 						</view>
 						<view class="nr">
 							<view class="left">订单号:</view>
-							<view class="right">{{item.order}}</view>
+							<view class="right">{{item.order_sn}}</view>
 						</view>
 						<view class="nr">
 							<view class="left">下单时间:</view>
-							<view class="right">{{item.time}}</view>
+							<view class="right">{{item.created_at}}</view>
 						</view>
 					</view>
 				</view>
@@ -78,7 +78,7 @@
 <script>
 	export default {
 		onShow() {
-			this.getLists(7);
+		
 		},
 		onLoad(e) {
 			// 获取列表
@@ -111,65 +111,7 @@
 						value: 1,
 					},
 				],
-				list: [
-						{
-						zt: 1, //状态
-						zl: 1, //种类 
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 2, //状态
-						zl: 1, //种类 
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt:3, //状态 
-						zl:1, //种类
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 4, //状态
-						zl: 1, //种类
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 1, //状态 
-						zl: 2, //种类
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 2, //状态 
-						zl: 2, //种类
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 3, //状态
-						zl: 2, //种类 
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}, {
-						zt: 4, //状态 
-						zl: 2, //种类 
-						name: '张三',
-						age: '一岁零2个月',
-						order: 'ZX202000010',
-						time: '2020年10月28日17:11:10'
-					}
-				],
+				list: [],
 				num: 2 //记录下拉的次数
 			}
 		},
@@ -184,9 +126,7 @@
 				})
 				if (res.status == 0) {
 					let data = res.data;
-					console.log('我是打他:', data)
 					this.list = data;
-					console.log('我是list', this.list)
 				}
 			},
 			close1(e) {
@@ -208,9 +148,9 @@
 			},
 			// 咨询详情
 			xiangqing(e) {
-				console.log(this.list[e.currentTarget.dataset.index])
+				let id = this.list[e.currentTarget.dataset.index].id;
 				uni.navigateTo({
-					url: 'xiangqing?data=' + this.list[e.currentTarget.dataset.index]
+					url: 'xiangqing?data=' + id
 				})
 			}
 		},