Contract.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package routers
  2. import (
  3. "ERP_storage/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. contract := beego.NewNamespace("/Contract",
  8. beego.NSRouter("/List", &controllers.ContractController{}, "*:Contract_List"), // 合同列表
  9. beego.NSRouter("/User_List", &controllers.ContractController{}, "*:Contract_User_List"), // 合同列表 - 销售人员
  10. beego.NSRouter("/Get", &controllers.ContractController{}, "*:Contract_Get"), // 合同详情
  11. beego.NSRouter("/Approval", &controllers.ContractController{}, "*:Contract_Approval"), // 合同详情
  12. beego.NSRouter("/Add", &controllers.ContractController{}, "*:Contract_Add"), // 添加合同
  13. beego.NSRouter("/Edit", &controllers.ContractController{}, "*:Contract_Edit"), // 编辑合同
  14. beego.NSRouter("/Del", &controllers.ContractController{}, "*:Contract_Del"), // 删除合同
  15. beego.NSRouter("/Product_List", &controllers.ContractController{}, "*:Contract_Product_List"), // 合同产品列表
  16. beego.NSRouter("/Out_List", &controllers.ContractController{}, "*:Contract_List_For_Out"), // 合同产品列表
  17. beego.NSRouter("/Gen_Number", &controllers.ContractController{}, "*:Contract_GenT_number"), // 生成合同编号
  18. beego.NSRouter("/Stat", &controllers.ContractController{}, "*:Contract_Stat"), // 统计合同金额
  19. )
  20. verifyContract := beego.NewNamespace("/VerifyContract",
  21. beego.NSRouter("/List", &controllers.ContractController{}, "*:VerifyContract_List"), // 验证合同列表
  22. beego.NSRouter("/Add", &controllers.ContractController{}, "*:VerifyContract_Add"), // 添加验证合同
  23. beego.NSRouter("/Edit", &controllers.ContractController{}, "*:VerifyContract_Edit"), // 编辑验证合同
  24. beego.NSRouter("/Del", &controllers.ContractController{}, "*:VerifyContract_Del"), // 删除验证合同
  25. beego.NSRouter("/Customer_List", &controllers.ContractController{}, "*:VerifyContract_Customer_List"), // 验证合同客户列表
  26. beego.NSRouter("/Add_Customer", &controllers.ContractController{}, "*:VerifyContract_Add_Customer"), // 添加客户
  27. beego.NSRouter("/Update_Customer", &controllers.ContractController{}, "*:VerifyContract_Update_Customer"), // 编辑客户
  28. )
  29. recoveriesContract := beego.NewNamespace("/RecoveriesContract",
  30. beego.NSRouter("/List", &controllers.ContractController{}, "*:Contract_List_RecoveriesMoney"), // 回款明细列表
  31. )
  32. beego.AddNamespace(contract, verifyContract, recoveriesContract)
  33. }