✨ 订单详情:订单项的售后状态接入
parent
953c8f96cb
commit
db19393427
10
pages.json
10
pages.json
|
@ -209,16 +209,6 @@
|
||||||
"title": "发票详情"
|
"title": "发票详情"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "dispatch/content",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "发货内容"
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"auth": true,
|
|
||||||
"title": "发货内容"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "aftersale/apply",
|
"path": "aftersale/apply",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -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', {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue