退款审核功能:待交接取消不再自动退款,改为客服审核后原路退回

- 租客在待交接状态取消订单不再自动退款,改为 refund_status=pending_review
- 新增退款审核页面 /admin/orders/refund-review,客服可逐个审核
- 新增 POST /refund/approve 通过退款、POST /refund/reject 驳回退款
- 新增 GET /orders/refund-pending 查询待审核退款订单列表
- 优化状态标签表述:已取消→租客已取消、已关闭→客服已关闭、异常→客服介入
- 新增 refund_status: pending_review 及其前端标签「待客服审核退款」
- AdminOrderDetailView 退款状态改用统一 refundStatusLabel
This commit is contained in:
yml2213
2026-06-28 21:14:55 +08:00
parent c6c6a92645
commit c92cd03b8c
16 changed files with 492 additions and 35 deletions
+3
View File
@@ -522,6 +522,9 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
adminRoutes.POST("/orders/:id/reset-handoff", requirePerm("order:mark_abnormal"), orderHandler.AdminResetHandoff)
adminRoutes.POST("/orders/:id/refund", requirePerm("order:close"), orderHandler.AdminRefund)
adminRoutes.GET("/orders/:id/refund-status", requirePerm("order:view"), orderHandler.AdminRefundStatus)
adminRoutes.POST("/orders/:id/refund/approve", requirePerm("order:close"), orderHandler.AdminApproveRefund)
adminRoutes.POST("/orders/:id/refund/reject", requirePerm("order:close"), orderHandler.AdminRejectRefund)
adminRoutes.GET("/orders/refund-pending", requirePerm("order:close"), orderHandler.ListPendingRefund)
adminRoutes.GET("/listings", requirePerm("listing:view"), listingHandler.ListAdmin)
adminRoutes.GET("/listings/pending", requirePerm("listing:approve"), listingHandler.ListPendingReview)
adminRoutes.GET("/listings/:id", requirePerm("listing:view"), listingHandler.FindAdmin)