✨ 订单详情:订单项的售后状态接入
parent
953c8f96cb
commit
db19393427
10
pages.json
10
pages.json
|
@ -209,16 +209,6 @@
|
|||
"title": "发票详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "dispatch/content",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发货内容"
|
||||
},
|
||||
"meta": {
|
||||
"auth": true,
|
||||
"title": "发货内容"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "aftersale/apply",
|
||||
"style": {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
>
|
||||
<template #tool>
|
||||
<view class="ss-flex">
|
||||
<button class="ss-reset-button apply-btn" v-if="item.buttons.includes('aftersale')"
|
||||
<button class="ss-reset-button apply-btn" v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/pages/order/aftersale/apply', {
|
||||
item: JSON.stringify(item),
|
||||
|
@ -66,30 +66,21 @@
|
|||
">
|
||||
申请售后
|
||||
</button>
|
||||
<button class="ss-reset-button apply-btn" v-if="item.buttons.includes('re_aftersale')"
|
||||
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/pages/order/aftersale/apply', {
|
||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||
item: JSON.stringify(item),
|
||||
})
|
||||
">
|
||||
重新售后
|
||||
退款中
|
||||
</button>
|
||||
|
||||
<button class="ss-reset-button apply-btn" v-if="item.buttons.includes('aftersale_info')"
|
||||
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||
id: item.ext.aftersale_id,
|
||||
})
|
||||
">
|
||||
售后详情
|
||||
</button>
|
||||
<button class="ss-reset-button apply-btn" v-if="item.buttons.includes('buy_again')"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/pages/goods/index', {
|
||||
id: item.goods_id,
|
||||
})
|
||||
">
|
||||
再次购买
|
||||
退款成功
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -225,6 +216,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// 查看商品
|
||||
function onGoodsDetail(id) {
|
||||
sheep.$router.go('/pages/goods/index', {
|
||||
id
|
||||
|
@ -248,25 +240,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
// 申请退款
|
||||
async function onRefund(orderId) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要申请退款吗?',
|
||||
success: async function(res) {
|
||||
if (res.confirm) {
|
||||
const {
|
||||
error,
|
||||
data
|
||||
} = await sheep.$api.order.applyRefund(orderId);
|
||||
if (error === 0) {
|
||||
getOrderDetail(data.order_sn);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 查看物流 TODO 芋艿:待测试
|
||||
async function onExpress(orderId) {
|
||||
sheep.$router.go('/pages/order/express/list', {
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<view class="order-card-footer ss-flex ss-col-center ss-p-x-20"
|
||||
:class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'">
|
||||
<view class="ss-flex ss-col-center">
|
||||
<!-- TODO 芋艿:再次购买 -->
|
||||
<button v-if="order.buttons.includes('combination')" class="tool-btn ss-reset-button"
|
||||
@tap.stop="onOrderGroupon(order)">
|
||||
拼团详情
|
||||
|
@ -80,15 +79,8 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
computed,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app';
|
||||
import { reactive } from 'vue';
|
||||
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import {
|
||||
fen2yuan,
|
||||
formatOrderColor, formatOrderStatus, handleOrderButtons,
|
||||
|
|
Loading…
Reference in New Issue