feat(consignment): 寄售仓库增加入库时间筛选
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
ThunderboltOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import dayjs from 'dayjs'
|
||||
import {
|
||||
Alert,
|
||||
App,
|
||||
@@ -28,7 +29,9 @@ import {
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from 'antd'
|
||||
import { AdminRangePicker } from '@/components/admin/AdminDatePicker'
|
||||
import PercentTable from '@/components/common/PercentTable'
|
||||
import { ADMIN_DATE_FORMAT } from '@/lib/dayjs'
|
||||
import { buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import type { TableColumnsType } from 'antd'
|
||||
import { useState } from 'react'
|
||||
@@ -148,6 +151,7 @@ export default function ConsignmentInventoryPanel() {
|
||||
const [series, setSeries] = useState<string>('')
|
||||
const [diamondLevel, setDiamondLevel] = useState<number>(0)
|
||||
const [allowMatching, setAllowMatching] = useState<string>('')
|
||||
const [inboundRange, setInboundRange] = useState<[string, string] | null>(null)
|
||||
const [keyword, setKeyword] = useState<string>('')
|
||||
const [page, setPage] = useState<number>(1)
|
||||
const [pageSize, setPageSize] = useState<number>(20)
|
||||
@@ -205,6 +209,8 @@ export default function ConsignmentInventoryPanel() {
|
||||
series,
|
||||
diamondLevel,
|
||||
allowMatching,
|
||||
inboundRange?.[0],
|
||||
inboundRange?.[1],
|
||||
keyword,
|
||||
page,
|
||||
pageSize,
|
||||
@@ -217,6 +223,8 @@ export default function ConsignmentInventoryPanel() {
|
||||
series: series || undefined,
|
||||
diamondLevel: diamondLevel > 0 ? diamondLevel : undefined,
|
||||
allowMatching: allowMatching === 'yes' ? true : allowMatching === 'no' ? false : undefined,
|
||||
dateFrom: inboundRange?.[0],
|
||||
dateTo: inboundRange?.[1],
|
||||
keyword: keyword || undefined,
|
||||
page,
|
||||
pageSize,
|
||||
@@ -835,6 +843,21 @@ export default function ConsignmentInventoryPanel() {
|
||||
]}
|
||||
/>
|
||||
|
||||
<AdminRangePicker
|
||||
allowClear
|
||||
style={{ width: 250 }}
|
||||
placeholder={['入库开始日期', '入库结束日期']}
|
||||
value={inboundRange ? [dayjs(inboundRange[0]), dayjs(inboundRange[1])] : null}
|
||||
onChange={(dates) => {
|
||||
setInboundRange(
|
||||
dates?.[0] && dates[1]
|
||||
? [dates[0].format(ADMIN_DATE_FORMAT), dates[1].format(ADMIN_DATE_FORMAT)]
|
||||
: null,
|
||||
)
|
||||
setPage(1)
|
||||
}}
|
||||
/>
|
||||
|
||||
<Input.Search
|
||||
placeholder="搜索物品名/编号/收购人/店铺/卖家"
|
||||
allowClear
|
||||
|
||||
Reference in New Issue
Block a user