fix: 套餐管理国际化配置优化
This commit is contained in:
1 parent
b5eda1d6d1
commit
d48961ecf4
6 files changed
+141
-10
No files matched your search
@@ -57,6 +57,7 @@
|
|||||||
"enterpriseLeads": "Enterprise Leads",
|
"enterpriseLeads": "Enterprise Leads",
|
||||||
"licenses": "License Management",
|
"licenses": "License Management",
|
||||||
"invoices": "Invoice Management",
|
"invoices": "Invoice Management",
|
||||||
|
"packages": "Package Management",
|
||||||
"roles": "Roles & Permissions",
|
"roles": "Roles & Permissions",
|
||||||
"users": "System Users"
|
"users": "System Users"
|
||||||
},
|
},
|
||||||
@@ -80,6 +81,7 @@
|
|||||||
"enterpriseLeads": "Enterprise Leads",
|
"enterpriseLeads": "Enterprise Leads",
|
||||||
"licenses": "License Management",
|
"licenses": "License Management",
|
||||||
"invoices": "Invoice Management",
|
"invoices": "Invoice Management",
|
||||||
|
"packages": "Package Management",
|
||||||
"invoiceDetail": "Invoice Detail",
|
"invoiceDetail": "Invoice Detail",
|
||||||
"licenseList": "License List",
|
"licenseList": "License List",
|
||||||
"createLicense": "Create License",
|
"createLicense": "Create License",
|
||||||
@@ -133,6 +135,61 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"packages": {
|
||||||
|
"title": "Package Management",
|
||||||
|
"table": {
|
||||||
|
"title": "Price Package Management",
|
||||||
|
"id": "Package ID",
|
||||||
|
"name": "Package Name",
|
||||||
|
"price": "Price",
|
||||||
|
"priceSymbol": "$",
|
||||||
|
"free": "Free",
|
||||||
|
"customPlan": "Custom Plan",
|
||||||
|
"cycle": "Cycle",
|
||||||
|
"createdAt": "Created At",
|
||||||
|
"updatedAt": "Updated At",
|
||||||
|
"status": "Status",
|
||||||
|
"actions": "Actions"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"enabled": "Enabled",
|
||||||
|
"disabled": "Disabled"
|
||||||
|
},
|
||||||
|
"edit": {
|
||||||
|
"title": "Edit Package",
|
||||||
|
"name": "Package Name",
|
||||||
|
"type": "Package Type",
|
||||||
|
"types": {
|
||||||
|
"trial": "Trial Version",
|
||||||
|
"basic": "Basic",
|
||||||
|
"professional": "Professional",
|
||||||
|
"custom": "Custom"
|
||||||
|
},
|
||||||
|
"price": "Price",
|
||||||
|
"cycle": "Cycle/Description",
|
||||||
|
"description": "Package Description",
|
||||||
|
"priceDescription": "Price Description",
|
||||||
|
"features": "Package Features",
|
||||||
|
"status": "Status",
|
||||||
|
"sort": "Display Order",
|
||||||
|
"remark": "Remark",
|
||||||
|
"save": "Save Changes",
|
||||||
|
"descPlaceholder": "Experience full features, suitable for new users to trial",
|
||||||
|
"priceDescPlaceholder": "e.g. Custom Plan / Pay as you go",
|
||||||
|
"remarkPlaceholder": "Please enter remark",
|
||||||
|
"featurePlaceholder": "Please enter feature content"
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"edit": "Edit"
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"fetchError": "Failed to fetch list",
|
||||||
|
"fetchDetailError": "Failed to fetch details",
|
||||||
|
"updateSuccess": "Updated successfully",
|
||||||
|
"updateError": "Failed to update"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"invoices": {
|
"invoices": {
|
||||||
"title": "Invoice Management",
|
"title": "Invoice Management",
|
||||||
"detailTitle": "Invoice Application Detail",
|
"detailTitle": "Invoice Application Detail",
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
"enterpriseLeads": "企業リード",
|
"enterpriseLeads": "企業リード",
|
||||||
"licenses": "ライセンス管理",
|
"licenses": "ライセンス管理",
|
||||||
"invoices": "発票管理",
|
"invoices": "発票管理",
|
||||||
|
"packages": "パッケージ管理",
|
||||||
"roles": "ロールと権限",
|
"roles": "ロールと権限",
|
||||||
"users": "システムユーザー"
|
"users": "システムユーザー"
|
||||||
},
|
},
|
||||||
@@ -80,6 +81,7 @@
|
|||||||
"enterpriseLeads": "企業リード",
|
"enterpriseLeads": "企業リード",
|
||||||
"licenses": "ライセンス管理",
|
"licenses": "ライセンス管理",
|
||||||
"invoices": "発票管理",
|
"invoices": "発票管理",
|
||||||
|
"packages": "パッケージ管理",
|
||||||
"invoiceDetail": "発票申請の詳細",
|
"invoiceDetail": "発票申請の詳細",
|
||||||
"licenseList": "ライセンス一覧",
|
"licenseList": "ライセンス一覧",
|
||||||
"createLicense": "ライセンス作成",
|
"createLicense": "ライセンス作成",
|
||||||
@@ -133,6 +135,61 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"packages": {
|
||||||
|
"title": "パッケージ管理",
|
||||||
|
"table": {
|
||||||
|
"title": "価格パッケージ管理",
|
||||||
|
"id": "パッケージID",
|
||||||
|
"name": "パッケージ名",
|
||||||
|
"price": "価格",
|
||||||
|
"priceSymbol": "¥",
|
||||||
|
"free": "無料",
|
||||||
|
"customPlan": "カスタムプラン",
|
||||||
|
"cycle": "期間",
|
||||||
|
"createdAt": "作成日時",
|
||||||
|
"updatedAt": "更新日時",
|
||||||
|
"status": "ステータス",
|
||||||
|
"actions": "操作"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"enabled": "有効",
|
||||||
|
"disabled": "無効"
|
||||||
|
},
|
||||||
|
"edit": {
|
||||||
|
"title": "パッケージ編集",
|
||||||
|
"name": "パッケージ名",
|
||||||
|
"type": "パッケージタイプ",
|
||||||
|
"types": {
|
||||||
|
"trial": "試用版",
|
||||||
|
"basic": "ベーシック",
|
||||||
|
"professional": "プロフェッショナル",
|
||||||
|
"custom": "カスタム"
|
||||||
|
},
|
||||||
|
"price": "価格",
|
||||||
|
"cycle": "期間/説明",
|
||||||
|
"description": "パッケージ説明",
|
||||||
|
"priceDescription": "価格説明",
|
||||||
|
"features": "パッケージ機能",
|
||||||
|
"status": "ステータス",
|
||||||
|
"sort": "表示順序",
|
||||||
|
"remark": "備考",
|
||||||
|
"save": "変更を保存",
|
||||||
|
"descPlaceholder": "全機能を体験、新ユーザー向け試用評価に最適",
|
||||||
|
"priceDescPlaceholder": "例:カスタムプラン / 需要に応じた価格設定",
|
||||||
|
"remarkPlaceholder": "備考を入力してください",
|
||||||
|
"featurePlaceholder": "機能内容を入力してください"
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"edit": "編集"
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"fetchError": "一覧の取得に失敗しました",
|
||||||
|
"fetchDetailError": "詳細の取得に失敗しました",
|
||||||
|
"updateSuccess": "更新しました",
|
||||||
|
"updateError": "更新に失敗しました"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"invoices": {
|
"invoices": {
|
||||||
"title": "発票管理",
|
"title": "発票管理",
|
||||||
"detailTitle": "発票申請の詳細",
|
"detailTitle": "発票申請の詳細",
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
"id": "套餐ID",
|
"id": "套餐ID",
|
||||||
"name": "套餐名称",
|
"name": "套餐名称",
|
||||||
"price": "价格",
|
"price": "价格",
|
||||||
|
"priceSymbol": "¥",
|
||||||
"free": "免费",
|
"free": "免费",
|
||||||
"customPlan": "定制方案",
|
"customPlan": "定制方案",
|
||||||
"cycle": "周期",
|
"cycle": "周期",
|
||||||
@@ -191,6 +192,12 @@
|
|||||||
"title": "编辑套餐",
|
"title": "编辑套餐",
|
||||||
"name": "套餐名称",
|
"name": "套餐名称",
|
||||||
"type": "套餐类型",
|
"type": "套餐类型",
|
||||||
|
"types": {
|
||||||
|
"trial": "试用版",
|
||||||
|
"basic": "基础版",
|
||||||
|
"professional": "专业版",
|
||||||
|
"custom": "定制版"
|
||||||
|
},
|
||||||
"price": "价格",
|
"price": "价格",
|
||||||
"cycle": "周期/描述",
|
"cycle": "周期/描述",
|
||||||
"description": "套餐描述",
|
"description": "套餐描述",
|
||||||
@@ -204,6 +211,15 @@
|
|||||||
"priceDescPlaceholder": "例如:定制方案 / 按需定价",
|
"priceDescPlaceholder": "例如:定制方案 / 按需定价",
|
||||||
"remarkPlaceholder": "请输入备注",
|
"remarkPlaceholder": "请输入备注",
|
||||||
"featurePlaceholder": "请输入特性内容"
|
"featurePlaceholder": "请输入特性内容"
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"edit": "编辑"
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"fetchError": "获取列表失败",
|
||||||
|
"fetchDetailError": "获取详情失败",
|
||||||
|
"updateSuccess": "更新成功",
|
||||||
|
"updateError": "更新失败"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const routeBreadcrumbKeys: Record<string, string[]> = {
|
|||||||
'/licenses': ['licenses'],
|
'/licenses': ['licenses'],
|
||||||
'/invoices': ['invoices'],
|
'/invoices': ['invoices'],
|
||||||
'/invoices/detail': ['invoices', 'invoiceDetail'],
|
'/invoices/detail': ['invoices', 'invoiceDetail'],
|
||||||
|
'/packages': ['packages'],
|
||||||
'/roles': ['roles'],
|
'/roles': ['roles'],
|
||||||
'/users': ['users'],
|
'/users': ['users'],
|
||||||
'/login': ['login']
|
'/login': ['login']
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="t('packages.edit.type')" prop="type" class="flex-1">
|
<el-form-item :label="t('packages.edit.type')" prop="type" class="flex-1">
|
||||||
<el-select v-model="form.type" class="w-full">
|
<el-select v-model="form.type" class="w-full">
|
||||||
<el-option label="试用版" value="trial" />
|
<el-option :label="t('packages.edit.types.trial')" value="trial" />
|
||||||
<el-option label="基础版" value="basic" />
|
<el-option :label="t('packages.edit.types.basic')" value="basic" />
|
||||||
<el-option label="专业版" value="professional" />
|
<el-option :label="t('packages.edit.types.professional')" value="professional" />
|
||||||
<el-option label="定制版" value="custom" />
|
<el-option :label="t('packages.edit.types.custom')" value="custom" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
{{ t('packages.table.free') }}
|
{{ t('packages.table.free') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ typeof row.price === 'number' ? `¥${row.price}` : row.price }}
|
{{ typeof row.price === 'number' ? `${t('packages.table.priceSymbol')}${row.price}` : row.price }}
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<el-table-column :label="t('packages.table.actions')" width="100" fixed="right">
|
<el-table-column :label="t('packages.table.actions')" width="100" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button size="small" class="btn-edit" @click="handleEdit(row)">
|
<el-button size="small" class="btn-edit" @click="handleEdit(row)">
|
||||||
{{ t('enterpriseLeads.actions.edit') }}
|
{{ t('packages.actions.edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -116,7 +116,7 @@ const fetchData = async () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Fetch packages error:', error)
|
console.error('Fetch packages error:', error)
|
||||||
ElMessage.error(error.backendMessage || t('enterpriseLeads.messages.fetchError'))
|
ElMessage.error(error.backendMessage || t('packages.messages.fetchError'))
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ const handleEdit = async (row: any) => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Fetch package detail error:', error)
|
console.error('Fetch package detail error:', error)
|
||||||
ElMessage.error(error.backendMessage || t('enterpriseLeads.messages.fetchDetailError'))
|
ElMessage.error(error.backendMessage || t('packages.messages.fetchDetailError'))
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
@@ -170,12 +170,12 @@ const handleUpdate = async (updatedData: any) => {
|
|||||||
}
|
}
|
||||||
const res = await updatePackage(id, data)
|
const res = await updatePackage(id, data)
|
||||||
if (res.code === '000000') {
|
if (res.code === '000000') {
|
||||||
ElMessage.success(t('enterpriseLeads.messages.updateSuccess'))
|
ElMessage.success(t('packages.messages.updateSuccess'))
|
||||||
fetchData()
|
fetchData()
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Update package error:', error)
|
console.error('Update package error:', error)
|
||||||
ElMessage.error(error.backendMessage || t('enterpriseLeads.messages.updateError'))
|
ElMessage.error(error.backendMessage || t('packages.messages.updateError'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user