|
@@ -500,8 +500,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
}
|
|
|
|
|
|
const onSubmit = (values: any) => {
|
|
|
- const { bizType, platform, templateProductId, corpUserGroups, welcomeMsgTemplateDTO, massSendingContent, massSendingStrategy, highMassSendingContent, highMassSendingStrategy, userInherit, friendsContent, friendsStrategy } = settings
|
|
|
-
|
|
|
+ const { bizType, platform, templateProductId, corpUserGroups, welcomeMsgTemplateDTO, massSendingContent, massSendingStrategy, userInherit } = settings
|
|
|
const params = {
|
|
|
...values,
|
|
|
bizType,
|
|
@@ -514,43 +513,24 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
}
|
|
|
// 欢迎语
|
|
|
if (settings?.welcomeMsgTemplateDTO && Object.keys(settings?.welcomeMsgTemplateDTO).length) {
|
|
|
- params.welcomeMsgContent = previewContent?.welcomeMsgContent[index]
|
|
|
+ params.welcomeMsgContent = previewContent?.welcomeMsgContent?.[index] || undefined
|
|
|
}
|
|
|
-
|
|
|
// 群发
|
|
|
- if (massSendingStrategy && Object.keys(massSendingStrategy).length) {
|
|
|
- params.groupMsgContent = previewContent.groupMsgContent[index]
|
|
|
+ if (massSendingStrategy && Object.keys(massSendingStrategy).length > 0) {
|
|
|
+ params.groupMsgContent = previewContent?.groupMsgContent?.[index] || undefined
|
|
|
}
|
|
|
-
|
|
|
// 继承
|
|
|
if (settings?.userInherit && Object.keys(settings?.userInherit).length) {
|
|
|
- params.takeoverUserIds = previewContent?.externalUserTransferContent[index]
|
|
|
+ params.takeoverUserIds = previewContent?.externalUserTransferContent?.[index] || undefined
|
|
|
}
|
|
|
- // // 高级群发
|
|
|
- // if (item?.highGroupMsgContent) {
|
|
|
- // params.messageSendContent = item?.highGroupMsgContent
|
|
|
- // // 外部成员
|
|
|
- // if (item?.externalUserList) {
|
|
|
- // params.corpList = item?.externalUserList.map(item => ({
|
|
|
- // externalUserId: item.externalUserId,
|
|
|
- // corpId: item.corpId
|
|
|
- // }))
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (item?.friendsMsgContent) {
|
|
|
- // params.momentSendContent = item.friendsMsgContent
|
|
|
- // }
|
|
|
- // if (item?.friendsTagContent) {
|
|
|
- // params.externalUserTagList = item.friendsTagContent.map(item => item.value)
|
|
|
- // }
|
|
|
return params
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
// 欢迎语
|
|
|
if (welcomeMsgTemplateDTO && Object.keys(welcomeMsgTemplateDTO).length) {
|
|
|
params.welcomeMsgTemplateDTO = welcomeMsgTemplateDTO
|
|
|
}
|
|
|
+
|
|
|
// 群发
|
|
|
if (massSendingStrategy && Object.keys(massSendingStrategy).length) {
|
|
|
params.groupSendTaskAddDTO = {
|
|
@@ -768,6 +748,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
// })
|
|
|
// }
|
|
|
// }
|
|
|
+ console.log('11111111111111', values)
|
|
|
if (projectId) {
|
|
|
params.projectId = projectId
|
|
|
updateTask.run(params).then(res => {
|