This commit is contained in:
@@ -38,8 +38,8 @@
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
:actions="getActions"
|
||||
:actionsWidth="220"
|
||||
:inlineActionsCount="2"
|
||||
:actionsWidth="160"
|
||||
:inlineActionsCount="1"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
@@ -164,6 +164,13 @@
|
||||
} from '@/utils/business/approvalSummary'
|
||||
import { toVoucherKeyList } from '@/utils/business'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import {
|
||||
resolveAuditResourceTarget,
|
||||
resolveFinanceAuditTarget
|
||||
} from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
|
||||
import VoucherUpload from '@/components/business/VoucherUpload.vue'
|
||||
import ExportTaskCreateDialog from '@/components/business/ExportTaskCreateDialog.vue'
|
||||
@@ -174,6 +181,7 @@
|
||||
defineOptions({ name: 'RefundList' })
|
||||
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
const { hasAuth } = useAuth()
|
||||
|
||||
const loading = ref(false)
|
||||
@@ -730,6 +738,43 @@
|
||||
// 获取操作按钮
|
||||
const getActions = (row: Refund) => {
|
||||
const actions: any[] = []
|
||||
|
||||
if (
|
||||
[1, 2].includes(userStore.getUserInfo.user_type || 0) &&
|
||||
hasAuth(AUDIT_PERMISSIONS.refundEntry)
|
||||
) {
|
||||
const auditTarget = resolveAuditResourceTarget({
|
||||
userType: userStore.getUserInfo.user_type,
|
||||
resourceType: 'refund',
|
||||
internalId: row.id
|
||||
})
|
||||
if (auditTarget)
|
||||
actions.push({
|
||||
label: '审计记录',
|
||||
handler: () => openAuditInvestigation(auditTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
if (hasAuth(AUDIT_PERMISSIONS.financeTimeline)) {
|
||||
const financeTarget = resolveFinanceAuditTarget('refund_id', row.id)
|
||||
if (financeTarget)
|
||||
actions.push({
|
||||
label: '资金链路',
|
||||
handler: () => openAuditInvestigation(financeTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
const approvalTarget = resolveAuditResourceTarget({
|
||||
userType: userStore.getUserInfo.user_type,
|
||||
resourceType: 'approval_instance',
|
||||
internalId: row.approval_instance_id
|
||||
})
|
||||
if (approvalTarget)
|
||||
actions.push({
|
||||
label: '审批审计',
|
||||
handler: () => openAuditInvestigation(approvalTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
const voucherKeys = getRefundAttachmentKeys(row)
|
||||
|
||||
if (canResubmit(row) && hasAuth('refund:resubmit')) {
|
||||
|
||||
Reference in New Issue
Block a user