|
@ -1,56 +1,62 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page"> |
|
|
|
|
|
|
|
|
<view class="page"> |
|
|
|
|
|
|
|
|
<navbar title="核销详情" leftClick @leftClick="$utils.navigateBack" color="#fff" /> |
|
|
<navbar title="核销详情" leftClick @leftClick="$utils.navigateBack" color="#fff" /> |
|
|
|
|
|
|
|
|
<view class="flex page-header"> |
|
|
|
|
|
<image class="icon" src="@/pages_order/static/verifyOrder/icon-clock.png" mode="widthFix"></image> |
|
|
|
|
|
<text>待核销</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="page-content"> |
|
|
|
|
|
<!-- 商品详情 --> |
|
|
|
|
|
<productCard :data="orderDetail.massageItem" size="medium" :readonly="true"></productCard> |
|
|
|
|
|
|
|
|
|
|
|
<view class="card rights" v-if="orderDetail.rights && orderDetail.rights.length"> |
|
|
|
|
|
<view class="flex rights-item" v-for="item in orderDetail.rights" :key="item"> |
|
|
|
|
|
<image class="rights-icon" src="@/pages_order/static/verifyOrder/icon-checked.png" mode="widthFix"></image> |
|
|
|
|
|
<text>{{ item }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="card info"> |
|
|
|
|
|
<view class="info-header">核销信息</view> |
|
|
|
|
|
<view class="flex flex-column info-content"> |
|
|
|
|
|
<image class="info-qr" :src="orderDetail.qrCodeImgUrl" mode="widthFix"></image> |
|
|
|
|
|
<view class="info-no">{{ `订单号:${orderDetail.id}` }}</view> |
|
|
|
|
|
<view class="info-desc">{{ `有效时间:${orderDetail.startTime}至${orderDetail.endTime}` }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="flex page-header"> |
|
|
|
|
|
<image class="icon" src="@/pages_order/static/verifyOrder/icon-clock.png" mode="widthFix"></image> |
|
|
|
|
|
<text>待核销</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="page-content"> |
|
|
|
|
|
<!-- 商品详情 --> |
|
|
|
|
|
<productCard :data="orderDetail.massageItem" size="medium" :readonly="true"></productCard> |
|
|
|
|
|
|
|
|
|
|
|
<view class="card rights" v-if="orderDetail.rights && orderDetail.rights.length"> |
|
|
|
|
|
<view class="flex rights-item" v-for="item in orderDetail.rights" :key="item"> |
|
|
|
|
|
<image class="rights-icon" src="@/pages_order/static/verifyOrder/icon-checked.png" mode="widthFix"> |
|
|
|
|
|
</image> |
|
|
|
|
|
<text>{{ item }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="card info"> |
|
|
|
|
|
<view class="info-header">核销信息</view> |
|
|
|
|
|
<view class="flex flex-column info-content"> |
|
|
|
|
|
<!-- <image class="info-qr" :src="orderDetail.qrCodeImgUrl" mode="widthFix"></image> --> |
|
|
|
|
|
|
|
|
|
|
|
<view class="" style="margin: 20rpx;"> |
|
|
|
|
|
<uv-qrcode ref="qrcode" size="300rpx" :value="orderDetail.id"></uv-qrcode> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="info-no">{{ `订单号:${orderDetail.id}` }}</view> |
|
|
|
|
|
<view class="info-desc">{{ `有效时间:${orderDetail.startTime}至${orderDetail.endTime}` }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 下单 --> |
|
|
<!-- 下单 --> |
|
|
<view class="flex bar"> |
|
|
<view class="flex bar"> |
|
|
<button plain class="btn btn-plain" @click="overOrder">核销</button> |
|
|
|
|
|
<button plain class="btn btn-plain" @click="onRefund">申请退款</button> |
|
|
|
|
|
<button plain class="btn" @click="onBuyAgain">再次购买</button> |
|
|
|
|
|
|
|
|
<button plain class="btn btn-plain" @click="overOrder">核销</button> |
|
|
|
|
|
<button plain class="btn btn-plain" @click="onRefund">申请退款</button> |
|
|
|
|
|
<button plain class="btn" @click="onBuyAgain">再次购买</button> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import productCard from '@/components/product/productCard.vue' |
|
|
import productCard from '@/components/product/productCard.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
components: { |
|
|
|
|
|
productCard, |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
components: { |
|
|
|
|
|
productCard, |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
orderDetail: {}, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
orderDetail: {}, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onLoad(args) { |
|
|
onLoad(args) { |
|
|
this.id = args.id |
|
|
this.id = args.id |
|
|
this.fetchOrderDetail() |
|
|
this.fetchOrderDetail() |
|
@ -58,11 +64,13 @@ |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.fetchOrderDetail() |
|
|
this.fetchOrderDetail() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
|
|
|
|
|
|
methods: { |
|
|
async fetchOrderDetail() { |
|
|
async fetchOrderDetail() { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
this.orderDetail = await this.$fetch('queryOrderById', { id: this.id }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.orderDetail = await this.$fetch('queryOrderById', { |
|
|
|
|
|
id: this.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
|
|
|
|
|
@ -70,48 +78,48 @@ |
|
|
|
|
|
|
|
|
uni.stopPullDownRefresh() |
|
|
uni.stopPullDownRefresh() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
overOrder(){ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '确认核销订单吗?', |
|
|
|
|
|
success : e => { |
|
|
|
|
|
if(e.confirm){ |
|
|
|
|
|
this.$api('overOrder', { |
|
|
|
|
|
orderId : this.orderDetail.id, |
|
|
|
|
|
}, res => { |
|
|
|
|
|
this.$emit('done') |
|
|
|
|
|
// 请求成功后返回上一个页面 |
|
|
|
|
|
uni.navigateBack() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onRefund() { |
|
|
|
|
|
// todo |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '确认申请订单退款嘛?', |
|
|
|
|
|
success : e => { |
|
|
|
|
|
if(e.confirm){ |
|
|
|
|
|
this.$api('rollbackOrder', { |
|
|
|
|
|
orderId : this.orderDetail.id, |
|
|
|
|
|
}, res => { |
|
|
|
|
|
this.$emit('done') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onBuyAgain() { |
|
|
|
|
|
// todo: check |
|
|
|
|
|
this.$utils.navigateTo(`/pages_order/product/productDetail?id=${this.orderDetail.massageItem.id}`) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overOrder() { |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '确认核销订单吗?', |
|
|
|
|
|
success: e => { |
|
|
|
|
|
if (e.confirm) { |
|
|
|
|
|
this.$api('overOrder', { |
|
|
|
|
|
orderId: this.orderDetail.id, |
|
|
|
|
|
}, res => { |
|
|
|
|
|
this.$emit('done') |
|
|
|
|
|
// 请求成功后返回上一个页面 |
|
|
|
|
|
uni.navigateBack() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onRefund() { |
|
|
|
|
|
// todo |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '确认申请订单退款嘛?', |
|
|
|
|
|
success: e => { |
|
|
|
|
|
if (e.confirm) { |
|
|
|
|
|
this.$api('rollbackOrder', { |
|
|
|
|
|
orderId: this.orderDetail.id, |
|
|
|
|
|
}, res => { |
|
|
|
|
|
this.$emit('done') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onBuyAgain() { |
|
|
|
|
|
// todo: check |
|
|
|
|
|
this.$utils.navigateTo(`/pages_order/product/productDetail?id=${this.orderDetail.massageItem.id}`) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
$bar-height: 132rpx; |
|
|
|
|
|
|
|
|
$bar-height: 132rpx; |
|
|
|
|
|
|
|
|
.page { |
|
|
.page { |
|
|
background-color: #F5F5F5; |
|
|
background-color: #F5F5F5; |
|
@ -120,69 +128,69 @@ |
|
|
background-image: linear-gradient(#84A73F, #D8FF8F); |
|
|
background-image: linear-gradient(#84A73F, #D8FF8F); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&-header { |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
margin-top: 24rpx; |
|
|
|
|
|
|
|
|
|
|
|
.icon { |
|
|
|
|
|
width: 30rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-right: 17rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-content { |
|
|
|
|
|
padding: 11rpx 13rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.rights { |
|
|
|
|
|
margin-top: 15rpx; |
|
|
|
|
|
padding: 23rpx 48rpx; |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
|
|
|
&-item { |
|
|
|
|
|
margin-right: 70rpx; |
|
|
|
|
|
display: inline-flex; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-icon { |
|
|
|
|
|
width: 30rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-right: 12rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info { |
|
|
|
|
|
margin-top: 19rpx; |
|
|
|
|
|
padding: 25rpx 41rpx 51rpx 41rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
|
|
|
&-header { |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
padding: 0 0 16rpx 7rpx; |
|
|
|
|
|
border-bottom: 1rpx dashed #C7C7C7; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-qr { |
|
|
|
|
|
width: 279rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-top: 57rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-no { |
|
|
|
|
|
color: #84A73F; |
|
|
|
|
|
margin-top: 16rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-desc { |
|
|
|
|
|
color: #999999; |
|
|
|
|
|
font-size: 22rpx; |
|
|
|
|
|
margin-top: 65rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
&-header { |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
margin-top: 24rpx; |
|
|
|
|
|
|
|
|
|
|
|
.icon { |
|
|
|
|
|
width: 30rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-right: 17rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-content { |
|
|
|
|
|
padding: 11rpx 13rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.rights { |
|
|
|
|
|
margin-top: 15rpx; |
|
|
|
|
|
padding: 23rpx 48rpx; |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
|
|
|
&-item { |
|
|
|
|
|
margin-right: 70rpx; |
|
|
|
|
|
display: inline-flex; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-icon { |
|
|
|
|
|
width: 30rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-right: 12rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info { |
|
|
|
|
|
margin-top: 19rpx; |
|
|
|
|
|
padding: 25rpx 41rpx 51rpx 41rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
|
|
|
&-header { |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
padding: 0 0 16rpx 7rpx; |
|
|
|
|
|
border-bottom: 1rpx dashed #C7C7C7; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-qr { |
|
|
|
|
|
width: 279rpx; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
margin-top: 57rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-no { |
|
|
|
|
|
color: #84A73F; |
|
|
|
|
|
margin-top: 16rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-desc { |
|
|
|
|
|
color: #999999; |
|
|
|
|
|
font-size: 22rpx; |
|
|
|
|
|
margin-top: 65rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bar { |
|
|
.bar { |
|
@ -194,37 +202,37 @@ |
|
|
padding-bottom: env(safe-area-inset-bottom); |
|
|
padding-bottom: env(safe-area-inset-bottom); |
|
|
background-color: $uni-fg-color; |
|
|
background-color: $uni-fg-color; |
|
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
width: auto; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
padding: 24rpx 50rpx; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-radius: 44rpx; |
|
|
|
|
|
margin: 0; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
|
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
background-image: linear-gradient(to right, #84A73F, #D8FF8F); |
|
|
|
|
|
|
|
|
|
|
|
& + & { |
|
|
|
|
|
margin-left: 39rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
|
margin-right: 54rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-plain { |
|
|
|
|
|
border: 2rpx solid #999999; |
|
|
|
|
|
color: #999999; |
|
|
|
|
|
background: none; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
width: auto; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
padding: 24rpx 50rpx; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-radius: 44rpx; |
|
|
|
|
|
margin: 0; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
|
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
background-image: linear-gradient(to right, #84A73F, #D8FF8F); |
|
|
|
|
|
|
|
|
|
|
|
&+& { |
|
|
|
|
|
margin-left: 39rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
|
margin-right: 54rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-plain { |
|
|
|
|
|
border: 2rpx solid #999999; |
|
|
|
|
|
color: #999999; |
|
|
|
|
|
background: none; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |