index.tsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. import { useAjax } from "@/Hook/useAjax";
  2. import { DeleteOutlined, DownOutlined, PauseCircleOutlined, PlayCircleOutlined, PlusOutlined, QuestionCircleOutlined } from "@ant-design/icons";
  3. import { Button, Checkbox, Col, DatePicker, Dropdown, Input, Menu, Modal, Row, Select, Space, Tooltip, Typography, message } from "antd"
  4. import React, { useCallback, useEffect, useState } from "react"
  5. import { ADGROUP_STATUS } from "../const";
  6. import { getAdqV3AdListApi, modifyStatusBatchApi, syncBatchApi } from "@/services/launchAdq/adqv3";
  7. import tableConfig from "./tableConfig";
  8. import { txAdConfig } from "../config";
  9. import UpdateAd from "./updateAd";
  10. import TableData from "@/pages/launchSystemNew/components/TableData";
  11. import AddDynamic from "../../tencentAdPutIn/create/addDynamic";
  12. import { arraysHaveSameValues } from "@/utils/utils";
  13. import { MARKETING_CARRIER_TYPE_ENUM, MARKETING_GOAL_ENUM, MARKETING_SUB_GOAL_ENUM, MARKETING_TARGET_TYPE_ENUM, MARKETING_TARGET_TYPE_GAME_ENUM, SITE_SET_ENUM } from "../../tencentAdPutIn/const";
  14. import Log from "../components/log";
  15. import '../../tencentAdPutIn/index.less'
  16. import UserTactics from "../../tencentAdPutIn/create/TacticsS/userTactics";
  17. import UpdateAd3 from "./updateAd3";
  18. import { useLocalStorageState } from "ahooks";
  19. import AutoAcquisitionSet from "./autoAcquisitionSet";
  20. const { Text } = Typography;
  21. const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
  22. /*****************************************/
  23. const [useType, setUseType] = useLocalStorageState<string>('AD_UNIT_TYPE', 'NOVEL');
  24. const [pageSize, setPageSize] = useLocalStorageState<number>('AD_PAGESIZE', 20);
  25. const [queryFrom, set_queryFrom] = useState<ADQV3.GetAdListProps>({ pageNum: 1, pageSize: pageSize || 20, adUnitType: 'NOVEL' })
  26. const [isClearSelect, setIsClearSelect] = useState(true)
  27. const [selectedRows, setSelectedRows] = useState<any[]>([])
  28. const [tactics, setTactics] = useState<any>()
  29. const [update, setUpdate] = useState<{ visible: boolean }>({ visible: false })
  30. const [addDynamicVisible, setAddDynamicVisible] = useState<boolean>(false)
  31. const [handleType, setHandleType] = useState<number>(1)
  32. const [czjlShow, setCzjlShow] = useState(false)
  33. const [updateData, setUpdateDate] = useState<{ visible: boolean, type: '修改出价' | '修改名称' | '修改日限额' | '修改投放时间' | '删除' | '深度优化ROI' | '修改投放首日开始时间' }>({ visible: false, type: '修改出价' })
  34. const [autoAcqVisible, setAutoAcqVisible] = useState<boolean>(false)
  35. const syncBatch = useAjax((params) => syncBatchApi(params))
  36. const modifyStatusBatch = useAjax((params) => modifyStatusBatchApi(params))
  37. const getAdqV3AdList = useAjax((params) => getAdqV3AdListApi(params), { formatResult: true })
  38. /*****************************************/
  39. useEffect(() => {
  40. getList({ pageNum: 1, pageSize: pageSize || 20, adUnitType: 'NOVEL' })
  41. }, [userId])
  42. // 获取列表
  43. const getList = useCallback((params: ADQV3.GetAdListProps) => {
  44. getAdqV3AdList.run({ ...params, userId })
  45. }, [userId, getAdqV3AdList])
  46. // 同步
  47. const sync = useCallback(() => {
  48. if (selectedRows?.length > 0) {
  49. let accountAdgroupMaps = [...new Set(selectedRows?.map(item => item.accountId + ',' + item.adgroupId))]
  50. syncBatch.run({ accountAdgroupMaps }).then(res => {
  51. res && getAdqV3AdList.refresh()
  52. res ? message.success('同步成功!') : message.error('同步失败!')
  53. })
  54. } else {
  55. message.error('请勾选需要同步的广告')
  56. }
  57. }, [getAdqV3AdList, selectedRows])
  58. // 批量启停
  59. const adStatus = (type: boolean) => {
  60. let newSelectedRows = []
  61. if (type) {
  62. newSelectedRows = selectedRows.filter((item: { configuredStatus: string, adgroupId: number }) => item.configuredStatus === 'AD_STATUS_SUSPEND')
  63. } else {
  64. newSelectedRows = selectedRows.filter((item: { configuredStatus: string, adgroupId: number }) => item.configuredStatus === 'AD_STATUS_NORMAL')
  65. }
  66. if (newSelectedRows.length === 0) {
  67. message.warn(`所有广告都是${type ? '启动' : '暂停'}状态,无需${type ? '启动' : '暂停'}操作`)
  68. return
  69. }
  70. let accountAdgroupMaps = [...new Set(newSelectedRows?.map(item => item.accountId + ',' + item.adgroupId))]
  71. modifyStatusBatch.run({ accountAdgroupMaps, suspend: !type }).then(res => {
  72. message.success(`${type ? '启动' : '暂停'}成功`)
  73. getAdqV3AdList.refresh()
  74. setSelectedRows([])
  75. })
  76. }
  77. // 添加创意
  78. const addDynamic = () => {
  79. setAddDynamicVisible(true)
  80. }
  81. return <div>
  82. <Row gutter={[6, 6]} align='middle' style={{ marginBottom: 15 }}>
  83. <Col>
  84. <Select
  85. placeholder='业务单元类型'
  86. style={{ width: 100 }}
  87. showSearch
  88. filterOption={(input: any, option: any) =>
  89. (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
  90. }
  91. value={useType}
  92. onChange={(value: any) => {
  93. let params = { ...queryFrom, adUnitType: value, pageNum: 1 }
  94. setUseType(value)
  95. set_queryFrom(params)
  96. getList(params)
  97. }}
  98. >
  99. <Select.Option value={'NOVEL'}>付费小说</Select.Option>
  100. <Select.Option value={'NOVEL_IAA'}>小说IAA</Select.Option>
  101. <Select.Option value={'SKIT_IAA'}>短剧IAA</Select.Option>
  102. <Select.Option value={'GAME'}>付费游戏</Select.Option>
  103. <Select.Option value={'GAME_IAA'}>游戏IAA</Select.Option>
  104. </Select>
  105. </Col>
  106. <Col>
  107. <Input
  108. placeholder='广告账号(多个,分割)'
  109. allowClear
  110. style={{ width: 160 }}
  111. onChange={(e) => {
  112. let value = e.target.value
  113. let arr: any = []
  114. if (value) {
  115. value = value.replace(/[,,\s]/g, ',')
  116. arr = value.split(',').filter((a: any) => a)
  117. }
  118. set_queryFrom({ ...queryFrom, accountIdList: arr })
  119. }}
  120. />
  121. </Col>
  122. <Col>
  123. <Input
  124. placeholder='广告ID(多个,分割)'
  125. allowClear
  126. style={{ width: 150 }}
  127. onChange={(e) => {
  128. let value = e.target.value
  129. let arr: any = []
  130. if (value) {
  131. value = value.replace(/[,,\s]/g, ',')
  132. arr = value.split(',').filter((a: any) => a)
  133. }
  134. set_queryFrom({ ...queryFrom, adgroupIdList: arr })
  135. }}
  136. />
  137. </Col>
  138. <Col>
  139. <Select
  140. placeholder='广告状态'
  141. mode="multiple"
  142. style={{ minWidth: 120 }}
  143. showSearch
  144. filterOption={(input: any, option: any) =>
  145. (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
  146. }
  147. allowClear
  148. onChange={(value: any) => {
  149. set_queryFrom({ ...queryFrom, systemStatusList: value })
  150. }}
  151. >
  152. {Object.keys(ADGROUP_STATUS).map(key => {
  153. return <Select.Option value={key} key={key}>{ADGROUP_STATUS[key as keyof typeof ADGROUP_STATUS]}</Select.Option>
  154. })}
  155. </Select>
  156. </Col>
  157. <Col>
  158. <Input
  159. placeholder='广告名称'
  160. allowClear
  161. style={{ width: 120 }}
  162. onChange={(e) => {
  163. let value = e.target.value
  164. set_queryFrom({ ...queryFrom, adgroupName: value })
  165. }}
  166. />
  167. </Col>
  168. <Col>
  169. <Input
  170. placeholder='腾讯备注'
  171. allowClear
  172. style={{ width: 120 }}
  173. onChange={(e) => {
  174. let value = e.target.value
  175. let arr: any = []
  176. if (value) {
  177. value = value.replace(/[,,\s]/g, ',')
  178. arr = value.split(',').filter((a: any) => a)
  179. }
  180. set_queryFrom({ ...queryFrom, accountMemo: arr })
  181. }}
  182. />
  183. </Col>
  184. <Col>
  185. <Input
  186. placeholder='本地备注'
  187. allowClear
  188. style={{ width: 120 }}
  189. onChange={(e) => {
  190. let value = e.target.value
  191. let arr: any = []
  192. if (value) {
  193. value = value.replace(/[,,\s]/g, ',')
  194. arr = value.split(',').filter((a: any) => a)
  195. }
  196. set_queryFrom({ ...queryFrom, accountRemark: arr })
  197. }}
  198. />
  199. </Col>
  200. <Col>
  201. <DatePicker.RangePicker
  202. placeholder={['创建开始日期', '创建结束日期']}
  203. onChange={(e, options) => {
  204. set_queryFrom({ ...queryFrom, beginDate: options[0], endDate: options[1] })
  205. }}
  206. />
  207. </Col>
  208. <Col>
  209. <Space>
  210. <Button
  211. type="primary"
  212. onClick={() => {
  213. if (isClearSelect) {
  214. setSelectedRows([])
  215. }
  216. getList({ ...queryFrom, pageNum: 1 })
  217. }}
  218. >
  219. <Space>
  220. <span>搜索</span>
  221. <Checkbox className='clearCheckbox' onClick={(e) => e.stopPropagation()} checked={isClearSelect} onChange={(e) => setIsClearSelect(e.target.checked)} />
  222. <Tooltip title="勾选搜索清空已选">
  223. <QuestionCircleOutlined />
  224. </Tooltip>
  225. </Space>
  226. </Button>
  227. {selectedRows?.length > 0 && <Button type='link' style={{ padding: 0, color: 'red' }} onClick={() => {
  228. setSelectedRows([])
  229. }}>清空已选({selectedRows?.length})</Button>}
  230. </Space>
  231. </Col>
  232. </Row>
  233. <TableData
  234. isCard={false}
  235. columns={() => tableConfig(() => getAdqV3AdList.refresh(), useType, creativeHandle)}
  236. ajax={getAdqV3AdList}
  237. syncAjax={sync}
  238. fixed={{ left: 2, right: 5 }}
  239. dataSource={getAdqV3AdList?.data?.data?.records}
  240. loading={getAdqV3AdList?.loading || syncBatch?.loading}
  241. scroll={{ y: 560 }}
  242. total={getAdqV3AdList?.data?.data?.total}
  243. page={getAdqV3AdList?.data?.data?.current}
  244. pageSize={getAdqV3AdList?.data?.data?.size}
  245. myKey={'adgroupId'}
  246. gutter={[0, 10]}
  247. config={txAdConfig}
  248. configName="腾讯广告3.0"
  249. leftChild={<Space direction='vertical'>
  250. <Row gutter={[10, 10]} align='middle'>
  251. <Col><Select
  252. style={{ width: 120 }}
  253. onChange={(e) => {
  254. setHandleType(e)
  255. setSelectedRows([])
  256. }}
  257. value={handleType}
  258. dropdownMatchSelectWidth={false}
  259. options={[{ label: '广告操作', value: 1 }, { label: '创意操作', value: 2 }, { label: '修改首日付费 ROI', value: 3 }, { label: '修改首日变现 ROI', value: 4 }]}
  260. /></Col>
  261. <Col>
  262. <Button type='dashed' onClick={() => { setCzjlShow(true) }}>操作记录</Button>
  263. </Col>
  264. {handleType === 1 ? <>
  265. <Col><Button type='primary' style={{ background: '#67c23a', borderColor: '#67c23a' }} loading={modifyStatusBatch.loading} icon={<PlayCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus(true)}>启动</Button></Col>
  266. <Col><Button type='primary' style={{ background: '#e6a23c', borderColor: '#e6a23c' }} loading={modifyStatusBatch.loading} icon={<PauseCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus(false)}>暂停</Button></Col>
  267. <Col><Button type='primary' danger icon={<DeleteOutlined />} disabled={selectedRows.length === 0} onClick={() => {
  268. setUpdateDate({ visible: true, type: '删除' })
  269. }}>删除</Button></Col>
  270. <Col><Dropdown
  271. menu={{
  272. items: [
  273. {
  274. label: <span style={{ display: 'inline-block', width: 120 }}>修改出价</span>,
  275. key: '1',
  276. disabled: selectedRows.length === 0,
  277. onClick: () => { setUpdateDate({ visible: true, type: '修改出价' }) }
  278. },
  279. {
  280. label: '修改名称',
  281. key: '2',
  282. disabled: selectedRows.length === 0,
  283. onClick: () => { setUpdateDate({ visible: true, type: '修改名称' }) }
  284. },
  285. {
  286. label: '修改日限额',
  287. key: '3',
  288. disabled: selectedRows.length === 0,
  289. onClick: () => { setUpdateDate({ visible: true, type: '修改日限额' }) }
  290. },
  291. {
  292. label: '修改投放日期',
  293. key: '4',
  294. disabled: selectedRows.length === 0,
  295. onClick: () => { setUpdateDate({ visible: true, type: '修改投放时间' }) }
  296. },
  297. {
  298. label: '修改投放首日开始时间',
  299. key: '5',
  300. disabled: selectedRows.length === 0,
  301. onClick: () => { setUpdateDate({ visible: true, type: '修改投放首日开始时间' }) }
  302. },
  303. {
  304. label: '一键起量',
  305. key: '6',
  306. disabled: selectedRows.length === 0,
  307. onClick: () => { setAutoAcqVisible(true) }
  308. }
  309. ]
  310. }}
  311. placement="bottomLeft"
  312. arrow
  313. >
  314. <Button>
  315. <Space>
  316. 修改广告
  317. <DownOutlined />
  318. </Space>
  319. </Button>
  320. </Dropdown></Col>
  321. </> : handleType === 2 ? <>
  322. <Col><UserTactics
  323. type="updateAd"
  324. onChange={(value) => {
  325. setTactics(value)
  326. addDynamic()
  327. }}
  328. adUnitType={useType}
  329. userId={userId}
  330. putInType={['GAME', 'GAME_IAA'].includes(useType) ? 'GAME' : 'NOVEL'}
  331. /></Col>
  332. <Col><Button type='primary' icon={<PlusOutlined />} disabled={selectedRows.length === 0} onClick={addDynamic}>添加创意</Button></Col>
  333. <Col>
  334. <Space>
  335. <Tooltip title="选择的广告必须与已选广告的营销目的、营销载体、推广内容、广告版位、微信公众号与小程序定投、版位选择一致">
  336. <QuestionCircleOutlined style={{ color: 'red' }} />
  337. </Tooltip>
  338. {selectedRows?.length > 0 && <div style={{ maxWidth: '380px' }}>
  339. <Text type="danger" ellipsis={{ tooltip: true }} strong style={{ fontSize: 12 }}>
  340. {`当前广告选择:
  341. 营销目的:${['GAME', 'GAME_IAA'].includes(useType) ? MARKETING_SUB_GOAL_ENUM[selectedRows?.[0]?.marketingSubGoal as keyof typeof MARKETING_SUB_GOAL_ENUM] : MARKETING_GOAL_ENUM[selectedRows?.[0]?.marketingGoal as keyof typeof MARKETING_GOAL_ENUM]},
  342. 推广产品类型:${['GAME', 'GAME_IAA'].includes(useType) ? MARKETING_TARGET_TYPE_GAME_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_GAME_ENUM] : MARKETING_TARGET_TYPE_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_ENUM]},
  343. 营销载体类型:${MARKETING_CARRIER_TYPE_ENUM[selectedRows?.[0]?.marketingCarrierType as keyof typeof MARKETING_CARRIER_TYPE_ENUM]},
  344. 版位选择:${selectedRows?.[0]?.automaticSiteEnabled ? '自动版位' : '选择特定版位'},
  345. ${!selectedRows?.[0]?.automaticSiteEnabled && `广告版位:${selectedRows?.[0]?.siteSet.map((item: string | number) => SITE_SET_ENUM[item as keyof typeof SITE_SET_ENUM]).toString()}`}
  346. `}
  347. </Text>
  348. </div>}
  349. </Space>
  350. </Col>
  351. </> : handleType === 3 ? <>
  352. <Col><Button type='primary' disabled={selectedRows.length === 0} onClick={() => {
  353. setUpdateDate({ visible: true, type: '深度优化ROI' })
  354. }}>修改首日付费 ROI</Button></Col>
  355. </> : handleType === 4 ? <>
  356. <Col><Button type='primary' disabled={selectedRows.length === 0} onClick={() => {
  357. setUpdateDate({ visible: true, type: '深度优化ROI' })
  358. }}>修改首日变现 ROI</Button></Col>
  359. </> : null}
  360. </Row>
  361. </Space>}
  362. rowSelection={{
  363. selectedRowKeys: selectedRows.map(item => item.adgroupId.toString()),
  364. // hideSelectAll: handleType === 3,
  365. getCheckboxProps: (record: any) => {
  366. if (handleType === 2 && selectedRows?.length > 0) {
  367. const { siteSet, marketingCarrierType, marketingGoal, marketingSubGoal, marketingTargetType, sceneSpec, automaticSiteEnabled } = selectedRows[0]
  368. return {
  369. disabled: record.isDeleted || !(
  370. record?.marketingGoal === marketingGoal && // 营销内容
  371. record?.marketingSubGoal === marketingSubGoal && // 二级营销内容
  372. record?.marketingCarrierType === marketingCarrierType && // 营销载体
  373. record?.marketingTargetType === marketingTargetType && // 推广产品
  374. record?.automaticSiteEnabled === automaticSiteEnabled && // 自动版位
  375. arraysHaveSameValues(siteSet || [], record?.siteSet || []) && // 版位选择
  376. arraysHaveSameValues(record?.sceneSpec?.wechatPosition || [], sceneSpec?.wechatPosition || []) // 微信公众号与小程序定投
  377. )
  378. }
  379. } else {
  380. return {
  381. disabled:
  382. handleType === 3 ? record.isDeleted || !(record?.deepConversionSpec?.deepConversionWorthSpec?.goal === 'GOAL_1DAY_PURCHASE_ROAS') :
  383. handleType === 4 ? record.isDeleted || !(record?.deepConversionSpec?.deepConversionWorthSpec?.goal === 'GOAL_1DAY_MONETIZATION_ROAS')
  384. : record.isDeleted
  385. }
  386. }
  387. },
  388. onSelect: (record: { adgroupId: number, mpName: string }, selected: boolean) => {
  389. if (selected) {
  390. selectedRows.push({ ...record })
  391. setSelectedRows([...selectedRows])
  392. } else {
  393. let newSelectAccData = selectedRows.filter((item: { adgroupId: number }) => item.adgroupId !== record.adgroupId)
  394. setSelectedRows([...newSelectAccData])
  395. }
  396. },
  397. onSelectAll: (selected: boolean, selectedRowss: { adgroupId: number }[], changeRows: { adgroupId: number }[]) => {
  398. if (selected) {
  399. let newSelectAccData = [...selectedRows]
  400. let firstRow = newSelectAccData?.[0] || changeRows?.[0] || {}
  401. changeRows.forEach((item: { adgroupId: number }) => {
  402. let index = newSelectAccData.findIndex((ite: { adgroupId: number }) => ite.adgroupId === item.adgroupId)
  403. if (index === -1) {
  404. let data: any = { ...item }
  405. if (handleType === 2) {
  406. const { siteSet, marketingCarrierType, marketingGoal, marketingTargetType, sceneSpec, automaticSiteEnabled } = firstRow
  407. if (
  408. data?.marketingGoal === marketingGoal && // 营销内容
  409. data?.marketingCarrierType === marketingCarrierType && // 营销载体
  410. data?.marketingTargetType === marketingTargetType && // 推广产品
  411. data?.automaticSiteEnabled === automaticSiteEnabled && // 自动版位
  412. arraysHaveSameValues(siteSet || [], data?.siteSet || []) && // 版位选择
  413. arraysHaveSameValues(data?.sceneSpec?.wechatPosition || [], sceneSpec?.wechatPosition || []) // 微信公众号与小程序定投
  414. ) {
  415. newSelectAccData.push(data)
  416. }
  417. } else {
  418. newSelectAccData.push(data)
  419. }
  420. }
  421. })
  422. setSelectedRows([...newSelectAccData])
  423. } else {
  424. let newSelectAccData = selectedRows.filter((item: { adgroupId: number }) => {
  425. let index = changeRows.findIndex((ite: { adgroupId: number }) => ite.adgroupId === item.adgroupId)
  426. if (index !== -1) {
  427. return false
  428. } else {
  429. return true
  430. }
  431. })
  432. setSelectedRows([...newSelectAccData])
  433. }
  434. }
  435. }}
  436. onChange={(props: any) => {
  437. let { pagination, sortData } = props
  438. let { current, pageSize } = pagination
  439. let newQueryForm = JSON.parse(JSON.stringify(queryFrom))
  440. if (sortData && sortData?.order) {
  441. newQueryForm['isAsc'] = sortData?.order === 'ascend'
  442. newQueryForm['orderByColumn'] = [sortData?.field]
  443. } else {
  444. delete newQueryForm['isAsc']
  445. delete newQueryForm['orderByColumn']
  446. }
  447. newQueryForm.pageNum = current
  448. newQueryForm.pageSize = pageSize
  449. console.log('newQueryForm', newQueryForm)
  450. setPageSize(pageSize)
  451. set_queryFrom(newQueryForm)
  452. getList(newQueryForm)
  453. }}
  454. />
  455. {/* 修改广告 */}
  456. {update.visible && <UpdateAd
  457. {...update}
  458. selectedRows={selectedRows}
  459. onChange={() => {
  460. setUpdate({ visible: false })
  461. getAdqV3AdList.refresh()
  462. setSelectedRows([])
  463. }}
  464. onClose={() => { setUpdate({ visible: false }) }}
  465. />}
  466. {/* 新增创意 */}
  467. {addDynamicVisible && <AddDynamic
  468. adData={selectedRows}
  469. putInType={['GAME', 'GAME_IAA'].includes(useType) ? 'GAME' : 'NOVEL'}
  470. visible={addDynamicVisible}
  471. onClose={() => {
  472. setAddDynamicVisible(false)
  473. setTactics(undefined)
  474. getAdqV3AdList.refresh()
  475. }}
  476. tactics={tactics}
  477. onChange={() => {
  478. setAddDynamicVisible(false)
  479. getAdqV3AdList.refresh()
  480. setSelectedRows([])
  481. setTactics(undefined)
  482. }}
  483. />}
  484. {czjlShow && <Modal
  485. open={czjlShow}
  486. onCancel={() => { setCzjlShow(false) }}
  487. onOk={() => { setCzjlShow(false) }}
  488. width={1200}
  489. footer={null}
  490. title={<strong>广告操作记录</strong>}
  491. className="modalResetCss"
  492. >
  493. <Log userId={userId} />
  494. </Modal>}
  495. {/* 修改广告 */}
  496. {updateData.visible && <UpdateAd3
  497. {...updateData}
  498. updateData={selectedRows}
  499. onClose={() => {
  500. setUpdateDate({ visible: false, type: '修改出价' })
  501. }}
  502. onChange={() => {
  503. setUpdateDate({ visible: false, type: '修改出价' })
  504. getAdqV3AdList.refresh()
  505. if (updateData.type === '删除') {
  506. setSelectedRows([])
  507. }
  508. }}
  509. />}
  510. {/* 批量一键起量 */}
  511. {autoAcqVisible && <AutoAcquisitionSet
  512. selectAdList={selectedRows}
  513. visible={autoAcqVisible}
  514. onClose={() => {
  515. setAutoAcqVisible(false)
  516. }}
  517. onChange={() => {
  518. setAutoAcqVisible(false)
  519. getAdqV3AdList.refresh()
  520. setSelectedRows([])
  521. }}
  522. />}
  523. </div>
  524. }
  525. export default React.memo(Ad)