From 5bd27a5d17303fb405e486058fde6f04f6fd5d4c Mon Sep 17 00:00:00 2001 From: shaw Date: Fri, 19 Dec 2025 08:41:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E4=BC=98=E5=8C=96=E5=88=86?= =?UTF-8?q?=E7=BB=84=E8=A1=A8=E5=8D=95=E4=B8=AD=E8=AE=A2=E9=98=85=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 订阅模式下隐藏 Exclusive 字段并默认为开启状态 - 编辑分组时禁用计费类型字段,防止修改 - 移除编辑表单中无用的 subscription_type watch --- frontend/src/i18n/locales/en.ts | 1 + frontend/src/i18n/locales/zh.ts | 1 + frontend/src/views/admin/GroupsView.vue | 16 ++++++---------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index e6465db1..12f5885e 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -543,6 +543,7 @@ export default { title: 'Subscription Settings', type: 'Billing Type', typeHint: 'Standard billing deducts from user balance. Subscription mode uses quota limits instead.', + typeNotEditable: 'Billing type cannot be changed after group creation.', standard: 'Standard (Balance)', subscription: 'Subscription (Quota)', dailyLimit: 'Daily Limit (USD)', diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 322fc9f4..556eb742 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -598,6 +598,7 @@ export default { title: '订阅设置', type: '计费类型', typeHint: '标准计费从用户余额扣除。订阅模式使用配额限制。', + typeNotEditable: '分组创建后无法修改计费类型。', standard: '标准(余额)', subscription: '订阅(配额)', dailyLimit: '每日限额(USD)', diff --git a/frontend/src/views/admin/GroupsView.vue b/frontend/src/views/admin/GroupsView.vue index cdd6c6ce..1cfa87f8 100644 --- a/frontend/src/views/admin/GroupsView.vue +++ b/frontend/src/views/admin/GroupsView.vue @@ -180,7 +180,7 @@ />

{{ t('admin.groups.rateMultiplierHint') }}

-
+
-
+
@@ -676,16 +677,11 @@ const confirmDelete = async () => { } } -// 监听 subscription_type 变化,配额模式时重置 rate_multiplier 为 1 +// 监听 subscription_type 变化,订阅模式时重置 rate_multiplier 为 1,is_exclusive 为 true watch(() => createForm.subscription_type, (newVal) => { if (newVal === 'subscription') { createForm.rate_multiplier = 1.0 - } -}) - -watch(() => editForm.subscription_type, (newVal) => { - if (newVal === 'subscription') { - editForm.rate_multiplier = 1.0 + createForm.is_exclusive = true } })