|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { useEffect } from 'react'
|
|
|
|
|
import { useLocation, useParams } from 'react-router-dom'
|
|
|
|
|
import { Card, Flex, Select, Typography, Radio, Button, Table } from 'antd'
|
|
|
|
|
import { Card, Flex, Select, Typography, List, Button, Table } from 'antd'
|
|
|
|
|
import { useAuthContext } from '@/stores/AuthContext.js'
|
|
|
|
|
import { UserOutlined, LinkOutlined, EllipsisOutlined, SmileOutlined, SyncOutlined, PhoneOutlined, MailOutlined, WhatsAppOutlined, SmileTwoTone } from '@ant-design/icons'
|
|
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ import useOrderStore from '@/stores/OrderStore'
|
|
|
|
|
|
|
|
|
|
const CustomerProfile = (() => {
|
|
|
|
|
const { order_sn: order_sn } = useParams()
|
|
|
|
|
const { orderDetail, customerDetail, lastQuotation,
|
|
|
|
|
const { orderDetail, customerDetail, lastQuotation, quotationList,
|
|
|
|
|
fetchOrderDetail, setOrderPropValue
|
|
|
|
|
} = useOrderStore()
|
|
|
|
|
|
|
|
|
@ -18,6 +18,14 @@ const CustomerProfile = (() => {
|
|
|
|
|
fetchOrderDetail(order_sn)
|
|
|
|
|
}, [order_sn])
|
|
|
|
|
|
|
|
|
|
const paginationProps = {
|
|
|
|
|
showLessItems: true,
|
|
|
|
|
showTotal: (total) => { return `总数:${total}` }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 '
|
|
|
|
@ -65,7 +73,7 @@ const CustomerProfile = (() => {
|
|
|
|
|
>
|
|
|
|
|
<Flex gap={10}>
|
|
|
|
|
<Flex vertical={true} justify='space-between'>
|
|
|
|
|
<Typography.Text ><UserOutlined className=' pr-1' />{customerDetail.name}</Typography.Text>
|
|
|
|
|
<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>
|
|
|
|
@ -76,9 +84,24 @@ const CustomerProfile = (() => {
|
|
|
|
|
<Typography.Text strong>最新报价</Typography.Text>
|
|
|
|
|
<p className='m-0 py-2 line-clamp-2 '><a target='_blank' href={lastQuotation.letterurl}>{lastQuotation.lettertitle}<LinkOutlined /></a></p>
|
|
|
|
|
<Flex justify={'space-between'} >
|
|
|
|
|
<CreatePayment />
|
|
|
|
|
<QuotesHistory />
|
|
|
|
|
</Flex>
|
|
|
|
|
|
|
|
|
|
<List
|
|
|
|
|
itemLayout="vertical"
|
|
|
|
|
pagination={paginationProps}
|
|
|
|
|
dataSource={quotationList}
|
|
|
|
|
renderItem={(item) => (
|
|
|
|
|
<List.Item
|
|
|
|
|
key={item.letterid}
|
|
|
|
|
>
|
|
|
|
|
<List.Item.Meta
|
|
|
|
|
title={<a href={item.letterurl}>{item.lettertitle}</a>}
|
|
|
|
|
description={item.letterdate}
|
|
|
|
|
/>
|
|
|
|
|
</List.Item>
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
</Flex>
|
|
|
|
|
<p className='p-2 shadow-inner overflow-auto max-h-72 m-0 break-words whitespace-pre-wrap ' dangerouslySetInnerHTML={{__html: orderDetail.order_detail}}></p>
|
|
|
|
|
</div>
|
|
|
|
|