Merge remote-tracking branch 'origin/main' into dev/chat

dev/chat
Lei OT 1 year ago
commit e466d3d414

@ -11,7 +11,7 @@
}, },
"dependencies": { "dependencies": {
"ahooks": "^3.7.8", "ahooks": "^3.7.8",
"antd": "^5.12.8", "antd": "^5.14.0",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"react": "^18.2.0", "react": "^18.2.0",

@ -1,8 +1,8 @@
import { Card, Flex, Avatar, Typography, Radio, Button, Table } from 'antd'; import { Card, Flex, Select, Typography, Radio, Button, Table } from 'antd';
import { useAuthContext } from '@/stores/AuthContext.js'; import { useAuthContext } from '@/stores/AuthContext.js';
// import { useConversationState } from '@/stores/ConversationContext'; // import { useConversationState } from '@/stores/ConversationContext';
import { useLocation, useParams } from 'react-router-dom' import { useLocation, useParams } from 'react-router-dom'
import { HomeOutlined, LoadingOutlined, SettingFilled, SmileOutlined, SyncOutlined, PhoneOutlined, MailOutlined, WhatsAppOutlined, SmileTwoTone } from '@ant-design/icons'; import { UserOutlined, EditOutlined, EllipsisOutlined, SmileOutlined, SyncOutlined, PhoneOutlined, MailOutlined, WhatsAppOutlined, SmileTwoTone } from '@ant-design/icons';
import CreatePayment from './CreatePayment'; import CreatePayment from './CreatePayment';
import QuotesHistory from './QuotesHistory'; import QuotesHistory from './QuotesHistory';
@ -36,24 +36,44 @@ const CustomerProfile = (() => {
<div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '> <div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '>
<Card className='p-2 ' <Card className='p-2 '
bordered={false} bordered={false}
title={order?.order_no} title={'Albee240210036'}
extra={<Radio.Group size={'small'} options={orderTags} value={'important'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />}> actions={[
<Meta className='py-2 text-right' <Select
// title={<Radio.Group size={'small'} options={orderStatus} value={'pending'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />} style={{
description={<Radio.Group size={'small'} options={orderStatus} value={'pending'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />} width: '100%'
/> }}
variant='borderless'
defaultValue='240003'
options={[
{ value: '240003', label: '重点' },
{ value: '240002', label: '次重点' },
{ value: '240001', label: '一般' }
]}
/>,
<Select
style={{
width: '100%'
}}
variant='borderless'
defaultValue='1'
options={[
{ value: '1', label: '新订单' },
{ value: '2', label: '报价中' },
{ value: '3', label: '以后联系' },
{ value: '4', label: '等待付订金' },
{ value: '5', label: '成行' },
{ value: '6', label: '丢失' },
{ value: '7', label: '取消' }
]}
/>
]}
>
<Flex gap={10}> <Flex gap={10}>
{/* <Avatar src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${contact?.name}`} /> */}
<Flex vertical={true} justify='space-between'> <Flex vertical={true} justify='space-between'>
<Typography.Text strong >{contact?.[0]?.name}</Typography.Text> <Typography.Text ><UserOutlined className=' pr-1' />{'Tyler-Jane Ines (R2)'}</Typography.Text>
{contact?.[0]?.phone && <Typography.Text ><PhoneOutlined className=' pr-1' />{contact?.[0]?.phone}</Typography.Text>} <Typography.Text ><PhoneOutlined className=' pr-1' />{'0118754786932'}</Typography.Text>
{contact?.[0]?.email && <Typography.Text ><MailOutlined className=' pr-1' />{contact?.[0]?.email}</Typography.Text>} <Typography.Text ><MailOutlined className=' pr-1' />{'tyler-jane@gmail.com'}</Typography.Text>
{contact?.[0]?.whatsapp_phone_number && <Typography.Text ><WhatsAppOutlined className='pr-1 text-whatsapp' />{contact?.[0]?.whatsapp_phone_number}</Typography.Text>} <Typography.Text ><WhatsAppOutlined className='pr-1' />{'0118754786932'}</Typography.Text>
{/* <div>{order?.order_no}</div> */}
{/* <div>
{order?.location} <span>{order?.local_datetime}</span>
</div>
<div></div> */}
</Flex> </Flex>
</Flex> </Flex>
</Card> </Card>
@ -65,12 +85,7 @@ const CustomerProfile = (() => {
<QuotesHistory /> <QuotesHistory />
</Flex> </Flex>
</Flex> </Flex>
{/* <pre className='p-2 overflow-auto max-h-72 m-0' dangerouslySetInnerHTML={{__html: order?.order_detail}}></pre> */}
<p className='p-2 shadow-inner overflow-auto max-h-72 m-0 break-words whitespace-pre-wrap ' dangerouslySetInnerHTML={{__html: order?.order_detail}}></p> <p className='p-2 shadow-inner overflow-auto max-h-72 m-0 break-words whitespace-pre-wrap ' dangerouslySetInnerHTML={{__html: order?.order_detail}}></p>
{/* <Flex vertical={true} className='p-2 '>
<Typography.Text strong>沟通记录</Typography.Text>
<Table size={'small'} columns={[{ title: '进程', dataIndex: 'title' }, { title: '状态', dataIndex: 'title2' },]} />
</Flex> */}
</div> </div>
); );
}); });

@ -178,7 +178,7 @@ function OrderList({ formValues }) {
{ {
title: '订单状态', title: '订单状态',
dataIndex: 'COLI_State', dataIndex: 'COLI_State',
width: 120, width: 150,
render: (text, record) => { render: (text, record) => {
let extra = '' let extra = ''
if (record.RemindState === 1) extra = '(一催)' if (record.RemindState === 1) extra = '(一催)'
@ -260,16 +260,37 @@ function OrderList({ formValues }) {
}) })
}, [formValues]) }, [formValues])
return ( const paginationProps = {
<Table key='Order Table' loading={loading} dataSource={orderData} showQuickJumper: true,
columns={orderColumns} showLessItems: true,
pagination={{ showSizeChanger: true,
showQuickJumper: true, showTotal: (total) => { return `总数:${total}` }
showLessItems: true, }
showSizeChanger: true,
showTotal: (total) => { return `总数:${total}` } return (
}} /> <Collapse defaultActiveKey={['1', '2', '3']} items={[
) {
key: '1',
label: 'AH 订单25',
children: <Table key='AH Order Table' loading={loading} dataSource={orderData}
columns={orderColumns}
pagination={paginationProps} />
},
{
key: '2',
label: 'CH 订单25',
children: <Table key='CH Order Table' loading={loading} dataSource={orderData}
columns={orderColumns}
pagination={paginationProps} />
},
{
key: '3',
label: 'GH 订单25',
children: <Table key='GH Order Table' loading={loading} dataSource={orderData}
columns={orderColumns}
pagination={paginationProps} />
}]}
/>)
} }
function OrderFollow() { function OrderFollow() {
@ -316,26 +337,8 @@ function OrderFollow() {
</Flex> </Flex>
<Conditional condition={advanceChecked} whenTrue={<AdvanceSearchForm onSubmit={handleSubmit} />} <Conditional condition={advanceChecked} whenTrue={<AdvanceSearchForm onSubmit={handleSubmit} />}
/> />
<OrderList formValues={formValues} />
</Space> </Space>
<Divider plain orientation='left'></Divider>
<Collapse defaultActiveKey={['1', '2', '3']} items={[
{
key: '1',
label: 'AH 订单25',
children: <OrderList formValues={formValues} />
},
{
key: '2',
label: 'CH 订单25',
children: <OrderList formValues={formValues} />
},
{
key: '3',
label: 'GH 订单25',
children: <OrderList formValues={formValues} />
},
]}
/>
</> </>
) )
} }

Loading…
Cancel
Save