|
|
|
@ -6,7 +6,7 @@ import { isEmpty, TagColorStyle } from '@/utils/commons'
|
|
|
|
|
import EmailEditorPopup from '../Input/EmailEditorPopup'
|
|
|
|
|
import DnDModal from '@/components/DnDModal'
|
|
|
|
|
import useStyleStore from '@/stores/StyleStore'
|
|
|
|
|
import { openPopup, useEmailDetail } from '@/hooks/useEmail'
|
|
|
|
|
import { openPopup, useEmailDetail, useEmailList, } from '@/hooks/useEmail'
|
|
|
|
|
import { EMAIL_ATTA_HOST, POPUP_FEATURES } from '@/config'
|
|
|
|
|
import EmailBindFormModal from './EmailBind'
|
|
|
|
|
import EmailContent from './EmailContent'
|
|
|
|
@ -103,6 +103,22 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleDel = async () => {
|
|
|
|
|
if (isEmpty(mai_sn)) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
//
|
|
|
|
|
} catch (err) {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: '请求失败',
|
|
|
|
|
description: err.message,
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 3,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const FileTypeIcon = ({fileName}) => {
|
|
|
|
|
const ext = fileName.split('.').pop() || 'default';
|
|
|
|
|
const Com = extTypeMapped[ext]?.icon || FileOutlined;
|
|
|
|
@ -124,7 +140,7 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
|
|
|
|
|
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>)
|
|
|
|
|
// btns.push(<Button type='text' key={'set-done'} onClick={() => { alert('todo')}} icon={<MailCheckIcon className={'text-yellow-600'} />} size='small'>已处理</Button>)
|
|
|
|
|
}
|
|
|
|
|
// 没有关联订单的邮件`绑定订单`
|
|
|
|
|
if (showBindBtn) {
|
|
|
|
@ -156,8 +172,8 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
break
|
|
|
|
|
case 'failed':
|
|
|
|
|
btns.push(
|
|
|
|
|
<Tooltip key='delete-t' title='删除'>
|
|
|
|
|
<Button key={'delete'} danger onClick={() => alert('todo')} size='small' type='text' icon={<DeleteOutlined className='text-red-500' />}>{compactBtn ? '' : '删除'}</Button></Tooltip>,
|
|
|
|
|
// <Tooltip key='delete-t' title='删除'>
|
|
|
|
|
// <Button key={'delete'} danger onClick={() => handleDel()} size='small' type='text' icon={<DeleteOutlined className='text-red-500' />}>{compactBtn ? '' : '删除'}</Button></Tooltip>,
|
|
|
|
|
|
|
|
|
|
<Tooltip key='resend-t' title='发送'>
|
|
|
|
|
<Button key={'resend'} onClick={() => handleResend()} size='small' type='text' icon={<SendPlaneFillIcon className='text-orange-500' />}>{compactBtn ? '' : '发送'}</Button></Tooltip>,
|
|
|
|
|