wjx пре 2 година
родитељ
комит
c87e66792c

+ 5 - 0
src/pages/launchSystemNew/account/addAccountToGroup.tsx

@@ -87,6 +87,11 @@ const AddAccountToGroup: React.FC<Props> = (props) => {
                         showSearch
                         titles={['未选', '已选']}
                         oneWay
+                        filterOption={(input: any, option: any) => {
+                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig).filter((item: any) => item) : []
+                            return newInput?.some(val => option!.title?.toString().toLowerCase()?.includes(val))
+                        }}
+                        listStyle={{ minHeight: 320 }}
                         render={item => item.title}
                     />
                 </Form.Item>}

+ 3 - 3
src/pages/launchSystemNew/account/index.tsx

@@ -64,7 +64,7 @@ const AdAuthorize: React.FC = () => {
 
     useEffect(() => {
         groupListInit()
-        !erpUserALL.data  && erpUserALL.run()
+        !erpUserALL.data && erpUserALL.run()
     }, [])
 
     useEffect(() => {
@@ -84,7 +84,7 @@ const AdAuthorize: React.FC = () => {
 
     const remark = () => {
         if (remarkData.remark && remarkData.data) {
-            putRemark.run(remarkData.data.id, remarkData.remark).then(res => {
+            putRemark.run(remarkData.data.accountId, remarkData.remark).then(res => {
                 set_remarkData({ ...remarkData, visible: false, remark: '', data: null })
                 getList()
             })
@@ -174,7 +174,7 @@ const AdAuthorize: React.FC = () => {
                             value={queryForm?.accountIds}
                             rows={1}
                             onChange={(e) => {
-                                setQueryForm({ ...queryForm, accountIds: e.target.value.replaceAll(/\s/ig,'') })
+                                setQueryForm({ ...queryForm, accountIds: e.target.value.replaceAll(/\s/ig, '') })
                             }}
                         />
                         <Button onClick={getList} type='primary' loading={getAdAccountList.loading}>搜索</Button>

+ 2 - 2
src/pages/launchSystemNew/adq/adAccount/index.tsx

@@ -54,7 +54,7 @@ function AdAccount(props: Props) {
             message.error('请勾选要同步的广点通账号!')
             return
         }
-        syncAjax.run(selectedRowKeys).then(res => {
+        syncAjax.run(selectedRowKeys?.map((item: any) => item.accountId)).then(res => {
             res && listAjax.refresh()
             res ? message.success('同步成功!') : message.error('同步失败!')
 
@@ -93,7 +93,7 @@ function AdAccount(props: Props) {
             </>}
             rowSelection={{
                 onChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => {
-                    setSelectedRowKeys(selectedRowKeys)
+                    setSelectedRowKeys(selectedRows)
                 }
             }}
             onChange={(props: any) => {

+ 2 - 2
src/pages/launchSystemNew/adq/index.tsx

@@ -15,13 +15,13 @@ import Promoted from './promoted';
 const { TabPane } = Tabs;
 let Menus: any = Menu
 const tabsConfig = [
-    { key: '1', tab: '账户信息', jsx: (props: any) => <AdAccount {...props} /> },
+    // { key: '1', tab: '账户信息', jsx: (props: any) => <AdAccount {...props} /> },
     { key: '3', tab: '广告', jsx: (props: any) => <Ad {...props} /> },
     { key: '2', tab: '计划', jsx: (props: any) => <Campaign {...props} /> },
     { key: '4', tab: '创意', jsx: (props: any) => <Creative {...props} /> },
     { key: '5', tab: '落地页', jsx: (props: any) => <LandingPage {...props} /> },
-    { key: '6', tab: '定向', jsx: (props: any) => <Targeting {...props} /> },
     { key: '7', tab: '推广目标', jsx: (props: any) => <Promoted {...props} /> },
+    { key: '6', tab: '定向', jsx: (props: any) => <Targeting {...props} /> },
 ]
 function Adq() {
     const userInfo = useModel('@@initialState', model => model.initialState?.currentUser)

+ 1 - 1
src/pages/launchSystemNew/components/crowdPackModal/index.tsx

@@ -80,7 +80,7 @@ const CrowdPackModal: React.FC<Props> = (props) => {
 
     // 同步人群包
     const synGoodsList = () => {
-        sysCrowdPack.run(data?.map((item: { id: number }) => item?.id)).then(res => {
+        sysCrowdPack.run(data?.map((item: { adAccountId: number }) => item?.adAccountId)).then(res => {
             getList([data[selectAdz - 1].adAccountId])
         })
     }

+ 1 - 1
src/pages/launchSystemNew/components/customerServiceModal/index.tsx

@@ -94,7 +94,7 @@ const CustomerServiceModal: React.FC<Props> = (props) => {
     const handleSys = () => {
         if (corpId) {
             console.log(data[selectAdz - 1].id, corpId);
-            sysCropWechat.run({ accountId: data[selectAdz - 1].id, corpId: corpId }).then(res => {
+            sysCropWechat.run({ accountId: data[selectAdz - 1].adAccountId, corpId: corpId }).then(res => {
                 if (res) {
                     getList([data[selectAdz - 1].adAccountId])
                     message.success('同步成功')

+ 1 - 1
src/pages/launchSystemNew/components/dataSourceModal/index.tsx

@@ -57,7 +57,7 @@ const DataSourceModal: React.FC<Props> = (props) => {
 
     // 同步数据源
     const synDataSourceList = () => {
-        sysDataSource.run(data?.map((item: { id: number }) => item?.id)).then(res => {
+        sysDataSource.run(data?.map((item: { adAccountId: number }) => item?.adAccountId)).then(res => {
             getList([data[selectAdz - 1].adAccountId])
         })
     }

+ 1 - 1
src/pages/launchSystemNew/components/expandModal/index.tsx

@@ -70,7 +70,7 @@ const ExpandModal: React.FC<Props> = (props) => {
 
     // 同步种子人群
     const synGoodsList = () => {
-        sysCrowdPack.run(data?.map((item: { id: number }) => item?.id)).then(res => {
+        sysCrowdPack.run(data?.map((item: { adAccountId: number }) => item?.adAccountId)).then(res => {
             getList([data[selectAdz - 1].adAccountId])
         })
     }

+ 1 - 1
src/pages/launchSystemNew/components/idModal/index.tsx

@@ -54,7 +54,7 @@ const IdModal: React.FC<Props> = (props) => {
 
     // 同步商品库
     const synIdList = () => {
-        sysId.run(data?.map((item: { id: number }) => item?.id)).then(res => {
+        sysId.run(data?.map((item: { adAccountId: number }) => item?.adAccountId)).then(res => {
             getList([data[selectAdz - 1].adAccountId])
         })
     }

+ 1 - 1
src/pages/launchSystemNew/components/pageModal/index.tsx

@@ -48,7 +48,7 @@ const PageModal: React.FC<Props> = (props) => {
     const getList = () => {
         console.log('data-->', cloudParams);
 
-        listAjax.run({ ...queryForm, ...cloudParams })
+        listAjax.run({ ...queryForm, ...cloudParams, pageStatus: 'NORMAL' })
     }
 
     const handleOk = () => {

+ 1 - 1
src/pages/launchSystemNew/launchManage/createAd/creative/modal/index.tsx

@@ -898,7 +898,7 @@ function CreativePup(props: Props) {
                         }
                         {/* 过滤了不必传和品牌名称,品牌标识图(外部传)短视频结构(组装使用) */}
                         {adcreative_template?.adcreativeElements?.filter(item => item.required && item.name === 'description').map(item => {
-                            let maxNum = adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707 ? pupState.xd_show ? 10 : item.restriction.textRestriction.maxLength : item.restriction.textRestriction.maxLength
+                            let maxNum = (adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707) && actionBtn ? 10 : item.restriction.textRestriction.maxLength
                             return <div key={item.fieldType}>
                                 <Form.Item label={<strong>{item.description}</strong>} className={'my_description'}>
                                     <Form.Item name={item.name} noStyle rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${maxNum}}`)), message: '请输入正确的' + item.description }]}>

+ 2 - 2
src/pages/launchSystemNew/launchManage/createAd/creativeCL/modal/copywriting.tsx

@@ -27,7 +27,7 @@ const Copywriting: React.FC<Props> = (props) => {
 
     /******************************/
     const { onChange, textData = [], sysAdcreative, value, model, material } = props
-    const { adcreativeTemplateId } = sysAdcreative
+    const { adcreativeTemplateId, linkNameType } = sysAdcreative
     const [visible, setVisible] = useState<boolean>(false)
     const [form] = Form.useForm();
     /******************************/
@@ -109,7 +109,7 @@ const Copywriting: React.FC<Props> = (props) => {
                                         </div>
                                     }
                                     if (item.name === 'description') {
-                                        let maxNum = adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707 ? item.pupState.xd_show ? 10 : item.restriction.textRestriction.maxLength : item.restriction.textRestriction.maxLength
+                                        let maxNum = (adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707) && linkNameType ?  10 : item.restriction.textRestriction.maxLength
                                         return <div key={'description' + item.fieldType}>
                                             <Form.Item {...field} label={<strong>{item.description}</strong>} name={[field.name, item.name]} rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${maxNum}}`)), message: '请输入正确的' + item.description }]}>
                                                 <TextAideInput placeholder={'请输入' + item.description} style={{ width: 450 }} maxTextLength={maxNum} />

+ 13 - 13
src/pages/launchSystemNew/launchManage/createAd/index.tsx

@@ -87,7 +87,7 @@ const CreateAd: React.FC = () => {
     const getAdcreativeTemplate = useAjax((params) => get_adcreative_template(params))
     const getGroupList = useAjax(() => getGroupListApi())
     /*************************/
-
+    
     useEffect(() => {
         getGroupList.run()
     }, [])
@@ -117,7 +117,7 @@ const CreateAd: React.FC = () => {
                 let adCreateLogsData = adCreateLogs?.map((item: any) => {
                     return {
                         adAccountId: item?.accountId,
-                        id: item?.adAccountId,
+                        id: item?.accountId,
                         // 数据源
                         userActionSetsList: item?.userActionSetList?.map((item: any) => ({ ...item, id: item?.userActionSetId })),
                         // 商品
@@ -170,7 +170,7 @@ const CreateAd: React.FC = () => {
                             return item.map((item1: any) => ({
                                 pageList: [{ ...item1.page, id: item1.page.pageId }],
                                 adAccountId: item1?.accountId,
-                                id: item1?.adAccountId,
+                                id: item1?.accountId,
                             }))
                         } else {
                             return null
@@ -195,7 +195,7 @@ const CreateAd: React.FC = () => {
                                 let corpUserGroup1s = item?.corpUserGroup1s
                                 let corpUserGroup2s = item?.corpUserGroup2s
                                 return {
-                                    adAccountId: item.accountId, id: item.adAccountId, data: groupList.map((crop: any, index: number) => {
+                                    adAccountId: item.accountId, id: item.accountId, data: groupList.map((crop: any, index: number) => {
                                         return { ...crop, cropList: crop.type === 1 ? corpUserGroup1s[index] ? [{ ...corpUserGroup1s[index], id: corpUserGroup1s[index].groupId }] : [] : corpUserGroup2s[0] ? [{ ...corpUserGroup2s[0], id: corpUserGroup2s[0].groupId }] : [] }
                                     })
                                 }
@@ -225,7 +225,7 @@ const CreateAd: React.FC = () => {
                                 return item.map((item1: any) => ({
                                     pageList: [{ ...item1.page, id: item1.page.pageId }],
                                     adAccountId: item1?.accountId,
-                                    id: item1?.adAccountId,
+                                    id: item1?.accountId,
                                 }))
                             } else {
                                 return null
@@ -296,7 +296,7 @@ const CreateAd: React.FC = () => {
                                 let corpUserGroup1s = item?.corpUserGroup1s
                                 let corpUserGroup2s = item?.corpUserGroup2s
                                 return {
-                                    adAccountId: item.accountId, id: item.adAccountId, data: groupList.map((crop: any, index: number) => {
+                                    adAccountId: item.accountId, id: item.accountId, data: groupList.map((crop: any, index: number) => {
                                         return { ...crop, cropList: crop.type === 1 ? corpUserGroup1s[index] ? [{ ...corpUserGroup1s[index], id: corpUserGroup1s[index].groupId }] : [] : corpUserGroup2s[0] ? [{ ...corpUserGroup2s[0], id: corpUserGroup2s[0].groupId }] : [] }
                                     })
                                 }
@@ -636,7 +636,7 @@ const CreateAd: React.FC = () => {
         let params = { ...newQueryForm, ...props }
         let accountLogs = accountCreateLogs.map((item: any, index) => {
             // userActionSetsList 数据源  productList 商品
-            let data: any = { adAccountId: item.id, count: props.count || 1 }
+            let data: any = { adAccountId: item.adAccountId, count: props.count || 1 }
             if (item?.userActionSetsList?.length > 0) { // 数据源
                 data.userActionSets = item?.userActionSetsList?.map((item: any) => ({ id: item?.id, type: item?.type }))
             }
@@ -877,7 +877,7 @@ const CreateAd: React.FC = () => {
                             }
                         })
                     })
-                    setAccountCreateLogs(userArr?.map((item) => ({ adAccountId: item?.accountId, id: item.id })))
+                    setAccountCreateLogs(userArr?.map((item) => ({ adAccountId: item?.accountId, id: item.accountId })))
                     clearData()
                     setQueryForm({ ...queryForm, adqPageList: [], pageList: [], taskMediaMaps: queryForm?.taskMediaMaps?.map((item: { sysPageId: number }) => ({ ...item, sysPageId: '', accountPageIdMap: {}, cropUserGroupMap: [] })) })
                 } else {
@@ -928,7 +928,7 @@ const CreateAd: React.FC = () => {
                     <Select
                         mode="multiple"
                         style={{ minWidth: 200, maxWidth: 500 }}
-                        placeholder="请选择媒体账户"
+                        placeholder="媒体账户(多个,,空格换行)"
                         maxTagCount={1}
                         allowClear
                         bordered={false}
@@ -938,7 +938,7 @@ const CreateAd: React.FC = () => {
                         dropdownMatchSelectWidth={false}
                         autoClearSearchValue={false}
                         filterOption={(input: any, option: any) => {
-                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig) : []
+                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig).filter((item: any) => item) : []
                             return newInput?.some(val => option!.children?.toString().toLowerCase()?.includes(val))
                         }}
                         value={accountCreateLogs?.map((item: { id: number }) => item?.id)}
@@ -961,19 +961,19 @@ const CreateAd: React.FC = () => {
                                         if (e.target.checked) {
                                             data = JSON.parse(JSON.stringify(getAllUserAccount?.data?.data))
                                             if (accSearch) {
-                                                let newAccSearch = accSearch?.split(/[,,\n\s]+/ig)
+                                                let newAccSearch = accSearch?.split(/[,,\n\s]+/ig).filter((item: any) => item)
                                                 data = data?.filter((item: any) => newAccSearch?.some(val => item!.accountId?.toString().toLowerCase()?.includes(val)))
                                             }
                                         }
                                         setQueryForm({ ...queryForm, adqPageList: [], pageList: [], taskMediaMaps: queryForm?.taskMediaMaps?.map((item: { sysPageId: number }) => ({ ...item, sysPageId: '', accountPageIdMap: {}, cropUserGroupMap: [] })) })
-                                        setAccountCreateLogs(data?.map((item: any) => ({ adAccountId: item?.accountId, id: item?.id })))
+                                        setAccountCreateLogs(data?.map((item: any) => ({ adAccountId: item?.accountId, id: item?.adAccountId })))
                                         clearData()
                                     }}>全选</Checkbox>
                                 </Space>
                             </>
                         )}
                     >
-                        {getAllUserAccount?.data?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.remark ? item.accountId + '_' + item.remark : item.accountId}</Select.Option>)}
+                        {getAllUserAccount?.data?.data?.map((item: any) => <Select.Option value={item.accountId} key={item.id}>{item.remark ? item.accountId + '_' + item.remark : item.accountId}</Select.Option>)}
                     </Select>
                 </Selector>
                 <Selector label="推广目标">