This commit is contained in:
@@ -318,6 +318,15 @@
|
||||
{ label: '未提现', prop: 'unwithdraw_commission' }
|
||||
]
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: ShopCommissionSummaryItem) => {
|
||||
if (hasAuth('agent_commission:detail')) {
|
||||
showDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 动态列配置
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
@@ -329,7 +338,20 @@
|
||||
prop: 'shop_name',
|
||||
label: '店铺名称',
|
||||
minWidth: 180,
|
||||
showOverflowTooltip: true
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: ShopCommissionSummaryItem) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.shop_name
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'username',
|
||||
@@ -566,9 +588,7 @@
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('agent_commission:detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
// 移除详情选项,通过点击店铺名称查看详情
|
||||
|
||||
return items
|
||||
})
|
||||
@@ -585,11 +605,7 @@
|
||||
const handleContextMenuSelect = (item: MenuItemType) => {
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
showDetail(currentRow.value)
|
||||
break
|
||||
}
|
||||
// 暂无其他菜单项
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user