2023-09-22 11:08:14 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="app">
|
|
|
|
|
|
<view class="content">
|
|
|
|
|
|
<view class="name">
|
|
|
|
|
|
退款商品
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="details">
|
|
|
|
|
|
<view class="detailslist">
|
|
|
|
|
|
<image :src="baseurl+order.attributePitureUrl" mode=""></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.orderType=='DIRECT_BUY'">¥{{order.goodsPrice}}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bottom" v-if="order.orderType !='HEALTH_CONSULTATION'">
|
|
|
|
|
|
<span>型号:{{order.goodsAttributeName}}</span>
|
|
|
|
|
|
<span>X{{order.goodsCount}}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="payinfo">
|
|
|
|
|
|
<text class="pay">实付款</text>
|
|
|
|
|
|
<text class="price"
|
|
|
|
|
|
v-if="order.orderType=='DIRECT_BUY'||order.orderType =='HEALTH_CONSULTATION'">¥{{order.totalPrice}}</text>
|
|
|
|
|
|
<text class="price"
|
|
|
|
|
|
v-if="order.orderType=='INTEGRAL_EXCHANGE'">{{order.integralExchangeSill}}积分</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="refundinfo" v-if="order.orderType !='HEALTH_CONSULTATION'">
|
|
|
|
|
|
<view class="refund">
|
|
|
|
|
|
选择退款类型
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="myrefund" @tap='goApplforrefund(1)'>
|
2023-09-22 11:30:57 +08:00
|
|
|
|
<image class="images" src="../../static/pagesB/myrefund.png" mode=""></image>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
<view class="refundfo">
|
|
|
|
|
|
<view>我要退款(无需退货)</view>
|
|
|
|
|
|
<view class="text">没收到货</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<image class="picture pictures" src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="myrefund" @tap='goApplforrefund(2)'>
|
2023-09-22 11:30:57 +08:00
|
|
|
|
<image class="images" src="../../static/pagesB/refundgoods.png" mode=""></image>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
<view class="refundfo">
|
|
|
|
|
|
<view>我要退货退款</view>
|
|
|
|
|
|
<view class="text">已收到货,需要退还收到的货物</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="" v-else>
|
|
|
|
|
|
<view class="discribe">
|
|
|
|
|
|
<view class="voucher">退款原因</view>
|
|
|
|
|
|
<view class="supplement">
|
|
|
|
|
|
<u-input v-model="order.refundReasonRemark" type="textarea" height="100" :auto-height="true"
|
|
|
|
|
|
placeholder="请输入退款原因" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="Submit" @tap='refundinfo'>提交</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
refund
|
2023-09-22 11:30:57 +08:00
|
|
|
|
} from '@/api/pagesB/Applforrefund/index.js'
|
2023-09-22 11:08:14 +08:00
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
baseurl: '', //url
|
|
|
|
|
|
order: {
|
|
|
|
|
|
refundReasonRemark: '',
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
//退款
|
|
|
|
|
|
refundinfo() {
|
|
|
|
|
|
this.order.updateTime = null
|
|
|
|
|
|
refund(this.order).then(
|
|
|
|
|
|
res => {
|
|
|
|
|
|
if (res.code == 500) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: res.msg,
|
|
|
|
|
|
type: 'error'
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.setStorageSync("Refresh", 'Refresh')
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: '退款申请提交成功',
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
duration: '1500'
|
|
|
|
|
|
})
|
|
|
|
|
|
if (this.timer) {
|
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
|
}
|
|
|
|
|
|
this.timer = setTimeout(e => {
|
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
|
delta: 2
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 1500)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//退款页面
|
|
|
|
|
|
goApplforrefund(e) {
|
|
|
|
|
|
if (e == 1) {
|
|
|
|
|
|
uni.navigateTo({
|
2023-09-22 11:30:57 +08:00
|
|
|
|
url: `/pagesB/Applforrefund/Applforrefund?typename=${'我要退款(无需退货)'}&order=${JSON.stringify(this.order)}`
|
2023-09-22 11:08:14 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.navigateTo({
|
2023-09-22 11:30:57 +08:00
|
|
|
|
url: `/pagesB/Applforrefund/Applforrefund?typename=${'已收到货,需要退还收到的货物'}&order=${JSON.stringify(this.order)}`
|
2023-09-22 11:08:14 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
2023-11-02 11:40:28 +08:00
|
|
|
|
console.log(options,'777')
|
2023-09-22 11:08:14 +08:00
|
|
|
|
this.baseurl = baseurl
|
2023-11-02 11:40:28 +08:00
|
|
|
|
this.order = JSON.parse(options.list)
|
2023-09-22 11:08:14 +08:00
|
|
|
|
this.order.id = this.order.goodsOrderId
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
@import './refundType.scss';
|
|
|
|
|
|
</style>
|