feat: 邮箱文件夹接口; 邮件列表接口

dev/ckeditor
Lei OT 4 weeks ago
parent 3519c4a414
commit 2a629df2ed

@ -78,7 +78,7 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
const { loading, mailData, orderDetail, postEmailResend } = useEmailDetail(mailID)
const [showBindBtn, setShowBindBtn] = useState(false)
useEffect(() => {
setShowBindBtn(isEmpty(mailData.info?.MAI_COLI_SN))
setShowBindBtn(mailID ? isEmpty(mailData.info?.MAI_COLI_SN) : false)
return () => {}
}, [mailData.info?.MAI_COLI_SN])
@ -117,7 +117,8 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
let btns = []
if (mailData.info.MAI_Direction !== 1) {
const showDoneBtn = mailData.info?.MAI_Direction !== 1 ? true : false
if (showDoneBtn) {
btns.push(<Button type='text' key={'set-done'} onClick={() => { alert('todo')}} icon={<MailCheckIcon className={'text-yellow-600'} />} size='small'>已处理</Button>)
}
// ``

@ -147,7 +147,7 @@ function Follow() {
const getMailList = async ({ query, order }) => {
const opi_sn = accountListDEIMapped[activeAccount].OPI_SN || 404
const x = await queryEmailListAction({ opi_sn, query, order })
const _x = x.map(ele => ({...ele, key: ele.MAI_SN, title: ele.MAI_Subject, description: ele.SenderReceiver, mailDate: ele.SRDate, orderNo: ele.MAI_COLI_ID, country: ele.CountryCN}));
const _x = x.map(ele => ({...ele, key: ele.MAI_SN, title: ele.MAI_Subject, description: ele.SenderReceiver, mailDate: ele.SRDate, orderNo: ele.MAI_COLI_ID || '', country: ele.CountryCN || ''}));
setMailList(_x);
}
@ -249,11 +249,11 @@ function Follow() {
<Layout.Content style={{ maxHeight: 'calc(100vh - 166px)', height: 'calc(100vh - 166px)', minWidth: '360px' }}>
<Row>
<Col className='bg-white' span={14}>
<Mailbox dataSource={mailList} onMailClick={id => setActiveEmailId(id)} />
<Mailbox dataSource={mailList} selectedIds={[activeEmailId]} onMailClick={id => setActiveEmailId(id)} />
</Col>
<Col span={10} style={{ height: 'calc(100vh - 166px)' }}>
<EmailDetailInline mailID={activeEmailId || 5291957} emailMsg={{}} variant={'outline'} size={'small'} />
<EmailDetailInline mailID={activeEmailId || 0} emailMsg={{}} variant={'outline'} size={'small'} />
</Col>
</Row>
</Layout.Content>

@ -89,115 +89,9 @@ const MailBox = (props) => {
size='large'
pagination={false}
dataSource={props.dataSource}
dataSource1={[...props.dataSource,
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: '250520-LSS250429038 团的 变更 <20>确认Japan Fleet',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Your Thailand Private tour by Asia Highlights 超长主题怎么办????????????到框框到得奖看到',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Personal information',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Your Future Trip with Asia Highlights',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: '回复: 回复中华游251110-LSS250413051(AH)团计划',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Greeting from Asia Highlights Alisa',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Have you made any decisions about your Japan trip',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Sri Lanka tour',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: How do you like the itinerary 3',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Re: Re: Final cost',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Reference Number: LSS240628079',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Personal information and Hiroshima tour for 2 people',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
{
key: Math.random().toString(36).substring(2, 9),
description: 'Fran Grundman <frangrundman@rogers.com>',
title: 'Re: Asia Travel Tips /LSS250429038',
mailDate: '2025-05-01 19:21:00',
orderNo: 'LSS250501006',
country: 'Thailand',
},
]}
renderItem={(item) => (
<li className='flex border border-solid border-t-0 border-x-0 border-gray-200 hover:bg-gray-100 p-2'>
<div className='flex-1'>
<li className={`flex border border-solid border-t-0 border-x-0 border-gray-200 hover:bg-gray-100 p-2 ${props?.selectedIds?.includes(item.key) ? 'bg-gray-100' : ''}`}>
<div className='flex-1' onClick={() => props?.onMailClick(item.key)}>
<Flex gap='small' vertical={true} justify='space-between' className='cursor-pointer'>
<span className="font-bold">{item.title}</span>
<span className="text-neutral-500 text-wrap break-words break-all ">{item.description + ' ' + item.mailDate}</span>

Loading…
Cancel
Save