medicine_template.go 1.2 KB

123456789101112131415161718192021222324
  1. package routers
  2. import (
  3. "Medical_ERP/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. medicineTemplate := beego.NewNamespace("/api/medicine-template",
  8. beego.NSRouter("/init", &controllers.MedicineTemplateController{}, "*:Initialize"),
  9. beego.NSRouter("/list", &controllers.MedicineTemplateController{}, "*:List"),
  10. beego.NSRouter("/add", &controllers.MedicineTemplateController{}, "*:Add"),
  11. beego.NSRouter("/edit", &controllers.MedicineTemplateController{}, "*:Edit"),
  12. beego.NSRouter("/delete", &controllers.MedicineTemplateController{}, "*:Delete"),
  13. beego.NSRouter("/columns", &controllers.MedicineTemplateController{}, "*:Columns"),
  14. beego.NSRouter("/list-for-stock", &controllers.MedicineTemplateController{}, "*:ListForStock"),
  15. beego.NSRouter("/list-for-stock-out", &controllers.MedicineTemplateController{}, "*:ListForStockOut"),
  16. beego.NSRouter("/scan-code/stock-in-list", &controllers.MedicineTemplateController{}, "*:ListForStockInScanCode"), // 扫码入库列表
  17. beego.NSRouter("/scan-code/stock-out-list", &controllers.MedicineTemplateController{}, "*:ListForStockOutScanCode"), // 扫码出库列表
  18. )
  19. //注册 namespace
  20. beego.AddNamespace(medicineTemplate)
  21. }