index.tsx 27 KB

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