xinelu-applet-ui/pagesB/consulted/consulted.vue
2023-11-01 10:00:47 +08:00

197 lines
5.7 KiB
Vue

<template>
<view class="app">
<u-navbar :is-back="false" :background="background" class="u-navbar">
<image src="@/static/pagesB/fanhui.png" mode="" @tap="goprevious"></image>
<view class="title" v-if="list.orderStatus=='WAIT_PAY'">待付款</view>
<view class="title" v-if="list.orderStatus=='WAIT_REFUND'">退款中</view>
<view class="title" v-if="list.orderStatus=='CANCEL'">已取消</view>
<view class="title" v-if="list.orderStatus=='WAIT_RECEIVED_GOODS'&&list.orderType !='HEALTH_CONSULTATION'">
待收货</view>
<view class="title" v-if="list.orderStatus=='WAIT_RECEIVED_GOODS'&&list.orderType =='HEALTH_CONSULTATION'">
待咨询</view>
<view class="title" v-if="list.orderStatus=='RECEIVED_GOODS'">待评价</view>
<view class="title" v-if="list.orderStatus=='EVALUATED'">已完成</view>
<view class="title" v-if="list.orderStatus=='PAY'">待发货</view>
<view class="title" v-if="list.orderStatus=='REFUNDED'">已退款</view>
<view class="title" v-if="list.orderStatus=='WAIT_RETURNED_GOODS'">待退货</view>
<view class="title" v-if="list.orderStatus=='RETURNED_GOODS'">退款成功</view>
</u-navbar>
<view class="content">
<view class="service">
<image src="/static/pagesB/persone.png" mode=""></image>
<span>医生服务</span>
</view>
<view class="orderitem">
<view class="details">
<image src="../../static/headsculpture.png" mode=""></image>
<view class="ppointment">
<view class="doctorname">
<span>{{list.hospitalPersonName}}</span>
</view>
<view class="reservation">
<span>齐鲁医院</span>
<span v-if="list.academicTitle=='DEPUTY_CHIEF_PHYSICIAN'">副主任医师</span>
<span v-if="list.academicTitle=='CHIEF_PHYSICIAN'">主任医师</span>
<span v-if="list.academicTitle=='ATTENDING_DOCTOR'">主治医师</span>
<span v-if="list.academicTitle=='PHYSICIAN'">医师</span>
<span v-if="list.academicTitle=='HEALER'">医士</span>
<span v-if="list.academicTitle=='RESIDENT_PHYSICIAN'">住院医师</span>
</view>
<!-- <view class="hospital">
三甲医院
</view> -->
</view>
</view>
</view>
<view class="doctordetails">
<view class="doctorphone">
医生电话
</view>
<view class="phone" v-if="list.personPhone">
·{{list.personPhone}}
</view>
</view>
<view class="doctordetails">
<view class="doctorphone">
预约时间
</view>
<view class="phone" v-if="list.healthAppointDate">
{{list.healthAppointDate}}
</view>
</view>
<view class="doctordetailstwo">
<view class="doctorphonetwo">
咨询内容
</view>
<view class="phonetwo advicetwo" v-if="list.healthConsultationContent">
·{{list.healthConsultationContent}}
<!-- <textarea v-model="value" :type="type" :border="border" /> -->
</view>
</view>
<view class="amount">
<span>预约金额</span><span>¥{{list.totalPrice}}</span>
</view>
<view class="doctordetailstwo">
<view class="doctorphonetwo">
备注
</view>
<view class="phonetwo advicetwo" v-if="list.remark">
·{{list.remark}}
</view>
</view>
</view>
<view class="bottom">
<span>更多</span>
<span @tap="cancle" v-if="list.orderStatus!='RECEIVED_GOODS'||list.orderStatus!='EVALUATED'">取消订单</span>
<span @tap="evaluate">服务评价</span>
</view>
<u-popup v-model="evaluateshow" mode="bottom" length="45%" border-radius="30" :closeable='true'>
<view class="evaluate">
服务评价
</view>
<view class="star">
<u-rate size="70" active-color="#F4EA2A" inactive-color="#b2b2b2" gutter="20"></u-rate>
<span>非常差/差/满意/非常满意</span>
</view>
<view class="submits">
提交
</view>
</u-popup>
</view>
</template>
<script>
import {
confirmReceipt,
ssgoodsOrder,
} from '@/api/pagesB/CommodityOrder/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
list: [],
// 评价弹框
background: {
backgroundColor: '#26A888',
},
evaluateshow: false,
orderTypeList: {
goodsOrderId: null,
patientId: '',
openid: null,
orderType: 'HEALTH_CONSULTATION',
orderStatus: 'WAIT_PAY',
// orderTypeList: [
// 'INTEGRAL_EXCHANGE',
// 'DIRECT_BUY',
// ],
// orderStatus: '',
pageSize: 15,
pageNum: 1,
goodsName: '',
},
}
},
onLoad(options) {
this.list = JSON.parse(options.item)
console.log(this.list, '99')
// console.log(options,'88')
this.baseurl = baseurl
this.orderTypeList.goodsOrderId = options.goodsOrderId
let that = this
// const value = uni.getStorageSync('patientId');
// const value2 = uni.getStorageSync('openid');
// if (value && value2) {
// that.orderTypeList.patientId = value
// that.orderTypeList.openid = value2
// }
},
methods: {
goprevious() {
uni.navigateBack({
delta: 1
})
},
goodsOrderinfo() {
ssgoodsOrder(this.orderTypeList).then(
res => {
this.order = res.rows[0]
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000
this.timestamp = time - times
if (this.timestamp >= 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
})
},
// 取消订单
cancle() {
var list=this.list
uni.navigateTo({
url: `/pagesB/cancel/cancel?list=${JSON.stringify(this.list)}`
})
},
// 服务评价
evaluate() {
this.evaluateshow = true;
},
}
}
</script>
<style lang="scss">
@import './consulted.scss'
</style>