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