让凭证数组与套餐作废任务进入可联调状态
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m52s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m52s
Constraint: 后端订单套餐作废接口使用 /api/admin/order-package-invalidate-tasks,上传 purpose 只能使用 attachment。 Rejected: 继续提交逗号拼接凭证字符串 | 新提交路径必须使用 string[],历史字符串只做读取归一化。 Confidence: high Scope-risk: broad Directive: 新增订单套餐作废权限时需同时配置菜单 URL 与 order_package_invalidate_task:create/detail 按钮权限。 Tested: bun run build;development 真实后端联调上传、创建、列表、详情通过;复机接口未触发。 Not-tested: 未逐一手工覆盖所有历史凭证数据、全部角色权限组合和所有文件扩展名预览
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
{
|
||||
label: '成本价',
|
||||
formatter: (_: unknown, data: PackageResponse) => {
|
||||
return `¥${(data.cost_price / 100).toFixed(2)}`
|
||||
return `¥${((data.cost_price || 0) / 100).toFixed(2)}`
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -190,10 +190,11 @@
|
||||
{
|
||||
label: '总流量',
|
||||
formatter: (_: unknown, data: PackageResponse) => {
|
||||
if (data.real_data_mb >= 1024) {
|
||||
return `${(data.real_data_mb / 1024).toFixed(2)} GB`
|
||||
const realDataMb = data.real_data_mb || 0
|
||||
if (realDataMb >= 1024) {
|
||||
return `${(realDataMb / 1024).toFixed(2)} GB`
|
||||
}
|
||||
return `${data.real_data_mb} MB`
|
||||
return `${realDataMb} MB`
|
||||
}
|
||||
},
|
||||
...(shouldHideVirtualTrafficFields.value
|
||||
@@ -209,10 +210,11 @@
|
||||
label: '虚流量额度',
|
||||
formatter: (_: unknown, data: PackageResponse) => {
|
||||
if (!data.enable_virtual_data) return '-'
|
||||
if (data.virtual_data_mb >= 1024) {
|
||||
return `${(data.virtual_data_mb / 1024).toFixed(2)} GB`
|
||||
const virtualDataMb = data.virtual_data_mb || 0
|
||||
if (virtualDataMb >= 1024) {
|
||||
return `${(virtualDataMb / 1024).toFixed(2)} GB`
|
||||
}
|
||||
return `${data.virtual_data_mb} MB`
|
||||
return `${virtualDataMb} MB`
|
||||
}
|
||||
}
|
||||
])
|
||||
@@ -243,7 +245,7 @@
|
||||
label: '下一档位比例',
|
||||
formatter: (_: unknown, data: PackageResponse) => {
|
||||
if (!data.tier_info || !data.tier_info.next_rate) return '-'
|
||||
return data.tier_info.next_rate
|
||||
return String(data.tier_info.next_rate)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -255,7 +257,7 @@
|
||||
data.tier_info.next_threshold === undefined
|
||||
)
|
||||
return '-'
|
||||
return data.tier_info.next_threshold
|
||||
return String(data.tier_info.next_threshold)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user