优化体验: 缓存表单数据: 订单跟踪-高级查询

dev/chat
Lei OT 2 years ago
parent b1b2844238
commit a3285eeaec

@ -12,10 +12,10 @@ export const useFormStore = create(
// 订单跟踪页面 // 订单跟踪页面
orderFollowForm: { orderFollowForm: {
type: 'today', type: 'today',
orderStatus: '新状态', // orderStatus: '新状态',
orderNumber: '订单号', // orderNumber: '订单号',
orderLabel: '订单标签', // orderLabel: '订单标签',
startDate: '走团时间', // startDate: '走团时间',
}, },
setOrderFollowForm: (orderFollowForm) => set({ orderFollowForm }), setOrderFollowForm: (orderFollowForm) => set({ orderFollowForm }),
orderFollowAdvanceChecked: false, orderFollowAdvanceChecked: false,

@ -52,7 +52,7 @@ const AdvanceSearchForm = memo(function ({ initialValues, onSubmit }) {
layout={'vertical'} layout={'vertical'}
form={form} form={form}
initialValues={{ initialValues={{
orderLabel: '', orderStatus: '', remindState: '' orderLabel: '', orderStatus: '', remindState: '', ...initialValues
}} }}
onFinish={handleSubmit} onFinish={handleSubmit}
> >
@ -167,7 +167,7 @@ function OrderGroupTable({ formValues }) {
if (record.buytime > 0) regularText = '(R' + record.buytime + ')' if (record.buytime > 0) regularText = '(R' + record.buytime + ')'
return ( return (
<Space> <Space>
<Link to={`/order/chat/${record.COLI_SN}`} state={record}>{text + regularText}</Link> <Link to={`/order/chat/${record.COLI_SN}`} state={record} title={record.coli_guest_WhatsApp}>{text + regularText}</Link>
<Badge <Badge
count={record.unread_msg} count={record.unread_msg}
style={{ style={{
@ -357,7 +357,7 @@ function OrderFollow() {
defaultChecked={false} defaultChecked={false}
onChange={() => { toggleAdvance(!advanceChecked) }} /> onChange={() => { toggleAdvance(!advanceChecked) }} />
</Flex> </Flex>
<Conditional condition={advanceChecked} whenTrue={<AdvanceSearchForm onSubmit={handleSubmit} />} <Conditional condition={advanceChecked} whenTrue={<AdvanceSearchForm onSubmit={handleSubmit} initialValues={formValues} />}
/> />
<OrderGroupTable formValues={formValues} /> <OrderGroupTable formValues={formValues} />
</Space> </Space>

Loading…
Cancel
Save