搜索框和输入框保持一行 & 添加菜单里的页面会员号数据显示
This commit is contained in:
@@ -85,7 +85,7 @@ export default function BalancePage() {
|
||||
return (
|
||||
<Page>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="phone"
|
||||
control={control}
|
||||
@@ -142,9 +142,7 @@ export default function BalancePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
|
||||
<Button type="submit">搜索</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -157,7 +155,7 @@ export default function BalancePage() {
|
||||
>
|
||||
重置
|
||||
</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function BalancePage() {
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="bill_no"
|
||||
control={control}
|
||||
@@ -141,9 +141,7 @@ export default function BalancePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
|
||||
<Button type="submit">搜索</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -156,7 +154,7 @@ export default function BalancePage() {
|
||||
>
|
||||
重置
|
||||
</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
|
||||
@@ -111,14 +111,14 @@ export default function UserQueryPage() {
|
||||
return (
|
||||
<Page>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="phone"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>手机号</FieldLabel>
|
||||
<Input {...field} placeholder="请输入手机号" />
|
||||
@@ -133,7 +133,7 @@ export default function UserQueryPage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>姓名</FieldLabel>
|
||||
<Input {...field} placeholder="请输入姓名" />
|
||||
@@ -141,9 +141,6 @@ export default function UserQueryPage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
<Auth scope={ScopeUserWrite}>
|
||||
<AddUserDialog onSuccess={refreshTable} />
|
||||
</Auth>
|
||||
@@ -151,7 +148,7 @@ export default function UserQueryPage() {
|
||||
重置
|
||||
</Button>
|
||||
<Button type="submit">搜索</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
@@ -263,7 +260,7 @@ export default function UserQueryPage() {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/client/trade?userId=${row.original.id}`,
|
||||
`/client/trade?userId=${row.original.id}&phone=${row.original.phone}`,
|
||||
)
|
||||
}}
|
||||
>
|
||||
@@ -274,7 +271,7 @@ export default function UserQueryPage() {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/client/billing?userId=${row.original.id}`,
|
||||
`/client/billing?userId=${row.original.id}&phone=${row.original.phone}`,
|
||||
)
|
||||
}}
|
||||
>
|
||||
@@ -285,7 +282,7 @@ export default function UserQueryPage() {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/client/resources?userId=${row.original.id}`,
|
||||
`/client/resources?userId=${row.original.id}&phone=${row.original.phone}`,
|
||||
)
|
||||
}}
|
||||
>
|
||||
@@ -296,7 +293,7 @@ export default function UserQueryPage() {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/client/batch?userId=${row.original.id}`,
|
||||
`/client/batch?userId=${row.original.id}&phone=${row.original.phone}`,
|
||||
)
|
||||
}}
|
||||
>
|
||||
@@ -307,7 +304,7 @@ export default function UserQueryPage() {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/client/channel?userId=${row.original.id}`,
|
||||
`/client/channel?userId=${row.original.id}&phone=${row.original.phone}`,
|
||||
)
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -122,7 +122,7 @@ export default function TradePage() {
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="inner_no"
|
||||
control={control}
|
||||
@@ -137,7 +137,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="method"
|
||||
control={control}
|
||||
@@ -161,7 +160,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="platform"
|
||||
control={control}
|
||||
@@ -182,7 +180,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="status"
|
||||
control={control}
|
||||
@@ -204,7 +201,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="created_at_start"
|
||||
control={control}
|
||||
@@ -219,7 +215,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="created_at_end"
|
||||
control={control}
|
||||
@@ -234,9 +229,6 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
<Button type="submit">搜索</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -249,7 +241,7 @@ export default function TradePage() {
|
||||
>
|
||||
重置
|
||||
</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
@@ -330,7 +322,7 @@ export default function TradePage() {
|
||||
? "电脑网站"
|
||||
: platform === 2
|
||||
? "手机网站"
|
||||
: "-"
|
||||
: ""
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -126,14 +126,14 @@ export default function CustPage() {
|
||||
return (
|
||||
<Page>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="account"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-80 flex-none"
|
||||
className="w-80 flex"
|
||||
>
|
||||
<FieldLabel>账号/手机号/邮箱</FieldLabel>
|
||||
<Input {...field} placeholder="请输入账号/手机号/邮箱" />
|
||||
@@ -148,7 +148,7 @@ export default function CustPage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>姓名</FieldLabel>
|
||||
<Input {...field} placeholder="请输入姓名" />
|
||||
@@ -205,7 +205,7 @@ export default function CustPage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>开始时间</FieldLabel>
|
||||
<Input type="date" {...field} />
|
||||
@@ -220,7 +220,7 @@ export default function CustPage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>结束时间</FieldLabel>
|
||||
<Input type="date" {...field} />
|
||||
@@ -228,9 +228,6 @@ export default function CustPage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
<Auth scope={ScopeUserWrite}>
|
||||
<AddUserDialog onSuccess={refreshTable} />
|
||||
</Auth>
|
||||
@@ -246,7 +243,7 @@ export default function CustPage() {
|
||||
重置
|
||||
</Button>
|
||||
<Button type="submit">搜索</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
|
||||
@@ -115,14 +115,14 @@ export default function TradePage() {
|
||||
<Page>
|
||||
{/* 筛选表单 */}
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="user_phone"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>会员号</FieldLabel>
|
||||
<Input {...field} placeholder="请输入会员号" />
|
||||
@@ -137,7 +137,7 @@ export default function TradePage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>订单号</FieldLabel>
|
||||
<Input {...field} placeholder="请输入订单号" />
|
||||
@@ -219,7 +219,7 @@ export default function TradePage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>开始时间</FieldLabel>
|
||||
<Input type="date" {...field} />
|
||||
@@ -234,7 +234,7 @@ export default function TradePage() {
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>结束时间</FieldLabel>
|
||||
<Input type="date" {...field} />
|
||||
@@ -242,9 +242,7 @@ export default function TradePage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
|
||||
<Button type="submit">搜索</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -257,7 +255,7 @@ export default function TradePage() {
|
||||
>
|
||||
重置
|
||||
</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Button } from "@/components/ui/button"
|
||||
import {
|
||||
Field,
|
||||
FieldError,
|
||||
FieldGroup,
|
||||
FieldLabel,
|
||||
} from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
@@ -63,14 +62,14 @@ export default function UserPage() {
|
||||
return (
|
||||
<Page>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<div className="flex items-end gap-4">
|
||||
<Controller
|
||||
name="phone"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field
|
||||
data-invalid={fieldState.invalid}
|
||||
className="w-40 flex-none"
|
||||
className="w-40 flex"
|
||||
>
|
||||
<FieldLabel>手机号</FieldLabel>
|
||||
<Input {...field} placeholder="请输入手机号" />
|
||||
@@ -78,9 +77,7 @@ export default function UserPage() {
|
||||
</Field>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FieldGroup className="flex-row justify-start mt-4 gap-2">
|
||||
|
||||
<Button type="submit">搜索</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -89,11 +86,12 @@ export default function UserPage() {
|
||||
reset()
|
||||
setFilters({})
|
||||
setLoading(false)
|
||||
table.pagination.onPageChange(1)
|
||||
}}
|
||||
>
|
||||
重置
|
||||
</Button>
|
||||
</FieldGroup>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Suspense>
|
||||
@@ -199,4 +197,4 @@ export default function UserPage() {
|
||||
</Suspense>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user