This commit is contained in:
@@ -25,7 +25,19 @@
|
||||
</ElEmpty>
|
||||
<div v-else-if="packageList && packageList.length > 0" class="table-scroll-container">
|
||||
<ElTable :data="packageList" class="package-table" border>
|
||||
<ElTableColumn prop="order_no" label="订单号" width="180" show-overflow-tooltip />
|
||||
<ElTableColumn label="订单号" width="240">
|
||||
<template #default="scope">
|
||||
<ElButton
|
||||
type="primary"
|
||||
link
|
||||
@click="handleOrderNoClick(scope.row)"
|
||||
v-if="hasAuth('order:detail')"
|
||||
>
|
||||
{{ scope.row.order_no }}
|
||||
</ElButton>
|
||||
<span v-else>{{ scope.row.order_no }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="套餐名称" width="150">
|
||||
<template #default="scope">
|
||||
<ElButton
|
||||
@@ -50,11 +62,6 @@
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn prop="data_limit_mb" label="总流量" width="120">
|
||||
<template #default="scope">
|
||||
{{ formatDataSize(scope.row.data_limit_mb) }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="流量" min-width="320">
|
||||
<template #default="scope">
|
||||
<div class="traffic-progress">
|
||||
@@ -108,12 +115,12 @@
|
||||
{{ formatDateTime(scope.row.expires_at) }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn prop="created_at" label="购买时间" width="170" show-overflow-tooltip>
|
||||
<ElTableColumn prop="created_at" label="下单时间" width="170" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatDateTime(scope.row.created_at) }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="操作" width="100" fixed="right">
|
||||
<ElTableColumn label="操作" width="120" fixed="right">
|
||||
<template #default="scope">
|
||||
<ElButton
|
||||
v-if="scope.row.status !== 4 && hasAuth('package:create_refund')"
|
||||
@@ -123,6 +130,18 @@
|
||||
>
|
||||
退款申请
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="
|
||||
scope.row.status === 4 &&
|
||||
scope.row.refund_id &&
|
||||
hasAuth('refund:package_list_detail')
|
||||
"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleViewRefundDetail(scope.row)"
|
||||
>
|
||||
退款详情
|
||||
</ElButton>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
@@ -217,6 +236,8 @@
|
||||
(e: 'page-change', page: number): void
|
||||
(e: 'size-change', size: number): void
|
||||
(e: 'navigateToDevice', deviceNo: string): void
|
||||
(e: 'navigateToOrder', orderId: number): void
|
||||
(e: 'navigateToRefund', refundId: number): void
|
||||
(e: 'refresh'): void
|
||||
}
|
||||
|
||||
@@ -262,6 +283,24 @@
|
||||
emit('showDailyRecords', { packageRow })
|
||||
}
|
||||
|
||||
// 点击订单号
|
||||
const handleOrderNoClick = (packageRow: PackageInfo) => {
|
||||
if (!hasAuth('order:package_list_detail')) {
|
||||
ElMessage.warning('您没有查看订单详情的权限')
|
||||
return
|
||||
}
|
||||
emit('navigateToOrder', packageRow.order_id!)
|
||||
}
|
||||
|
||||
// 查看退款详情
|
||||
const handleViewRefundDetail = (packageRow: PackageInfo) => {
|
||||
if (!hasAuth('refund:detail')) {
|
||||
ElMessage.warning('您没有查看退款详情的权限')
|
||||
return
|
||||
}
|
||||
emit('navigateToRefund', packageRow.refund_id!)
|
||||
}
|
||||
|
||||
const handleShowRecharge = () => {
|
||||
emit('showRecharge')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user