This commit is contained in:
@@ -185,7 +185,20 @@
|
||||
{
|
||||
prop: 'allocation_no',
|
||||
label: '分配单号',
|
||||
minWidth: 200
|
||||
minWidth: 200,
|
||||
formatter: (row: AssetAllocationRecord) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.allocation_no
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'allocation_name',
|
||||
@@ -323,14 +336,19 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: AssetAllocationRecord) => {
|
||||
if (hasAuth('asset_assign:view_detail')) {
|
||||
viewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 右键菜单项配置
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('asset_assign:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
return items
|
||||
})
|
||||
|
||||
@@ -347,9 +365,7 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
viewDetail(currentRow.value)
|
||||
break
|
||||
// No cases available
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -225,7 +225,20 @@
|
||||
{
|
||||
prop: 'iccid',
|
||||
label: 'ICCID',
|
||||
minWidth: 200
|
||||
minWidth: 200,
|
||||
formatter: (row: AuthorizationItem) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.iccid
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'msisdn',
|
||||
@@ -354,6 +367,15 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: AuthorizationItem) => {
|
||||
if (hasAuth('authorization_records:view_detail')) {
|
||||
viewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 显示修改备注对话框
|
||||
const showRemarkDialog = (row: AuthorizationItem) => {
|
||||
currentRecordId.value = row.id
|
||||
@@ -389,10 +411,6 @@
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('authorization_records:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (hasAuth('authorization_records:update_remark')) {
|
||||
items.push({ key: 'edit', label: '编辑' })
|
||||
}
|
||||
@@ -413,9 +431,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
viewDetail(currentRow.value)
|
||||
break
|
||||
case 'edit':
|
||||
showRemarkDialog(currentRow.value)
|
||||
break
|
||||
|
||||
@@ -247,13 +247,35 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: DeviceImportTask) => {
|
||||
if (hasAuth('device_task:view_detail')) {
|
||||
viewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 动态列配置
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
prop: 'task_no',
|
||||
label: '任务编号',
|
||||
width: 180,
|
||||
showOverflowTooltip: true
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: DeviceImportTask) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.task_no
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
@@ -612,10 +634,6 @@
|
||||
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('device_task:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (currentRow.value.fail_count > 0 && hasAuth('device_task:download_fail_data')) {
|
||||
items.push({ key: 'failData', label: '失败数据' })
|
||||
}
|
||||
@@ -636,9 +654,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
viewDetail(currentRow.value)
|
||||
break
|
||||
case 'failData':
|
||||
downloadFailDataByRow(currentRow.value)
|
||||
break
|
||||
|
||||
@@ -282,12 +282,34 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: IotCardImportTask) => {
|
||||
if (hasAuth('iot_card_task:view_detail')) {
|
||||
viewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 动态列配置
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
prop: 'task_no',
|
||||
label: '任务编号',
|
||||
width: 180
|
||||
width: 180,
|
||||
formatter: (row: IotCardImportTask) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.task_no
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
@@ -666,10 +688,6 @@
|
||||
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('iot_card_task:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (currentRow.value.fail_count > 0 && hasAuth('iot_card_task:download_fail_data')) {
|
||||
items.push({ key: 'failData', label: '失败数据' })
|
||||
}
|
||||
@@ -690,9 +708,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
viewDetail(currentRow.value)
|
||||
break
|
||||
case 'failData':
|
||||
downloadFailDataByRow(currentRow.value)
|
||||
break
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -655,7 +655,20 @@
|
||||
{
|
||||
prop: 'order_no',
|
||||
label: t('orderManagement.table.orderNo'),
|
||||
minWidth: 220
|
||||
minWidth: 220,
|
||||
formatter: (row: Order) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.order_no
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'order_type',
|
||||
@@ -1008,6 +1021,15 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: Order) => {
|
||||
if (hasAuth('orders:view_detail')) {
|
||||
showOrderDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
const handleCancelOrder = (row: Order) => {
|
||||
// 已支付的订单不能取消
|
||||
@@ -1045,10 +1067,6 @@
|
||||
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('orders:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
// 只有待支付和已支付的订单可以删除
|
||||
if (
|
||||
(currentRow.value.payment_status === 1 || currentRow.value.payment_status === 2) &&
|
||||
@@ -1073,9 +1091,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
showOrderDetail(currentRow.value)
|
||||
break
|
||||
case 'cancel':
|
||||
handleCancelOrder(currentRow.value)
|
||||
break
|
||||
|
||||
@@ -459,7 +459,20 @@
|
||||
prop: 'package_name',
|
||||
label: '套餐名称',
|
||||
minWidth: 160,
|
||||
showOverflowTooltip: true
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: PackageResponse) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.package_name
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'series_name',
|
||||
@@ -555,13 +568,6 @@
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('package:detail')) {
|
||||
items.push({
|
||||
key: 'detail',
|
||||
label: '详情'
|
||||
})
|
||||
}
|
||||
|
||||
if (hasAuth('package:edit')) {
|
||||
items.push({
|
||||
key: 'edit',
|
||||
@@ -913,6 +919,15 @@
|
||||
router.push(`${RoutesAlias.PackageDetail}/${row.id}`)
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: PackageResponse) => {
|
||||
if (hasAuth('package:detail')) {
|
||||
handleViewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 处理表格行右键菜单
|
||||
const handleRowContextMenu = (row: PackageResponse, column: any, event: MouseEvent) => {
|
||||
event.preventDefault()
|
||||
@@ -926,9 +941,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
handleViewDetail(currentRow.value)
|
||||
break
|
||||
case 'edit':
|
||||
showDialog('edit', currentRow.value)
|
||||
break
|
||||
|
||||
@@ -545,7 +545,20 @@
|
||||
{
|
||||
prop: 'series_name',
|
||||
label: '系列名称',
|
||||
minWidth: 150
|
||||
minWidth: 150,
|
||||
formatter: (row: PackageSeriesResponse) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.series_name
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
@@ -723,14 +736,6 @@
|
||||
const seriesOperationMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
// 详情
|
||||
if (hasAuth('package_series:detail')) {
|
||||
items.push({
|
||||
key: 'detail',
|
||||
label: '详情'
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑
|
||||
if (hasAuth('package_series:edit')) {
|
||||
items.push({
|
||||
@@ -761,11 +766,7 @@
|
||||
// 处理表格行右键菜单
|
||||
const handleRowContextMenu = (row: PackageSeriesResponse, column: any, event: MouseEvent) => {
|
||||
// 如果用户有编辑或删除权限,显示右键菜单
|
||||
if (
|
||||
hasAuth('package_series:edit') ||
|
||||
hasAuth('package_series:delete') ||
|
||||
hasAuth('package_series:detail')
|
||||
) {
|
||||
if (hasAuth('package_series:edit') || hasAuth('package_series:delete')) {
|
||||
showSeriesOperationMenu(event, row)
|
||||
}
|
||||
}
|
||||
@@ -775,9 +776,6 @@
|
||||
if (!currentOperatingSeries.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
handleViewDetail(currentOperatingSeries.value)
|
||||
break
|
||||
case 'edit':
|
||||
showDialog('edit', currentOperatingSeries.value)
|
||||
break
|
||||
@@ -1105,6 +1103,15 @@
|
||||
const handleViewDetail = (row: PackageSeriesResponse) => {
|
||||
router.push(`/package-management/package-series/detail/${row.id}`)
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: PackageSeriesResponse) => {
|
||||
if (hasAuth('package_series:detail')) {
|
||||
handleViewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -613,7 +613,20 @@
|
||||
{
|
||||
prop: 'series_name',
|
||||
label: '系列名称',
|
||||
minWidth: 150
|
||||
minWidth: 150,
|
||||
formatter: (row: ShopSeriesGrantResponse) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.series_name
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'shop_name',
|
||||
@@ -1287,6 +1300,15 @@
|
||||
router.push(`/package-management/series-grants/detail/${row.id}`)
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: ShopSeriesGrantResponse) => {
|
||||
if (hasAuth('series_grants:detail')) {
|
||||
handleViewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 删除分配
|
||||
const deleteAllocation = (row: ShopSeriesGrantResponse) => {
|
||||
ElMessageBox.confirm(
|
||||
@@ -1392,10 +1414,6 @@
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('series_grants:detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (hasAuth('series_grants:edit')) {
|
||||
items.push({ key: 'edit', label: '编辑' })
|
||||
}
|
||||
@@ -1420,9 +1438,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
handleViewDetail(currentRow.value)
|
||||
break
|
||||
case 'edit':
|
||||
showDialog('edit', currentRow.value)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user