package routers import ( "ERP_storage/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { device := beego.NewNamespace("/Device", beego.NSRouter("/List", &controllers.StockController{}, "*:Device_List"), // 设备列表 beego.NSRouter("/Check", &controllers.StockController{}, "*:Device_Check"), // 检查设备 ) stock := beego.NewNamespace("/Stock", beego.NSRouter("/List", &controllers.StockController{}, "*:Stock_List"), // 库存列表 beego.NSRouter("/Edit_Sort", &controllers.StockController{}, "*:Stock_Edit_Sort"), // 修改排序 beego.NSRouter("/Detail_List", &controllers.StockController{}, "*:Stock_Detail_List"), // 库存明细列表 beego.NSRouter("/Detail_Excel", &controllers.StockController{}, "*:Stock_Detail_Excel"), // 导出库存明细列表 ) stockIn := beego.NewNamespace("/StockIn", beego.NSRouter("/List", &controllers.StockController{}, "*:StockIn_List"), // 入库列表 beego.NSRouter("/List_Product", &controllers.StockController{}, "*:StockIn_List_Product"), // 入库列表 - 带产品明细 beego.NSRouter("/List_Product_Excel", &controllers.StockController{}, "*:StockIn_List_Product_Excel"), // 入库产品明细excel beego.NSRouter("/Get", &controllers.StockController{}, "*:StockIn_Get"), // 入库详情 beego.NSRouter("/Add", &controllers.StockController{}, "*:StockIn_Add"), // 入库 beego.NSRouter("/Edit", &controllers.StockController{}, "*:StockIn_Edit"), // 修改入库 beego.NSRouter("/Del", &controllers.StockController{}, "*:StockIn_Del"), // 删除入库 beego.NSRouter("/Excel", &controllers.StockController{}, "*:StockIn_Excel"), // 导出入库 ) stockOut := beego.NewNamespace("/StockOut", beego.NSRouter("/List", &controllers.StockController{}, "*:StockOut_List"), // 出库列表 beego.NSRouter("/List_Product", &controllers.StockController{}, "*:StockOut_List_Product"), // 出库列表 - 带产品明细 beego.NSRouter("/List_Product_Excel", &controllers.StockController{}, "*:StockOut_List_Product_Excel"), // 出库产品明细excel beego.NSRouter("/Get", &controllers.StockController{}, "*:StockOut_Get"), // 出库详情 beego.NSRouter("/Add", &controllers.StockController{}, "*:StockOut_Add"), // 出库 beego.NSRouter("/Edit_Delivery", &controllers.StockController{}, "*:StockOut_Edit_Delivery"), // 修改发货单 beego.NSRouter("/Edit", &controllers.StockController{}, "*:StockOut_Edit"), // 修改出库 beego.NSRouter("/Del", &controllers.StockController{}, "*:StockOut_Del"), // 删除出库 beego.NSRouter("/Excel", &controllers.StockController{}, "*:StockOut_Excel"), // 导出出库 ) beego.AddNamespace(device, stock, stockIn, stockOut) }