This commit is contained in:
张成
2026-04-01 10:37:51 +08:00
parent 494555a6e1
commit 7199c6b5cf
10 changed files with 187 additions and 17 deletions

View File

@@ -85,9 +85,9 @@
</Form>
</Modal>
<Modal v-model="upgradeModal" title="升级套餐" :loading="saving" @on-ok="submitUpgrade">
<Modal v-model="upgradeModal" title="编辑订阅" :loading="saving" @on-ok="submitUpgrade">
<Form :label-width="100">
<FormItem label="套餐">
<FormItem label="套餐">
<Select v-model="upgradeForm.new_plan_id" filterable clearable placeholder="请选择" style="width: 100%">
<Option v-for="p in bizPlanOptions" :key="p.id" :value="p.id">{{ bizPlanLabel(p) }}</Option>
</Select>
@@ -141,7 +141,7 @@ export default {
render: (h, p) =>
h('div', [
h('Button', { props: { size: 'small' }, on: { click: () => this.openRenew(p.row) } }, '续费'),
h('Button', { props: { size: 'small' }, class: { ml8: true }, on: { click: () => this.openUpgrade(p.row) } }, '升级'),
h('Button', { props: { size: 'small' }, class: { ml8: true }, on: { click: () => this.openUpgrade(p.row) } }, '编辑'),
h('Button', { props: { type: 'error', size: 'small' }, class: { ml8: true }, on: { click: () => this.doCancel(p.row) } }, '取消'),
]),
},
@@ -268,7 +268,7 @@ export default {
if (!this.currentRow) return false
const np = this.upgradeForm.new_plan_id
if (np === undefined || np === null || np === '') {
this.$Message.warning('请选择套餐')
this.$Message.warning('请选择套餐')
return false
}
this.saving = true
@@ -289,7 +289,7 @@ export default {
end_time: this.upgradeForm.end_time || undefined,
})
if (res && res.code === 0) {
this.$Message.success('已升级')
this.$Message.success('已保存')
this.upgradeModal = false
this.load(1)
} else {