用户管理:资金变动按钮整合为3个(钻石/H币/赊尼券变动)
This commit is contained in:
parent
4cb752ba8c
commit
12c28e4a79
|
|
@ -121,14 +121,13 @@ const formRules = computed<FormRules>(() => ({
|
||||||
|
|
||||||
// 类型标签
|
// 类型标签
|
||||||
const typeLabel = computed(() => {
|
const typeLabel = computed(() => {
|
||||||
const labels: Record<number, string> = { 1: '余额', 2: '积分', 3: '钻石' }
|
const labels: Record<number, string> = { 1: '钻石', 2: 'H币', 3: '赊尼券' }
|
||||||
return labels[props.type] || '余额'
|
return labels[props.type] || '钻石'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 对话框标题
|
// 对话框标题
|
||||||
const dialogTitle = computed(() => {
|
const dialogTitle = computed(() => {
|
||||||
const actionLabel = props.action === 'add' ? '充值' : '扣除'
|
return `${typeLabel.value}变动`
|
||||||
return `${actionLabel}${typeLabel.value}`
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 当前值标签
|
// 当前值标签
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,9 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item command="money:add">充值余额</el-dropdown-item>
|
<el-dropdown-item command="money:change">钻石变动</el-dropdown-item>
|
||||||
<el-dropdown-item command="money:sub">扣除余额</el-dropdown-item>
|
<el-dropdown-item command="integral:change">H币变动</el-dropdown-item>
|
||||||
<el-dropdown-item command="integral:add">充值积分</el-dropdown-item>
|
<el-dropdown-item command="diamond:change">赊尼券变动</el-dropdown-item>
|
||||||
<el-dropdown-item command="integral:sub">扣除积分</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="diamond:add">充值钻石</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="diamond:sub">扣除钻石</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,8 @@ const handleCommand = async (command: string, row: UserListItem) => {
|
||||||
const typeMap: Record<string, number> = { money: 1, integral: 2, diamond: 3 }
|
const typeMap: Record<string, number> = { money: 1, integral: 2, diamond: 3 }
|
||||||
|
|
||||||
moneyDialogType.value = typeMap[typeStr]
|
moneyDialogType.value = typeMap[typeStr]
|
||||||
moneyDialogAction.value = action as 'add' | 'sub'
|
// change 命令默认为充值,弹窗内可切换
|
||||||
|
moneyDialogAction.value = action === 'sub' ? 'sub' : 'add'
|
||||||
moneyDialogVisible.value = true
|
moneyDialogVisible.value = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user