完成分配新会话

dev/timezone
Lei OT 1 year ago
parent d753904f39
commit 08746c031a

@ -14,7 +14,7 @@ export const fetchSalesAgent = async (q) => {
*/
export const fetchSalesAgentWithDD = async (q) => {
const { errcode, result } = await fetchJSON(`${API_HOST}/opi_with_dingtalk`, { q });
return errcode !== 0 ? [] : result.map((ele) => ({ ...ele, label: ele.cn_name, value: ele.op_id }));
return errcode !== 0 ? [] : result.map((ele) => ({ ...ele, label: ele.cn_name, value: ele.op_id, key: ele.op_id }));
};
/**

@ -3,7 +3,7 @@ import { memo } from 'react';
import { Form, Flex, Input, Button, DatePicker } from 'antd';
import SearchInput from '@/components/SearchInput';
import { isNotEmpty } from '@/utils/commons';
import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
import { fetchSalesAgentWithDD as fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
const { RangePicker } = DatePicker;
const SearchForm = memo(function ({ initialValues, onSubmit, onReset }) {

@ -1,7 +1,7 @@
import { useState } from 'react';
import { App, Button, Form, Input } from 'antd';
import SearchInput from '@/components/SearchInput';
import { fetchSalesAgent, fetchSalesAgentWithDD } from '@/actions/CommonActions';
import { fetchSalesAgentWithDD } from '@/actions/CommonActions';
import { postAssignConversation } from '@/actions/ConversationActions';
import useAuthStore from '@/stores/AuthStore';
@ -29,7 +29,7 @@ const InputAssign = ({ initialValues, ...props }) => {
<>
<Form layout={'inline'} form={form} initialValues={initialValues} onFinish={handleSubmit} {...props}>
<Form.Item label='分配至' name='opi_sn' rules={[{ required: true, message: '请选择分配的顾问' }]}>
<SearchInput placeholder='搜索顾问, 如Coco' fetchOptions={fetchSalesAgent} allowClear={true} />
<SearchInput placeholder='搜索顾问, 如Coco' fetchOptions={fetchSalesAgentWithDD} allowClear={true} />
</Form.Item>
<Form.Item hidden name='conversationid'>
<Input />

Loading…
Cancel
Save