Forráskód Böngészése

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage into develop

shenwu 2 éve
szülő
commit
c24bc23356
29 módosított fájl, 389 hozzáadás és 130 törlés
  1. 32 0
      src/components/EarlyWarning/expandedColumns.tsx
  2. 46 0
      src/components/EarlyWarning/expandedRowTable.tsx
  3. 3 1
      src/components/EarlyWarning/index.tsx
  4. 1 1
      src/components/EarlyWarning/setEarlyWarning.tsx
  5. 1 1
      src/components/EarlyWarning/tableConfig.tsx
  6. 2 1
      src/components/Tables/index.tsx
  7. 44 32
      src/pages/adMonitor/adMonitorList/config.ts
  8. 42 8
      src/pages/adMonitor/adMonitorList/tableMonitorConfig.tsx
  9. 46 12
      src/pages/adMonitor/adMonitorList/tablePlanListConfig.tsx
  10. 5 0
      src/pages/launchSystemNew/account/addAccountToGroup.tsx
  11. 3 3
      src/pages/launchSystemNew/account/index.tsx
  12. 12 11
      src/pages/launchSystemNew/adq/ad/copy.tsx
  13. 2 2
      src/pages/launchSystemNew/adq/adAccount/index.tsx
  14. 2 2
      src/pages/launchSystemNew/adq/index.tsx
  15. 1 1
      src/pages/launchSystemNew/components/crowdPackModal/index.tsx
  16. 1 1
      src/pages/launchSystemNew/components/customerServiceModal/index.tsx
  17. 1 1
      src/pages/launchSystemNew/components/dataSourceModal/index.tsx
  18. 1 1
      src/pages/launchSystemNew/components/expandModal/index.tsx
  19. 1 1
      src/pages/launchSystemNew/components/idModal/index.tsx
  20. 1 1
      src/pages/launchSystemNew/components/pageModal/index.tsx
  21. 12 5
      src/pages/launchSystemNew/launchManage/createAd/ad/modal/leadAd.tsx
  22. 12 5
      src/pages/launchSystemNew/launchManage/createAd/ad/modal/wechat.tsx
  23. 34 14
      src/pages/launchSystemNew/launchManage/createAd/creative/index.tsx
  24. 1 1
      src/pages/launchSystemNew/launchManage/createAd/creative/modal/index.tsx
  25. 2 2
      src/pages/launchSystemNew/launchManage/createAd/creativeCL/modal/copywriting.tsx
  26. 32 13
      src/pages/launchSystemNew/launchManage/createAd/index.tsx
  27. 31 3
      src/pages/launchSystemNew/launchManage/createAd/tableConfig.tsx
  28. 17 6
      src/services/adMonitor/earlyWarning.ts
  29. 1 1
      src/services/api.ts

+ 32 - 0
src/components/EarlyWarning/expandedColumns.tsx

@@ -0,0 +1,32 @@
+import { DelAdSysWarningRuleProps } from "@/services/adMonitor/earlyWarning"
+import { Popconfirm } from "antd"
+import React from "react"
+
+function columns(del: (data: DelAdSysWarningRuleProps) => void) {
+    const data: any = [
+        { title: '广告账号', dataIndex: 'accountId', key: 'accountId' },
+        { title: '广告名称', dataIndex: 'adgroupName', key: 'adgroupName', width: 350, ellipsis: true },
+        { title: '广告ID', dataIndex: 'adgroupId', key: 'adgroupId' },
+        { title: '创意ID', dataIndex: 'campaignId', key: 'campaignId' },
+        {
+            title: '操作',
+            dataIndex: 'cz',
+            key: 'cz',
+            render: (a: string[], b: any) => {
+                return <Popconfirm
+                    title="确定删除?"
+                    onConfirm={() => del(b)}
+                    okText="是"
+                    cancelText="否"
+                >
+                    <a style={{ color: 'red' }}>删除</a>
+                </Popconfirm>
+            }
+        },
+    ]
+
+
+    return data
+}
+
+export default columns

+ 46 - 0
src/components/EarlyWarning/expandedRowTable.tsx

@@ -0,0 +1,46 @@
+import { useAjax } from "@/Hook/useAjax"
+import { delAdSysWarningRuleApi, DelAdSysWarningRuleProps, getSysWarningRuleApi } from "@/services/adMonitor/earlyWarning"
+import { SyncOutlined } from "@ant-design/icons"
+import { message, Table } from "antd"
+import React, { useEffect } from "react"
+import columns from "./expandedColumns"
+
+
+const ExpandedRowTable: React.FC<{ data: any }> = ({ data }) => {
+
+    /*****************************/
+    const getSysWarningRule = useAjax((params) => getSysWarningRuleApi(params), { formatResult: true })
+    const delAdSysWarningRule = useAjax((params) => delAdSysWarningRuleApi(params))
+    /*****************************/
+
+    useEffect(() => {
+        console.log(data);
+        if (data?.id) {
+            getSysWarningRule.run(data.id)
+        }
+    }, [])
+
+
+    const del = (data: DelAdSysWarningRuleProps) => {
+        let { accountId, adgroupId, campaignId } = data
+        delAdSysWarningRule.run([{ accountId, adgroupId, campaignId }]).then(res => {
+            message.success('删除成功')
+            getSysWarningRule.refresh()
+        })
+    }
+
+    return <Table
+        size="small"
+        bordered
+        columns={columns(del)}
+        loading={getSysWarningRule.loading}
+        dataSource={getSysWarningRule?.data?.data}
+        title={() => <div style={{ textAlign: 'center', color: '#1890ff', fontWeight: 700, position: 'relative' }}>
+            <span>当前规则配置下的广告</span>
+            <a style={{ position: 'absolute', left: 0 }} onClick={() => getSysWarningRule.refresh()}><SyncOutlined /></a>
+        </div>}
+        pagination={false}
+    />;
+}
+
+export default React.memo(ExpandedRowTable)

+ 3 - 1
src/components/EarlyWarning/index.tsx

@@ -4,6 +4,7 @@ import { delSysWarningRuleApi, getSysWarningRuleListApi, RuleProps } from "@/ser
 import { Button, Drawer, Input, message, Space } from "antd"
 import React, { useEffect, useState } from "react"
 import AddEdit from "./addEdit"
+import ExpandedRowTable from "./expandedRowTable"
 import tableConfig from "./tableConfig"
 
 
@@ -51,7 +52,7 @@ const EarlyWarning: React.FC = () => {
                 field
             }
         })
-        
+
         setEditData({ initialValues: newData })
         setAddVisible(true)
     }
@@ -91,6 +92,7 @@ const EarlyWarning: React.FC = () => {
                     total={getSysWarningRuleList?.data?.data?.length}
                     gutter={[0, 10]}
                     leftChild={<Space direction='vertical'></Space>}
+                    expandedRowRender={(data) => <ExpandedRowTable data={data}/>}
                 />
             </Space>
         </Drawer>}

+ 1 - 1
src/components/EarlyWarning/setEarlyWarning.tsx

@@ -67,7 +67,7 @@ const SetEarlyWarning: React.FC<Props> = (props) => {
                             ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                         }
                     >
-                        {getSysWarningRuleList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.ruleName}</Select.Option>)}
+                        {getSysWarningRuleList?.data?.filter((item: any) => !item?.defaultRule)?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.ruleName}</Select.Option>)}
                     </Select>
                 </Form.Item>
             </Form>

+ 1 - 1
src/components/EarlyWarning/tableConfig.tsx

@@ -33,7 +33,7 @@ function tableConfig(edit: (data: any) => void, del: (id: number) => void): any
             dataIndex: 'warningType',
             key: 'warningType',
             align: 'center',
-            width: 100,
+            width: 115,
             render: (a: string[], b: any) => {
                 return a?.map((item, index) => <Tag color={['#f50', '#2db7f5'][index]} key={index}>{WarningTypeEnum[item]}</Tag>)
             }

+ 2 - 1
src/components/Tables/index.tsx

@@ -145,7 +145,8 @@ function Tables(props: Props) {
             className={className}
             expandable={expandedRowRender ? {
                 defaultExpandedRowKeys: ['0'],
-                expandRowByClick: true, expandedRowRender: (data) => {
+                expandRowByClick: false, 
+                expandedRowRender: (data) => {
                     return expandedRowRender(data)
                 }
             } : {}}

+ 44 - 32
src/pages/adMonitor/adMonitorList/config.ts

@@ -82,15 +82,18 @@ const qiliangpaihang = [
         ]
     },
     {
-        label: '公众号转化',
+        label: '转化',
         data: [
-            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '公众号转化', default: 6, width: 85 },
-            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '公众号转化', width: 70 },
-            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '公众号转化', width: 85 },
-            { title: '加粉成本', dataIndex: 'addFansCost', label: '公众号转化' },
-            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCost', label: '公众号转化' },
-            { title: '加粉数', dataIndex: 'addFansCount', label: '公众号转化' },
-            { title: '公众号关注次数', dataIndex: 'mpFollowPv', label: '公众号转化' },
+            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '转化', default: 6, width: 85 },
+            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '转化', width: 70 },
+            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '转化', width: 85 },
+            { title: '加粉成本', dataIndex: 'addFansCostDay', label: '转化' },
+            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCostDay', label: '转化' },
+            { title: '加粉数', dataIndex: 'addFansCountDay', label: '转化' },
+            { title: '公众号关注次数', dataIndex: 'mpFollowPvDay', label: '转化' },
+            { title: '加企业微信客服人数', dataIndex: 'scanFollowUvDay', label: '转化' },
+            { title: '加企业微信客服成本', dataIndex: 'scanFollowCostDay', label: '转化' },
+            { title: '加企业微信客服率', dataIndex: 'scanFollowRateDay', label: '转化' },
         ]
     },
 ]
@@ -179,15 +182,18 @@ const qiliangpaihanghour = [
         ]
     },
     {
-        label: '公众号转化',
+        label: '转化',
         data: [
-            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '公众号转化', default: 6, width: 85 },
-            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '公众号转化', width: 70 },
-            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '公众号转化', width: 85 },
-            { title: '加粉成本', dataIndex: 'addFansCost', label: '公众号转化' },
-            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCost', label: '公众号转化' },
-            { title: '加粉数', dataIndex: 'addFansCount', label: '公众号转化' },
-            { title: '公众号关注次数', dataIndex: 'mpFollowPv', label: '公众号转化' },
+            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '转化', default: 6, width: 85 },
+            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '转化', width: 70 },
+            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '转化', width: 85 },
+            { title: '加粉成本', dataIndex: 'addFansCostDay', label: '转化' },
+            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCostDay', label: '转化' },
+            { title: '加粉数', dataIndex: 'addFansCountDay', label: '转化' },
+            { title: '公众号关注次数', dataIndex: 'mpFollowPvDay', label: '转化' },
+            { title: '加企业微信客服人数', dataIndex: 'scanFollowUvDay', label: '转化' },
+            { title: '加企业微信客服成本', dataIndex: 'scanFollowCostDay', label: '转化' },
+            { title: '加企业微信客服率', dataIndex: 'scanFollowRateDay', label: '转化' },
         ]
     },
 ]
@@ -276,15 +282,18 @@ const qiliangpaihangminute = [
         ]
     },
     {
-        label: '公众号转化',
+        label: '转化',
         data: [
-            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '公众号转化', default: 6, width: 85 },
-            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '公众号转化', width: 85 },
-            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '公众号转化', width: 85 },
-            { title: '加粉成本', dataIndex: 'addFansCost', label: '公众号转化' },
-            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCost', label: '公众号转化' },
-            { title: '加粉数', dataIndex: 'addFansCount', label: '公众号转化' },
-            { title: '公众号关注次数', dataIndex: 'mpFollowPv', label: '公众号转化' },
+            { title: '公众号关注人数', dataIndex: 'mpFollowUvDay', label: '转化', default: 6, width: 85 },
+            { title: '公众号关注率', dataIndex: 'mpFollowRateDay', label: '转化', width: 85 },
+            { title: '公众号关注成本', dataIndex: 'mpFollowCostDay', label: '转化', width: 85 },
+            { title: '加粉成本', dataIndex: 'addFansCostDay', label: '转化' },
+            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCostDay', label: '转化' },
+            { title: '加粉数', dataIndex: 'addFansCountDay', label: '转化' },
+            { title: '公众号关注次数', dataIndex: 'mpFollowPvDay', label: '转化' },
+            { title: '加企业微信客服人数', dataIndex: 'scanFollowUvDay', label: '转化' },
+            { title: '加企业微信客服成本', dataIndex: 'scanFollowCostDay', label: '转化' },
+            { title: '加企业微信客服率', dataIndex: 'scanFollowRateDay', label: '转化' },
         ]
     },
 ]
@@ -367,15 +376,18 @@ const guanggao = [
         ]
     },
     {
-        label: '公众号转化',
+        label: '转化',
         data: [
-            { title: '公众号关注人数', dataIndex: 'mpFollowUser', label: '公众号转化', width: 85 },
-            { title: '公众号关注率', dataIndex: 'mpFollowRate', label: '公众号转化', width: 85 },
-            { title: '公众号关注成本', dataIndex: 'mpFollowCost', label: '公众号转化', width: 85 },
-            { title: '加粉成本(今日)', dataIndex: 'addFansCostDay', label: '公众号转化' },
-            { title: '公众号关注次数成本(今日)', dataIndex: 'mpFollowPvCostDay', label: '公众号转化' },
-            { title: '加粉数(今日)', dataIndex: 'addFansCountDay', label: '公众号转化' },
-            { title: '公众号关注次数(今日)', dataIndex: 'mpFollowPvDay', label: '公众号转化' },
+            { title: '公众号关注人数', dataIndex: 'mpFollowUser', label: '转化', width: 85 },
+            { title: '公众号关注率', dataIndex: 'mpFollowRate', label: '转化', width: 85 },
+            { title: '公众号关注成本', dataIndex: 'mpFollowCost', label: '转化', width: 85 },
+            { title: '加粉成本', dataIndex: 'addFansCost', label: '转化' },
+            { title: '公众号关注次数成本', dataIndex: 'mpFollowPvCost', label: '转化' },
+            { title: '加粉数', dataIndex: 'addFansCount', label: '转化' },
+            { title: '公众号关注次数', dataIndex: 'mpFollowPv', label: '转化' },
+            { title: '加企业微信客服人数', dataIndex: 'scanFollowUv', label: '转化' },
+            { title: '加企业微信客服成本', dataIndex: 'scanFollowCost', label: '转化' },
+            { title: '加企业微信客服率', dataIndex: 'scanFollowRate', label: '转化' },
         ]
     },
 ]

+ 42 - 8
src/pages/adMonitor/adMonitorList/tableMonitorConfig.tsx

@@ -625,8 +625,8 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
             },
             {
                 title: '加粉成本',
-                dataIndex: 'addFansCost',
-                key: 'addFansCost',
+                dataIndex: 'addFansCostDay',
+                key: 'addFansCostDay',
                 align: 'center',
                 width: 75,
                 // sorter: true,
@@ -636,8 +636,8 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
             },
             {
                 title: '公众号关注次数成本',
-                dataIndex: 'mpFollowPvCost',
-                key: 'mpFollowPvCost',
+                dataIndex: 'mpFollowPvCostDay',
+                key: 'mpFollowPvCostDay',
                 align: 'center',
                 width: 80,
                 // sorter: true,
@@ -647,8 +647,8 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
             },
             {
                 title: '加粉数',
-                dataIndex: 'addFansCount',
-                key: 'addFansCount',
+                dataIndex: 'addFansCountDay',
+                key: 'addFansCountDay',
                 align: 'center',
                 width: 75,
                 // sorter: true,
@@ -658,8 +658,8 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
             },
             {
                 title: '公众号关注次数',
-                dataIndex: 'mpFollowPv',
-                key: 'mpFollowPv',
+                dataIndex: 'mpFollowPvDay',
+                key: 'mpFollowPvDay',
                 align: 'center',
                 width: 75,
                 // sorter: true,
@@ -667,6 +667,40 @@ function columnsMonitor(planDetail: (id: number) => void, getDetailList: (adId:
                     return <Statistic value={a || 0} />
                 }
             },
+            {
+                title: '加企业微信客服人数',
+                dataIndex: 'scanFollowUvDay',
+                key: 'scanFollowUvDay',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    return <Statistic value={a || 0} />
+                }
+            },
+            {
+                title: '加企业微信客服成本',
+                dataIndex: 'scanFollowCostDay',
+                key: 'scanFollowCostDay',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    return <Statistic value={a || 0} />
+                }
+            },
+            {
+                title: '加企业微信客服率',
+                dataIndex: 'scanFollowRateDay',
+                key: 'scanFollowRateDay',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
+                    return a + '%'
+                }
+            },
             {
                 title: '操作',
                 dataIndex: 'event',

+ 46 - 12
src/pages/adMonitor/adMonitorList/tablePlanListConfig.tsx

@@ -537,9 +537,9 @@ function columnsMonitor(details: (id: number) => void) {
                 }
             },
             {
-                title: '加粉成本(今日)',
-                dataIndex: 'addFansCostDay',
-                key: 'addFansCostDay',
+                title: '加粉成本',
+                dataIndex: 'addFansCost',
+                key: 'addFansCost',
                 align: 'center',
                 width: 80,
                 // sorter: true,
@@ -548,9 +548,9 @@ function columnsMonitor(details: (id: number) => void) {
                 }
             },
             {
-                title: '公众号关注次数成本(今日)',
-                dataIndex: 'mpFollowPvCostDay',
-                key: 'mpFollowPvCostDay',
+                title: '公众号关注次数成本',
+                dataIndex: 'mpFollowPvCost',
+                key: 'mpFollowPvCost',
                 align: 'center',
                 width: 105,
                 // sorter: true,
@@ -559,9 +559,9 @@ function columnsMonitor(details: (id: number) => void) {
                 }
             },
             {
-                title: '加粉数(今日)',
-                dataIndex: 'addFansCountDay',
-                key: 'addFansCountDay',
+                title: '加粉数',
+                dataIndex: 'addFansCount',
+                key: 'addFansCount',
                 align: 'center',
                 width: 80,
                 // sorter: true,
@@ -570,9 +570,9 @@ function columnsMonitor(details: (id: number) => void) {
                 }
             },
             {
-                title: '公众号关注次数(今日)',
-                dataIndex: 'mpFollowPvDay',
-                key: 'mpFollowPvDay',
+                title: '公众号关注次数',
+                dataIndex: 'mpFollowPv',
+                key: 'mpFollowPv',
                 align: 'center',
                 width: 100,
                 // sorter: true,
@@ -580,6 +580,40 @@ function columnsMonitor(details: (id: number) => void) {
                     return <Statistic value={a || 0} />
                 }
             },
+            {
+                title: '加企业微信客服人数',
+                dataIndex: 'scanFollowUv',
+                key: 'scanFollowUv',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    return <Statistic value={a || 0} />
+                }
+            },
+            {
+                title: '加企业微信客服成本',
+                dataIndex: 'scanFollowCost',
+                key: 'scanFollowCost',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    return <Statistic value={a || 0} />
+                }
+            },
+            {
+                title: '加企业微信客服率',
+                dataIndex: 'scanFollowRate',
+                key: 'scanFollowRate',
+                align: 'center',
+                width: 80,
+                // sorter: true,
+                render: (a: any) => {
+                    a = a ? parseFloat((a * 100).toFixed(2)) : 0
+                    return a + '%'
+                }
+            },
             {
                 title: '操作',
                 dataIndex: 'event',

+ 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>

+ 12 - 11
src/pages/launchSystemNew/adq/ad/copy.tsx

@@ -52,7 +52,7 @@ const Copy: React.FC<Props> = (props) => {
 
             delete newValues?.date
             delete newValues?.dateType
-            if(newValues?.bidAmount){
+            if (newValues?.bidAmount) {
                 newValues.bidAmount = newValues.bidAmount * 100
             }
             console.log(newValues);
@@ -96,7 +96,8 @@ const Copy: React.FC<Props> = (props) => {
                 timeSeries: getTimeSeriesList(),
                 firstDayBeginTime: moment('2023-02-24 00:00:00'),
                 copyCount: 1,
-                isCopyAdcreative:true
+                configuredStatus: null,
+                isCopyAdcreative: true
             }}
         >
             <Form.Item label={<strong>投放日期</strong>} name='dateType'>
@@ -147,17 +148,17 @@ const Copy: React.FC<Props> = (props) => {
                 </Space>
             </Form.Item>
             <Form.Item label={<strong>广告出价</strong>} name={"bidAmount"}>
-                        <InputNumber  min={0} placeholder="价格 元"/>
+                <InputNumber min={0} placeholder="价格 元" />
             </Form.Item>
-            <Form.Item label={<strong>广告启停</strong>} name={"configuredStatus"}>
-                        <Select style={{width:100}}>
-                            <Select.Option key={null} value={null}>默认</Select.Option>
-                            <Select.Option key={"AD_STATUS_NORMAL"} value={"AD_STATUS_NORMAL"}>开启</Select.Option>
-                            <Select.Option key={"AD_STATUS_SUSPEND"} value={"AD_STATUS_SUSPEND"}>关闭</Select.Option>
-                        </Select>
+            <Form.Item label={<strong>广告启停</strong>} name={"configuredStatus"} tooltip="默认:沿用选择广告的启停状态,开启or关闭:复制的所有广告设置成开启or关闭">
+                <Select style={{ width: 100 }}>
+                    <Select.Option key={null} value={null}>默认</Select.Option>
+                    <Select.Option key={"AD_STATUS_NORMAL"} value={"AD_STATUS_NORMAL"}>开启</Select.Option>
+                    <Select.Option key={"AD_STATUS_SUSPEND"} value={"AD_STATUS_SUSPEND"}>关闭</Select.Option>
+                </Select>
             </Form.Item>
-            <Form.Item label={<strong>是否复制创意</strong>} name={"isCopyAdcreative"} valuePropName="checked"  >
-                <Switch checkedChildren="是" unCheckedChildren="否"  />
+            <Form.Item label={<strong>是否复制创意</strong>} name={"isCopyAdcreative"} valuePropName="checked" tooltip="选择“是”,新建创意,复制条数不限制;选择”否“沿用旧创意,复制条数限制26条。">
+                <Switch checkedChildren="是" unCheckedChildren="否" />
             </Form.Item>
             <Form.Item label={<strong>复制数量</strong>} name='copyCount' rules={[{ required: true, message: '请输入复制数量' }]}>
                 <InputNumber min={1} />

+ 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 = () => {

+ 12 - 5
src/pages/launchSystemNew/launchManage/createAd/ad/modal/leadAd.tsx

@@ -11,6 +11,7 @@ import { createSysAdgroups } from '@/services/launchAdq/localAd';
 import AdPositionList from './adPositionList';
 import BidAdjustment from './bidAdjustment';
 import { useModel } from 'umi';
+import { RangePickerProps } from 'antd/lib/date-picker';
 const { RangePicker }: { RangePicker: any } = DatePicker;
 let DatePickers: any = DatePicker
 interface Props {
@@ -270,7 +271,7 @@ function LeadAdModal(props: Props) {
         } else {
             form.setFieldsValue({ 
                 adgroupName: '广告_销售线索_' + moment().format('YYYYMMDDhhmmss') + '_' + currentUser.userId,
-                date: moment().startOf('day').add(4, 'M'),
+                date: moment().startOf('day').add(2, 'M'),
                 optimizationGoal: "OPTIMIZATIONGOAL_ECOMMERCE_ORDER",
                 bidStrategy: "BID_STRATEGY_TARGET_COST",
                 bidAmount: '1000'
@@ -365,6 +366,12 @@ function LeadAdModal(props: Props) {
         })
     }
 
+    /** 禁止选择以前时间 */
+    const disabledDate: RangePickerProps['disabledDate'] = current => {
+        // Can not select days before today and today
+        return current && current < moment().startOf('day');
+    };
+
     return <Modal
         visible={visible}
         title={type === 'add' ? '新建广告' : type === 'look' ? '广告详情' : '编辑广告'}
@@ -486,10 +493,10 @@ function LeadAdModal(props: Props) {
             <Form.Item label={<strong>投放日期</strong>} name='dateType'>
                 <Radio.Group onChange={(e) => {
                     if (e.target.value === "1") {
-                        form.setFieldsValue({ date: [moment().startOf('day').add(4, 'M'), moment().startOf('day').add(12, 'M')] })
+                        form.setFieldsValue({ date: [moment().startOf('day').add(2, 'M'), moment().startOf('day').add(5, 'M')] })
                     }
                     if (e.target.value === "2") {
-                        form.setFieldsValue({ date: moment().startOf('day').add(4, 'M') })
+                        form.setFieldsValue({ date: moment().startOf('day').add(2, 'M') })
                     }
                 }}>
                     <Radio.Button value="1">选择开始与结束日期</Radio.Button>
@@ -499,9 +506,9 @@ function LeadAdModal(props: Props) {
             {/* 投放日期的不同展示不同的日期选择 */}
             {
                 dateType === '1' ? <Form.Item name='date' rules={[{ required: true, message: '请选择日期' }]}>
-                    <RangePicker style={{ marginLeft: 177 }}></RangePicker>
+                    <RangePicker style={{ marginLeft: 177 }} disabledDate={disabledDate}></RangePicker>
                 </Form.Item> : <Form.Item name='date' style={{ marginLeft: 177 }} rules={[{ required: true, message: '请选择日期' }]}>
-                    <DatePickers />
+                    <DatePickers disabledDate={disabledDate}/>
                 </Form.Item>
             }
             <Form.Item label={<strong>投放时段</strong>}>

+ 12 - 5
src/pages/launchSystemNew/launchManage/createAd/ad/modal/wechat.tsx

@@ -12,6 +12,7 @@ import AdPositionList from './adPositionList';
 import { siteSetData, SiteSetPackageDataProps } from './leadAd';
 import BidAdjustment from './bidAdjustment';
 import { useModel } from 'umi';
+import { RangePickerProps } from 'antd/lib/date-picker';
 const { RangePicker }: { RangePicker: any } = DatePicker;
 let DatePickers: any = DatePicker
 interface Props {
@@ -251,7 +252,7 @@ function WeChatAdModal(props: Props) {
         } else {
             form.setFieldsValue({
                 adgroupName: '广告_微信朋友圈_' + moment().format('YYYYMMDDhhmmss') + '_' + currentUser.userId,
-                date: moment().startOf('day').add(4, 'M'),
+                date: moment().startOf('day').add(2, 'M'),
                 optimizationGoal: "OPTIMIZATIONGOAL_ECOMMERCE_ORDER",
                 bidStrategy: "BID_STRATEGY_TARGET_COST",
                 bidAmount: '1000'
@@ -346,6 +347,12 @@ function WeChatAdModal(props: Props) {
         })
     }
 
+    /** 禁止选择以前时间 */
+    const disabledDate: RangePickerProps['disabledDate'] = current => {
+        // Can not select days before today and today
+        return current && current < moment().startOf('day');
+    };
+
     return <Modal
         visible={visible}
         title={type === 'add' ? '新建广告' : type === 'look' ? '广告详情' : '编辑广告'}
@@ -467,10 +474,10 @@ function WeChatAdModal(props: Props) {
             <Form.Item label={<strong>投放日期</strong>} name='dateType'>
                 <Radio.Group onChange={(e) => {
                     if (e.target.value === "1") {
-                        form.setFieldsValue({ date: [moment().startOf('day').add(4, 'M'), moment().startOf('day').add(12, 'M')] })
+                        form.setFieldsValue({ date: [moment().startOf('day').add(2, 'M'), moment().startOf('day').add(5, 'M')] })
                     }
                     if (e.target.value === "2") {
-                        form.setFieldsValue({ date: moment().startOf('day').add(4, 'M') })
+                        form.setFieldsValue({ date: moment().startOf('day').add(2, 'M') })
                     }
                 }}>
                     <Radio.Button value="1">选择开始与结束日期</Radio.Button>
@@ -480,9 +487,9 @@ function WeChatAdModal(props: Props) {
             {/* 投放日期的不同展示不同的日期选择 */}
             {
                 dateType === '1' ? <Form.Item name='date' rules={[{ required: true, message: '请选择日期' }]}>
-                    <RangePicker style={{ marginLeft: 177 }}></RangePicker>
+                    <RangePicker style={{ marginLeft: 177 }} disabledDate={disabledDate}></RangePicker>
                 </Form.Item> : <Form.Item name='date' style={{ marginLeft: 177 }} rules={[{ required: true, message: '请选择日期' }]}>
-                    <DatePickers />
+                    <DatePickers disabledDate={disabledDate}/>
                 </Form.Item>
             }
             <Form.Item label={<strong>投放时段</strong>}>

+ 34 - 14
src/pages/launchSystemNew/launchManage/createAd/creative/index.tsx

@@ -1,5 +1,5 @@
 import React, { useCallback, useState } from 'react'
-import { Col, Space, Spin, Tabs, Tooltip, } from 'antd'
+import { Button, Col, Space, Spin, Tabs, Tooltip, } from 'antd'
 import style from '../index.less'
 import CreativeModal from "../../../components/creativeModal"
 import { CreateAdProps } from '@/services/launchAdq/createAd'
@@ -7,6 +7,7 @@ import { BaseResult } from '@ahooksjs/use-request/lib/types'
 import { ModalConfig } from '../ad'
 import AdcreativeCol from "../adcreativeCol"
 import CreativePup from './modal'
+import { CopyOutlined } from '@ant-design/icons'
 
 type Props = {
     queryForm: Partial<CreateAdProps>,
@@ -67,6 +68,17 @@ function Creative(props: Props) {
             }
         }
     }, [queryForm])
+
+    // 复制当前创意
+    const copyBefore = () => {
+        if (queryForm.taskMediaMaps) {
+            let taskMediaMaps = queryForm.taskMediaMaps
+            let taskMediaMap = queryForm.taskMediaMaps[targetKey]
+            taskMediaMaps.push(JSON.parse(JSON.stringify(taskMediaMap)))
+            setQueryForm({ ...queryForm, taskMediaMaps: taskMediaMaps })
+        }
+    }
+
     return <Col span={12} className={style.conRightBorder}>
         <div className={style.top}>创意基本信息
             {queryForm.taskMediaMaps && queryForm.taskMediaMaps?.length > 0 && <a onClick={() => {
@@ -75,20 +87,28 @@ function Creative(props: Props) {
             }}>全部清空</a>}
         </div>
         <div className={style.center}>
-            <Tabs size={'small'} onEdit={onEdit} type="editable-card" activeKey={targetKey} onChange={(key) => { set_targetKey(key) }} >
-                {
-                    queryForm?.taskMediaMaps?.map((item, index) => {
-                        return <Tabs.TabPane key={index} tab={'创意' + (index + 1)}>
-                            <Spin spinning={getSysAdcreative.loading}>
-                                <div className={style.centerContent}>
-                                    {item?.sysAdcreative && <AdcreativeCol data={item.sysAdcreative} />}
-                                </div>
-                            </Spin>
-                        </Tabs.TabPane >
-                    })
-                }
+            <Tabs
+                size={'small'}
+                onEdit={onEdit}
+                type="editable-card"
+                activeKey={targetKey}
+                tabBarExtraContent={queryForm.taskMediaMaps?.[targetKey]?.sysAdcreative ? {
+                    right: <Tooltip title="复制当前创意">
+                        <Button icon={<CopyOutlined />} style={{ marginLeft: 4 }} type="link" onClick={copyBefore}></Button>
+                    </Tooltip>
+                } : {}}
+                onChange={(key) => { set_targetKey(key) }}
+            >
+                {queryForm?.taskMediaMaps?.map((item, index) => {
+                    return <Tabs.TabPane key={index} tab={'创意' + (index + 1)}>
+                        <Spin spinning={getSysAdcreative.loading}>
+                            <div className={style.centerContent}>
+                                {item?.sysAdcreative && <AdcreativeCol data={item.sysAdcreative} />}
+                            </div>
+                        </Spin>
+                    </Tabs.TabPane>
+                })}
             </Tabs>
-
         </div>
         <div className={style.bottom}>
             <Space size={20}>

+ 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} />

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

@@ -28,6 +28,7 @@ import CustomerServiceModal from "../../components/customerServiceModal"
 import { getTaskDetailsApi } from "@/services/launchAdq/taskList"
 import CreativeCL from "./creativeCL"
 import { groupBy } from "@/utils/utils"
+import moment from "moment"
 import { getAccountListApi, getGroupListApi } from "@/services/launchAdq/subgroup"
 
 const CreateAd: React.FC = () => {
@@ -86,7 +87,7 @@ const CreateAd: React.FC = () => {
     const getAdcreativeTemplate = useAjax((params) => get_adcreative_template(params))
     const getGroupList = useAjax(() => getGroupListApi())
     /*************************/
-
+    
     useEffect(() => {
         getGroupList.run()
     }, [])
@@ -116,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 })),
                         // 商品
@@ -169,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
@@ -194,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 }] : [] }
                                     })
                                 }
@@ -224,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
@@ -295,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 }] : [] }
                                     })
                                 }
@@ -359,6 +360,14 @@ const CreateAd: React.FC = () => {
                         type2Data['model'] = 'corres'
                     }
                 }
+                if (moment(sysAdgroup?.beginDate) < moment()) {
+                    sysAdgroup.beginDate = moment().format('YYYY-MM-DD')
+                    message.warning('请注意,检测投放开始日期小于今天,以自动改成今天,如需修改,请重新设置')
+                }
+                if (moment(sysAdgroup?.endDate) < moment()) {
+                    sysAdgroup.endDate = moment().format('YYYY-MM-DD')
+                    message.warning('请注意,检测投放结束日期小于今天,以自动改成今天,如需修改,请重新设置')
+                }
                 setQueryForm({
                     ...queryForm,
                     ...type2Data,
@@ -383,6 +392,16 @@ const CreateAd: React.FC = () => {
             let adqAdData = localStorage.getItem('ADQAD')
             if (adqAdData) {
                 const { queryForm, accountCreateLogs } = JSON.parse(adqAdData)
+                if (queryForm?.sysAdgroup) {
+                    if (moment(queryForm?.sysAdgroup?.beginDate) < moment()) {
+                        queryForm.sysAdgroup.beginDate = moment().format('YYYY-MM-DD')
+                        message.warning('请注意,检测投放开始日期小于今天,已自动改成今天,如需修改,请重新设置')
+                    }
+                    if (moment(queryForm?.sysAdgroup?.endDate) < moment()) {
+                        queryForm.sysAdgroup.endDate = moment().format('YYYY-MM-DD')
+                        message.warning('请注意,检测投放结束日期小于今天,已自动改成今天,如需修改,请重新设置')
+                    }
+                }
                 setQueryForm({ ...queryForm })
                 setAccountCreateLogs(accountCreateLogs)
             }
@@ -617,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 }))
             }
@@ -858,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 {
@@ -909,7 +928,7 @@ const CreateAd: React.FC = () => {
                     <Select
                         mode="multiple"
                         style={{ minWidth: 200, maxWidth: 500 }}
-                        placeholder="请选择媒体账户"
+                        placeholder="媒体账户(多个,,空格换行)"
                         maxTagCount={1}
                         allowClear
                         bordered={false}
@@ -919,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)}
@@ -942,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="推广目标">

+ 31 - 3
src/pages/launchSystemNew/launchManage/createAd/tableConfig.tsx

@@ -1,4 +1,4 @@
-import { Tooltip } from "antd"
+import { Space, Tooltip } from "antd"
 import React from "react"
 import style from './index.less'
 import { BidModeEnum, OptimizationGoalEnum, PromotedObjectType, SiteSetEnum } from "@/services/launchAdq/enum";
@@ -60,9 +60,9 @@ let columns = () => {
             width: 100,
             render: (a: any, b: any) => {
                 if (a) {
-                    return <span style={{ fontSize: "12px" }}>{b?.endDate ? b?.beginDate + '~' + b?.endDate : b?.beginDate + '~ 长期投放'}</span> 
+                    return <span style={{ fontSize: "12px" }}>{b?.endDate ? b?.beginDate + '~' + b?.endDate : b?.beginDate + '~ 长期投放'}</span>
                 }
-                return <span style={{ fontSize: "12px" }}>{b?.sysAdGroupData?.endDate ? b?.sysAdGroupData?.beginDate + '~' + b?.sysAdGroupData?.endDate : b?.sysAdGroupData?.beginDate + '~ 长期投放'}</span> 
+                return <span style={{ fontSize: "12px" }}>{b?.sysAdGroupData?.endDate ? b?.sysAdGroupData?.beginDate + '~' + b?.sysAdGroupData?.endDate : b?.sysAdGroupData?.beginDate + '~ 长期投放'}</span>
             }
         },
         {
@@ -156,6 +156,34 @@ let columns = () => {
                 return <span style={{ fontSize: "12px" }}>{b?.sysAdcreativeData?.adcreativeTemplateAppellation}</span>
             }
         },
+        {
+            title: '创意素材',
+            dataIndex: 'mediaData',
+            key: 'mediaData',
+            width: 140,
+            render: (a: any, b: any) => {
+                let adcreativeElements = b?.sysAdcreativeData?.adcreativeElements
+                if (adcreativeElements) {
+                    let keys = Object.keys(adcreativeElements)
+                    if (keys.includes('imageUrlList')) {
+                        return <Space wrap>{adcreativeElements.imageUrlList.map((url: string, index: number) => <img key={index} src={url} height={25} />)}</Space>
+                    } else if (keys.includes('elementStory')) {
+                        return <Space wrap>{adcreativeElements.elementStory.map((url: string, index: number) => <img key={index} src={url} height={25} />)}</Space>
+                    } else {
+                        if (keys.includes('videoUrl') || keys.includes('shortVideo1Url')) {
+                            return <Space>
+                                {keys?.includes('imageUrl') && <img src={adcreativeElements.imageUrl} height={25}/>}
+                                {keys?.includes('videoUrl') && <video src={adcreativeElements.videoUrl} style={{ height: 25 }}/>}
+                                {keys?.includes('shortVideo1Url') && <video src={adcreativeElements.shortVideo1Url} style={{ height: 25 }}/>}
+                            </Space>
+                        } else {
+                            return keys?.includes('imageUrl') ? <img src={adcreativeElements.imageUrl} height={25}/> : '无'
+                        }
+                    }
+                }
+                return <span style={{ fontSize: "12px" }}>无</span>
+            }
+        },
         {
             title: '创意文案',
             dataIndex: 'description',

+ 17 - 6
src/services/adMonitor/earlyWarning.ts

@@ -63,12 +63,23 @@ export async function delSysWarningRuleApi(ruleIds: string) {
     })
 }
 
-/** */
-// export async function delAdSysWarningRuleApi(ruleIds: string) {
-//     return request(`${api}/adq/sysWarningRule/delete/${ruleIds}`, {
-//         method: 'POST'
-//     })
-// }
+
+export interface DelAdSysWarningRuleProps {
+    accountId: number, 
+    adgroupId: number, 
+    campaignId: number
+}
+/**
+ * 删除告警规则下的广告
+ * @param data 
+ * @returns 
+ */
+export async function delAdSysWarningRuleApi(data: DelAdSysWarningRuleProps[]) {
+    return request(`${api}/adq/sysWarningRule/deleteAd`, {
+        method: 'POST',
+        data
+    })
+}
 
 /**
  * 告警规则列表

+ 1 - 1
src/services/api.ts

@@ -1,4 +1,4 @@
-export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://test.api.zanxiangwl.com/api'
+export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://test.api.zanxiangwl.com'
 // export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://api.zanxiangwl.com'
 export let dataApi: any = process.env.NODE_ENV === 'development' ? 'dapi' : `http://data.zanxiangnet.com`
 export let wxApi: any = process.env.NODE_ENV === 'development' ? 'wxapi' : `https://report.zanxiangwl.com`