详情修改
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m48s

This commit is contained in:
sexygoat
2026-03-06 17:51:27 +08:00
parent 1ebc0b8929
commit 8fbc321a5e
9 changed files with 211 additions and 85 deletions

View File

@@ -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>