fix(buyer): 修复已取消订单仍可发起投诉与售后申请的问题

This commit is contained in:
pikachu1995@126.com
2026-11-11 22:41:27 +08:00
parent c398ff4717
commit 3d77c58e63
2 changed files with 11 additions and 1 deletions

View File

@@ -90,6 +90,11 @@ const reasonList = ref([]); // 投诉原因
function getOrderDetail() { // 获取订单详情 function getOrderDetail() { // 获取订单详情
orderDetail(route.query.sn).then(res => { orderDetail(route.query.sn).then(res => {
if (res.result?.order?.orderStatus === 'CANCELLED') {
Message.warning('订单已取消,无法发起投诉');
router.push({ name: 'MyOrder' });
return;
}
order.value = res.result order.value = res.result
orderGoods.value = res.result.orderItems[route.query.index] orderGoods.value = res.result.orderItems[route.query.index]
orderGoods.value.uploadList = [] orderGoods.value.uploadList = []

View File

@@ -297,7 +297,11 @@
@click="comment(order.order.sn, goodsIndex)" @click="comment(order.order.sn, goodsIndex)"
>评价</button> >评价</button>
<el-button <el-button
v-if="goods.complainStatus == 'NO_APPLY'" v-if="
order.order?.orderStatus !== 'CANCELLED' &&
order.order?.payStatus === 'PAID' &&
goods.complainStatus == 'NO_APPLY'
"
@click="complain(order.order.sn, goodsIndex)" @click="complain(order.order.sn, goodsIndex)"
type="danger" type="danger"
size="small" size="small"
@@ -306,6 +310,7 @@
<el-button <el-button
v-if=" v-if="
!isECouponOrder && !isECouponOrder &&
order.order?.orderStatus !== 'CANCELLED' &&
(goods.afterSaleStatus.includes('NOT_APPLIED') || (goods.afterSaleStatus.includes('NOT_APPLIED') ||
goods.afterSaleStatus.includes('PART_AFTER_SALE')) goods.afterSaleStatus.includes('PART_AFTER_SALE'))
" "