1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package routers
- import (
- "ERP_salary/controllers"
- errorlibs "git.baozhida.cn/ERP_libs/Error"
- beego "github.com/beego/beego/v2/server/web"
- )
- func init() {
- beego.ErrorController(&errorlibs.ErrorController{})
- //过滤器,拦截所有请求
- beego.InsertFilter("/*", beego.BeforeRouter, RBACFilter)
- ns := beego.NewNamespace("/Salary",
- beego.NSRouter("/List", &controllers.SalaryController{}, "*:Salary_List"), // 薪资列表
- beego.NSRouter("/User_List", &controllers.SalaryController{}, "*:Salary_User_List"), // 我的薪资列表
- beego.NSRouter("/Get", &controllers.SalaryController{}, "*:Salary_Get"), // 获取薪资
- beego.NSRouter("/User_Get", &controllers.SalaryController{}, "*:Salary_User_Get"), // 我的薪资
- beego.NSRouter("/Post", &controllers.SalaryController{}, "*:Salary_Post"), // 添加薪资
- beego.NSRouter("/Send", &controllers.SalaryController{}, "*:Send_Salary"), // 发送薪资
- beego.NSRouter("/Excel", &controllers.SalaryController{}, "*:Salary_Excel"), // 导出excel
- )
- ns2 := beego.NewNamespace("/Reimburse",
- //-----------费用类型
- beego.NSRouter("/FeeType/List", &controllers.ReimburseController{}, "*:FeeType_List"), //费用类型列表
- //-----------费用明细
- //beego.NSRouter("/FeeDetails/List", &controllers.ReimburseController{}, "*:FeeDetails_List"), // 费用明细列表
- //-----------左侧员工列表(只显示提交过报销的)
- beego.NSRouter("/User/List", &controllers.ReimburseController{}, "*:User_List"), // 左侧用户列表
- beego.NSRouter("/List", &controllers.ReimburseController{}, "*:Reimburse_List"), // 管理员报销列表
- beego.NSRouter("/User_List", &controllers.ReimburseController{}, "*:Reimburse_User_List"), // 员工报销列表
- beego.NSRouter("/Add", &controllers.ReimburseController{}, "*:Reimburse_Add"), // 添加报销
- beego.NSRouter("/Edit", &controllers.ReimburseController{}, "*:Reimburse_Edit"), // 修改报销
- beego.NSRouter("/Del", &controllers.ReimburseController{}, "*:Reimburse_Del"), // 删除报销
- beego.NSRouter("/Get", &controllers.ReimburseController{}, "*:Reimburse_Get"), // 报销详情
- beego.NSRouter("/Submit_Audit", &controllers.ReimburseController{}, "*:Reimburse_Submit_Audit"), // 提交审核
- beego.NSRouter("/Edit_Audit", &controllers.ReimburseController{}, "*:Reimburse_Edit_Audit"), // 修改审核状态
- beego.NSRouter("/Edit_Finance", &controllers.ReimburseController{}, "*:Reimburse_Edit_Finance"), // 修改(财务)
- )
- beego.AddNamespace(ns, ns2)
- }
|