123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- <template>
- <view class="main">
- <load-refresh ref="loadRefresh" :isPaging="false" :isRefresh="true" refreshType="loader" refreshTime="2000"
- heightReduce="10" backgroundCover="#fff" @refresh="refresh">
- <view slot="content-list">
- <view class="list">
- <!-- 头像 -->
- <view class="portrait">
- <view style="padding-top: 20rpx;">
- <!-- <image class="img" :src=""></image> -->
- <u-avatar :src="orderInfo.docter.avatar" mode="circle"></u-avatar>
- </view>
- </view>
- <!-- 文字 -->
- <view class="text">
- <!-- 名字+标签 -->
- <view class="name">
- <view style="margin-right: 15rpx;">{{orderInfo.docter.name}}</view>
- <view class="label" v-for="(itm,idx) in orderInfo.docter.label_texts" :key="index">
- {{itm.label_name}}
- </view>
- </view>
- <!-- 科室 -->
- <view class="department">
- <text>科室:</text>
- <text style="color: #333333;">{{orderInfo.docter.office.name}}</text>
- <text style="color: #333333;">{{orderInfo.docter.qualification.name}}</text>
- </view>
- </view>
- </view>
- <view class="padding-sm bg-white margin-top-sm">
- <view class="text-lg text-black text-bold">
- 订单信息
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs">
- <text class="text-leftstyle">订单号:</text>
- <text class="font_style">{{orderInfo.order_sn}}</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs">
- <text class="text-leftstyle">状态:</text><text v-if="orderInfo.order_status==1" class="font_style"
- style="color: rgb(238, 170, 63);">未支付</text>
- <text v-else-if="orderInfo.order_status==2" class="font_style"
- style="color: rgb(238, 170, 63);">待接单</text>
- <text v-else-if="orderInfo.order_status==3" class="font_style"
- style="color: rgb(238, 170, 63);">进行中</text>
- <text v-else-if="orderInfo.order_status==4" class="font_style"
- style="color: rgb(238, 170, 63);">已完成</text>
- <text v-else-if="orderInfo.order_status==5" class="font_style"
- style="color: rgb(238, 170, 63);">已取消</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs">
- <text class="text-leftstyle">下单时间:</text><text
- class="font_style">{{orderInfo.created_at}}</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.end_time!=0">
- <text class="text-leftstyle">结束时间:</text><text
- class="font_style">{{formatDate(orderInfo.end_time * 1000)}}</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.product_type==1">
- <text class="text-leftstyle">咨询时长:</text><text
- class="font_style">{{orderInfo.consult_duration}}秒</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs">
- <text class="text-leftstyle">咨询患者:</text><text
- class="font_style">{{orderInfo.order_patient.name}}</text>
- </view>
- <view class="text-gray margin-top-xs padding-tb-xs">
- <text class="text-leftstyle">{{orderInfo.order_status==1?'未付款:':'已付款:'}}</text><text
- class="font_style">¥{{orderInfo.total_amount/100}}</text>
- </view>
- </view>
- <view class="cu-tabbar-height"></view>
- <view class="cu-tabbar-height"></view>
- <view class="cu-bar bg-white tabbar" v-if="orderInfo.order_status==4&&orderInfo.product_type==2"
- style="position: fixed;bottom: 0;width: 100%;display: flex;justify-content: flex-end;height: 108rpx;">
- <u-button shape="circle" :custom-style="customStyle" @click="gotochat" :ripple="true">咨询会话
- </u-button>
- <!-- <u-button shape="circle" :custom-style="customStyle" @click="gotopinjia" :ripple="true">查看评价</u-button> -->
- <u-button shape="circle" :custom-style="customStylebtn" @click="gosuggest" :ripple="true">意见单
- </u-button>
- </view>
- <view class="cu-bar bg-white tabbar" v-else-if="orderInfo.order_status==3"
- style="position: fixed;bottom: 0;width: 100%;">
- <view class="submit" style="background-color: #0B73B9;color: white;" @click="gotochat">
- {{orderInfo.product_type==1?'回拨':'咨询会话'}}
- </view>
- </view>
- </view>
- </load-refresh>
- </view>
- </template>
- <script>
- export default {
- onLoad(options) {
- this.order_id = options.id
- },
- mounted() {
- this.getordersInfo()
- },
- data() {
- return {
- order_id: "",
- orderInfo: {},
- customStyle: {
- marginRight: '20rpx'
- },
- customStylebtn: {
- marginRight: '20rpx',
- color: "#0B73B9",
- borderColor: "#0B73B9"
- },
- outtime: ""
- }
- },
- onShow() {
- },
- // onPullDownRefresh() {
- // this.getordersInfo()
- // uni.stopPullDownRefresh()
- // },
- methods: {
- refresh() {
- this.getordersInfo()
- },
- gosuggest() {
- uni.navigateTo({
- url: "opinionInfo?id=" + this.orderInfo.suggest.id
- })
- },
- gotopinjia() {
- uni.navigateTo({
- url: "../me_evaluate"
- })
- },
- getordersInfo: async function() {
- let res = await this.$request.post("/api/v1/order/orderDetail", {
- order_id: this.order_id
- }, false)
- console.log(res)
- if (res.status == 0) {
- this.orderInfo = res.data
- this.$refs.loadRefresh.loadOver()
- console.log(this.orderInfo)
- // this.outtime = this.formatDate(this.orderInfo.end_time * 1000)
- }
- },
- gotochat() {
- if (this.orderInfo.product_type == 1) {
- if (this.orderInfo.callback_phone == '') {
- uni.showModal({
- title: "提示",
- content: "回拨需等首次医生拨打后才可回拨",
- showCancel: false,
- confirmText: "知道了",
- })
- return false
- }
- uni.makePhoneCall({
- phoneNumber: this.orderInfo.callback_phone
- })
- } else if (this.orderInfo.product_type == 2) {
- console.log(this.orderInfo.order_status)
- if (this.orderInfo.order_status == 4) {
- uni.showModal({
- title: "提示",
- showCancel: false,
- content: "请前往患者档案详情查看详细聊天记录",
- })
- return false
- } else {
- let obj = {
- id: this.orderInfo.docter.id,
- name: this.orderInfo.docter.name,
- avatar: this.orderInfo.docter.avatar
- }
- uni.navigateTo({
- url: "conversation?doctor=" + JSON.stringify(obj) + "&doctorstatus=" + this.orderInfo
- .order_status
- })
- }
- }
- }
- }
- };
- </script>
- <style scoped lang="scss">
- .main {}
- .text-leftstyle {
- text-align: right;
- width: 140rpx;
- display: inline-block;
- }
- .font_style {
- color: rgb(51, 51, 51);
- }
- .footer {
- width: 100%;
- height: auto;
- display: flex;
- position: fixed;
- bottom: 0;
- }
- .round {
- height: 45rpx;
- width: 50rpx;
- border-radius: 50%;
- background-color: #ececec;
- }
- .card {
- padding: 30rpx 30rpx;
- box-sizing: border-box;
- .card_view {
- width: 100%;
- background-color: #ffffff;
- border-radius: 15rpx;
- .title {
- width: 100%;
- height: 20vh;
- display: flex;
- justify-content: center;
- align-items: flex-end;
- .img {
- width: 90%;
- height: 90%;
- }
- }
- .describe {
- width: 100%;
- height: 1;
- padding: 100rpx 40rpx 20rpx 40rpx;
- }
- }
- }
- .list {
- margin: 20rpx 0 10rpx 0;
- padding: 20rpx 0;
- align-items: center;
- display: flex;
- width: 100%;
- border-radius: 15rpx;
- background-color: #FFFFFF;
- box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
- .portrait {
- width: 20%;
- display: flex;
- justify-content: center;
- align-items: center;
- .img {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- }
- .bun_true {
- text-align: center;
- width: 80rpx;
- height: 36rpx;
- background-color: #D92975;
- margin: 0 10rpx;
- border-radius: 60rpx;
- position: relative;
- top: -20rpx;
- font-size: 20rpx;
- color: #FFFFFF;
- padding: 3rpx 0;
- }
- .bun_false {
- border: 1rpx solid #D92975;
- text-align: center;
- width: 80rpx;
- height: 36rpx;
- background-color: #FFFFFF;
- margin: 0 10rpx;
- border-radius: 60rpx;
- position: relative;
- top: -20rpx;
- font-size: 20rpx;
- color: #D92975;
- padding: 3rpx 0;
- }
- }
- //文字
- .text {
- width: 70%;
- //名字+标签
- .name {
- font-size: 30rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- .label {
- font-weight: 400;
- margin-right: 15rpx;
- background-color: #E5F5FF;
- color: #0B73B9;
- // width: 100rpx;
- height: 28rpx;
- font-size: 20rpx;
- border-radius: 10rpx;
- text-align: center;
- }
- }
- //科室
- .department {
- margin-top: 15rpx;
- color: #666666;
- text {
- margin-right: 15rpx;
- }
- }
- // 选项
- .option {
- display: flex;
- view {
- background-color: #E4E4E4;
- width: 100rpx;
- height: 48rpx;
- border-radius: 12px;
- margin-right: 15rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
- }
- </style>
|