修复:优化解绑优惠券和余额历史
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
v-if="canShowUnbind(record)"
|
||||
title="确定要解绑该用户与当前店铺的关系吗?"
|
||||
:title="getUnbindConfirmText(record)"
|
||||
@confirm="handleUnbind(record)"
|
||||
>
|
||||
<a-button type="link" size="small">
|
||||
@@ -710,6 +710,13 @@ const canShowUnbind = (record: Partial<UserVO> | Record<string, any>) => {
|
||||
return record.type !== 4
|
||||
}
|
||||
|
||||
const getUnbindConfirmText = (record: Partial<UserVO> | Record<string, any>) => {
|
||||
if (currentUserType.value === 2 && record.type === 3) {
|
||||
return '确定要解绑该美甲师与当前店铺的关系吗?解绑后该账号会同步降级为普通用户。'
|
||||
}
|
||||
return '确定要解绑该用户与当前店铺的关系吗?'
|
||||
}
|
||||
|
||||
const getSceneText = (scene?: string) => {
|
||||
const map: Record<string, string> = {
|
||||
RECHARGE: '充值',
|
||||
@@ -1097,7 +1104,11 @@ const handleUnbind = async (record: any) => {
|
||||
}
|
||||
userList.value = userList.value.filter(user => user.id !== record.id)
|
||||
pagination.total = Math.max(0, Number(pagination.total || 0) - 1)
|
||||
message.success('已解绑当前店铺下的用户')
|
||||
if (currentUserType.value === 2 && record.type === 3) {
|
||||
message.success('已解绑当前店铺下的美甲师,并已同步降级为普通用户')
|
||||
} else {
|
||||
message.success('已解绑当前店铺下的用户')
|
||||
}
|
||||
await fetchUserList()
|
||||
} catch (error) {
|
||||
console.error('解绑用户失败:', error)
|
||||
|
||||
Reference in New Issue
Block a user