|
|
|
@ -6,7 +6,7 @@ import { isEmpty } from '@/utils/utils';
|
|
|
|
|
import useFormStore from '@/stores/FormStore';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
|
|
|
|
|
|
import { fetchSalesAgent } from '@/actions/CommonActions';
|
|
|
|
|
import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
|
|
|
|
|
import SearchInput from '@/components/SearchInput';
|
|
|
|
|
|
|
|
|
|
const { Sider, Content, Header, Footer } = Layout;
|
|
|
|
@ -19,7 +19,11 @@ const { RangePicker } = DatePicker;
|
|
|
|
|
const SearchForm = memo(function ({ initialValues, onSubmit }) {
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
function handleSubmit(values) {
|
|
|
|
|
onSubmit?.({...values, travel: values?.agent?.value || -1});
|
|
|
|
|
onSubmit?.({
|
|
|
|
|
...values,
|
|
|
|
|
travel: values?.agent?.value || '',
|
|
|
|
|
customer_name: values?.customer?.label || '',
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<Form
|
|
|
|
@ -33,57 +37,19 @@ const SearchForm = memo(function ({ initialValues, onSubmit }) {
|
|
|
|
|
<Form.Item label='顾问' name='agent' style={{ width: '200px' }}>
|
|
|
|
|
<SearchInput placeholder='搜索顾问' fetchOptions={fetchSalesAgent} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label='客人' name='orderLabel' style={{ width: '200px' }}>
|
|
|
|
|
<Form.Item label='客人' name='customer' style={{ width: '200px' }}>
|
|
|
|
|
<SearchInput placeholder='搜索客人' fetchOptions={fetchCustomerList} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{/* <Form.Item label='客人H' name='orderLabel' style={{ width: '200px' }}>
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder='请选择'
|
|
|
|
|
optionFilterProp='children'
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: 'Denise',
|
|
|
|
|
label: 'Denise',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Kennedy',
|
|
|
|
|
label: 'Kennedy',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Harsh',
|
|
|
|
|
label: 'Harsh',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'SMLiew',
|
|
|
|
|
label: 'SMLiew',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'See Kok Ching',
|
|
|
|
|
label: 'See Kok Ching',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Jonathan Michael Lilley',
|
|
|
|
|
label: 'Jonathan Michael Lilley',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Loan',
|
|
|
|
|
label: 'Loan',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Leah Belle',
|
|
|
|
|
label: 'Leah Belle',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Christelle Narvasa',
|
|
|
|
|
label: 'Christelle Narvasa',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'Mai Schaefer',
|
|
|
|
|
label: 'Mai Schaefer',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
options={[]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label='关键词' name='orderNumber'>
|
|
|
|
|
</Form.Item> */}
|
|
|
|
|
<Form.Item label='关键词' name='search'>
|
|
|
|
|
<Input placeholder='关键词' allowClear />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label='日期' name='startDate'>
|
|
|
|
|