修改长效套餐号跳转问题

This commit is contained in:
Eamon
2026-05-20 15:42:51 +08:00
parent fc25858e72
commit 05c927111b
9 changed files with 142 additions and 35 deletions

View File

@@ -1,6 +1,7 @@
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { format } from "date-fns"
import Link from "next/link"
import { useRouter, useSearchParams } from "next/navigation"
import { Suspense, useState } from "react"
import { Controller, useForm } from "react-hook-form"
@@ -250,7 +251,24 @@ export default function BatchPage() {
header: "会员号",
accessorFn: row => row.user?.phone || "",
},
{ header: "套餐号", accessorKey: "resource.resource_no" },
{
header: "套餐号",
accessorKey: "resource.resource_no",
cell: ({ row }) => {
const resourceNo = row.original.resource?.resource_no
const type = row.original.resource?.type
return (
<Link
href={`/resources?resource_no=${resourceNo}&type=${type}`}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600"
>
{resourceNo}
</Link>
)
},
},
{ header: "批次号", accessorKey: "batch_no" },
{ header: "省份", accessorKey: "prov" },
{ header: "城市", accessorKey: "city" },