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

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": "发票详情" "title": "发票详情"
} }
}, },
{
"path": "dispatch/content",
"style": {
"navigationBarTitleText": "发货内容"
},
"meta": {
"auth": true,
"title": "发货内容"
}
},
{ {
"path": "aftersale/apply", "path": "aftersale/apply",
"style": { "style": {

View File

@ -58,7 +58,7 @@
> >
<template #tool> <template #tool>
<view class="ss-flex"> <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=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/apply', { sheep.$router.go('/pages/order/aftersale/apply', {
item: JSON.stringify(item), item: JSON.stringify(item),
@ -66,30 +66,21 @@
"> ">
申请售后 申请售后
</button> </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=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/apply', { sheep.$router.go('/pages/order/aftersale/detail', {
item: JSON.stringify(item), item: JSON.stringify(item),
}) })
"> ">
重新售后 退款中
</button> </button>
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20"
<button class="ss-reset-button apply-btn" v-if="item.buttons.includes('aftersale_info')"
@tap.stop=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/detail', { sheep.$router.go('/pages/order/aftersale/detail', {
id: item.ext.aftersale_id, 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> </button>
</view> </view>
</template> </template>
@ -225,6 +216,7 @@
}); });
} }
//
function onGoodsDetail(id) { function onGoodsDetail(id) {
sheep.$router.go('/pages/goods/index', { sheep.$router.go('/pages/goods/index', {
id 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 // TODO
async function onExpress(orderId) { async function onExpress(orderId) {
sheep.$router.go('/pages/order/express/list', { 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" <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'"> :class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'">
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<!-- TODO 芋艿再次购买 -->
<button v-if="order.buttons.includes('combination')" class="tool-btn ss-reset-button" <button v-if="order.buttons.includes('combination')" class="tool-btn ss-reset-button"
@tap.stop="onOrderGroupon(order)"> @tap.stop="onOrderGroupon(order)">
拼团详情 拼团详情
@ -80,15 +79,8 @@
</template> </template>
<script setup> <script setup>
import { import { reactive } from 'vue';
computed, import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
reactive
} from 'vue';
import {
onLoad,
onReachBottom,
onPullDownRefresh
} from '@dcloudio/uni-app';
import { import {
fen2yuan, fen2yuan,
formatOrderColor, formatOrderStatus, handleOrderButtons, formatOrderColor, formatOrderStatus, handleOrderButtons,