wjx преди 1 месец
родител
ревизия
dd44a8a497

+ 6 - 0
src/pages/weComTask/components/selectExternalAccount/index.less

@@ -26,6 +26,12 @@
             box-sizing: border-box;
             overflow: hidden;
 
+            .leftTitle {
+                display: flex;
+                justify-content: space-between;
+                padding-right: 10px;
+            }
+
             .title {
                 margin: 0 0 5px;
                 font-weight: 700;

+ 38 - 7
src/pages/weComTask/page/businessPlan/create/components/massSending/content.tsx

@@ -1,17 +1,19 @@
 import NewSteps from '@/pages/weComTask/components/newSteps';
-import { App, Button, Card, Form, Select } from 'antd';
+import { App, Button, Card, Form, Popover, Select } from 'antd';
 import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
 import '../../global.less';
 import { welcomeContentData } from '../../const';
-import { PlusOutlined, MinusOutlined } from '@ant-design/icons'
+import { PlusOutlined, MinusOutlined, QuestionCircleFilled } from '@ant-design/icons'
 import MaterialNoTextMould from './materialNoTextMould';
+import PreviewTime from '@/pages/weComTask/components/previewTime';
+import FilterUserTooltip from '@/pages/weComTask/components/filterUser/filterUserTooltip';
 
 /**
  * 群发内容
  * @param param0 
  * @returns 
  */
-const Content = forwardRef(({ massSendingStrategy, value, onChange }: TASK_CREATE.ContentProps, ref: React.ForwardedRef<{ handleOk: (type: string) => void }>) => {
+const Content = forwardRef(({ massSendingStrategy, value, onChange, bookCityList }: TASK_CREATE.ContentProps, ref: React.ForwardedRef<{ handleOk: (type: string) => void }>) => {
 
     /****************************************/
     const { message } = App.useApp()
@@ -33,7 +35,6 @@ const Content = forwardRef(({ massSendingStrategy, value, onChange }: TASK_CREAT
             message.error('请先设置群发策略')
             return
         }
-
         if (value && Object.keys(value).length) {
             filedUpdateChange(value)
             form.setFieldsValue(value)
@@ -41,7 +42,8 @@ const Content = forwardRef(({ massSendingStrategy, value, onChange }: TASK_CREAT
             const data = {
                 massSendingContentDTO: massSendingStrategy.strategySettings.map(item => {
                     return {
-                        sendContentDto: item.sendData.map(() => ({ contentDTO: [undefined], sendMode: undefined }))
+                        sendContentDto: item.sendData.map((i) => ({ contentDTO: [undefined], sendMode: undefined, id: i?.id })),
+                        id: item?.id
                     }
                 })
             }
@@ -125,7 +127,6 @@ const Content = forwardRef(({ massSendingStrategy, value, onChange }: TASK_CREAT
                 onFinish={handleOk}
                 initialValues={{ massSendingContentDTO: [undefined] }}
                 onFieldsChange={() => {
-                    console.log(form.getFieldsValue())
                     filedUpdateChange(form.getFieldsValue())
                 }}
                 preserve={true}
@@ -134,15 +135,45 @@ const Content = forwardRef(({ massSendingStrategy, value, onChange }: TASK_CREAT
                     {(fields) => (
                         <>
                             {fields.map(({ key, name, ...restField }, index) => {
-                                return <Card key={index} title={<strong>策略名称:{massSendingStrategy?.strategySettings?.[index]?.strategyName || `<空>`}</strong>} style={{ background: '#fff', marginBottom: 10 }} id={'clientId' + '_' + index}>
+                                const { strategyName, sendData, ...strategyItem } = massSendingStrategy?.strategySettings?.[index]
+                                return <Card
+                                    key={index}
+                                    title={<strong>策略名称:{strategyName || `<空>`}</strong>}
+                                    style={{ background: '#fff', marginBottom: 10 }}
+                                    extra={<Popover
+                                        placement="right"
+                                        content={<div>
+                                            <PreviewTime
+                                                {...strategyItem}
+                                            />
+                                        </div>}
+                                        styles={{ body: { width: 300, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }}
+                                    >
+                                        <a style={{ color: '#000' }}><QuestionCircleFilled /></a>
+                                    </Popover>}
+                                    id={'clientId' + '_' + index}
+                                >
                                     <Form.List {...restField} name={[name, 'sendContentDto']}>
                                         {(fields) => (
                                             <>
                                                 {fields.map(({ key, name, ...restField }, i) => {
+                                                    const sendDataItem = sendData?.[i];
                                                     return <Card
                                                         key={i}
                                                         title={<strong>发送对象{i + 1} 内容配置</strong>}
                                                         style={{ background: '#fff', marginBottom: 10 }}
+                                                        extra={sendDataItem?.externalUserType === "specify" ? <Popover
+                                                            placement="right"
+                                                            styles={{ body: { maxWidth: 350, maxHeight: 350, overflow: 'hidden', overflowY: 'auto' } }}
+                                                            mouseEnterDelay={0.5}
+                                                            content={<FilterUserTooltip
+                                                                bookCityList={bookCityList}
+                                                                configName={sendDataItem?.externalUserFilter?.configName}
+                                                                data={sendDataItem?.externalUserFilter?.configContent}
+                                                            />}
+                                                        >
+                                                            <a style={{ color: '#000' }}>指定 <QuestionCircleFilled /></a>
+                                                        </Popover> : '全部'}
                                                         id={'clientId' + '_' + index + '_' + i}
                                                     >
                                                         <div id={'clientId' + '_' + index + '_' + i + 'sendMode'}>

+ 6 - 17
src/pages/weComTask/page/businessPlan/create/components/massSending/index.tsx

@@ -280,18 +280,6 @@ const MassSending: React.FC = () => {
             saveAs(blob, `群发内容配置_${dayjs().format('YYYYMMDDHHmmss')}.xlsx`);
             setTimeout(() => setDownloadLoading(false), 1000)
         });
-        // 替换原有 saveAs 代码
-        // const fileStream = streamSaver.createWriteStream(
-        //     `群发内容配置_${dayjs().format('YYYYMMDDHHmmss')}.xlsx`
-        // );
-        // const writer = fileStream.getWriter();
-
-        // // 流式写入
-        // workbook.xlsx.write(writer).then(() => {
-        //     writer.close();
-        //     console.log('33333333333333333333333')
-        //     setDownloadLoading(false); // 立即关闭loading
-        // });
     }
 
     // 读取Excel
@@ -366,8 +354,8 @@ const MassSending: React.FC = () => {
     }
 
     return <>
-        <div className={`${style.settingsBody_content_row}`}>
-            <div className={`${style.settingsBody_content_col}`}>
+        <div className={`${style.settingsBody_content_row}`} style={{ width: 'calc(100% / 3 * 2)' }}>
+            <div className={`${style.settingsBody_content_col}`} style={{ width: '50%' }}>
                 <div className={style.title}>
                     <span>群发</span>
                 </div>
@@ -383,11 +371,11 @@ const MassSending: React.FC = () => {
                     <Button type="link" style={{ padding: 0, fontSize: 12, color: token.colorPrimary }} size='small' onClick={() => { setNewVisible(true); setCreateType('STRATEGY') }}>编辑</Button>
                 </div>
             </div>
-            <div className={`${style.settingsBody_content_col}`}>
+            <div className={`${style.settingsBody_content_col}`} style={{ width: '50%' }}>
                 <div className={style.title}>
                     <span></span>
                     {(settings?.massSendingStrategy && Object.keys(settings?.massSendingStrategy).length > 0) && <Space>
-                        {settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && <>
+                        {/* {settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && <>
                             <Button
                                 type="link"
                                 style={{ padding: 0, fontSize: 12 }}
@@ -409,7 +397,7 @@ const MassSending: React.FC = () => {
                                     style={{ padding: 0, fontSize: 12 }}
                                 >{settings?.corpUsers?.every(item => item?.groupMsgContent?.length) ? 'Excel内容已上传,重新上传' : '上传Excel'}</Button>
                             </Upload>
-                        </>}
+                        </>} */}
                         <Button
                             type="link"
                             danger
@@ -462,6 +450,7 @@ const MassSending: React.FC = () => {
         {newVisible && <SettingsMassSending
             visible={newVisible}
             createType={createType}
+            bookCityList={bookPlatForm?.map(item => ({ label: item.platformName, value: item.platformKey }))}
             value={{
                 massSendingContent: settings?.massSendingContent,
                 massSendingStrategy: settings?.massSendingStrategy

+ 24 - 3
src/pages/weComTask/page/businessPlan/create/components/massSending/settingsMassSending.tsx

@@ -9,7 +9,7 @@ import Content from './content';
  * @param param0 
  * @returns 
  */
-const SettingsMassSending: React.FC<TASK_CREATE.MassSendingProps<any>> = ({ value: { massSendingContent, massSendingStrategy }, createType, onChange, visible, onClose }) => {
+const SettingsMassSending: React.FC<TASK_CREATE.MassSendingProps<any>> = ({ bookCityList, value: { massSendingContent, massSendingStrategy }, createType, onChange, visible, onClose }) => {
 
     /****************************************/
     const { message } = App.useApp()
@@ -50,9 +50,29 @@ const SettingsMassSending: React.FC<TASK_CREATE.MassSendingProps<any>> = ({ valu
                     setType('CONTENT')
                 }
                 if (massSendingContent && (value?.strategySettings?.length !== massSendingContent?.massSendingContentDTO?.length || value?.strategySettings?.some((item, index) => massSendingContent?.massSendingContentDTO?.[index]?.sendContentDto?.length !== item?.sendData?.length))) {
-                    message.error('策略配置和内容配置不一致,内容已重置,请重新配置!')
+                    message.warning('策略配置和内容配置不一致,内容已更新,请查看!')
                     onChange({
-                        massSendingContent: undefined,
+                        massSendingContent: {
+                            massSendingContentDTO: value?.strategySettings?.map(item => {
+                                const mc = massSendingContent.massSendingContentDTO.find(mc => mc.id === item.id)
+                                if (mc) {
+                                    return {
+                                        sendContentDto: item.sendData.map((i) => {
+                                            const sendContent = mc.sendContentDto.find(s => s.id === i.id)
+                                            if (sendContent) {
+                                                return sendContent
+                                            }
+                                            return { contentDTO: [undefined], sendMode: undefined, id: i?.id }
+                                        }),
+                                        id: item?.id
+                                    }
+                                }
+                                return {
+                                    sendContentDto: item.sendData.map((i) => ({ contentDTO: [undefined], sendMode: undefined, id: i?.id })),
+                                    id: item?.id
+                                }
+                            })
+                        },
                         massSendingStrategy: value
                     }, type)
                     return
@@ -64,6 +84,7 @@ const SettingsMassSending: React.FC<TASK_CREATE.MassSendingProps<any>> = ({ valu
             }}
         /> : <Content
             ref={ref1}
+            bookCityList={bookCityList}
             massSendingStrategy={massSendingStrategy}
             value={massSendingContent}
             onChange={(value, type) => {

+ 16 - 12
src/pages/weComTask/page/businessPlan/create/components/massSending/showContent.tsx

@@ -75,8 +75,6 @@ const ShowContent: React.FC<ShowContentProps> = ({ strategySettings, massSending
     const { token } = useNewToken()
     /*************************************/
 
-
-
     return <div className={style.showContent}>
         <Tabs
             tabPosition='left'
@@ -85,7 +83,7 @@ const ShowContent: React.FC<ShowContentProps> = ({ strategySettings, massSending
             size='small'
             popupClassName={style.popupClassName}
             items={strategySettings?.map((item, index) => ({
-                label: '策略' + (index + 1),
+                label: <span style={massSendingContent?.massSendingContentDTO?.[index]?.sendContentDto?.every(sc => sc?.sendMode || sc?.sendMode === 0) ? {} : { color: 'red' }}>{'策略' + (index + 1)}</span>,
                 key: `${index}`,
                 children: <div className={style.showContent_content}>
                     <div style={{ backgroundColor: token.colorPrimary, padding: 4, color: '#FFF', fontSize: 12, marginBottom: 5 }}>
@@ -93,17 +91,23 @@ const ShowContent: React.FC<ShowContentProps> = ({ strategySettings, massSending
                     </div>
                     {massSendingContent?.massSendingContentDTO?.[index]?.sendContentDto?.map((si: any, sn: number) => {
                         return <div key={sn}>
-                            <div style={{ backgroundColor: token.colorPrimary, padding: 4, color: '#FFF', fontSize: 12, marginTop: sn > 0 ? 16 : 0 }}>
-                                <div>
-                                    发送对象组{sn + 1} - 发送模式:{welcomeContentData?.find(i => i.value === si?.sendMode)?.label}
+                            {(si?.sendMode || si?.sendMode == 0) ? <>
+                                <div style={{ backgroundColor: token.colorPrimary, padding: 4, color: '#FFF', fontSize: 12, marginTop: sn > 0 ? 16 : 0 }}>
+                                    <div>
+                                        发送对象组{sn + 1} - 发送模式:{welcomeContentData?.find(i => i.value === si?.sendMode)?.label}
+                                    </div>
                                 </div>
-                            </div>
-                            {si?.contentDTO?.map((item, index) => {
-                                return <div key={index} style={{ marginTop: 5, backgroundColor: '#f1f1f1', borderRadius: 6, padding: '5px 10px 16px' }}>
-                                    <h3 style={{ textAlign: 'center' }}>内容{index + 1}</h3>
-                                    <LookMsg data={type === 'highQf' ? item : getMsgData(item, token)} />
+                                {si?.contentDTO?.map((item, index) => {
+                                    return <div key={index} style={{ marginTop: 5, backgroundColor: '#f1f1f1', borderRadius: 6, padding: '5px 10px 16px' }}>
+                                        <h3 style={{ textAlign: 'center' }}>内容{index + 1}</h3>
+                                        <LookMsg data={type === 'highQf' ? item : getMsgData(item, token)} />
+                                    </div>
+                                })}
+                            </> : <div style={{ backgroundColor: token.colorError, padding: 4, color: '#FFF', fontSize: 12, marginTop: sn > 0 ? 16 : 0 }}>
+                                <div>
+                                    发送对象组{sn + 1} - 内容未配置
                                 </div>
-                            })}
+                            </div>}
                         </div>
                     })}
                 </div>

+ 3 - 3
src/pages/weComTask/page/businessPlan/create/components/massSending/strategy.tsx

@@ -174,7 +174,7 @@ const Strategy = forwardRef(({ value, onChange }: TASK_CREATE.StrategyProps, ref
                 }}
                 initialValues={{
                     taskType: 'novel',
-                    strategySettings: [{ sendData: [{ externalUserType: 'all' }] }],
+                    strategySettings: [{ sendData: [{ externalUserType: 'all', id: Date.now() }], id: Date.now() }],
                 }}
                 onFieldsChange={() => {
                     filedUpdateChange(form.getFieldsValue())
@@ -253,7 +253,7 @@ const Strategy = forwardRef(({ value, onChange }: TASK_CREATE.StrategyProps, ref
                                                         </Card>
                                                     })}
                                                     <Form.Item>
-                                                        <Button type="dashed" onClick={() => add({ externalUserType: 'all' })} block icon={<PlusOutlined />}>
+                                                        <Button type="dashed" onClick={() => add({ externalUserType: 'all', id: Date.now() })} block icon={<PlusOutlined />}>
                                                             新增发送对象
                                                         </Button>
                                                     </Form.Item>
@@ -264,7 +264,7 @@ const Strategy = forwardRef(({ value, onChange }: TASK_CREATE.StrategyProps, ref
                                 </Card>
                             })}
                             <Form.Item>
-                                <Button type="primary" onClick={() => add({ sendData: [{ externalUserType: 'all' }] })} block icon={<PlusOutlined />}>
+                                <Button type="primary" onClick={() => add({ sendData: [{ externalUserType: 'all', id: Date.now() }], id: Date.now() })} block icon={<PlusOutlined />}>
                                     新增策略组
                                 </Button>
                             </Form.Item>

+ 3 - 3
src/pages/weComTask/page/businessPlan/create/components/welcome/index.tsx

@@ -283,8 +283,8 @@ const Welcome: React.FC = () => {
     }
 
     return <>
-        <div className={`${style.settingsBody_content_row}`}>
-            <div className={`${style.settingsBody_content_col}`}>
+        <div className={`${style.settingsBody_content_row}`} style={{ width: 'calc(100% / 3)' }}>
+            <div className={`${style.settingsBody_content_col}`} style={{ width: '100%' }}>
                 <div className={style.title}>
                     <span>欢迎语</span>
 
@@ -346,7 +346,7 @@ const Welcome: React.FC = () => {
                 </div>
             </div>
         </div>
-        
+
         {/* 配置欢迎语 */}
         {newVisible && <SettingsWelcome
             visible={newVisible}

+ 2 - 2
src/pages/weComTask/page/businessPlan/create/index.less

@@ -76,8 +76,8 @@
     }
 
     .settingsBody_content_col {
-        width: 350px;
-        max-width: 350px;
+        // width: 350px;
+        // max-width: 350px;
         min-width: 350px;
 
         

+ 349 - 315
src/pages/weComTask/page/businessPlan/create/index.tsx

@@ -19,6 +19,7 @@ import HighMassSending from './components/highMassSending';
 import { toJS } from 'mobx';
 import Friends from './components/friends';
 import SelectCwTag from '@/pages/weComTask/components/selectCwTag';
+import SelectCorpUserGroup from '../../corpUserManage/selectCorpUserGroup';
 
 export const DispatchTaskCreate = React.createContext<TASK_CREATE.DispatchTaskCreate | null>(null);
 /**
@@ -41,6 +42,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
     const [subVisible, setSubVisible] = useState<boolean>(false) // 选择设置名称弹窗控制
     const [eaVisible, setEaVisible] = useState<boolean>(false)
     const [qwVisible, setQwVisible] = useState<boolean>(false)
+    const [previewContent, setPreviewContent] = useState<{ groupMsgContent?: any[], welcomeMsgContent?: any[] }>({})
 
     const welcomeMsgJobType = useAjax(() => welcomeMsgJobTypeApi())//获取欢迎语类型
 
@@ -65,7 +67,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
     // 预览
     const preview = () => {
         const newPreviewData: TASK_CREATE.previewDataProps = {}
-        if (!settings?.corpUsers || settings?.corpUsers?.length === 0) {
+        if (!settings?.corpUserGroups || settings?.corpUserGroups?.length === 0) {
             message.error('请先选择客服号')
             return
         }
@@ -128,22 +130,17 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
 
         // 群发
         if ((settings?.massSendingContent && Object.keys(settings?.massSendingContent).length) && (settings?.massSendingStrategy && Object.keys(settings?.massSendingStrategy).length)) {
-            if (settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
-                message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
-                return
-            }
+            // if (settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
+            //     message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
+            //     return
+            // }
             const massSendingData = getGroupData(settings)
             const massSending = []
-            if (!settings?.corpUsers?.every((item, i) => {
+            if (!settings?.corpUserGroups?.every((item, i) => {
 
                 let strategyIndex = 0
 
                 return massSendingData.every((dataItem, li, row) => {
-                    const groupMsgContent = item.groupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[dataItem.contentIndex - 1]
-                    if (dataItem?.content?.attachmentList?.length && dataItem?.content?.attachmentList?.some(item => (item?.msgType === 'TASK_CONTENT_LINK' ? !groupMsgContent?.linkUrl : item?.msgType === 'TASK_STATUS_MINIPROGRAM' ? (!groupMsgContent?.miniprogramAppid || !groupMsgContent?.miniprogramPage) : false))) {
-                        message.error('群发内容配置错误,请检查')
-                        return false
-                    }
 
                     const mediaItem = JSON.parse(JSON.stringify(dataItem?.content?.attachmentList || []))
                     if (dataItem?.content?.text?.content) {
@@ -152,11 +149,15 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
                             textContent: dataItem?.content?.text?.content
                         })
                     }
+                    let isLink = false
+                    let isMiniProgram = false
                     const contentReactNode = mediaItem.map(item => {
                         switch (item.msgType) {
                             case 'TASK_CONTENT_LINK':
+                                isLink = true
                                 return `<span style="color: red">链接</span>`
                             case 'TASK_STATUS_MINIPROGRAM':
+                                isMiniProgram = true
                                 return `<span style="color: red">小程序</span>`
                             case 'TASK_STATUS_FILE':
                                 return `<span>文件</span>`
@@ -173,15 +174,17 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
 
                     massSending.push({
                         ...dataItem,
-                        groupMsgContent,
                         contentReactNode,
-                        corpUserId: item.corpUserId,
-                        corpUserName: item.name,
+                        corpUsergroupIndex: i,
+                        corpUserGroupName: `客服组${i + 1}`,
+                        corpUserList: item.corpUsers,
                         bizType: settings?.bizType,
                         channel: settings?.channel,
                         platform: settings?.platform,
                         templateProductId: settings?.templateProductId,
                         id: i * row.length + (li + 1),
+                        isLink,
+                        isMiniProgram,
                         userRowSpan: li % row.length === 0 ? row.length : 0,
                         strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.strategyDataCount : 0
                     })
@@ -196,115 +199,116 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
         }
 
         // 是否有客户继承配置
-        if (settings?.userInherit && Object.keys(settings?.userInherit).length) {
-            if (settings?.corpUsers?.every(item => !item?.externalUserTransferContent?.length)) {
-                message.error('请上传配置好的客户继承Excel文件')
-                return
-            }
-            const userInData = getUserInDataData(settings?.userInherit?.schedulingStrategyDTO, settings?.userInherit?.taskName)
-
-            const userInherit = []
-            // 数据内容
-            if (!settings?.corpUsers?.every((item, i) => {
-                return userInData.every((dataItem, ii, row) => {
-                    const externalUser = item.externalUserTransferContent?.[dataItem.strategyIndex - 1]?.[dataItem.inheritIndex - 1]
-                    if (!externalUser || !externalUser?.corpUserName || !externalUser?.corpUserId) {
-                        message.error('Excel配置错误,' + JSON.stringify(dataItem) + ',' + JSON.stringify(item.externalUserTransferContent))
-                        return false
-                    }
-                    userInherit.push({
-                        ...dataItem,
-                        externalUser,
-                        taskName: dataItem?.taskName,
-                        corpUserId: item.corpUserId,
-                        corpUserName: item.name,
-                        bizType: settings?.bizType,
-                        channel: settings?.channel,
-                        platform: settings?.platform,
-                        templateProductId: settings?.templateProductId,
-                        id: i * row.length + (ii + 1)
-                    })
-                    return true
-                })
-            })) {
-                return
-            }
-            console.log('userInherit-->', userInherit)
-            newPreviewData.userInherit = userInherit
-        }
+        // if (settings?.userInherit && Object.keys(settings?.userInherit).length) {
+        //     if (settings?.corpUsers?.every(item => !item?.externalUserTransferContent?.length)) {
+        //         message.error('请上传配置好的客户继承Excel文件')
+        //         return
+        //     }
+        //     const userInData = getUserInDataData(settings?.userInherit?.schedulingStrategyDTO, settings?.userInherit?.taskName)
+
+        //     const userInherit = []
+        //     // 数据内容
+        //     if (!settings?.corpUsers?.every((item, i) => {
+        //         return userInData.every((dataItem, ii, row) => {
+        //             const externalUser = item.externalUserTransferContent?.[dataItem.strategyIndex - 1]?.[dataItem.inheritIndex - 1]
+        //             if (!externalUser || !externalUser?.corpUserName || !externalUser?.corpUserId) {
+        //                 message.error('Excel配置错误,' + JSON.stringify(dataItem) + ',' + JSON.stringify(item.externalUserTransferContent))
+        //                 return false
+        //             }
+        //             userInherit.push({
+        //                 ...dataItem,
+        //                 externalUser,
+        //                 taskName: dataItem?.taskName,
+        //                 corpUserId: item.corpUserId,
+        //                 corpUserName: item.name,
+        //                 bizType: settings?.bizType,
+        //                 channel: settings?.channel,
+        //                 platform: settings?.platform,
+        //                 templateProductId: settings?.templateProductId,
+        //                 id: i * row.length + (ii + 1)
+        //             })
+        //             return true
+        //         })
+        //     })) {
+        //         return
+        //     }
+        //     console.log('userInherit-->', userInherit)
+        //     newPreviewData.userInherit = userInherit
+        // }
 
         // 是否有高级群发
-        if ((settings?.highMassSendingContent && Object.keys(settings?.highMassSendingContent).length) && (settings?.highMassSendingStrategy && Object.keys(settings?.highMassSendingStrategy).length)) {
-            if (settings?.highMassSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.some(a => ["miniprogram", 'link'].includes(a?.mediaType))))) && settings?.corpUsers?.every(item => !item?.highGroupMsgContent?.length)) {
-                message.error('需要配置小程序、链接,请上传配置好的高级群发Excel文件')
-                return
-            }
-            const massSendingData = getHighGroupData(settings)
-            console.log('massSendingData---->', massSendingData)
-            const highMassSending = []
-            let rowLength = 0
-            if (!settings?.corpUsers?.every((item, i) => {
-
-                let strategyIndex = 0
-                let corpUserCount = 0
-                return massSendingData.every((dataItem, li, row) => {
-
-                    const mediaItem = JSON.parse(JSON.stringify(dataItem?.content || []))
-                    const contentReactNode = mediaItem.map(item => {
-                        switch (item.mediaType) {
-                            case 'link':
-                                return `<span style="color: red">链接</span>`
-                            case 'miniprogram':
-                                return `<span style="color: red">小程序</span>`
-                            case 'file':
-                                return `<span>文件</span>`
-                            case 'video':
-                                return `<span>视频</span>`
-                            case 'image':
-                                return `<span>图片</span>`
-                            case 'text':
-                                return `<span>文本</span>`
-                            default:
-                                return `<span style="color: red">请联系管理员</span>`
-                        }
-                    })
-                    const externalUserListLength = item.externalUserList.length
-                    return item.externalUserList?.every((externalUser, ii) => {
-                        const layer3 = externalUser.corpId + '-' + externalUser.externalUserId
-                        const externalUserMsg = item.highGroupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[layer3]?.[dataItem.contentIndex - 1]
-                        if (mediaItem?.some(media => media?.mediaType === 'link' ? !externalUserMsg?.linkUrl : media?.mediaType === 'miniprogram' ? (!externalUserMsg?.miniprogramAppid || !externalUserMsg?.miniprogramPage) : false)) {
-                            message.error('高级群发配置错误,请检查')
-                            return false
-                        }
-                        rowLength++;
-                        highMassSending.push({
-                            ...dataItem,
-                            groupMsgContent: externalUserMsg,
-                            contentReactNode,
-                            externalUser,
-                            corpUserId: item.corpUserId,
-                            corpUserName: item.name,
-                            bizType: settings?.bizType,
-                            channel: settings?.channel,
-                            platform: settings?.platform,
-                            templateProductId: settings?.templateProductId,
-                            id: rowLength,
-                            userRowSpan: corpUserCount === 0 ? (massSendingData.length * externalUserListLength) : 0,
-                            strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.sendDataRowSpan * externalUserListLength * dataItem.strategyItemSendDataCount : 0,
-                            sendDataRowSpan: ii === 0 ? externalUserListLength * dataItem.sendDataRowSpan : 0
-                        })
-                        corpUserCount++;
-                        strategyIndex = dataItem.strategyIndex
-
-                        return true
-                    })
-                })
-            })) {
-                return
-            }
-            newPreviewData.highMassSending = highMassSending
-        }
-
+        // if ((settings?.highMassSendingContent && Object.keys(settings?.highMassSendingContent).length) && (settings?.highMassSendingStrategy && Object.keys(settings?.highMassSendingStrategy).length)) {
+        //     if (settings?.highMassSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.some(a => ["miniprogram", 'link'].includes(a?.mediaType))))) && settings?.corpUsers?.every(item => !item?.highGroupMsgContent?.length)) {
+        //         message.error('需要配置小程序、链接,请上传配置好的高级群发Excel文件')
+        //         return
+        //     }
+        //     const massSendingData = getHighGroupData(settings)
+        //     console.log('massSendingData---->', massSendingData)
+        //     const highMassSending = []
+        //     let rowLength = 0
+        //     if (!settings?.corpUsers?.every((item, i) => {
+
+        //         let strategyIndex = 0
+        //         let corpUserCount = 0
+        //         return massSendingData.every((dataItem, li, row) => {
+
+        //             const mediaItem = JSON.parse(JSON.stringify(dataItem?.content || []))
+        //             const contentReactNode = mediaItem.map(item => {
+        //                 switch (item.mediaType) {
+        //                     case 'link':
+        //                         return `<span style="color: red">链接</span>`
+        //                     case 'miniprogram':
+        //                         return `<span style="color: red">小程序</span>`
+        //                     case 'file':
+        //                         return `<span>文件</span>`
+        //                     case 'video':
+        //                         return `<span>视频</span>`
+        //                     case 'image':
+        //                         return `<span>图片</span>`
+        //                     case 'text':
+        //                         return `<span>文本</span>`
+        //                     default:
+        //                         return `<span style="color: red">请联系管理员</span>`
+        //                 }
+        //             })
+        //             const externalUserListLength = item.externalUserList.length
+        //             return item.externalUserList?.every((externalUser, ii) => {
+        //                 const layer3 = externalUser.corpId + '-' + externalUser.externalUserId
+        //                 const externalUserMsg = item.highGroupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[layer3]?.[dataItem.contentIndex - 1]
+        //                 if (mediaItem?.some(media => media?.mediaType === 'link' ? !externalUserMsg?.linkUrl : media?.mediaType === 'miniprogram' ? (!externalUserMsg?.miniprogramAppid || !externalUserMsg?.miniprogramPage) : false)) {
+        //                     message.error('高级群发配置错误,请检查')
+        //                     return false
+        //                 }
+        //                 rowLength++;
+        //                 highMassSending.push({
+        //                     ...dataItem,
+        //                     groupMsgContent: externalUserMsg,
+        //                     contentReactNode,
+        //                     externalUser,
+        //                     corpUserId: item.corpUserId,
+        //                     corpUserName: item.name,
+        //                     bizType: settings?.bizType,
+        //                     channel: settings?.channel,
+        //                     platform: settings?.platform,
+        //                     templateProductId: settings?.templateProductId,
+        //                     id: rowLength,
+        //                     userRowSpan: corpUserCount === 0 ? (massSendingData.length * externalUserListLength) : 0,
+        //                     strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.sendDataRowSpan * externalUserListLength * dataItem.strategyItemSendDataCount : 0,
+        //                     sendDataRowSpan: ii === 0 ? externalUserListLength * dataItem.sendDataRowSpan : 0
+        //                 })
+        //                 corpUserCount++;
+        //                 strategyIndex = dataItem.strategyIndex
+
+        //                 return true
+        //             })
+        //         })
+        //     })) {
+        //         return
+        //     }
+        //     newPreviewData.highMassSending = highMassSending
+        // }
+
+        // 是否有朋友圈任务
         if ((settings?.friendsContent && Object.keys(settings?.friendsContent).length) && (settings?.friendsStrategy && Object.keys(settings?.friendsStrategy).length)) {
             if (settings?.friendsContent?.friendsContentDTO?.some(item => item?.contentDTO?.some(i => i?.attachmentList?.some(a => ['link', 'miniprogram'].includes(a?.mediaType)))) && settings?.corpUsers?.every(item => !item?.friendsMsgContent?.length)) {
                 message.error('朋友圈需要配置小程序、链接,请上传配置好的群发Excel文件')
@@ -391,6 +395,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
 
     const onSubmit = (values: any) => {
         const { bizType, platform, templateProductId, corpUsers, welcomeMsgTemplateDTO, massSendingContent, massSendingStrategy, highMassSendingContent, highMassSendingStrategy, userInherit, friendsContent, friendsStrategy } = settings
+
         const params = {
             ...values,
             bizType,
@@ -440,6 +445,10 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
         }
         // 群发
         if (massSendingStrategy && Object.keys(massSendingStrategy).length) {
+            if (massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
+                message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
+                return
+            }
             params.groupSendTaskAddDTO = {
                 groupSendName: massSendingStrategy.groupSendName,
                 strategyList: massSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
@@ -471,189 +480,189 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
             }
         }
         // 高级群发
-        if (highMassSendingStrategy && Object.keys(highMassSendingStrategy).length) {
-            params.messageSendTaskAddDTO = {
-                groupSendName: highMassSendingStrategy.groupSendName,
-                strategyList: highMassSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
-                    const {
-                        // 发送对象
-                        sendData,
-                        // 策略
-                        ...strategy
-                    } = settingsItem
-                    return {
-                        ...strategy,
-                        taskDetail: sendData.map((sendItem, sendIndex) => {
-                            // 发送内容
-                            const { contentDTO, sendMode } = highMassSendingContent.massSendingContentDTO[settingsIndex]['sendContentDto'][sendIndex]
-                            const detail: { [x: string]: any } = {
-                                sendMode,
-                                contentDTO: contentDTO.map(item => {
-
-                                    let newContentDTO: { [x: string]: any } = {}
-                                    item.forEach((item: MediaContentProps) => {
-                                        switch (item.mediaType) {
-                                            case "text":
-                                                newContentDTO = {
-                                                    text: {
-                                                        content: item?.textContent
-                                                    },
-                                                    msgType: 'TASK_CONTENT_TEXT'
-                                                }
-                                                break
-                                            case "miniprogram":
-                                                newContentDTO = {
-                                                    miniprogram: {
-                                                        appId: item?.miniprogramAppid,
-                                                        page: item?.miniprogramPage,
-                                                        title: item?.miniprogramTitle,
-                                                        picUrl: item?.miniprogramPicurl
-                                                    },
-                                                    msgType: 'TASK_STATUS_MINIPROGRAM'
-                                                }
-                                                break
-                                            case "link":
-                                                newContentDTO = {
-                                                    link: {
-                                                        desc: item?.linkDesc,
-                                                        picUrl: item?.linkPicurl,
-                                                        title: item?.linkTitle,
-                                                        url: item?.linkUrl
-                                                    },
-                                                    msgType: 'TASK_CONTENT_LINK'
-                                                }
-                                                break
-                                            case "image":
-                                                newContentDTO = {
-                                                    image: {
-                                                        picUrl: item?.imageUrl
-                                                    },
-                                                    msgType: 'TASK_CONTENT_IMAGE'
-                                                }
-                                                break
-                                            case "video":
-                                                newContentDTO = {
-                                                    video: {
-                                                        videoUrl: item?.videoUrl
-                                                    },
-                                                    msgType: 'TASK_STATUS_VIDEO'
-                                                }
-                                                break
-                                            case "file":
-                                                newContentDTO = {
-                                                    file: {
-                                                        fileUrl: item?.fileUrl
-                                                    },
-                                                    msgType: 'TASK_STATUS_FILE'
-                                                }
-                                                break
-                                        }
-                                    })
-
-                                    return newContentDTO
-                                })
-                            }
-                            if (sendItem.externalUserType === 'specify') {
-                                detail.externalUserFilter = {
-                                    configName: sendItem.externalUserFilter.configName,
-                                    ...sendItem.externalUserFilter.configContent
-                                }
-                            }
-                            return detail
-                        })
-                    }
-                })
-            }
-        }
-        if (userInherit && Object.keys(userInherit).length) {
-            params.externalUserTransferTasksDTO = {
-                taskName: userInherit.taskName,
-                schedulingStrategyDTO: userInherit.schedulingStrategyDTO.map(strategyItem => {
-                    const {
-                        inheritDto,
-                        ...strategy
-                    } = strategyItem
-                    return {
-                        ...strategy,
-                        transferStrategyContentDTOS: inheritDto.map(inheritItem => {
-                            const inherit: { [x: string]: any } = {
-                                transferSuccessMsg: inheritItem.transferSuccessMsg
-                            }
-                            if (inheritItem.transferType === 'specify') {
-                                inherit.externalUserFilter = {
-                                    configName: inheritItem.transferUserDto.configName,
-                                    ...inheritItem.transferUserDto.configContent
-                                }
-                            }
-                            return inherit
-                        })
-                    }
-                })
-            }
-        }
+        // if (highMassSendingStrategy && Object.keys(highMassSendingStrategy).length) {
+        //     params.messageSendTaskAddDTO = {
+        //         groupSendName: highMassSendingStrategy.groupSendName,
+        //         strategyList: highMassSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
+        //             const {
+        //                 // 发送对象
+        //                 sendData,
+        //                 // 策略
+        //                 ...strategy
+        //             } = settingsItem
+        //             return {
+        //                 ...strategy,
+        //                 taskDetail: sendData.map((sendItem, sendIndex) => {
+        //                     // 发送内容
+        //                     const { contentDTO, sendMode } = highMassSendingContent.massSendingContentDTO[settingsIndex]['sendContentDto'][sendIndex]
+        //                     const detail: { [x: string]: any } = {
+        //                         sendMode,
+        //                         contentDTO: contentDTO.map(item => {
+
+        //                             let newContentDTO: { [x: string]: any } = {}
+        //                             item.forEach((item: MediaContentProps) => {
+        //                                 switch (item.mediaType) {
+        //                                     case "text":
+        //                                         newContentDTO = {
+        //                                             text: {
+        //                                                 content: item?.textContent
+        //                                             },
+        //                                             msgType: 'TASK_CONTENT_TEXT'
+        //                                         }
+        //                                         break
+        //                                     case "miniprogram":
+        //                                         newContentDTO = {
+        //                                             miniprogram: {
+        //                                                 appId: item?.miniprogramAppid,
+        //                                                 page: item?.miniprogramPage,
+        //                                                 title: item?.miniprogramTitle,
+        //                                                 picUrl: item?.miniprogramPicurl
+        //                                             },
+        //                                             msgType: 'TASK_STATUS_MINIPROGRAM'
+        //                                         }
+        //                                         break
+        //                                     case "link":
+        //                                         newContentDTO = {
+        //                                             link: {
+        //                                                 desc: item?.linkDesc,
+        //                                                 picUrl: item?.linkPicurl,
+        //                                                 title: item?.linkTitle,
+        //                                                 url: item?.linkUrl
+        //                                             },
+        //                                             msgType: 'TASK_CONTENT_LINK'
+        //                                         }
+        //                                         break
+        //                                     case "image":
+        //                                         newContentDTO = {
+        //                                             image: {
+        //                                                 picUrl: item?.imageUrl
+        //                                             },
+        //                                             msgType: 'TASK_CONTENT_IMAGE'
+        //                                         }
+        //                                         break
+        //                                     case "video":
+        //                                         newContentDTO = {
+        //                                             video: {
+        //                                                 videoUrl: item?.videoUrl
+        //                                             },
+        //                                             msgType: 'TASK_STATUS_VIDEO'
+        //                                         }
+        //                                         break
+        //                                     case "file":
+        //                                         newContentDTO = {
+        //                                             file: {
+        //                                                 fileUrl: item?.fileUrl
+        //                                             },
+        //                                             msgType: 'TASK_STATUS_FILE'
+        //                                         }
+        //                                         break
+        //                                 }
+        //                             })
+
+        //                             return newContentDTO
+        //                         })
+        //                     }
+        //                     if (sendItem.externalUserType === 'specify') {
+        //                         detail.externalUserFilter = {
+        //                             configName: sendItem.externalUserFilter.configName,
+        //                             ...sendItem.externalUserFilter.configContent
+        //                         }
+        //                     }
+        //                     return detail
+        //                 })
+        //             }
+        //         })
+        //     }
+        // }
+        // if (userInherit && Object.keys(userInherit).length) {
+        //     params.externalUserTransferTasksDTO = {
+        //         taskName: userInherit.taskName,
+        //         schedulingStrategyDTO: userInherit.schedulingStrategyDTO.map(strategyItem => {
+        //             const {
+        //                 inheritDto,
+        //                 ...strategy
+        //             } = strategyItem
+        //             return {
+        //                 ...strategy,
+        //                 transferStrategyContentDTOS: inheritDto.map(inheritItem => {
+        //                     const inherit: { [x: string]: any } = {
+        //                         transferSuccessMsg: inheritItem.transferSuccessMsg
+        //                     }
+        //                     if (inheritItem.transferType === 'specify') {
+        //                         inherit.externalUserFilter = {
+        //                             configName: inheritItem.transferUserDto.configName,
+        //                             ...inheritItem.transferUserDto.configContent
+        //                         }
+        //                     }
+        //                     return inherit
+        //                 })
+        //             }
+        //         })
+        //     }
+        // }
         // 朋友圈
-        if (friendsStrategy && Object.keys(friendsStrategy).length) {
-            params.momentCreateDTO = {
-                momentSendName: friendsStrategy.momentSendName,
-                strategyList: friendsStrategy.strategySettings.map((item, index) => {
-                    const { sendMode, contentDTO } = settings?.friendsContent?.friendsContentDTO?.[index]
+        // if (friendsStrategy && Object.keys(friendsStrategy).length) {
+        //     params.momentCreateDTO = {
+        //         momentSendName: friendsStrategy.momentSendName,
+        //         strategyList: friendsStrategy.strategySettings.map((item, index) => {
+        //             const { sendMode, contentDTO } = settings?.friendsContent?.friendsContentDTO?.[index]
+
+        //             return {
+        //                 ...item,
+        //                 taskDetail: {
+        //                     sendMode,
+        //                     contentDTO: contentDTO.map(item => {
+
+        //                         return {
+        //                             text: item.text,
+        //                             attachmentList: item.attachmentList.map((item: any) => {
+        //                                 switch (item.mediaType) {
+        //                                     case 'image':
+        //                                         return {
+        //                                             image: {
+        //                                                 picUrl: item.imageUrl,
+        //                                                 mediaFormat: item.mediaFormat,
+        //                                                 mediaSize: item.mediaSize,
+        //                                                 mediaPlayTime: item.mediaPlayTime,
+        //                                                 mediaWidth: item.mediaWidth,
+        //                                                 mediaHeight: item.mediaHeight
+        //                                             }, msgType: 'TASK_CONTENT_IMAGE'
+        //                                         }
+        //                                     case 'video':
+        //                                         return {
+        //                                             video: {
+        //                                                 videoUrl: item.videoUrl,
+        //                                                 mediaFormat: item.mediaFormat,
+        //                                                 mediaSize: item.mediaSize,
+        //                                                 mediaPlayTime: item.mediaPlayTime,
+        //                                                 mediaWidth: item.mediaWidth,
+        //                                                 mediaHeight: item.mediaHeight
+        //                                             }, msgType: 'TASK_STATUS_VIDEO'
+        //                                         }
+        //                                     case 'file':
+        //                                         return { file: { fileUrl: item.fileUrl }, msgType: 'TASK_STATUS_FILE' }
+        //                                     case 'link':
+        //                                         return { link: { desc: item.linkDesc, picUrl: item.linkPicurl, title: item.linkTitle, url: item.linkUrl }, msgType: 'TASK_CONTENT_LINK' }
+        //                                     case 'miniprogram':
+        //                                         return {
+        //                                             miniprogram: {
+        //                                                 appId: item.miniprogramAppid,
+        //                                                 page: item.miniprogramPage,
+        //                                                 picUrl: item.miniprogramPicurl,
+        //                                                 title: item.miniprogramTitle
+        //                                             },
+        //                                             msgType: 'TASK_STATUS_MINIPROGRAM'
+        //                                         }
+        //                                 }
+        //                             })
+        //                         }
+        //                     })
+        //                 }
+        //             }
+        //         })
+        //     }
+        // }
 
-                    return {
-                        ...item,
-                        taskDetail: {
-                            sendMode,
-                            contentDTO: contentDTO.map(item => {
-
-                                return {
-                                    text: item.text,
-                                    attachmentList: item.attachmentList.map((item: any) => {
-                                        switch (item.mediaType) {
-                                            case 'image':
-                                                return {
-                                                    image: {
-                                                        picUrl: item.imageUrl,
-                                                        mediaFormat: item.mediaFormat,
-                                                        mediaSize: item.mediaSize,
-                                                        mediaPlayTime: item.mediaPlayTime,
-                                                        mediaWidth: item.mediaWidth,
-                                                        mediaHeight: item.mediaHeight
-                                                    }, msgType: 'TASK_CONTENT_IMAGE'
-                                                }
-                                            case 'video':
-                                                return {
-                                                    video: {
-                                                        videoUrl: item.videoUrl,
-                                                        mediaFormat: item.mediaFormat,
-                                                        mediaSize: item.mediaSize,
-                                                        mediaPlayTime: item.mediaPlayTime,
-                                                        mediaWidth: item.mediaWidth,
-                                                        mediaHeight: item.mediaHeight
-                                                    }, msgType: 'TASK_STATUS_VIDEO'
-                                                }
-                                            case 'file':
-                                                return { file: { fileUrl: item.fileUrl }, msgType: 'TASK_STATUS_FILE' }
-                                            case 'link':
-                                                return { link: { desc: item.linkDesc, picUrl: item.linkPicurl, title: item.linkTitle, url: item.linkUrl }, msgType: 'TASK_CONTENT_LINK' }
-                                            case 'miniprogram':
-                                                return {
-                                                    miniprogram: {
-                                                        appId: item.miniprogramAppid,
-                                                        page: item.miniprogramPage,
-                                                        picUrl: item.miniprogramPicurl,
-                                                        title: item.miniprogramTitle
-                                                    },
-                                                    msgType: 'TASK_STATUS_MINIPROGRAM'
-                                                }
-                                        }
-                                    })
-                                }
-                            })
-                        }
-                    }
-                })
-            }
-        }
-        
         addTask.run(params).then(res => {
             console.log(res)
             if (res?.data) {
@@ -676,6 +685,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
 
     const onPreviewReset = () => {
         setPreviewData({})
+        setPreviewContent({})
     }
 
     const severBd = () => {
@@ -683,20 +693,44 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
         message.success('存储成功')
     }
 
+    const setContent = (data: TASK_CREATE.SetContentProps) => {
+        const { msg, index, type } = data
+        const newPreviewContent = JSON.parse(JSON.stringify(previewContent))
+
+
+        switch (type) {
+            case 'welcome':
+                break
+            case 'massSending':
+                newPreviewContent.groupMsgContent = newPreviewContent?.groupMsgContent || {}
+                if (!newPreviewContent.groupMsgContent?.[index[0]]) newPreviewContent.groupMsgContent[index[0]] = [];
+                if (!newPreviewContent.groupMsgContent[index[0]][index[1]]) newPreviewContent.groupMsgContent[index[0]][index[1]] = [];
+                if (!newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]]) newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]] = [];
+                if (!newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]]) newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]] = {};
+                newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]] = { ...newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]], ...msg }
+                break
+        }
+        setPreviewContent(newPreviewContent)
+    }
+
     return <div className={style.create}>
         <Spin spinning={false}>
             <Card title={<strong>配置区</strong>} className={`${style.card} ${style.config}`}>
                 <Space wrap>
                     <Space.Compact>
-                        <Button>客服号</Button>
-                        <SelectCorpUser
-                            value={settings?.corpUsers}
-                            onChange={(corpUsers) => {
-                                console.log(corpUsers)
+                        <Button>客服</Button>
+                        <SelectCorpUserGroup
+                            value={settings?.corpUserGroups}
+                            onChange={(corpUserGroups) => {
+                                console.log(corpUserGroups)
                                 setSettings({
-                                    ...settings, corpUsers: corpUsers.map(item => {
-                                        const { corpUserId, name, corpName, corpId } = item
-                                        return { corpUserId, name, corpName, corpId }
+                                    ...settings, corpUserGroups: corpUserGroups.map(item => {
+                                        return {
+                                            ...item, corpUsers: item.corpUsers.map(item => {
+                                                const { corpUserId, name, corpName, corpId } = item
+                                                return { corpUserId, name, corpName, corpId }
+                                            })
+                                        }
                                     })
                                 })
                                 onPreviewReset()
@@ -813,11 +847,11 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
                                 {/* 群发设置 */}
                                 <MassSending />
                                 {/* 高级群发 */}
-                                <HighMassSending />
+                                {/* <HighMassSending /> */}
                                 {/* 朋友圈 */}
-                                <Friends />
+                                {/* <Friends /> */}
                                 {/* 客户继承 */}
-                                <UserInherit />
+                                {/* <UserInherit /> */}
                             </div>
                         </DispatchTaskCreate.Provider>
                     </div>
@@ -835,7 +869,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
                     >
                         <Button icon={<RedoOutlined />} danger>清空配置/预设</Button>
                     </Popconfirm>
-                    <Button type='primary' onClick={preview}><SearchOutlined />预览广告</Button>
+                    <Button type='primary' onClick={preview}><SearchOutlined />预览任务/配置内容</Button>
                 </Space>
             </Card>
         </Spin>
@@ -859,7 +893,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
                         </> : key === 'massSending' ? <>
                             <Table
                                 dataSource={previewData[key]}
-                                columns={massSendingColumns()}
+                                columns={massSendingColumns(setContent)}
                                 rowKey={'id'}
                                 bordered={true}
                                 scroll={{ y: 550 }}

+ 38 - 11
src/pages/weComTask/page/businessPlan/create/tableConfig.tsx

@@ -1,4 +1,4 @@
-import { Typography } from "antd";
+import { Input, Typography } from "antd";
 import { AnyObject } from "antd/es/_util/type"
 import { ColumnsType } from "antd/es/table"
 import { businessPlanData, TIME_TYPE, welcomeContentData } from "./const";
@@ -95,16 +95,19 @@ export const userInheritColumns = (): ColumnsType<AnyObject> => {
 
 }
 
-
-export const massSendingColumns = (): ColumnsType<AnyObject> => {
+/** 群发 */
+export const massSendingColumns = (setContent: (data: TASK_CREATE.SetContentProps) => void): ColumnsType<AnyObject> => {
     return [
         {
             title: '账号',
-            dataIndex: 'corpUserName',
-            key: 'corpUserName',
+            dataIndex: 'corpUserGroupName',
+            key: 'corpUserGroupName',
             width: 150,
             render(value, record) {
-                return <Text>{value}({record.corpUserId})</Text>
+                return <>
+                    <Title level={5} style={{ margin: 0 }}>{value}</Title>
+                    <Paragraph style={{ margin: 0 }}>客服号:{record?.corpUserList?.map(i => i.name).join('、')}</Paragraph>
+                </>
             },
             onCell: (record) => {
                 return { rowSpan: record.userRowSpan }
@@ -173,7 +176,7 @@ export const massSendingColumns = (): ColumnsType<AnyObject> => {
                 return <>
                     <ShowContentTable
                         data={record?.content}
-                        name={<><span>内容{record.contentIndex}:</span><span dangerouslySetInnerHTML={{ __html: record.contentReactNode?.map((item) => item).join('、') }}></span></>}
+                        name={<><span>内容{record.contentIndex}:</span><span dangerouslySetInnerHTML={{ __html: record.contentReactNode?.map((item) => item).join('、') }}></span></>}
                     />
                 </>
             },
@@ -184,7 +187,15 @@ export const massSendingColumns = (): ColumnsType<AnyObject> => {
             key: 'linkUrl',
             width: 200,
             render(_, record) {
-                return <Paragraph style={{ margin: 0, color: '#000', fontWeight: !!record?.groupMsgContent?.linkUrl ? 'bold' : 'normal' }}>{record?.groupMsgContent?.linkUrl || '--'}</Paragraph>
+                return record?.isLink ? <Input.TextArea
+                    placeholder="请输入链接"
+                    allowClear
+                    onChange={e => setContent({
+                        msg: { linkUrl: e.target.value },
+                        index: [record.corpUsergroupIndex, record.strategyIndex - 1, record.sendDataIndex - 1, record.contentIndex - 1],
+                        type: 'massSending'
+                    })}
+                /> : '--'
             },
         },
         {
@@ -193,7 +204,15 @@ export const massSendingColumns = (): ColumnsType<AnyObject> => {
             key: 'miniprogramAppid',
             width: 200,
             render(_, record) {
-                return <Paragraph style={{ margin: 0, color: '#000', fontWeight: !!record?.groupMsgContent?.miniprogramAppid ? 'bold' : 'normal' }}>{record?.groupMsgContent?.miniprogramAppid || '--'}</Paragraph>
+                return record?.isMiniProgram ? <Input.TextArea 
+                    placeholder="请输入小程序APPID"
+                    allowClear
+                    onChange={e => setContent({
+                        msg: { miniprogramAppid: e.target.value },
+                        index: [record.corpUsergroupIndex, record.strategyIndex - 1, record.sendDataIndex - 1, record.contentIndex - 1],
+                        type: 'massSending'
+                    })}
+                /> : '--'
             },
         },
         {
@@ -202,8 +221,16 @@ export const massSendingColumns = (): ColumnsType<AnyObject> => {
             key: 'miniprogramPage',
             width: 200,
             render(_, record) {
-                return <Paragraph style={{ margin: 0, color: '#000', fontWeight: !!record?.groupMsgContent?.miniprogramPage ? 'bold' : 'normal' }}>{record?.groupMsgContent?.miniprogramPage || '--'}</Paragraph>
-            },
+                return record?.isMiniProgram ? <Input.TextArea 
+                    placeholder="请输入小程序路径"
+                    allowClear
+                    onChange={e => setContent({
+                        msg: { miniprogramPage: e.target.value },
+                        index: [record.corpUsergroupIndex, record.strategyIndex - 1, record.sendDataIndex - 1, record.contentIndex - 1],
+                        type: 'massSending'
+                    })}
+                /> : '--'
+            }
         }
     ]
 }

+ 10 - 0
src/pages/weComTask/page/businessPlan/create/typings.d.ts

@@ -31,6 +31,7 @@ declare namespace TASK_CREATE {
         value?: { [x: string]: any };
     }
     interface MassSendingProps<T> extends DefaultProps, DefaultChangeProps<T> {
+        bookCityList: { label: string, value: string }[]
         value?: {
             massSendingStrategy?: { [x: string]: any };
             massSendingContent?: { massSendingContentDTO: any };
@@ -70,9 +71,12 @@ declare namespace TASK_CREATE {
         friendsTagContent?: any[],
         friendsMsgContent?: any[],
     }
+    type CorpUserProps = { corpUserId: string, name: string, corpName: string, corpId: string }
+    type CorpUserGroupProps = { corpUsers: CorpUserProps[] }
     // 配置保存字段
     interface SettingsProps {
         corpUsers?: corpUsersProps[]; // 企微号列表
+        corpUserGroups?: CorpUserGroupProps[];
         bizType?: string; // 业务类型
         platform?: string; // 书城
         channel?: string;   // 渠道
@@ -94,6 +98,7 @@ declare namespace TASK_CREATE {
     // 群发内容
     interface ContentProps {
         massSendingStrategy: { [x: string]: any };
+        bookCityList?: { label: string, value: string }[]
         onChange?: (value?: { [x: string]: any }, type: string) => void;
         value?: { massSendingContentDTO: any };
     }
@@ -192,4 +197,9 @@ declare namespace TASK_CREATE {
         bookPlatForm: BookPlatFormProps[]
         bookList: BookListProps[]
     }
+    interface SetContentProps {
+        msg: { [x: string]: string },
+        index: number[],
+        type: 'welcome' | 'massSending'
+    }
 }

+ 92 - 0
src/pages/weComTask/page/corpUserManage/selectCorpUserGroup.tsx

@@ -0,0 +1,92 @@
+import useNewToken from '@/Hook/useNewToken';
+import React, { useEffect, useState } from 'react';
+import './global.less'
+import SelectCorpUserGroupModal from './selectCorpUserGroupModal';
+import { Tag, Tooltip } from 'antd';
+
+
+export type CorpUserProps = { corpUserId: string, name: string, corpName: string, corpId: string }
+interface SelectCorpUserGroupProps {
+    value?: TASK_CREATE.CorpUserGroupProps[];
+    onChange?: (value?: TASK_CREATE.CorpUserGroupProps[]) => void;
+    placeholder?: React.ReactNode
+}
+
+/**
+ * 分组选择企微账号
+ * @param param0 
+ * @returns 
+ */
+const SelectCorpUserGroup: React.FC<SelectCorpUserGroupProps> = ({ placeholder, value = [{ corpUsers: [] }], onChange }) => {
+
+    /************************************************************/
+    const { token } = useNewToken()
+    const [visible, setVisible] = useState<boolean>(false);
+    const [corpUserList, setCorpUserList] = useState<TASK_CREATE.CorpUserProps[]>([])
+    /************************************************************/
+
+    useEffect(() => {
+        const newCorpUserList = value?.map(item => item.corpUsers).flat(1)
+        if (JSON.stringify(newCorpUserList) !== JSON.stringify(corpUserList)) {
+            setCorpUserList(newCorpUserList)
+        }
+    }, [value, corpUserList])
+
+    return <>
+        <div
+            className='selectCorpUser'
+            style={{
+                border: `1px solid ${token.colorBorder}`,
+                padding: `0px ${token.paddingXS}px`,
+                borderRadius: token.borderRadius,
+                height: token.controlHeight,
+            }}
+            onClick={() => {
+                setVisible(true)
+            }}
+        >
+            <div className='selectCorpUserContent'>
+                {(corpUserList && corpUserList?.length > 0) ? <>
+                    <Tag
+                        closable
+                        onClose={(e) => {
+                            e.preventDefault();
+                            const newData = value?.map(item => ({ ...item, corpUsers: item.corpUsers?.filter(item => item.corpUserId !== corpUserList?.[0]?.corpUserId) }))?.filter(item => item?.corpUsers?.length > 0)
+                            onChange(newData)
+                        }}
+                    >
+                        {corpUserList?.[0]?.name || corpUserList?.[0]?.corpUserId}
+                    </Tag>
+                    {corpUserList?.length > 1 && <Tooltip
+                        color="#FFF"
+                        title={<span style={{ color: '#000' }}>
+                            {corpUserList?.filter((_, index) => index !== 0)?.map((item) => <Tag
+                                key={item.corpUserId}
+                                closable
+                                onClose={(e) => {
+                                    e.stopPropagation()
+                                    const newData = value?.map(ii => ({ ...ii, corpUsers: ii.corpUsers?.filter(i => i.corpUserId !== item.corpUserId) }))?.filter(item => item?.corpUsers?.length > 0)
+                                    onChange(newData)
+                                }}
+                            >{item.name || item?.corpUserId}</Tag>)}</span>
+                        }
+                    >
+                        <Tag>+{corpUserList.length - 1} ...</Tag>
+                    </Tooltip>}
+                </> : <span style={{ color: token.colorTextDisabled }}>{placeholder || '请选择客服号'}</span>}
+            </div>
+        </div>
+
+        {visible && <SelectCorpUserGroupModal
+            visible={visible}
+            value={value}
+            onClose={() => setVisible(false)}
+            onChange={(value) => {
+                setVisible(false)
+                onChange?.(value)
+            }}
+        />}
+    </>
+};
+
+export default React.memo(SelectCorpUserGroup);

+ 240 - 0
src/pages/weComTask/page/corpUserManage/selectCorpUserGroupModal.tsx

@@ -0,0 +1,240 @@
+import { App, Button, Input, Modal, Select, Space, Table, Typography } from "antd";
+import { CorpUserProps } from "./selectCorpUserGroup";
+import { useEffect, useState } from "react";
+import style from '../../components/selectExternalAccount/index.less';
+import { CheckOutlined, SearchOutlined, CloseOutlined } from '@ant-design/icons';
+import React from "react";
+import { useAjax } from "@/Hook/useAjax";
+import { getAdAccountAllOfMember } from "@/API/global";
+import { getCorpUserApi, getGroupListApi } from "../../API/corpUserManage";
+import { WeTableSelectConfig } from "./tableConfig";
+const { Text, Title } = Typography;
+
+
+interface Props {
+    visible?: boolean;
+    onClose?: () => void;
+    value?: TASK_CREATE.CorpUserGroupProps[];
+    onChange?: (value?: TASK_CREATE.CorpUserGroupProps[]) => void;
+}
+const SelectCorpUserGroupModal: React.FC<Props> = ({ visible, onClose, value, onChange }) => {
+
+    /*****************************************/
+    const { message } = App.useApp()
+    const [data, setData] = useState<TASK_CREATE.CorpUserGroupProps[]>(value)
+    const [selectAdz, setSelectAdz] = useState<number>(1)   // 选择广告主
+
+    const [queryForm, setQueryForm] = useState<CORP_USER_ASSIGN_API.GetCorpUserProps>({ pageNum: 1, pageSize: 20, stopUse: false, status: 1 })
+    const [queryFormNew, setQueryFormNew] = useState<CORP_USER_ASSIGN_API.GetCorpUserProps>({ pageNum: 1, pageSize: 20, stopUse: false, status: 1 })
+
+    const allOfMember = useAjax(() => getAdAccountAllOfMember())
+    const getCorpUser = useAjax((params) => getCorpUserApi(params))
+    const getGroupList = useAjax(() => getGroupListApi())
+    /*****************************************/
+
+    useEffect(() => {
+        allOfMember.run()
+        getGroupList.run()
+    }, [])
+
+    useEffect(() => {
+        const params = { ...queryForm }
+        if (params?.corpIds) {
+            params.corpIds = (params.corpIds as any).split(/[\s,,\n]/).filter((item: string) => item)
+        } else {
+            delete params?.corpIds
+        }
+        if (params?.corpUserIds) {
+            params.corpUserIds = (params.corpUserIds as any).split(/[\s,,\n]/).filter((item: string) => item)
+        } else {
+            delete params?.corpUserIds
+        }
+        getCorpUser.run(params)
+    }, [queryForm])
+
+    const handleOk = () => {
+        if (data?.every(item => item?.corpUsers?.length)) {
+            onChange?.(data)
+        } else {
+            message.error('请选择客服号')
+        }
+    }
+
+    const handleSelectAdz = (value: number) => {
+        if (value === selectAdz) {
+            return
+        }
+        setSelectAdz(value)
+    }
+
+    return <Modal
+        title={<strong>选择客服号</strong>}
+        open={visible}
+        onCancel={onClose}
+        onOk={handleOk}
+        width={1000}
+        className={`${style.SelectPackage}`}
+        styles={{
+            body: {
+                padding: '0 10px 0 10px'
+            }
+        }}
+    >
+        <div className={style.content}>
+            <div className={style.left} style={{ width: 180 }}>
+                <div className={style.leftTitle}>
+                    <h4 className={style.title}>客服组</h4>
+                    <a onClick={() => {
+                        setData(d => ([...d, { corpUsers: [] }]))
+                    }}>新增组</a>
+                </div>
+                <div className={style.accountIdList}>
+                    {data?.map((item, index) => {
+                        const corpUserList = data[index]?.corpUsers || []
+                        return <div key={index} onClick={() => { handleSelectAdz(index + 1) }} className={`${style.accItem} ${selectAdz === index + 1 && style.select} `}>
+                            <div><Text ellipsis={{ tooltip: true }}>客服组{index + 1}</Text></div>
+                            {corpUserList?.length > 0 && <CheckOutlined style={{ color: '#1890ff' }} />}
+                        </div>
+                    })}
+                </div>
+            </div>
+            <div className={style.right}>
+                <Space style={{ marginBottom: 10 }} align="end" size={5} wrap>
+                    <Input style={{ width: 150 }} onChange={(e) => setQueryFormNew({ ...queryFormNew, corpIds: e.target.value as any })} value={queryFormNew?.corpIds} placeholder="企微ID(多个,,空格换行)" allowClear />
+                    <Input style={{ width: 150 }} onChange={(e) => setQueryFormNew({ ...queryFormNew, corpUserName: e.target.value as any })} value={queryFormNew?.corpUserName} placeholder="客服号名称" allowClear />
+                    <Input style={{ width: 150 }} onChange={(e) => setQueryFormNew({ ...queryFormNew, corpUserIds: e.target.value as any })} value={queryFormNew?.corpUserIds} placeholder="客服ID(多个,,空格换行)" allowClear />
+                    <Select
+                        value={queryFormNew?.groupId}
+                        onChange={(e) => setQueryFormNew({ ...queryFormNew, groupId: e })}
+                        showSearch
+                        style={{ width: 100 }}
+                        placeholder="分组"
+                        filterOption={(input, option) =>
+                            ((option?.label ?? '') as string).toLowerCase().includes(input.toLowerCase())
+                        }
+                        allowClear
+                        options={getGroupList?.data?.data?.map((item: any) => ({ label: item.groupName, value: item.groupId }))}
+                    />
+                    <Select
+                        value={queryFormNew?.operUserId}
+                        onChange={(e) => setQueryFormNew({ ...queryFormNew, operUserId: e })}
+                        showSearch
+                        style={{ width: 100 }}
+                        placeholder="运营"
+                        filterOption={(input, option) =>
+                            ((option?.label ?? '') as string).toLowerCase().includes(input.toLowerCase())
+                        }
+                        allowClear
+                        options={allOfMember?.data?.data?.map((item: any) => ({ label: item.nickname, value: item.userId }))}
+                    />
+                    <Select
+                        value={queryFormNew?.groupOwner}
+                        onChange={(e) => setQueryFormNew({ ...queryFormNew, groupOwner: e })}
+                        showSearch
+                        style={{ width: 100 }}
+                        placeholder="是否群主号"
+                        filterOption={(input, option) =>
+                            ((option?.label ?? '') as string).toLowerCase().includes(input.toLowerCase())
+                        }
+                        allowClear
+                        options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]}
+                    />
+                    <Select
+                        value={queryFormNew?.machine}
+                        onChange={(e) => setQueryFormNew({ ...queryFormNew, machine: e })}
+                        showSearch
+                        style={{ width: 100 }}
+                        placeholder="是否机器号"
+                        filterOption={(input, option) =>
+                            ((option?.label ?? '') as string).toLowerCase().includes(input.toLowerCase())
+                        }
+                        allowClear
+                        options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]}
+                    />
+                    <Button type="primary" onClick={() => {
+                        setQueryForm({ ...queryFormNew, pageNum: 1 })
+                    }} loading={getCorpUser.loading} icon={<SearchOutlined />}>搜索</Button>
+                </Space>
+
+                <Table
+                    columns={WeTableSelectConfig()}
+                    dataSource={getCorpUser?.data?.data?.records}
+                    size='small'
+                    scroll={{ y: 300 }}
+                    rowKey={'corpUserId'}
+                    loading={getCorpUser.loading}
+                    pagination={{
+                        current: getCorpUser?.data?.data?.current || 1,
+                        pageSize: getCorpUser?.data?.data?.size || 20,
+                        total: getCorpUser?.data?.data?.total,
+                        showTotal: (total) => `共 ${total} 条数据`,
+                        showSizeChanger: true
+                    }}
+                    rowSelection={{
+                        type: 'checkbox',
+                        selectedRowKeys: data?.[selectAdz - 1]?.corpUsers?.map(item => item.corpUserId),
+                        getCheckboxProps: (record: any) => ({
+                            disabled: data.filter((_, i) => i !== selectAdz - 1)?.map(item => item.corpUsers).flat(1)?.map(item => item.corpUserId).includes(record.corpUserId)
+                        }),
+                        onSelect: (record: { corpUserId: string }, selected: boolean) => {
+                            let newData = JSON.parse(JSON.stringify(data))
+                            let dataIten = newData[selectAdz - 1]?.corpUsers || []
+                            if (selected) {
+                                dataIten.push({ ...record })
+                            } else {
+                                dataIten = dataIten.filter((item: { corpUserId: string }) => item.corpUserId !== record.corpUserId)
+                            }
+                            newData[selectAdz - 1].corpUsers = dataIten
+                            setData(newData)
+                        },
+                        onSelectAll: (selected: boolean, selectedRowss: { corpUserId: string }[], changeRows: { corpUserId: string }[]) => {
+                            let newData = JSON.parse(JSON.stringify(data))
+                            let dataIten = newData[selectAdz - 1]?.corpUsers || []
+                            if (selected) {
+                                let newSelectAccData = [...dataIten]
+                                changeRows.forEach((item: { corpUserId: string }) => {
+                                    let index = newSelectAccData.findIndex((ite: { corpUserId: string }) => ite.corpUserId === item.corpUserId)
+                                    if (index === -1) {
+                                        let data: any = { ...item }
+                                        newSelectAccData.push(data)
+                                    }
+                                })
+                                newData[selectAdz - 1].corpUsers = newSelectAccData
+                            } else {
+                                let newSelectAccData = dataIten.filter((item: { corpUserId: string }) => {
+                                    let index = changeRows.findIndex((ite: { corpUserId: string }) => ite.corpUserId === item.corpUserId)
+                                    if (index !== -1) {
+                                        return false
+                                    } else {
+                                        return true
+                                    }
+                                })
+                                newData[selectAdz - 1].corpUsers = newSelectAccData
+                            }
+                            setData(newData)
+                        }
+                    }}
+                    onChange={(pagination) => {
+                        setQueryForm({ ...queryForm, pageNum: pagination.current || 1, pageSize: pagination.pageSize || 20 })
+                    }}
+                />
+            </div>
+
+            <div className={style.center}>
+                <Title level={5}>已选:{data[selectAdz - 1]?.corpUsers?.length || 0}</Title>
+                <div className={style.select_content}>
+                    {data[selectAdz - 1]?.corpUsers?.map(item => <div key={item.corpUserId}>
+                        <Text ellipsis={{ tooltip: true }} className={style.marketingAssetName}>{item.name}({item?.corpName})</Text>
+                        <CloseOutlined className={style.close} onClick={() => {
+                            let newData = JSON.parse(JSON.stringify(data))
+                            newData[selectAdz - 1].corpUsers = newData[selectAdz - 1]?.corpUsers?.filter((i: any) => i?.corpUserId !== item.corpUserId)
+                            setData(newData)
+                        }} />
+                    </div>)}
+                </div>
+            </div>
+        </div>
+    </Modal>
+}
+
+export default React.memo(SelectCorpUserGroupModal);