This commit is contained in:
@@ -10,6 +10,34 @@
|
||||
返回
|
||||
</ElButton>
|
||||
<h2 class="detail-title">{{ pageTitle }}</h2>
|
||||
<ElButton
|
||||
v-if="refund && isPlatformUser && hasAuth(AUDIT_PERMISSIONS.refundEntry)"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openRefundAudit"
|
||||
>
|
||||
审计记录
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="refund && isPlatformUser && hasAuth(AUDIT_PERMISSIONS.financeTimeline)"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openRefundFinance"
|
||||
>
|
||||
资金链路
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="
|
||||
refund?.approval_instance_id &&
|
||||
isPlatformUser &&
|
||||
hasAuth(AUDIT_PERMISSIONS.resourceTimeline)
|
||||
"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openApprovalAudit"
|
||||
>
|
||||
审批审计
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="refund && canResubmit(refund) && hasAuth('refund:resubmit')"
|
||||
type="primary"
|
||||
@@ -119,16 +147,43 @@
|
||||
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
|
||||
import VoucherUpload from '@/components/business/VoucherUpload.vue'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import {
|
||||
resolveAuditResourceTarget,
|
||||
resolveFinanceAuditTarget
|
||||
} from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
|
||||
defineOptions({ name: 'RefundDetail' })
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { hasAuth } = useAuth()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const loading = ref(false)
|
||||
const refund = ref<Refund | null>(null)
|
||||
const refundVoucherFileKeys = ref<string[]>([])
|
||||
const isPlatformUser = computed(() => [1, 2].includes(Number(userStore.info.user_type)))
|
||||
const openRefundAudit = () => {
|
||||
const target = resolveAuditResourceTarget({
|
||||
resourceType: 'refund',
|
||||
internalId: refund.value?.id
|
||||
})
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
const openRefundFinance = () => {
|
||||
const target = resolveFinanceAuditTarget('refund_id', refund.value?.id)
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
const openApprovalAudit = () => {
|
||||
const target = resolveAuditResourceTarget({
|
||||
resourceType: 'approval_instance',
|
||||
internalId: refund.value?.approval_instance_id
|
||||
})
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
|
||||
const pageTitle = computed(() => `退款详情`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user