师部上报
This commit is contained in:
parent
070f66b471
commit
cb2f2ef5f9
|
|
@ -596,12 +596,12 @@ function getTotalConsumed(): number {
|
||||||
}
|
}
|
||||||
|
|
||||||
function canReportConsumption(distribution: AllocationDistribution): boolean {
|
function canReportConsumption(distribution: AllocationDistribution): boolean {
|
||||||
// 师级(Division)是配额创建者,不需要上报消耗
|
|
||||||
if (authStore.organizationalLevelNum === 1) return false
|
|
||||||
// 当前用户所属单位或其上级单位的分配都可以上报消耗
|
|
||||||
if (!authStore.user) return false
|
if (!authStore.user) return false
|
||||||
|
// 如果分配目标是当前用户所属单位,则可以上报消耗
|
||||||
|
if (distribution.targetUnitId === authStore.user.organizationalUnitId) return true
|
||||||
// 营部及以下账号可以上报所属团的配额
|
// 营部及以下账号可以上报所属团的配额
|
||||||
return true
|
if (authStore.organizationalLevelNum >= 3) return true
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleReportConsumption(distribution: AllocationDistribution) {
|
function handleReportConsumption(distribution: AllocationDistribution) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user