2022-11-25 10:58:46 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="app">
|
|
|
|
|
|
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
|
|
|
|
|
|
订单已关闭
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="content">
|
|
|
|
|
|
<view class="name">
|
|
|
|
|
|
服务商家
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="details">
|
|
|
|
|
|
<view class="detailslist">
|
|
|
|
|
|
<image :src="baseurl+list.stationPictureUrl" mode=""></image>
|
|
|
|
|
|
<view class="model">
|
|
|
|
|
|
<view class="top">
|
|
|
|
|
|
<view>{{list.nurseStationName}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
|
<view>{{list.address}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="callme" @tap="gophone()">
|
|
|
|
|
|
<u-icon class='icon' name="phone-fill" color="#ffffff" size="30"></u-icon>
|
|
|
|
|
|
<view class="text">联系我们</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="content">
|
|
|
|
|
|
<view class="name">
|
|
|
|
|
|
服务项目
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="drug">·{{list.nurseItemName}} </view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="content">服务信息
|
|
|
|
|
|
<view class="contacts">·联系人:{{list.patientName}}</view>
|
|
|
|
|
|
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
|
|
|
|
|
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
|
|
|
|
|
<view class="contacts">·时间:{{list.serviceDate}} {{list.serviceStartTime}}-{{list.serviceEndTime}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="Package">套餐信息:
|
|
|
|
|
|
<span>¥{{list.nurseItemPrice}}</span>
|
|
|
|
|
|
<view class="detail">
|
|
|
|
|
|
·{{list.nurseItemName}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
|
|
|
|
|
<span>¥{{list.consumableTotalPrice}}</span>
|
|
|
|
|
|
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
|
|
|
|
|
·{{item.orderConsumableName}}
|
2022-12-02 16:02:53 +08:00
|
|
|
|
<!-- <span style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span> -->
|
2022-11-25 10:58:46 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="remarks">
|
|
|
|
|
|
<view>备注:</view>
|
|
|
|
|
|
<input v-model='list.remark'>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="evaluate">
|
|
|
|
|
|
<view class="price">
|
|
|
|
|
|
¥{{list.totalPrice}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cancelorder" @tap="cancelorderment()"
|
|
|
|
|
|
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cancelorder" style="background: #4C7BC9;" @tap='rateshow= true'
|
|
|
|
|
|
v-if="list.orderStatus=='COMPLETE'">评价
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
|
|
|
|
|
|
v-if="list.orderStatus=='WAIT_PAY'">
|
|
|
|
|
|
去支付
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<u-mask :show="rateshow" @tap="rateshow = false">
|
|
|
|
|
|
<view class="mask">
|
|
|
|
|
|
<view class="rateitem" @tap="taprate('SATISFIED')">
|
|
|
|
|
|
满意
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="rateitem" @tap="taprate('COMMONLY')">
|
|
|
|
|
|
一般
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="rateitem" @tap="taprate('DISSATISFIED')">
|
|
|
|
|
|
不满意
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</u-mask>
|
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
appletAppointmentOrderPay
|
|
|
|
|
|
} from '@/api/appointmenttime/appointmenttime.js'
|
|
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
|
|
|
|
|
import {
|
|
|
|
|
|
getAppointmentDetailsInfo,
|
|
|
|
|
|
addAppointmentEvaluate
|
|
|
|
|
|
} from '@/api/ServiceDetails/ServiceDetails.js'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
rateshow: false, //评价
|
|
|
|
|
|
baseurl: '',
|
|
|
|
|
|
patientId: '', //id
|
|
|
|
|
|
openid: '', //id
|
|
|
|
|
|
list: {},
|
|
|
|
|
|
orderNo: '',
|
|
|
|
|
|
timer: null,
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
var that = this
|
|
|
|
|
|
try {
|
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
that.patientId = value
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
that.openid = value
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
|
this.orderNo = options.orderNo
|
|
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
|
this.getlist()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
//支付
|
|
|
|
|
|
buy() {
|
|
|
|
|
|
let obj = {
|
|
|
|
|
|
patientId: this.patientId,
|
|
|
|
|
|
openid: this.openid,
|
|
|
|
|
|
orderNo: this.list.orderNo,
|
|
|
|
|
|
orderChannel: "WECHAT_APPLET",
|
|
|
|
|
|
paymentPrice: this.list.totalPrice,
|
|
|
|
|
|
payType: "WECHAT_PAY",
|
|
|
|
|
|
buySource: "NURSE_STATION",
|
|
|
|
|
|
}
|
|
|
|
|
|
var that = this
|
|
|
|
|
|
appletAppointmentOrderPay(obj).then(response => {
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
uni.requestPayment({
|
|
|
|
|
|
timeStamp: response.data.timeStamp,
|
|
|
|
|
|
nonceStr: response.data.nonceStr,
|
|
|
|
|
|
package: response.data.prepayId,
|
|
|
|
|
|
signType: response.data.signType,
|
|
|
|
|
|
paySign: response.data.paySign,
|
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
|
title: '支付成功',
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
toast: 1500,
|
|
|
|
|
|
})
|
|
|
|
|
|
that.getlist()
|
|
|
|
|
|
},
|
|
|
|
|
|
fail: function(err) {
|
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
|
title: '取消支付',
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
toast: 1500,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: response.msg,
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
toast: 2000
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//评价
|
|
|
|
|
|
taprate(item) {
|
|
|
|
|
|
var obj = {
|
|
|
|
|
|
"patientId": this.patientId,
|
|
|
|
|
|
"openid": this.openid,
|
|
|
|
|
|
"orderNo": this.orderNo,
|
|
|
|
|
|
"evaluateChannel": "WE_CHAT_APPLET",
|
|
|
|
|
|
"evaluateSatisfaction": item,
|
|
|
|
|
|
}
|
|
|
|
|
|
addAppointmentEvaluate(obj).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: '评价成功',
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
duration: '1500'
|
|
|
|
|
|
})
|
|
|
|
|
|
if (this.timer) {
|
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
|
}
|
|
|
|
|
|
this.timer = setTimeout(e => {
|
|
|
|
|
|
this.getlist();
|
|
|
|
|
|
}, 1500)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//打电话
|
|
|
|
|
|
gophone() {
|
|
|
|
|
|
var that = this
|
|
|
|
|
|
uni.getSystemInfo({
|
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
if (res.platform == 'ios') {
|
|
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
|
phoneNumber: that.nursestationlist.phone //仅为示例
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showActionSheet({
|
|
|
|
|
|
itemList: ['呼叫', ],
|
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
if (res.tapIndex + 1 == 1) {
|
|
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
|
phoneNumber: that.nursestationlist.phone //仅为示例
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
fail: function(res) {}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 信息
|
|
|
|
|
|
getlist() {
|
|
|
|
|
|
getAppointmentDetailsInfo(this.orderNo).then(res => {
|
|
|
|
|
|
this.list = res.data
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelorderment() {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/cancelorder/cancelorder?nurseItemPrice=${this.list.totalPrice}&appointmentOrderId=${this.list.appointmentOrderId}`
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
@import './ServiceDetails.scss';
|
|
|
|
|
|
</style>
|