NurseStationApp/pages/orderDetails/orderDetails.vue

162 lines
4.8 KiB
Vue
Raw Normal View History

2022-10-28 14:05:30 +08:00
<template>
<view class="app">
2023-01-13 13:55:31 +08:00
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'">
2022-11-10 16:40:00 +08:00
剩余付款时间
2022-12-06 10:10:34 +08:00
<u-count-down style='' :timestamp="timestamp">
2022-11-10 16:40:00 +08:00
</u-count-down>
</view>
2022-12-27 09:21:01 +08:00
<view class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
2022-12-06 10:10:34 +08:00
订单已关闭
</view>
2022-10-28 14:05:30 +08:00
<view class="content">
<view class="name">
店铺名称
<image src="../../static/rowsright.png" mode=""></image>
</view>
<view class="details">
<view class="detailslist">
2022-11-01 16:26:34 +08:00
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
2022-10-28 14:05:30 +08:00
<view class="model">
<view class="top">
2022-11-01 16:26:34 +08:00
<span>{{order.goodsName}}</span>
<span>{{order.goodsPrice}}</span>
2022-10-28 14:05:30 +08:00
</view>
<view class="bottom">
2022-11-01 16:26:34 +08:00
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
2022-10-28 14:05:30 +08:00
</view>
2022-11-01 16:26:34 +08:00
<view class="refund" @tap='gorefundType'
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'">
2022-10-28 14:05:30 +08:00
申请退款
</view>
2022-11-01 16:26:34 +08:00
<view class="refund" v-if="order.orderStatus=='WAIT_REFUND'" @tap='goAftersalesdetails(order)'>
退款中
</view>
<view class="refund" v-if="order.orderStatus=='REFUNDED'">
退款成功
</view>
<!-- <view class="refund" v-if="order.orderStatus=='RETURNED_GOODS'">
退货中
</view> -->
<view class="refund" v-if="order.orderStatus=='WAIT_RETURNED_GOODS'">
待退货
</view>
2022-10-28 14:05:30 +08:00
</view>
</view>
<view class="payinfo">
<text class="pay">实付款</text>
2022-12-01 17:03:02 +08:00
<text class="price">{{order.totalPrice}}</text>
2022-10-28 14:05:30 +08:00
</view>
</view>
</view>
2023-01-10 10:35:17 +08:00
<view class="info">
<view>收货人<text>{{order.receiver}}</text></view>
<view>联系电话<text>{{order.phone}}</text></view>
<view>收货地址<text>{{order.receiveAddress}}</text></view>
<view>订单编号<text>{{order.goOrderNo}}</text></view>
2022-11-01 16:26:34 +08:00
<!-- <span>获得积分<text>30点积分</text></span> -->
2023-01-10 10:35:17 +08:00
<view>下单时间<text>{{order.orderTime}}</text></view>
<view v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></view>
2022-11-01 16:26:34 +08:00
<!-- <span>发货时间<text>2022-10-28 113126</text></span> -->
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>
2023-01-13 13:55:31 +08:00
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'">
2022-11-01 16:26:34 +08:00
<view class="pay">
去支付
</view>
2022-10-28 14:05:30 +08:00
</view>
2022-12-27 09:21:01 +08:00
<view class="buy" v-if="order.orderStatus == 'EVALUATED'" @tap='golookrate'>
<view class="pay" style="background-color: #4C7BC9;">
查看评价
</view>
</view>
<view class="buy" v-if="order.orderStatus == 'RECEIVED_GOODS'" @tap='rate'>
<view class="pay" style="background-color: #60c5f1;">
去评价
</view>
</view>
<u-toast ref="uToast" />
2022-10-28 14:05:30 +08:00
</view>
</template>
<script>
2022-11-01 16:26:34 +08:00
import {
goodsOrder
} from '@/api/CommodityOrder/index.js'
import baseurl from '@/api/baseurl.js'
2022-12-27 09:21:01 +08:00
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
2022-10-28 14:05:30 +08:00
export default {
data() {
return {
2022-11-01 16:26:34 +08:00
baseurl: '',
order: {},
patientId: '',
orderStatus: '',
pageSize: 10,
pageNum: 1,
2022-11-10 16:40:00 +08:00
timestamp: 0, //倒计时
2022-10-28 14:05:30 +08:00
}
},
methods: {
2022-12-27 09:21:01 +08:00
//查看评价
golookrate() {
uni.navigateTo({
url: `/pages/lookrate/lookrate?item=${JSON.stringify(this.order)}`
})
},
//评价
rate() {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
})
},
2022-11-01 16:26:34 +08:00
//退款页面
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]
2022-11-10 16:40:00 +08:00
var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
2022-11-01 16:26:34 +08:00
})
},
//跳转售后详情
goAftersalesdetails(item) {
uni.navigateTo({
url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${item.goodsOrderId}`
})
},
},
onLoad(options) {
this.baseurl = baseurl
let that = this
2022-11-09 16:38:05 +08:00
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
2022-11-01 16:26:34 +08:00
that.goodsOrderinfo(options.goodsOrderId)
}
2022-11-09 16:38:05 +08:00
} catch (e) {
// error
}
/* uni.getStorage({
key: 'patientId',
success: function(res) {
that.patientId = res.data
that.goodsOrderinfo(options.goodsOrderId)
}
}); */
2022-10-28 14:05:30 +08:00
}
}
</script>
<style lang="scss">
2022-11-01 16:26:34 +08:00
@import "./orderDetails.scss";
2022-10-28 14:05:30 +08:00
</style>