From 17c299e4ceddccd6ddc287a2e875dedea5a10b0c Mon Sep 17 00:00:00 2001 From: sexygoat <1538832180@qq.com> Date: Fri, 24 Apr 2026 18:39:39 +0800 Subject: [PATCH] fix: bug --- .../business/CreateRefundDialog.vue | 2 +- .../device/RealnamePolicyDialog.vue | 6 +- src/components/device/SetWiFiDialog.vue | 136 --------- src/types/api/asset.ts | 3 +- .../account-management/account/index.vue | 10 +- .../components/BasicInfoCard.vue | 2 +- .../components/CurrentPackageCard.vue | 53 +++- .../components/PackageListCard.vue | 55 +++- .../components/dialogs/SwitchModeDialog.vue | 2 +- .../components/dialogs/WiFiConfigDialog.vue | 36 ++- .../asset-information/index.vue | 23 +- .../asset-management/device-list/index.vue | 285 +++++------------- .../iot-card-management/index.vue | 187 ++++++++++-- .../task-management/device-task/index.vue | 21 +- .../task-management/iot-card-task/index.vue | 21 +- src/views/common/account-list.vue | 2 +- src/views/finance/agent-recharge/detail.vue | 4 +- src/views/finance/agent-recharge/index.vue | 8 + src/views/finance/refund/detail.vue | 3 +- src/views/finance/refund/index.vue | 8 + .../order-management/order-list/index.vue | 63 ++-- .../package-management/package-list/index.vue | 9 +- .../package-series/index.vue | 15 +- .../series-grants/index.vue | 20 +- .../series-grants/packages.vue | 1 + src/views/settings/wechat-config/detail.vue | 4 +- src/views/system/role/index.vue | 2 +- 27 files changed, 500 insertions(+), 481 deletions(-) delete mode 100644 src/components/device/SetWiFiDialog.vue 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 @@