This commit is contained in:
2026-02-02 15:11:02 +08:00
parent b34c9c6c77
commit ca1b62671b
@@ -367,30 +367,15 @@ layout("/layouts/platform.html"){
},
methods: {
hasUnionRole() {
return this.$auth.hasRoleOr([
"UNION_REIMBURSEMENT_MANAGER",
"BRANCH_UNION_CHAIRMAN",
"BRANCH_UNION_WENTI_SPORTS",
"BRANCH_UNION_XJSHAN_PROMOTION",
"BRANCH_UNION_ADMIN",
"BRANCH_UNION_VICE_CHAIRMAN"
]);
return this.$auth.hasPermission('activityReimbursement.apply.unionHas')
},
hasClubRole() {
return this.$auth.hasRoleOr([
"CLUB_REIMBURSEMENT_MANAGER",
"CLUB_PRESIDENT"
]);
return this.$auth.hasPermission('activityReimbursement.apply.clubHas')
},
hasSchoolLevelRole() {
return this.$auth.hasRoleOr([
"SYSADMIN",
"SCHOOL_UNION_ADMIN",
"SCHOOL_UNION_CHAIRMAN",
"SCHOOL_UNION_VICE_CHAIRMAN"
]);
return this.$auth.hasPermission('activityReimbursement.apply.schoolHas')
},
clubIdChange() {
@@ -592,7 +577,7 @@ layout("/layouts/platform.html"){
budgetTypeCloseOption.push(typeOneOption)
}
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN","SCHOOL_UNION_CHAIRMAN","SCHOOL_UNION_VICE_CHAIRMAN"])) {
if (this.$auth.hasPermission('activityReimbursement.apply.schoolHas')) {
const allCodes = [ "ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_THREE"]
allCodes.forEach(code => {
const option = resp.find(v => v.code === code)
@@ -601,13 +586,13 @@ layout("/layouts/platform.html"){
}
})
} else {
if (this.$auth.hasRoleOr(["UNION_REIMBURSEMENT_MANAGER", "BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_WENTI_SPORTS","BRANCH_UNION_XJSHAN_PROMOTION","BRANCH_UNION_ADMIN","BRANCH_UNION_VICE_CHAIRMAN"])) {
if (this.$auth.hasPermission('activityReimbursement.apply.unionHas')) {
const typeTwoOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_TWO")
if (typeTwoOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_TWO")) {
budgetTypeCloseOption.push(typeTwoOption)
}
}
if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER", "CLUB_PRESIDENT"])) {
if (this.$auth.hasPermission('activityReimbursement.apply.clubHas')) {
const typeThreeOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_THREE")
if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) {
budgetTypeCloseOption.push(typeThreeOption)