|
|
|
@ -3,8 +3,11 @@ import { App, Button, Form, Input } from 'antd';
|
|
|
|
|
import SearchInput from '@/components/SearchInput';
|
|
|
|
|
import { fetchSalesAgent, fetchSalesAgentWithDD } from '@/actions/CommonActions';
|
|
|
|
|
import { postAssignConversation } from '@/actions/ConversationActions';
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
|
|
|
|
|
const InputAssign = ({ initialValues, ...props }) => {
|
|
|
|
|
const [userId, username] = useAuthStore((state) => [state.loginUser.userId, state.loginUser.username]);
|
|
|
|
|
|
|
|
|
|
const { message } = App.useApp();
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
|
|
|
@ -19,6 +22,9 @@ const InputAssign = ({ initialValues, ...props }) => {
|
|
|
|
|
setSubLoading(false);
|
|
|
|
|
message.success('分配成功');
|
|
|
|
|
}
|
|
|
|
|
const assignToMe = () => {
|
|
|
|
|
form.setFieldValue('opi_sn', { label: username, value: userId });
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Form layout={'inline'} form={form} initialValues={initialValues} onFinish={handleSubmit} {...props}>
|
|
|
|
@ -28,10 +34,10 @@ const InputAssign = ({ initialValues, ...props }) => {
|
|
|
|
|
<Form.Item hidden name='conversationid'>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<div className='flex justify-end gap-2 items-end'>
|
|
|
|
|
{/* <Button type='primary' ghost htmlType='submit' size={'small'}>
|
|
|
|
|
<div className='flex justify-end gap-4 items-end'>
|
|
|
|
|
<Button type='primary' ghost size={'small'} onClick={assignToMe} disabled={subLoading}>
|
|
|
|
|
分配给我
|
|
|
|
|
</Button> */}
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type='primary' htmlType='submit' loading={subLoading}>
|
|
|
|
|
确认
|
|
|
|
|
</Button>
|
|
|
|
|