This commit is contained in:
@@ -511,15 +511,46 @@
|
||||
{ label: '套餐名称', prop: 'package_name' },
|
||||
{ label: '所属系列', prop: 'series_name' },
|
||||
{ label: '套餐类型', prop: 'package_type' },
|
||||
{ label: '套餐周期类型', prop: 'calendar_type' },
|
||||
{ label: '有效期', prop: 'duration_months' },
|
||||
{ label: '真流量', prop: 'real_data_mb' },
|
||||
{ label: '虚流量', prop: 'virtual_data_mb' },
|
||||
{ label: '虚流量比例', prop: 'virtual_ratio' },
|
||||
{ label: '有效期', prop: 'duration_months' },
|
||||
{
|
||||
label: '启用虚流量',
|
||||
prop: 'enable_virtual_data',
|
||||
formatter: (row: any) => (row.enable_virtual_data ? '是' : '否')
|
||||
},
|
||||
{
|
||||
label: '流量重置周期',
|
||||
prop: 'data_reset_cycle',
|
||||
formatter: (row: any) => {
|
||||
const map: Record<string, string> = {
|
||||
daily: '每日',
|
||||
weekly: '每周',
|
||||
monthly: '每月',
|
||||
none: '不重置'
|
||||
}
|
||||
return map[row.data_reset_cycle] || row.data_reset_cycle || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '到期时间基准',
|
||||
prop: 'expiry_base',
|
||||
formatter: (row: any) => {
|
||||
const map: Record<string, string> = {
|
||||
from_activation: '实名激活',
|
||||
from_purchase: '购买时'
|
||||
}
|
||||
return map[row.expiry_base] || row.expiry_base || '-'
|
||||
}
|
||||
},
|
||||
{ label: '成本价', prop: 'cost_price' },
|
||||
{ label: '建议售价', prop: 'suggested_retail_price' },
|
||||
{ label: '上架状态', prop: 'shelf_status' },
|
||||
{ label: '状态', prop: 'status' },
|
||||
{ label: '创建时间', prop: 'created_at' }
|
||||
{ label: '创建时间', prop: 'created_at' },
|
||||
{ label: '更新时间', prop: 'updated_at' }
|
||||
]
|
||||
|
||||
// 表单验证规则
|
||||
@@ -729,6 +760,44 @@
|
||||
width: 100,
|
||||
formatter: (row: PackageResponse) => `${row.duration_months}月`
|
||||
},
|
||||
{
|
||||
prop: 'calendar_type',
|
||||
label: '套餐周期类型',
|
||||
width: 120,
|
||||
formatter: (row: PackageResponse) => {
|
||||
const map: Record<string, string> = {
|
||||
natural_month: '自然月',
|
||||
by_day: '按天'
|
||||
}
|
||||
return map[row.calendar_type] || row.calendar_type || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'data_reset_cycle',
|
||||
label: '流量重置周期',
|
||||
width: 120,
|
||||
formatter: (row: PackageResponse) => {
|
||||
const map: Record<string, string> = {
|
||||
daily: '每日',
|
||||
weekly: '每周',
|
||||
monthly: '每月',
|
||||
none: '不重置'
|
||||
}
|
||||
return map[row.data_reset_cycle] || row.data_reset_cycle || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'expiry_base',
|
||||
label: '到期时间基准',
|
||||
width: 120,
|
||||
formatter: (row: PackageResponse) => {
|
||||
const map: Record<string, string> = {
|
||||
from_activation: '实名激活',
|
||||
from_purchase: '购买时'
|
||||
}
|
||||
return map[row.expiry_base] || row.expiry_base || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'cost_price',
|
||||
label: '成本价',
|
||||
@@ -850,8 +919,6 @@
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
loadSeriesOptions()
|
||||
loadSearchSeriesOptions()
|
||||
getTableData()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user