|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { LinkOutlined, MailOutlined, PhoneOutlined, UserOutlined, WhatsAppOutlined } from '@ant-design/icons'
|
|
|
|
|
import { Card, Flex, Select, Typography } from 'antd'
|
|
|
|
|
import { Card, Flex, Select, Typography, Empty, Button } from 'antd'
|
|
|
|
|
import { useEffect } from 'react'
|
|
|
|
|
import { useParams } from 'react-router-dom'
|
|
|
|
|
|
|
|
|
@ -19,67 +19,81 @@ const CustomerProfile = (() => {
|
|
|
|
|
let regularText = ''
|
|
|
|
|
if (orderDetail.buytime > 0) regularText = '(R' + orderDetail.buytime + ')'
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '>
|
|
|
|
|
<Card className='p-2 '
|
|
|
|
|
bordered={false}
|
|
|
|
|
title={orderDetail.order_no}
|
|
|
|
|
actions={[
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%'
|
|
|
|
|
}}
|
|
|
|
|
variant='borderless'
|
|
|
|
|
onSelect={(value) => {
|
|
|
|
|
setOrderPropValue(order_sn, 'orderlabel', value)
|
|
|
|
|
}}
|
|
|
|
|
value={orderDetail.tags}
|
|
|
|
|
options={[
|
|
|
|
|
{ value: 0, label: '未设置', disabled: true, },
|
|
|
|
|
{ value: 240003, label: '重点' },
|
|
|
|
|
{ value: 240002, label: '次重点' },
|
|
|
|
|
{ value: 240001, label: '一般' }
|
|
|
|
|
]}
|
|
|
|
|
/>,
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%'
|
|
|
|
|
}}
|
|
|
|
|
variant='borderless'
|
|
|
|
|
onSelect={(value) => {
|
|
|
|
|
setOrderPropValue(order_sn,'orderstatus', value)
|
|
|
|
|
}}
|
|
|
|
|
value={orderDetail.states}
|
|
|
|
|
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 vertical={true} justify='space-between'>
|
|
|
|
|
<Typography.Text ><UserOutlined className=' pr-1' />{customerDetail.name + regularText}</Typography.Text>
|
|
|
|
|
<Typography.Text ><PhoneOutlined className=' pr-1' />{customerDetail.phone}</Typography.Text>
|
|
|
|
|
<Typography.Text ><MailOutlined className=' pr-1' />{customerDetail.email}</Typography.Text>
|
|
|
|
|
<Typography.Text ><WhatsAppOutlined className='pr-1' />{customerDetail.whatsapp_phone_number}</Typography.Text>
|
|
|
|
|
if (order_sn) {
|
|
|
|
|
return (
|
|
|
|
|
<div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '>
|
|
|
|
|
<Card className='p-2 '
|
|
|
|
|
bordered={false}
|
|
|
|
|
title={orderDetail.order_no}
|
|
|
|
|
actions={[
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%'
|
|
|
|
|
}}
|
|
|
|
|
variant='borderless'
|
|
|
|
|
onSelect={(value) => {
|
|
|
|
|
setOrderPropValue(order_sn, 'orderlabel', value)
|
|
|
|
|
}}
|
|
|
|
|
value={orderDetail.tags}
|
|
|
|
|
options={[
|
|
|
|
|
{ value: 0, label: '未设置', disabled: true, },
|
|
|
|
|
{ value: 240003, label: '重点' },
|
|
|
|
|
{ value: 240002, label: '次重点' },
|
|
|
|
|
{ value: 240001, label: '一般' }
|
|
|
|
|
]}
|
|
|
|
|
/>,
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%'
|
|
|
|
|
}}
|
|
|
|
|
variant='borderless'
|
|
|
|
|
onSelect={(value) => {
|
|
|
|
|
setOrderPropValue(order_sn,'orderstatus', value)
|
|
|
|
|
}}
|
|
|
|
|
value={orderDetail.states}
|
|
|
|
|
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 vertical={true} justify='space-between'>
|
|
|
|
|
<Typography.Text ><UserOutlined className=' pr-1' />{customerDetail.name + regularText}</Typography.Text>
|
|
|
|
|
<Typography.Text ><PhoneOutlined className=' pr-1' />{customerDetail.phone}</Typography.Text>
|
|
|
|
|
<Typography.Text ><MailOutlined className=' pr-1' />{customerDetail.email}</Typography.Text>
|
|
|
|
|
<Typography.Text ><WhatsAppOutlined className='pr-1' />{customerDetail.whatsapp_phone_number}</Typography.Text>
|
|
|
|
|
</Flex>
|
|
|
|
|
</Flex>
|
|
|
|
|
</Card>
|
|
|
|
|
<Flex vertical={true} className='p-2 '>
|
|
|
|
|
<Typography.Text strong>最新报价</Typography.Text>
|
|
|
|
|
<p className='m-0 py-2 line-clamp-2 '><a target='_blank' href={lastQuotation.letterurl}><LinkOutlined /> {lastQuotation.lettertitle}</a></p>
|
|
|
|
|
<Flex justify={'space-between'} >
|
|
|
|
|
<QuotesHistory dataSource={quotationList} />
|
|
|
|
|
</Flex>
|
|
|
|
|
</Flex>
|
|
|
|
|
</Card>
|
|
|
|
|
<Flex vertical={true} className='p-2 '>
|
|
|
|
|
<Typography.Text strong>最新报价</Typography.Text>
|
|
|
|
|
<p className='m-0 py-2 line-clamp-2 '><a target='_blank' href={lastQuotation.letterurl}><LinkOutlined /> {lastQuotation.lettertitle}</a></p>
|
|
|
|
|
<Flex justify={'space-between'} >
|
|
|
|
|
<QuotesHistory dataSource={quotationList} />
|
|
|
|
|
</Flex>
|
|
|
|
|
</Flex>
|
|
|
|
|
<p className='p-2 shadow-inner overflow-auto m-0 break-words whitespace-pre-wrap ' dangerouslySetInnerHTML={{__html: orderDetail.order_detail}}></p>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
<p className='p-2 shadow-inner overflow-auto m-0 break-words whitespace-pre-wrap ' dangerouslySetInnerHTML={{__html: orderDetail.order_detail}}></p>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
} else {
|
|
|
|
|
return (
|
|
|
|
|
<Empty
|
|
|
|
|
description={
|
|
|
|
|
<span>
|
|
|
|
|
暂无相关订单
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<Button type='primary'>现在关联</Button>
|
|
|
|
|
</Empty>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
export default CustomerProfile
|
|
|
|
|