@@ -108,12 +115,12 @@
{{ formatDateTime(scope.row.expires_at) }}
-
+
{{ formatDateTime(scope.row.created_at) }}
-
+
退款申请
+
+ 退款详情
+
@@ -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 @@
-
+
{{ deviceIdentifier }}
diff --git a/src/views/asset-management/asset-information/components/dialogs/WiFiConfigDialog.vue b/src/views/asset-management/asset-information/components/dialogs/WiFiConfigDialog.vue
index aec4291..80de0b1 100644
--- a/src/views/asset-management/asset-information/components/dialogs/WiFiConfigDialog.vue
+++ b/src/views/asset-management/asset-information/components/dialogs/WiFiConfigDialog.vue
@@ -1,6 +1,6 @@
-
-
+
+
启用
@@ -15,6 +15,7 @@
show-word-limit
clearable
autocomplete="off"
+ name="wifi_ssid"
/>
@@ -27,6 +28,7 @@
show-password
clearable
autocomplete="off"
+ name="wifi_password"
/>
@@ -53,14 +55,33 @@
interface Props {
modelValue: boolean
cardNo?: string // 流量卡号(ICCID)
+ deviceIdentifier?: string // 设备标识(IMEI)
+ wifiEnabled?: number // WiFi启用状态
+ wifiSsid?: string // WiFi名称
+ wifiPassword?: string // WiFi密码
}
interface Emits {
(e: 'update:modelValue', value: boolean): void
- (e: 'confirm', data: { card_no: string; enabled: number; ssid: string; password: string }): void
+ (
+ e: 'confirm',
+ data: {
+ deviceIdentifier?: string
+ card_no: string
+ enabled: number
+ ssid: string
+ password: string
+ }
+ ): void
}
- const props = defineProps()
+ const props = withDefaults(defineProps(), {
+ cardNo: '',
+ deviceIdentifier: '',
+ wifiEnabled: 1,
+ wifiSsid: '',
+ wifiPassword: ''
+ })
const emit = defineEmits()
const formRef = ref()
@@ -91,9 +112,9 @@
// 监听对话框打开,重置表单
watch(visible, (newVal) => {
if (newVal) {
- form.enabled = 1
- form.ssid = ''
- form.password = ''
+ form.enabled = props.wifiEnabled ?? 1
+ form.ssid = props.wifiSsid ?? ''
+ form.password = props.wifiPassword ?? ''
}
})
@@ -107,6 +128,7 @@
try {
await formRef.value.validate()
emit('confirm', {
+ deviceIdentifier: props.deviceIdentifier,
card_no: props.cardNo || '',
enabled: form.enabled,
ssid: form.ssid,
diff --git a/src/views/asset-management/asset-information/index.vue b/src/views/asset-management/asset-information/index.vue
index d387b69..adc90cd 100644
--- a/src/views/asset-management/asset-information/index.vue
+++ b/src/views/asset-management/asset-information/index.vue
@@ -65,6 +65,8 @@
@page-change="handlePackagePageChange"
@size-change="handlePackageSizeChange"
@navigate-to-device="handleNavigateToDevice"
+ @navigate-to-order="handleNavigateToOrder"
+ @navigate-to-refund="handleNavigateToRefund"
@refresh="handlePackageRefresh"
/>
@@ -106,6 +108,9 @@