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: { methods: {
hasUnionRole() { hasUnionRole() {
return this.$auth.hasRoleOr([ return this.$auth.hasPermission('activityReimbursement.apply.unionHas')
"UNION_REIMBURSEMENT_MANAGER",
"BRANCH_UNION_CHAIRMAN",
"BRANCH_UNION_WENTI_SPORTS",
"BRANCH_UNION_XJSHAN_PROMOTION",
"BRANCH_UNION_ADMIN",
"BRANCH_UNION_VICE_CHAIRMAN"
]);
}, },
hasClubRole() { hasClubRole() {
return this.$auth.hasRoleOr([ return this.$auth.hasPermission('activityReimbursement.apply.clubHas')
"CLUB_REIMBURSEMENT_MANAGER",
"CLUB_PRESIDENT"
]);
}, },
hasSchoolLevelRole() { hasSchoolLevelRole() {
return this.$auth.hasRoleOr([ return this.$auth.hasPermission('activityReimbursement.apply.schoolHas')
"SYSADMIN",
"SCHOOL_UNION_ADMIN",
"SCHOOL_UNION_CHAIRMAN",
"SCHOOL_UNION_VICE_CHAIRMAN"
]);
}, },
clubIdChange() { clubIdChange() {
@@ -592,7 +577,7 @@ layout("/layouts/platform.html"){
budgetTypeCloseOption.push(typeOneOption) 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"] const allCodes = [ "ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_THREE"]
allCodes.forEach(code => { allCodes.forEach(code => {
const option = resp.find(v => v.code === code) const option = resp.find(v => v.code === code)
@@ -601,13 +586,13 @@ layout("/layouts/platform.html"){
} }
}) })
} else { } 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") const typeTwoOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_TWO")
if (typeTwoOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_TWO")) { if (typeTwoOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_TWO")) {
budgetTypeCloseOption.push(typeTwoOption) 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") const typeThreeOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_THREE")
if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) { if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) {
budgetTypeCloseOption.push(typeThreeOption) budgetTypeCloseOption.push(typeThreeOption)