|
|
|
@ -64,11 +64,13 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
|
|
|
|
|
const [mobile] = useStyleStore((state) => [state.mobile]);
|
|
|
|
|
const [userId, username, emailList] = useAuthStore((state) => [state.loginUser.userId, state.loginUser.username, state.loginUser.emailList]);
|
|
|
|
|
const emailListOption = emailList?.map(ele => ({ ...ele, label: ele.email, key: ele.email, value: ele.email })) || [];
|
|
|
|
|
const emailListMapped = emailList?.reduce((r, v) => ({ ...r, [v.opi_sn]: v }));
|
|
|
|
|
|
|
|
|
|
const mai_sn = quoteid;
|
|
|
|
|
const mailData = useEmailDetail(mai_sn, _mailData);
|
|
|
|
|
|
|
|
|
|
const emailUser = mailData.info?.MAI_OPI_SN || fromUser // quote.order_opi
|
|
|
|
|
const emailUserMat = mailData.info?.MAI_MAT_SN || emailListMapped?.[emailUser]?.mat_sn
|
|
|
|
|
|
|
|
|
|
const { notification, message } = App.useApp();
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
@ -247,7 +249,7 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
|
|
|
|
|
body.to = 'lyt@hainatravel.com'; // debug: 0
|
|
|
|
|
body.attaList = fileList;
|
|
|
|
|
body.opi_sn = emailUser || fromUser;
|
|
|
|
|
body.mat_sn = 278; // todo: 从配置中获取
|
|
|
|
|
body.mat_sn = 278; // emailUserMat
|
|
|
|
|
console.log('body', body);
|
|
|
|
|
const values = await form.validateFields();
|
|
|
|
|
body.cc = values.cc || '';
|
|
|
|
|