【订单】

1、接入退款流程
pull/1/MERGE
YunaiV 2023-08-18 19:59:47 +08:00
parent a4846939dd
commit e452f7cb19
2 changed files with 32 additions and 15 deletions

View File

@ -18,10 +18,16 @@
</text>
</view>
<view class='money font-color'>{{ fen2yuan(item.price) }}</view>
<!-- 售后状态 -->
<!-- TODO 芋艿这样式不太合理应该顺着向右对齐 -->
<view class="evaluate" style="right: 60px;" v-if="afterSale" @click.stop="afterSaleTap(item)">
{{
item.afterSaleStatus === 0 ? '申请退款' :
item.afterSaleStatus === 10 ? '退款中' : '退款成功'
}}
</view>
<!-- 评价状态 -->
<view class='evaluate' v-if='item.commentStatus === false && evaluate === 2' @click.stop="evaluateTap(item)">
评价
</view>
<view class='evaluate' v-if='item.commentStatus === false && evaluate === 2' @click.stop="evaluateTap(item)">评价</view>
<view class='evaluate' v-else-if="item.replyStatus === true">已评价</view>
</view>
</view>
@ -36,6 +42,10 @@
type: Number,
default: 0, // 0 - 2 -
},
afterSale: { //
type: Boolean,
default: false,
},
cartInfo: {
type: Array,
default: function() {
@ -68,7 +78,7 @@
nVal.forEach((item, index) => {
num += item.count
})
this.totalNmu = num
this.totalNmu = num
}
},
methods: {
@ -77,6 +87,17 @@
url: "/pages/users/goods_comment_con/index?orderItemId=" + item.id
})
},
afterSaleTap(item) {
if (item.afterSaleStatus === 0) {
uni.navigateTo({
url: "/pages/users/goods_return/index?orderId=" + item.orderId + '&orderItemId=' + item.id
})
return;
}
uni.navigateTo({
url: "/pages/users/user_return_detail/index?id=" + item.afterSaleId
})
},
jumpCon: function(id) {
let type = this.productType === 0 ?'normal':'video'
if (this.jump) {

View File

@ -122,6 +122,7 @@
<!-- 商品列表 -->
<orderGoods
:evaluate='evaluate'
:afterSale="afterSale"
:productType="orderInfo.type"
:orderId="order_id"
:cartInfo="cartInfo"
@ -235,17 +236,6 @@
<view class='bnt bg-color' v-if="orderInfo.status === 0" @tap='goPay'>
立即付款
</view>
<!-- TODO 芋艿退款各种 -->
<!-- #ifdef MP -->
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</view>
<!-- #endif -->
<!-- #ifndef MP -->
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</navigator>
<!-- #endif -->
<!-- TODO 芋艿拼团 -->
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
<navigator class='bnt cancel' v-if="orderInfo.logisticsId > 0"
@ -295,7 +285,9 @@
systemStore: {},
},
cartInfo: [], //
evaluate: 0, //
afterSale: false, //
// ========== ==========
system_store: {}, //
@ -359,6 +351,10 @@
// evaluate 2
this.$set(this, 'evaluate', res.data.status === 30 && !res.data.commentStatus ? 2 : 0);
//
if ([10, 20, 30].includes(res.data.status)) {
this.$set(this, 'afterSale', true);
}
//
if (res.data.pickUpStoreId) {