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

dev/chat
Lei OT 1 year ago
commit e466d3d414

@ -11,7 +11,7 @@
},
"dependencies": {
"ahooks": "^3.7.8",
"antd": "^5.12.8",
"antd": "^5.14.0",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.10",
"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 { useConversationState } from '@/stores/ConversationContext';
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 QuotesHistory from './QuotesHistory';
@ -36,24 +36,44 @@ const CustomerProfile = (() => {
<div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '>
<Card className='p-2 '
bordered={false}
title={order?.order_no}
extra={<Radio.Group size={'small'} options={orderTags} value={'important'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />}>
<Meta className='py-2 text-right'
// title={<Radio.Group size={'small'} options={orderStatus} value={'pending'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />}
description={<Radio.Group size={'small'} options={orderStatus} value={'pending'} onChange={({ target: { value } }) => {}} optionType='button' buttonStyle={'solid'} />}
/>
title={'Albee240210036'}
actions={[
<Select
style={{
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}>
{/* <Avatar src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${contact?.name}`} /> */}
<Flex vertical={true} justify='space-between'>
<Typography.Text strong >{contact?.[0]?.name}</Typography.Text>
{contact?.[0]?.phone && <Typography.Text ><PhoneOutlined className=' pr-1' />{contact?.[0]?.phone}</Typography.Text>}
{contact?.[0]?.email && <Typography.Text ><MailOutlined className=' pr-1' />{contact?.[0]?.email}</Typography.Text>}
{contact?.[0]?.whatsapp_phone_number && <Typography.Text ><WhatsAppOutlined className='pr-1 text-whatsapp' />{contact?.[0]?.whatsapp_phone_number}</Typography.Text>}
{/* <div>{order?.order_no}</div> */}
{/* <div>
{order?.location} <span>{order?.local_datetime}</span>
</div>
<div></div> */}
<Typography.Text ><UserOutlined className=' pr-1' />{'Tyler-Jane Ines (R2)'}</Typography.Text>
<Typography.Text ><PhoneOutlined className=' pr-1' />{'0118754786932'}</Typography.Text>
<Typography.Text ><MailOutlined className=' pr-1' />{'tyler-jane@gmail.com'}</Typography.Text>
<Typography.Text ><WhatsAppOutlined className='pr-1' />{'0118754786932'}</Typography.Text>
</Flex>
</Flex>
</Card>
@ -65,12 +85,7 @@ const CustomerProfile = (() => {
<QuotesHistory />
</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>
{/* <Flex vertical={true} className='p-2 '>
<Typography.Text strong>沟通记录</Typography.Text>
<Table size={'small'} columns={[{ title: '进程', dataIndex: 'title' }, { title: '状态', dataIndex: 'title2' },]} />
</Flex> */}
</div>
);
});

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