stock.go 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package routers
  2. import (
  3. "Medical_ERP/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. // 分组
  8. stockTemplate := beego.NewNamespace("/api/stock-template",
  9. beego.NSRouter("/in", &controllers.StockTemplateController{}, "*:StockTemplateIn"), // 入库
  10. beego.NSRouter("/in/edit", &controllers.StockTemplateController{}, "*:StockTemplateInEdit"), // 入库 - 编辑
  11. beego.NSRouter("/in/delete", &controllers.StockTemplateController{}, "*:StockTemplateInDelete"), // 入库 - 删除
  12. beego.NSRouter("/batch-in", &controllers.StockTemplateController{}, "*:BatchStockTemplateIn"), // 批量入库
  13. beego.NSRouter("/out", &controllers.StockTemplateController{}, "*:StockTemplateOut"), // 出库
  14. beego.NSRouter("/out/edit", &controllers.StockTemplateController{}, "*:StockTemplateOutEdit"), // 出库 - 编辑
  15. beego.NSRouter("/out/delete", &controllers.StockTemplateController{}, "*:StockTemplateOutDelete"), // 出库 - 删除
  16. beego.NSRouter("/batch-out", &controllers.StockTemplateController{}, "*:BatchStockTemplateOut"), // 批量出库
  17. beego.NSRouter("/in/list", &controllers.StockTemplateController{}, "*:StockTemplateInList"), // 入库列表
  18. beego.NSRouter("/out/list", &controllers.StockTemplateController{}, "*:StockTemplateOutList"), // 出库列表
  19. beego.NSRouter("/inventory/list", &controllers.StockTemplateController{}, "*:StockTemplateInventoryList"), // 收发记录
  20. beego.NSRouter("/inventory/export", &controllers.StockTemplateController{}, "*:StockTemplateInventoryExport"), // 库存 - excel
  21. beego.NSRouter("/transport-record/export", &controllers.StockTemplateController{}, "*:TransportRecordExport"), // 运输登记表
  22. beego.NSRouter("/transport-record/list", &controllers.StockTemplateController{}, "*:TransportRecordExportList"), // 运输登记表产品明细
  23. beego.NSRouter("/transport-record/barcode-info", &controllers.StockTemplateController{}, "*:GetTransportRecordBarCodeInfo"), // 获取条码信息
  24. beego.NSRouter("/scan-code-in", &controllers.StockTemplateController{}, "*:StockTemplateInScanCode"), // 扫码入库
  25. beego.NSRouter("/scan-code-out", &controllers.StockTemplateController{}, "*:StockTemplateOutScanCode"), // 扫码出库
  26. beego.NSRouter("/out/export", &controllers.StockTemplateController{}, "*:StockOutExport"), // 出库单
  27. beego.NSRouter("/refund/in/list", &controllers.StockTemplateController{}, "*:StockTemplateRefundInList"), // 退货入库列表
  28. beego.NSRouter("/refund/in", &controllers.StockTemplateController{}, "*:StockTemplateRefundIn"), // 退货入库
  29. beego.NSRouter("/refund/batch-in", &controllers.StockTemplateController{}, "*:BatchStockTemplateRefundIn"), // 批量退货入库
  30. beego.NSRouter("/refund/scan-code-in", &controllers.StockTemplateController{}, "*:StockTemplateRefundInScanCode"), // 扫码退货入库
  31. beego.NSRouter("/refund/out/list", &controllers.StockTemplateController{}, "*:StockTemplateRefundOutList"), // 退货/报废出库列表
  32. beego.NSRouter("/refund/out", &controllers.StockTemplateController{}, "*:StockTemplateRefundOut"), // 退货/报废出库
  33. beego.NSRouter("/refund/batch-out", &controllers.StockTemplateController{}, "*:BatchStockTemplateRefundOut"), // 批量退货/报废出库
  34. beego.NSRouter("/refund/scan-code-out", &controllers.StockTemplateController{}, "*:StockTemplateRefundOutScanCode"), // 扫码退货/报废出库
  35. beego.NSRouter("/refund/out/transport-record/export", &controllers.StockTemplateController{}, "*:StockRefundOutTransportRecordExport"), // 退货出库运输温度记录表
  36. beego.NSRouter("/refund/out/transport-record/list", &controllers.StockTemplateController{}, "*:StockRefundOutTransportRecordExportList"), // 运输登记表产品明细
  37. beego.NSRouter("/refund/out/barcode-info", &controllers.StockTemplateController{}, "*:GetRefundOutBarCodeInfo"), // 退货出库二维码信息
  38. beego.NSRouter("/refund/out/export", &controllers.StockTemplateController{}, "*:StockRefundOutExport"), // 退货单
  39. beego.NSRouter("/scrap/out/export", &controllers.StockTemplateController{}, "*:StockScrapOutExport"), // 退货单
  40. )
  41. stock := beego.NewNamespace("/api/stock",
  42. beego.NSRouter("/unit/list", &controllers.StockTemplateController{}, "*:StockUnitList"), // 收/发货单位列表
  43. beego.NSRouter("/operator/list", &controllers.StockTemplateController{}, "*:StockOperatorList"), // 经办人列表
  44. beego.NSRouter("/inquiry/list", &controllers.StockTemplateController{}, "*:StockInquiryList"), // 库存查询
  45. beego.NSRouter("/inquiry/get", &controllers.StockTemplateController{}, "*:GetStockInquiry"), // 库存查询-单个产品
  46. beego.NSRouter("/inquiry/excel", &controllers.StockTemplateController{}, "*:StockInquiryExcel"), // 库存查询 - excel
  47. beego.NSRouter("/stat", &controllers.StockTemplateController{}, "*:StockStat"),
  48. beego.NSRouter("/home-stat", &controllers.StockTemplateController{}, "*:StockHomeStat"),
  49. )
  50. //注册 namespace
  51. beego.AddNamespace(stockTemplate, stock)
  52. }