Stock.go 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package routers
  2. import (
  3. "ERP_storage/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. device := beego.NewNamespace("/Device",
  8. beego.NSRouter("/List", &controllers.StockController{}, "*:Device_List"), // 设备列表
  9. beego.NSRouter("/Check", &controllers.StockController{}, "*:Device_Check"), // 检查设备
  10. )
  11. stock := beego.NewNamespace("/Stock",
  12. beego.NSRouter("/List", &controllers.StockController{}, "*:Stock_List"), // 库存列表
  13. beego.NSRouter("/Edit_Sort", &controllers.StockController{}, "*:Stock_Edit_Sort"), // 修改排序
  14. beego.NSRouter("/Detail_List", &controllers.StockController{}, "*:Stock_Detail_List"), // 库存明细列表
  15. beego.NSRouter("/Detail_Excel", &controllers.StockController{}, "*:Stock_Detail_Excel"), // 导出库存明细列表
  16. )
  17. stockIn := beego.NewNamespace("/StockIn",
  18. beego.NSRouter("/List", &controllers.StockController{}, "*:StockIn_List"), // 入库列表
  19. beego.NSRouter("/List_Product", &controllers.StockController{}, "*:StockIn_List_Product"), // 入库列表 - 带产品明细
  20. beego.NSRouter("/List_Product_Excel", &controllers.StockController{}, "*:StockIn_List_Product_Excel"), // 入库产品明细excel
  21. beego.NSRouter("/Get", &controllers.StockController{}, "*:StockIn_Get"), // 入库详情
  22. beego.NSRouter("/Add", &controllers.StockController{}, "*:StockIn_Add"), // 入库
  23. beego.NSRouter("/Edit", &controllers.StockController{}, "*:StockIn_Edit"), // 修改入库
  24. beego.NSRouter("/Del", &controllers.StockController{}, "*:StockIn_Del"), // 删除入库
  25. beego.NSRouter("/Excel", &controllers.StockController{}, "*:StockIn_Excel"), // 导出入库
  26. )
  27. stockOut := beego.NewNamespace("/StockOut",
  28. beego.NSRouter("/List", &controllers.StockController{}, "*:StockOut_List"), // 出库列表
  29. beego.NSRouter("/List_Product", &controllers.StockController{}, "*:StockOut_List_Product"), // 出库列表 - 带产品明细
  30. beego.NSRouter("/List_Product_Excel", &controllers.StockController{}, "*:StockOut_List_Product_Excel"), // 出库产品明细excel
  31. beego.NSRouter("/Get", &controllers.StockController{}, "*:StockOut_Get"), // 出库详情
  32. beego.NSRouter("/Add", &controllers.StockController{}, "*:StockOut_Add"), // 出库
  33. beego.NSRouter("/Edit_Delivery", &controllers.StockController{}, "*:StockOut_Edit_Delivery"), // 修改发货单
  34. beego.NSRouter("/Edit", &controllers.StockController{}, "*:StockOut_Edit"), // 修改出库
  35. beego.NSRouter("/Del", &controllers.StockController{}, "*:StockOut_Del"), // 删除出库
  36. beego.NSRouter("/Excel", &controllers.StockController{}, "*:StockOut_Excel"), // 导出出库
  37. )
  38. beego.AddNamespace(device, stock, stockIn, stockOut)
  39. }