|
@@ -1,4 +1,4 @@
|
|
|
-import { Button, Card, Empty, Modal, Popconfirm, Radio, Space, Spin, Table, Tabs, Tag, message, notification } from "antd"
|
|
|
+import { Button, Card, Empty, Modal, Popconfirm, Radio, Space, Spin, Table, Tabs, Tag, Tooltip, message, notification } from "antd"
|
|
|
import React, { useEffect, useState } from "react"
|
|
|
import style from './index.less'
|
|
|
import '../index.less'
|
|
@@ -63,6 +63,7 @@ const Create: React.FC = () => {
|
|
|
const [putInType, setPutInType] = useLocalStorageState<'NOVEL' | 'GAME'>('PUTINTYPE');
|
|
|
const [copyTask, setCopyTask] = useState<{ copyTaskId?: number, uuid?: string }>({})
|
|
|
const [ownerAccountId, setOwnerAccountId] = useState<number>()
|
|
|
+ const [isDqSubmit, setIsDqSubmit] = useState<boolean>(false) // 是否提交过
|
|
|
|
|
|
const createAdgroupTask = useAjax((params) => createAdgroupTaskApi(params))
|
|
|
const createAdgroupTaskV2 = useAjax((params) => createAdgroupTaskV2Api(params))
|
|
@@ -80,6 +81,8 @@ const Create: React.FC = () => {
|
|
|
}, [initialState?.menu])
|
|
|
|
|
|
useEffect(() => {
|
|
|
+ // 刷新页面清除数据
|
|
|
+ setIsDqSubmit(false)
|
|
|
initTargeting()
|
|
|
}, [])
|
|
|
|
|
@@ -183,6 +186,7 @@ const Create: React.FC = () => {
|
|
|
})
|
|
|
setCopyTask({})
|
|
|
setTableData({})
|
|
|
+ setIsDqSubmit(false)
|
|
|
}
|
|
|
|
|
|
/**数据回填 */
|
|
@@ -907,6 +911,7 @@ const Create: React.FC = () => {
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
setSubVisible(false)
|
|
|
+ setIsDqSubmit(true)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -946,6 +951,7 @@ const Create: React.FC = () => {
|
|
|
ownerAccountId={ownerAccountId}
|
|
|
putInType={putInType}
|
|
|
onChange={(e, isClear) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
clearData()
|
|
|
setAccountCreateLogs(e?.map((item: any) => ({ accountId: item.accountId })) || []);
|
|
|
if (isClear) {
|
|
@@ -991,7 +997,9 @@ const Create: React.FC = () => {
|
|
|
setTextData,
|
|
|
clearData,
|
|
|
putInType,
|
|
|
- adLength
|
|
|
+ adLength,
|
|
|
+ isDqSubmit,
|
|
|
+ setIsDqSubmit
|
|
|
}}>
|
|
|
<div className={style.settingsBody_content_right}>
|
|
|
{/* 广告信息 */}
|
|
@@ -1034,6 +1042,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setGoodsVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setGoodsVisible(false);
|
|
|
clearData()
|
|
@@ -1045,6 +1054,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setSourceVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setSourceVisible(false);
|
|
|
clearData()
|
|
@@ -1056,6 +1066,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setWechatVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setWechatVisible(false);
|
|
|
clearData()
|
|
@@ -1067,6 +1078,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setChannelsProfileVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setChannelsProfileVisible(false);
|
|
|
clearData()
|
|
@@ -1080,6 +1092,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setConversionVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setConversionVisible(false);
|
|
|
clearData()
|
|
@@ -1091,6 +1104,7 @@ const Create: React.FC = () => {
|
|
|
data={accountCreateLogs}
|
|
|
onClose={() => setPositionPackageVisible(false)}
|
|
|
onChange={(e) => {
|
|
|
+ setIsDqSubmit(false)
|
|
|
setAccountCreateLogs(e);
|
|
|
setPositionPackageVisible(false);
|
|
|
clearData()
|
|
@@ -1110,9 +1124,11 @@ const Create: React.FC = () => {
|
|
|
tabBarExtraContent={<Space>
|
|
|
<span>广告总数:{adCount}</span>
|
|
|
<span>创意总数:{dynamicCount}</span>
|
|
|
- <Button type='primary' onClick={() => {
|
|
|
- setSubVisible(true)
|
|
|
- }}>提交创建</Button>
|
|
|
+ <Tooltip title="注意,当前有提交过!" open={isDqSubmit ? undefined : false}>
|
|
|
+ <Button type='primary' danger={isDqSubmit} onClick={() => {
|
|
|
+ setSubVisible(true)
|
|
|
+ }}>提交创建</Button>
|
|
|
+ </Tooltip>
|
|
|
</Space>}
|
|
|
items={accountCreateLogs.map(item => ({ label: item.accountId, key: item.accountId?.toString() })) as any[]}
|
|
|
/>
|