|
| 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>
|
|
| xqd
@@ -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>
|
|
| xqd
@@ -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>
|
|
| xqd
@@ -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>
|
|
| xqd
@@ -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>
|
|
| xqd
@@ -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进行中 显示未会话
|
|
| xqd
@@ -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: {
|
|
| xqd
@@ -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
|
|
|
},
|
|
|
//完成订单
|
|
|
|
|
| xqd
@@ -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:'请填写结论',
|