This commit is contained in:
parent
9c25b4ca35
commit
ef186007c4
|
|
@ -20,8 +20,7 @@ const { checkLogin } = useAuth()
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ label: '全部', value: 'all' },
|
{ label: '全部', value: 'all' },
|
||||||
{ label: '已测评', value: 'completed' },
|
{ label: '已测评', value: 'completed' },
|
||||||
{ label: '待测评', value: 'pending' },
|
{ label: '待测评', value: 'pending' }
|
||||||
{ label: '已退款', value: 'refunded' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
// 状态
|
// 状态
|
||||||
|
|
@ -70,12 +69,16 @@ function getDisplayStatus(order) {
|
||||||
* 根据当前tab过滤订单列表
|
* 根据当前tab过滤订单列表
|
||||||
*/
|
*/
|
||||||
const filteredList = computed(() => {
|
const filteredList = computed(() => {
|
||||||
if (activeTab.value === 'all') return orderList.value
|
// 过滤掉已退款和退款中的订单
|
||||||
return orderList.value.filter(order => {
|
const visibleList = orderList.value.filter(order => {
|
||||||
|
const dst = getDisplayStatus(order)
|
||||||
|
return dst !== '已退款' && dst !== '退款中'
|
||||||
|
})
|
||||||
|
if (activeTab.value === 'all') return visibleList
|
||||||
|
return visibleList.filter(order => {
|
||||||
const dst = getDisplayStatus(order)
|
const dst = getDisplayStatus(order)
|
||||||
if (activeTab.value === 'completed') return dst === '已测评'
|
if (activeTab.value === 'completed') return dst === '已测评'
|
||||||
if (activeTab.value === 'pending') return dst === '待测评' || dst === '测评中'
|
if (activeTab.value === 'pending') return dst === '待测评' || dst === '测评中'
|
||||||
if (activeTab.value === 'refunded') return dst === '已退款' || dst === '退款中'
|
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user