This commit is contained in:
曹辉 2023-05-24 14:31:17 +08:00
parent 1365550f05
commit b715310e61
7 changed files with 23 additions and 479 deletions

View File

@ -143,12 +143,6 @@
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/payorderDetails/payorderDetails",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/login/login",
"style": {
@ -185,13 +179,7 @@
"navigationBarTitleText": "选择退款类型",
"enablePullDownRefresh": false
}
}, {
"path": "pages/menttimeorder/menttimeorder",
"style": {
"navigationBarTitleText": "预约详情",
"enablePullDownRefresh": false
}
}, {
}, {
"path": "pages/homepage/homepage",
"style": {
"navigationBarTitleText": "泉医到家",

View File

@ -490,11 +490,8 @@
title: '取消支付',
type: 'error',
duration: 1000,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
// url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
// })
}
});
} else {

View File

@ -359,7 +359,7 @@
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
url: `/pages/ServiceDetails/ServiceDetails?orderNo=${obj.orderNo}`
})
}, 1500)
}

View File

@ -73,6 +73,7 @@
export default {
data() {
return {
timer: null,
openid: null,
buyshow: false,
price: 0,
@ -117,16 +118,30 @@
title: '支付成功',
type: 'success',
duration: 1500,
url: `/pages/paysuccess/paysuccess`
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: `/pages/paysuccess/paysuccess`
})
}, 1500)
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
duration: 1500,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
})
}, 1500)
}
});
} else {
@ -300,6 +315,7 @@
background: #FFFFFF;
border-radius: 20rpx;
padding: 30rpx 0 0 30rpx;
span {
font-weight: 600;
}

View File

@ -70,7 +70,7 @@
timer: null,
companionDays: 1,
orderlist: {
caregiverName:undefined,
caregiverName: undefined,
caregiverPhone: undefined,
hospitalName: undefined,
departmentName: undefined,
@ -154,7 +154,7 @@
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
url: `/pages/ServiceDetails/ServiceDetails?orderNo=${obj.orderNo}`
})
}, 1500)
}

View File

@ -1,235 +0,0 @@
<template>
<view class="app" v-if="list">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<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="" v-if="list.orderType=='COMPANION_IN_HOSPITAL'">
<view class="contacts" v-if="list.caregiverName">·姓名{{list.caregiverName}}</view>
<view class="contacts" v-if="list.caregiverPhone">·电话{{list.caregiverPhone}}</view>
<view class="contacts" v-if="list.hospitalName">·医院{{list.hospitalName}}</view>
<view class="contacts" v-if="list.departmentName">·科室{{list.departmentName}}</view>
<view class="contacts" v-if="list.hospitalBedNumber">·病床号{{list.hospitalBedNumber}}</view>
<view class="contacts" v-if="list.companionStartDate&&list.companionEndDate">
·时间{{list.companionStartDate}} - {{list.companionEndDate}}</view>
<view class="contacts" v-if="list.createTime">·下单时间{{list.createTime}}</view>
</view>
<view class="" v-else>
<view class="contacts" v-if="list.patientName">·姓名{{list.patientName}}</view>
<view class="contacts" v-if="list.patientPhone">·电话{{list.patientPhone}}</view>
<view class="contacts" v-if="list.serviceAddress">·地址{{list.serviceAddress}}</view>
<view class="contacts" v-if="list.serviceDate">·预约时间{{list.serviceDate}} {{list.serviceStartTime}}
</view>
<view class="contacts" v-if="list.createTime">·下单时间{{list.createTime}}</view>
</view>
</view>
<view class="Package">套餐信息
<span>{{list.nurseItemPrice}}</span>
<view class="detail">
·{{list.nurseItemName}}
</view>
</view>
<view class="Consumablespackage" v-if='list.itemConsumableList.length>0'>耗材包详情
<span v-if="list.consumableTotalPrice">{{list.consumableTotalPrice}}</span>
<span v-else>0</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.orderConsumableName}}
<span
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/{{item.orderConsumablePrice}}</span>
</view>
</view>
<view class="remarks" v-if="list.orderType!='COMPANION_IN_HOSPITAL'">
<view>备注</view>
<input placeholder="请输入" v-model='list.remark'>
</view>
<view class="evaluate">
<view class="price">
{{list.totalPrice}}
</view>
<!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> -->
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'">
去支付
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
appletAppointmentOrderPay
} from '@/api/appointmenttime/appointmenttime.js'
import baseurl from '@/api/baseurl.js'
import {
getAppointmentDetailsInfo,
handCloseOrder
} from '@/api/ServiceDetails/ServiceDetails.js'
export default {
data() {
return {
baseurl: '',
patientId: '', //id
openid: '', //id
list: null,
orderNo: '',
timestamp: 0,
timecount: null,
Timers: null,
}
},
onShow() {
this.getlist()
},
onLoad(options) {
var that = this
this.orderNo = JSON.parse(options.list).orderNo
this.baseurl = baseurl
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
}
const value2 = uni.getStorageSync('openid');
if (value2) {
that.openid = value2
}
},
onUnload() {
clearInterval(this.Timers); //
},
watch: { //
timecount() {
if (this.timecount <= 0) {
clearInterval(this.Timers); //
handCloseOrder().then(res => {
this.list.orderStatus = 'CANCEL'
})
}
},
},
methods: {
//
buy() {
var that = this
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",
}
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',
duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
duration: 1500,
})
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 2000
})
}
})
},
//
gophone() {
var that = this
uni.getSystemInfo({
success: function(res) {
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: that.list.stationPhone //
});
} else {
uni.showActionSheet({
itemList: ['呼叫', ],
success: function(res) {
if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({
phoneNumber: that.list.stationPhone //
});
}
},
fail: function(res) {}
});
}
}
});
},
//
getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data
var ordertimes = this.list.createTime.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)
}
})
},
}
}
</script>
<style lang="scss">
@import '../ServiceDetails/ServiceDetails.scss';
</style>

View File

@ -1,222 +0,0 @@
<template>
<view class="app" v-if="order">
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<view class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
订单已关闭
</view>
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
<view class="content">
<view class="name">
店铺名称
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="details">
<view class="detailslist">
<image :src="baseurl+order.personPictureUrl" mode=""
v-if="order.orderType =='HEALTH_CONSULTATION'&&order.personPictureUrl"></image>
<image src="@/static/yis.png" mode=""
v-if="order.orderType =='HEALTH_CONSULTATION'&&!order.personPictureUrl"></image>
<image :src="baseurl+order.attributePitureUrl" mode=""
v-if="order.orderType !='HEALTH_CONSULTATION'"></image>
<view class="model">
<view class="top">
<span v-if="order.orderType =='HEALTH_CONSULTATION'">健康咨询</span>
<span v-else>{{order.goodsName}}</span>
<span
v-if="order.goodsPrice&&order.orderType !='HEALTH_CONSULTATION'">{{order.goodsPrice}}</span>
</view>
<view class="bottom" v-if="order.orderType !='HEALTH_CONSULTATION'">
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
</view>
<view class="bottom" v-if="order.discountPrice>0">
<span class="box" style='width:40%'>优惠金额</span>
<span class="box">-{{order.discountPrice}}</span>
</view>
<view class="refund"
v-if="order.orderStatus != 'WAIT_PAY'&& order.orderStatus!='CANCEL'&&order.orderStatus!='WAIT_REFUND'&&order.orderStatus!='REFUNDED'&&order.orderStatus!='RETURNED_GOODS'&&order.orderStatus!='WAIT_RETURNED_GOODS'">
<text @tap='gorefundType'
v-if="order.orderType=='DIRECT_BUY'||order.orderType=='HEALTH_CONSULTATION'">申请退款</text>
</view>
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='WAIT_REFUND'"
@tap='goAftersalesdetails(order)'>
退款中
</view>
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='REFUNDED'">
退款成功
</view>
<!-- <view class="refund" v-if="order.orderStatus=='RETURNED_GOODS'">
退货中
</view> -->
<view class="refund" style="border: 1rpx solid #969394;"
v-if="order.orderStatus=='WAIT_RETURNED_GOODS'">
待退货
</view>
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='CANCEL'">
已取消
</view>
</view>
</view>
<view class="payinfo">
<text class="pay">实付款</text>
<text class="price">{{order.totalPrice}}</text>
</view>
</view>
</view>
<view class="info">
<span>收货人<text>{{order.receiver}}</text></span>
<span>联系电话<text>{{order.phone}}</text></span>
<span v-if="order.orderType =='HEALTH_CONSULTATION'">咨询医生<text>{{order.hospitalPersonName}}</text></span>
<span v-if="order.orderType =='HEALTH_CONSULTATION'">咨询时间<text>{{order.healthAppointDate}}</text></span>
<span v-if="order.orderType !='HEALTH_CONSULTATION'">收货地址<text>{{order.receiveAddress}}</text></span>
<span>订单编号<text>{{order.goOrderNo}}</text></span>
<!-- <span>获得积分<text>30点积分</text></span> -->
<span>下单时间<text>{{order.orderTime}}</text></span>
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'>
<view class="pay">
去支付
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
import {
handCloseOrder
} from '@/api/ServiceDetails/ServiceDetails.js'
import {
goodsOrder
} from '@/api/CommodityOrder/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
baseurl: '',
order: null,
patientId: '',
openid: null,
orderStatus: '',
pageSize: 10,
pageNum: 1,
timestamp: 0,
goodsOrderId: null,
timecount: undefined,
Timers: null,
}
},
onUnload() {
clearInterval(this.Timers); //
},
watch: { //
timecount() {
if (this.timecount <= 0) {
clearInterval(this.Timers); //
handCloseOrder().then(res => {
this.order.orderStatus = 'CANCEL'
})
}
},
},
methods: {
//
pay() {
var that = this
let paydata = this.order
paydata.openid = this.openid
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = this.order.totalPrice
paydata.orderChannel = 'WECHAT_APPLET'
paydata.orderNo = this.order.goOrderNo
appletGoodsOrderPay(paydata).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',
duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
duration: 1500,
})
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 2000
})
}
})
},
//退
gorefundType() {
uni.navigateTo({
url: `/pages/refundType/refundType?order=${JSON.stringify(this.order)}`
})
},
goodsOrderinfo(goodsOrderId) {
goodsOrder(this.patientId, this.orderStatus, goodsOrderId, this.pageSize, this.pageNum).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)
}
})
},
//
goAftersalesdetails(item) {
uni.navigateTo({
url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${item.goodsOrderId}`
})
},
},
onLoad(options) {
this.baseurl = baseurl
this.goodsOrderId = options.goodsOrderId
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
}
const value2 = uni.getStorageSync('openid');
if (value2) {
that.openid = value2
} else {}
},
onShow() {
this.goodsOrderinfo(this.goodsOrderId)
},
}
</script>
<style lang="scss">
@import '../orderDetails/orderDetails.scss'
</style>