feat: 历史记录: 增加渠道和类型

dev/email
Lei OT 12 months ago
parent b37fb2c1aa
commit b0a8c149a1

@ -33,7 +33,7 @@ const Index = (props) => {
const getConversationsList = async () => {
setConversationsListLoading(true);
const params = flush(pick(formValues, ['opisn', 'whatsapp_id', 'search', 'from_date', 'end_date', 'coli_id', 'lasttime']));
const params = flush(pick(formValues, ['opisn', 'whatsapp_id', 'search', 'from_date', 'end_date', 'coli_id', 'lasttime', 'mtype', 'mchannel']));
const data = await fetchConversationsSearch({ ...params, ...pageParam, pagesize: CONVERSATION_PAGE_SIZE });
setConversationsListLoading(false);
setConversationsList(conversationsList.concat(data));

@ -1,6 +1,6 @@
/* eslint-disable react/display-name */
import { memo } from 'react';
import { Form, Flex, Input, Button, DatePicker } from 'antd';
import { Form, Flex, Input, Button, DatePicker, Select } from 'antd';
import SearchInput from '@/components/SearchInput';
import { isNotEmpty } from '@/utils/commons';
import { fetchSalesAgentWithDD as fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
@ -39,6 +39,22 @@ const SearchForm = memo(function ({ initialValues, onSubmit, onReset }) {
<Form.Item label='关键词' name='search'>
<Input placeholder='关键词' allowClear />
</Form.Item>
<Form.Item label='消息渠道' name='mchannel' className='w-52'>
<Select mode='multiple' maxTagCount={0} allowClear options={[
{ key: 'waba', label: 'WA商业号', value: 'waba' },
{ key: 'email', label: '邮件', value: 'email' },
{ key: 'whatsapp', label: 'WhatsApp', value: 'whatsapp' },
]} className='w-8' />
</Form.Item>
<Form.Item label='消息类型' name='mtype' className='w-44'>
<Select mode='multiple' maxTagCount={0} allowClear options={[
{ key: 'image', label: '图片', value: 'image' },
{ key: 'video', label: '视频', value: 'video' },
{ key: 'audio', label: '音频', value: 'audio' },
{ key: 'file', label: '文件', value: 'file' },
{ key: 'email', label: '邮件', value: 'email' },
]} className='w-8' />
</Form.Item>
<Form.Item label='日期' name='msgDateRange'>
<RangePicker format={'YYYY-MM-DD'} />
</Form.Item>

Loading…
Cancel
Save