|
|
@ -98,6 +98,10 @@ const NewEmail = () => {
|
|
|
|
const { loading: loadingTamplate, templateContent } = useEmailTemplate(templateKey, {coli_sn: pageParam.oid, opi_sn: orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0, lgc: 1});
|
|
|
|
const { loading: loadingTamplate, templateContent } = useEmailTemplate(templateKey, {coli_sn: pageParam.oid, opi_sn: orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0, lgc: 1});
|
|
|
|
const { signature } = useEmailSignature(orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0)
|
|
|
|
const { signature } = useEmailSignature(orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [initialContent, setInitialContent] = useState('')
|
|
|
|
|
|
|
|
const [showQuoteContent, setShowQuoteContent] = useState(false)
|
|
|
|
|
|
|
|
const [quoteContent, setQuoteContent] = useState('')
|
|
|
|
|
|
|
|
|
|
|
|
// const [newFromEmail, setNewFromEmail] = useState('')
|
|
|
|
// const [newFromEmail, setNewFromEmail] = useState('')
|
|
|
|
// const [newToEmail, setNewToEmail] = useState('')
|
|
|
|
// const [newToEmail, setNewToEmail] = useState('')
|
|
|
|
// const [emailOPI, setEmailOPI] = useState('')
|
|
|
|
// const [emailOPI, setEmailOPI] = useState('')
|
|
|
@ -342,10 +346,6 @@ const NewEmail = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const [initialContent, setInitialContent] = useState('')
|
|
|
|
|
|
|
|
const [showQuoteContent, setShowQuoteContent] = useState(false)
|
|
|
|
|
|
|
|
const [quoteContent, setQuoteContent] = useState('')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [openPlainTextConfirm, setOpenPlainTextConfirm] = useState(false)
|
|
|
|
const [openPlainTextConfirm, setOpenPlainTextConfirm] = useState(false)
|
|
|
|
const handlePlainTextOpenChange = ({ target }) => {
|
|
|
|
const handlePlainTextOpenChange = ({ target }) => {
|
|
|
|
const { value: newChecked } = target
|
|
|
|
const { value: newChecked } = target
|
|
|
@ -488,7 +488,7 @@ const NewEmail = () => {
|
|
|
|
body.attaList = fileList;
|
|
|
|
body.attaList = fileList;
|
|
|
|
// console.log('body', body, '\n', fileList);
|
|
|
|
// console.log('body', body, '\n', fileList);
|
|
|
|
const values = await form.validateFields()
|
|
|
|
const values = await form.validateFields()
|
|
|
|
const preQuoteBody = pageParam.quoteid ? (quoteContent ? quoteContent : generateQuoteContent(mailData, isRichText)) : ''
|
|
|
|
const preQuoteBody = !['edit', 'new'].includes(pageParam.action) && pageParam.quoteid ? (quoteContent ? quoteContent : generateQuoteContent(mailData, isRichText)) : ''
|
|
|
|
body.mailcontent = isRichText ? EmailBuilder({ subject: values.subject, content: htmlContent + preQuoteBody }) : textContent + preQuoteBody
|
|
|
|
body.mailcontent = isRichText ? EmailBuilder({ subject: values.subject, content: htmlContent + preQuoteBody }) : textContent + preQuoteBody
|
|
|
|
body.cc = values.cc || ''
|
|
|
|
body.cc = values.cc || ''
|
|
|
|
body.bcc = values.bcc || ''
|
|
|
|
body.bcc = values.bcc || ''
|
|
|
|