订单详情:订单项的售后状态接入

pull/28/head
YunaiV 2023-12-13 21:17:31 +08:00
parent 953c8f96cb
commit db19393427
3 changed files with 9 additions and 54 deletions

View File

@ -209,16 +209,6 @@
"title": "发票详情"
}
},
{
"path": "dispatch/content",
"style": {
"navigationBarTitleText": "发货内容"
},
"meta": {
"auth": true,
"title": "发货内容"
}
},
{
"path": "aftersale/apply",
"style": {

View File

@ -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', {

View File

@ -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,