调整模型枚举字段值

This commit is contained in:
2025-04-30 17:47:27 +08:00
parent 6d30c19ffb
commit 78f60c94e6

View File

@@ -19,7 +19,7 @@ import Page from '@/components/page'
import Link from 'next/link'
const filterSchema = zod.object({
type: zod.enum(['all', '0', '1', '2']).default('all'),
type: zod.enum(['all', '3', '1', '2']).default('all'),
create_after: zod.date().optional(),
create_before: zod.date().optional(),
})
@@ -111,7 +111,7 @@ export default function BillsPage(props: BillsPageProps) {
</SelectTrigger>
<SelectContent>
<SelectItem value={`all`}></SelectItem>
<SelectItem value={`0`}></SelectItem>
<SelectItem value={`3`}></SelectItem>
<SelectItem value={`1`}></SelectItem>
<SelectItem value={`2`}>退</SelectItem>
</SelectContent>
@@ -176,7 +176,7 @@ export default function BillsPage(props: BillsPageProps) {
}, {
accessorKey: 'type', header: `类型`, cell: ({row}) => (
<div className={`flex gap-2 items-center`}>
{row.original.type === 0 && (
{row.original.type === 2 && (
<div className={`flex gap-2 items-center bg-blue-50 w-fit px-2 py-1 rounded-md`}>
<CreditCard size={16}/>
<span></span>