diff --git a/src/components/business/CreateRefundDialog.vue b/src/components/business/CreateRefundDialog.vue index 8e42199..7e2bdf5 100644 --- a/src/components/business/CreateRefundDialog.vue +++ b/src/components/business/CreateRefundDialog.vue @@ -105,7 +105,7 @@ }) const validateRefundAmount = (rule: any, value: number, callback: any) => { - if (value === undefined || value === null || value === 0) { + if (value === undefined || value === null) { callback(new Error('请输入申请退款金额')) } else if (value > formData.actual_received_amount) { callback(new Error('申请退款金额不能大于实收金额')) diff --git a/src/components/device/RealnamePolicyDialog.vue b/src/components/device/RealnamePolicyDialog.vue index 94591da..00ba50b 100644 --- a/src/components/device/RealnamePolicyDialog.vue +++ b/src/components/device/RealnamePolicyDialog.vue @@ -1,5 +1,5 @@ - + diff --git a/src/views/asset-management/asset-information/components/CurrentPackageCard.vue b/src/views/asset-management/asset-information/components/CurrentPackageCard.vue index 07a5614..a051b96 100644 --- a/src/views/asset-management/asset-information/components/CurrentPackageCard.vue +++ b/src/views/asset-management/asset-information/components/CurrentPackageCard.vue @@ -36,10 +36,17 @@
总量 - {{ formatDataSize(currentPackage.data_limit_mb || currentPackage.package_total_data || 0) }} + {{ + formatDataSize( + currentPackage.data_limit_mb || currentPackage.package_total_data || 0 + ) + }}
-
+
实际可用 {{ formatDataSize(currentPackage.virtual_limit_mb || 0) }} @@ -52,7 +59,8 @@ formatDataSize( currentPackage.enable_virtual_data ? currentPackage.virtual_remain_mb || 0 - : (currentPackage.data_limit_mb || currentPackage.package_total_data || 0) - (currentPackage.data_usage_mb || 0) + : (currentPackage.data_limit_mb || currentPackage.package_total_data || 0) - + (currentPackage.data_usage_mb || 0) ) }} @@ -62,13 +70,29 @@ @@ -89,7 +113,10 @@ {{ getPackageTypeName(currentPackage.package_type) }} - + {{ currentPackage.virtual_ratio || '-' }} @@ -98,7 +125,7 @@ {{ formatDateTime(currentPackage.expire_time) || '-' }} - + {{ formatDateTime(currentPackage.created_at) || '-' }} @@ -128,12 +155,8 @@ import { formatDateTime } from '@/utils/business/format' import type { PackageInfo } from '../types' - const { - formatAmount, - formatDataSize, - getUsageProgress, - getProgressColorByPercentage - } = useAssetFormatters() + const { formatAmount, formatDataSize, getUsageProgress, getProgressColorByPercentage } = + useAssetFormatters() const userStore = useUserStore() const { info: userInfo } = storeToRefs(userStore) diff --git a/src/views/asset-management/asset-information/components/PackageListCard.vue b/src/views/asset-management/asset-information/components/PackageListCard.vue index 66af950..07d0c9e 100644 --- a/src/views/asset-management/asset-information/components/PackageListCard.vue +++ b/src/views/asset-management/asset-information/components/PackageListCard.vue @@ -25,7 +25,19 @@
- + + + - - - - + - + @@ -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') } diff --git a/src/views/asset-management/asset-information/components/dialogs/SwitchModeDialog.vue b/src/views/asset-management/asset-information/components/dialogs/SwitchModeDialog.vue index ee5d45d..a42a875 100644 --- a/src/views/asset-management/asset-information/components/dialogs/SwitchModeDialog.vue +++ b/src/views/asset-management/asset-information/components/dialogs/SwitchModeDialog.vue @@ -1,6 +1,6 @@