package router

import (
	"github.com/gin-gonic/gin"
	"go-admin/app/admin/apis/decision"
	"go-admin/app/admin/middleware"
	jwt "go-admin/pkg/jwtauth"
)

func registerErpDecisionRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	r := v1.Group("/decision").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())

	r.POST("report", decision.ErpDecisionReport)             // 进销存报表
	r.POST("store_sales_report", decision.ErpStoreSalesData) // 门店销售对比

	r1 := v1.Group("/decision/month_end_closing").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	r1.POST("list", decision.ErpMonthEndClosingList)      // 财务月结-列表
	r1.POST("create", decision.ErpMonthEndClosingCreate)  // 财务月结-新增
	r1.POST("audit", decision.ErpMonthEndClosingAudit)    // 财务月结-审核
	r1.POST("edit", decision.ErpMonthEndClosingEdit)      // 财务月结-编辑
	r1.POST("delete", decision.ErpMonthEndClosingDelete)  // 财务月结-删除
	r1.GET("start_date", decision.ErpMonthEndClosingDate) // 财务月结-获取开始日期
}
