This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<ElButton type="primary" @click="showDialog('add')" v-permission="'package:add'">新增套餐</ElButton>
|
||||
<ElButton type="primary" @click="showDialog('add')" v-permission="'package:add'"
|
||||
>新增套餐</ElButton
|
||||
>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -50,13 +52,13 @@
|
||||
>
|
||||
<ElForm ref="formRef" :model="form" :rules="rules" label-width="150px">
|
||||
<ElFormItem label="套餐编码" prop="package_code">
|
||||
<div style="display: flex; gap: 8px;">
|
||||
<div style="display: flex; gap: 8px">
|
||||
<ElInput
|
||||
v-model="form.package_code"
|
||||
placeholder="请输入套餐编码或点击生成"
|
||||
:disabled="dialogType === 'edit'"
|
||||
clearable
|
||||
style="flex: 1;"
|
||||
style="flex: 1"
|
||||
/>
|
||||
<ElButton v-if="dialogType === 'add'" @click="handleGeneratePackageCode">
|
||||
生成编码
|
||||
@@ -478,14 +480,14 @@
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
width: 200,
|
||||
width: 220,
|
||||
fixed: 'right',
|
||||
formatter: (row: PackageResponse) => {
|
||||
const buttons = []
|
||||
|
||||
buttons.push(
|
||||
h(ArtButtonTable, {
|
||||
type: 'view',
|
||||
text: '详情',
|
||||
onClick: () => handleViewDetail(row)
|
||||
})
|
||||
)
|
||||
@@ -493,7 +495,7 @@
|
||||
if (hasAuth('package:edit')) {
|
||||
buttons.push(
|
||||
h(ArtButtonTable, {
|
||||
type: 'edit',
|
||||
text: '编辑',
|
||||
onClick: () => showDialog('edit', row)
|
||||
})
|
||||
)
|
||||
@@ -502,7 +504,7 @@
|
||||
if (hasAuth('package:delete')) {
|
||||
buttons.push(
|
||||
h(ArtButtonTable, {
|
||||
type: 'delete',
|
||||
text: '删除',
|
||||
onClick: () => deletePackage(row)
|
||||
})
|
||||
)
|
||||
@@ -661,7 +663,9 @@
|
||||
form.virtual_data_mb = row.virtual_data_mb || 0
|
||||
form.duration_months = row.duration_months
|
||||
form.cost_price = row.cost_price / 100 // 分转换为元显示
|
||||
form.suggested_retail_price = row.suggested_retail_price ? row.suggested_retail_price / 100 : undefined
|
||||
form.suggested_retail_price = row.suggested_retail_price
|
||||
? row.suggested_retail_price / 100
|
||||
: undefined
|
||||
form.description = row.description || ''
|
||||
} else {
|
||||
form.id = 0
|
||||
|
||||
Reference in New Issue
Block a user