|
|
@ -17,9 +17,11 @@ const extTypeMapped = {
|
|
|
|
pdf: { icon: FilePdfOutlined, color: '#ad0b00' },
|
|
|
|
pdf: { icon: FilePdfOutlined, color: '#ad0b00' },
|
|
|
|
doc: { icon: FileWordOutlined, color: '#103f91' },
|
|
|
|
doc: { icon: FileWordOutlined, color: '#103f91' },
|
|
|
|
docx: { icon: FileWordOutlined, color: '#103f91' },
|
|
|
|
docx: { icon: FileWordOutlined, color: '#103f91' },
|
|
|
|
|
|
|
|
rtf: { icon: FileWordOutlined, color: '#103f91' },
|
|
|
|
xls: { icon: FileExcelOutlined, color: '#0c7d0c' },
|
|
|
|
xls: { icon: FileExcelOutlined, color: '#0c7d0c' },
|
|
|
|
xlsx: { icon: FileExcelOutlined, color: '#0c7d0c' },
|
|
|
|
xlsx: { icon: FileExcelOutlined, color: '#0c7d0c' },
|
|
|
|
jpg: { icon: FileImageOutlined, color: '#1985ff' },
|
|
|
|
jpg: { icon: FileImageOutlined, color: '#1985ff' },
|
|
|
|
|
|
|
|
jpeg: { icon: FileImageOutlined, color: '#1985ff' },
|
|
|
|
png: { icon: FileImageOutlined, color: '#1985ff' },
|
|
|
|
png: { icon: FileImageOutlined, color: '#1985ff' },
|
|
|
|
gif: { icon: FileGifOutlined, color: '#1985ff' },
|
|
|
|
gif: { icon: FileGifOutlined, color: '#1985ff' },
|
|
|
|
html: { icon: GlobalOutlined, color: '#1985ff' },
|
|
|
|
html: { icon: GlobalOutlined, color: '#1985ff' },
|
|
|
@ -30,7 +32,7 @@ const extTypeMapped = {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @property {*} emailMsg - 邮件数据. { conversationid, actionId, order_opi, coli_sn, msgOrigin: { from, to, id, email: { subject, mai_sn, } } }
|
|
|
|
* @property {*} emailMsg - 邮件数据. { conversationid, actionId, order_opi, coli_sn, msgOrigin: { from, to, id, email: { subject, mai_sn, } } }
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, size, ...props }) => {
|
|
|
|
const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, size, autoMark = false, ...props }) => {
|
|
|
|
// console.log('emailDetail', emailMsg);
|
|
|
|
// console.log('emailDetail', emailMsg);
|
|
|
|
const componentRef = useRef(null);
|
|
|
|
const componentRef = useRef(null);
|
|
|
|
const [compactBtn, setCompactBtn] = useState(size==='small');
|
|
|
|
const [compactBtn, setCompactBtn] = useState(size==='small');
|
|
|
@ -80,7 +82,7 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const { loading, mailData, orderDetail, postEmailResend } = useEmailDetail(mailID, null, false)
|
|
|
|
const { loading, mailData, orderDetail, postEmailResend } = useEmailDetail(mailID, null, false, autoMark)
|
|
|
|
const [showBindBtn, setShowBindBtn] = useState(false)
|
|
|
|
const [showBindBtn, setShowBindBtn] = useState(false)
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
setShowBindBtn(mailID ? isEmpty(mailData.info?.MAI_COLI_SN) : false)
|
|
|
|
setShowBindBtn(mailID ? isEmpty(mailData.info?.MAI_COLI_SN) : false)
|
|
|
@ -301,7 +303,26 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{mailData.insideAttachments.length > 0 && <span className='text-gray-500 italic'> 文内附件 ({mailData.insideAttachments.length}) 已在正文显示</span>}
|
|
|
|
{mailData.insideAttachments.length > 0 && <details>
|
|
|
|
|
|
|
|
<summary>
|
|
|
|
|
|
|
|
点击展开<span className='text-gray-500 italic'> 文内附件 ({mailData.insideAttachments.length}) 已在正文显示 </span>
|
|
|
|
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
<List
|
|
|
|
|
|
|
|
dataSource={mailData.insideAttachments || []}
|
|
|
|
|
|
|
|
size='small'
|
|
|
|
|
|
|
|
className='[&_.ant-list-item]:p-1 [&_.ant-list-item]:justify-start'
|
|
|
|
|
|
|
|
renderItem={(atta) => (
|
|
|
|
|
|
|
|
<List.Item>
|
|
|
|
|
|
|
|
<FileTypeIcon fileName={atta.ATI_Name} />
|
|
|
|
|
|
|
|
<Typography.Text ellipsis={{ tooltip: { title: atta.ATI_Name, placement: 'left' } }} className='text-inherit'>
|
|
|
|
|
|
|
|
<span key={atta.ATI_SN} onClick={() => openPopup(`${EMAIL_ATTA_HOST}${atta.ATI_ServerFile}`, atta.ATI_SN)} size='small' className='text-blue-500 cursor-pointer'>
|
|
|
|
|
|
|
|
{atta.ATI_Name}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</Typography.Text>
|
|
|
|
|
|
|
|
</List.Item>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</details>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|