fix: 优化审计
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m42s

This commit is contained in:
luo
2026-08-11 16:47:58 +08:00
parent 9599a4d52b
commit 33485b137f
49 changed files with 1263 additions and 212 deletions

View File

@@ -19,7 +19,7 @@
{{ userType === 3 ? '活动记录' : '换货审计' }}
</ElButton>
<ElButton
v-if="oldAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.resourceTimeline)"
v-if="oldAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.exchangeOldAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(oldAssetAuditTarget)"
@@ -27,7 +27,7 @@
旧资产审计
</ElButton>
<ElButton
v-if="newAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.resourceTimeline)"
v-if="newAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.exchangeNewAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(newAssetAuditTarget)"
@@ -77,10 +77,10 @@
const exchangeId = ref<number>(0)
const userType = computed(() => Number(userStore.info.user_type))
const exchangeAuditPermission = computed(() =>
userType.value === 3 ? AUDIT_PERMISSIONS.agentActivity : AUDIT_PERMISSIONS.resourceTimeline
userType.value === 3 ? AUDIT_PERMISSIONS.agentExchangeActivity : AUDIT_PERMISSIONS.exchangeEntry
)
const exchangeAuditTarget = computed(() => {
if (!exchangeDetail.value || userType.value === 4) return null
if (!exchangeDetail.value || ![1, 2, 3].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: 'exchange_order',

View File

@@ -1555,8 +1555,8 @@
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)) {
userType === 3 ? AUDIT_PERMISSIONS.agentExchangeActivity : AUDIT_PERMISSIONS.exchangeEntry
if ([1, 2, 3].includes(userType) && hasAuth(entryPermission)) {
const exchangeTarget = resolveAuditResourceTarget({
userType,
resourceType: 'exchange_order',
@@ -1574,7 +1574,7 @@
resourceType: row.old_asset_type,
internalId: row.old_asset_id
})
if (oldAssetTarget)
if (oldAssetTarget && hasAuth(AUDIT_PERMISSIONS.exchangeOldAssetEntry))
actions.push({
label: '旧资产审计',
handler: () => openAuditInvestigation(oldAssetTarget),
@@ -1584,7 +1584,7 @@
resourceType: row.new_asset_type || '',
internalId: row.new_asset_id
})
if (newAssetTarget)
if (newAssetTarget && hasAuth(AUDIT_PERMISSIONS.exchangeNewAssetEntry))
actions.push({
label: '新资产审计',
handler: () => openAuditInvestigation(newAssetTarget),