This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
:actions="getActions"
|
||||
:actionsWidth="120"
|
||||
:actionsWidth="160"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
@@ -438,10 +438,15 @@
|
||||
getProcessingStatusText
|
||||
} from '@/utils/business/approvalSummary'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { resolveAuditResourceTarget } from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
|
||||
defineOptions({ name: 'ExchangeManagement' })
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
|
||||
const currentExchangeRow = ref<ExchangeResponse | null>(null)
|
||||
@@ -1548,6 +1553,45 @@
|
||||
const actions: any[] = []
|
||||
const status = row.status
|
||||
const flowType = row.flow_type || 'shipping' // 历史数据兼容
|
||||
const userType = Number(userStore.info.user_type)
|
||||
const entryPermission =
|
||||
userType === 3 ? AUDIT_PERMISSIONS.agentActivity : AUDIT_PERMISSIONS.resourceTimeline
|
||||
if (userType !== 4 && hasAuth(entryPermission)) {
|
||||
const exchangeTarget = resolveAuditResourceTarget({
|
||||
userType,
|
||||
resourceType: 'exchange_order',
|
||||
internalId: row.id,
|
||||
businessIdentifier: row.exchange_no
|
||||
})
|
||||
if (exchangeTarget)
|
||||
actions.push({
|
||||
label: userType === 3 ? '活动记录' : '换货审计',
|
||||
handler: () => openAuditInvestigation(exchangeTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
if ([1, 2].includes(userType)) {
|
||||
const oldAssetTarget = resolveAuditResourceTarget({
|
||||
resourceType: row.old_asset_type,
|
||||
internalId: row.old_asset_id
|
||||
})
|
||||
if (oldAssetTarget)
|
||||
actions.push({
|
||||
label: '旧资产审计',
|
||||
handler: () => openAuditInvestigation(oldAssetTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
const newAssetTarget = resolveAuditResourceTarget({
|
||||
resourceType: row.new_asset_type || '',
|
||||
internalId: row.new_asset_id
|
||||
})
|
||||
if (newAssetTarget)
|
||||
actions.push({
|
||||
label: '新资产审计',
|
||||
handler: () => openAuditInvestigation(newAssetTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 直接换货不支持任何操作(发货、确认完成、取消)
|
||||
if (flowType === 'direct') {
|
||||
|
||||
Reference in New Issue
Block a user