tablePlanListConfig.tsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. import { AdStatusEnum, BidModeEnum, BidStrategyEnum, OptimizationGoalEnum, PromotedObjectType } from '@/services/launchAdq/enum'
  2. import React from 'react'
  3. import { Badge, Dropdown, Menu, Popover, Space, Statistic } from 'antd'
  4. import { ReactComponent as RocketSvg } from '@/assets/rocket.svg'
  5. import '../adq/index.less'
  6. import { copy } from '@/utils/utils'
  7. import { ColumnsType } from 'antd/lib/table'
  8. import StatisticNull from '@/components/StatisticNull'
  9. import { DownOutlined } from '@ant-design/icons'
  10. import SwitchStatus from '../adqv3/ad/switchStatus'
  11. import TimeSeriesLook from '../adq/ad/timeSeriesLook'
  12. import { ADGROUP_STATUS } from '../adqv3/const'
  13. function tablePlanConfig(
  14. onChange: () => void,
  15. details: (data: any) => void,
  16. log: (data: any) => void,
  17. handleTag: (data: any) => void,
  18. delTag: (data: any) => void,
  19. ): ColumnsType<any> {
  20. let adArr: ColumnsType<any> = [
  21. {
  22. title: '启停',
  23. dataIndex: 'configured_status',
  24. key: 'configured_status',
  25. align: 'center',
  26. width: 40,
  27. fixed: 'left',
  28. render: (a: string, b: any) => {
  29. if (b?.account_id === '总计') {
  30. return '--'
  31. }
  32. return <SwitchStatus configuredStatus={a} isDeleted={b?.is_deleted} adgroupId={b?.adgroup_id} accountId={b?.account_id} onChange={onChange} />
  33. }
  34. },
  35. {
  36. title: '所属账号',
  37. dataIndex: 'account_id',
  38. key: 'account_id',
  39. align: 'center',
  40. width: 80,
  41. ellipsis: true,
  42. render: (a: string) => {
  43. return <Space>
  44. <a onClick={() => copy(a)} >{a}</a>
  45. </Space>
  46. }
  47. },
  48. {
  49. title: '腾讯备注',
  50. dataIndex: 'memo',
  51. key: 'memo',
  52. align: 'center',
  53. width: 80,
  54. ellipsis: true,
  55. render(value, record) {
  56. if (record?.account_id === '总计') {
  57. return '--'
  58. }
  59. return value
  60. },
  61. },
  62. {
  63. title: '本地备注',
  64. dataIndex: 'remark',
  65. key: 'remark',
  66. align: 'center',
  67. width: 80,
  68. ellipsis: true,
  69. render(value, record) {
  70. if (record?.account_id === '总计') {
  71. return '--'
  72. }
  73. return value
  74. },
  75. },
  76. {
  77. title: '广告ID',
  78. dataIndex: 'adgroup_id',
  79. key: 'adgroup_id',
  80. align: 'center',
  81. width: 100,
  82. ellipsis: true,
  83. render: (a: string, b: any) => {
  84. if (b?.account_id === '总计') {
  85. return '--'
  86. }
  87. return <Space>
  88. <a onClick={() => copy(a)} >{a}</a>
  89. </Space>
  90. }
  91. },
  92. {
  93. title: '投手',
  94. dataIndex: 'put_user_name',
  95. key: 'put_user_name',
  96. align: 'center',
  97. width: 70,
  98. ellipsis: true,
  99. render(value, record) {
  100. if (record?.account_id === '总计') return '--';
  101. return value
  102. },
  103. },
  104. {
  105. title: '广告名称',
  106. dataIndex: 'adgroup_name',
  107. key: 'adgroup_name',
  108. width: 280,
  109. ellipsis: true,
  110. render: (a: string, b: any) => {
  111. if (b?.account_id === '总计') return '--';
  112. return a
  113. }
  114. },
  115. {
  116. title: '投放日期',
  117. dataIndex: 'begin_date',
  118. key: 'begin_date',
  119. align: 'center',
  120. width: 150,
  121. ellipsis: true,
  122. sorter: true,
  123. render: (a: string, b: { end_date: string, account_id: any }) => {
  124. if (b?.account_id === '总计') return '--';
  125. return b?.end_date && b?.end_date !== '1970-01-01' ? a + '~' + b.end_date : a + '~' + '长期投放'
  126. }
  127. },
  128. {
  129. title: '投放时间',
  130. dataIndex: 'time_series',
  131. key: 'time_series',
  132. align: 'center',
  133. width: 55,
  134. render: (a: string, b: { endDate: string, account_id: string }) => {
  135. if (b?.account_id === '总计') return '--';
  136. return <TimeSeriesLook timeSeries={a} />
  137. }
  138. },
  139. {
  140. title: '首日开始投放时间',
  141. dataIndex: 'first_day_begin_time',
  142. key: 'first_day_begin_time',
  143. align: 'center',
  144. width: 70,
  145. render(value, record) {
  146. if (record?.account_id === '总计') return '--';
  147. return value
  148. },
  149. },
  150. {
  151. title: '出价',
  152. dataIndex: 'bid_amount',
  153. key: 'bid_amount',
  154. width: 140,
  155. ellipsis: true,
  156. sorter: true,
  157. render: (a: string, b: { bid_mode: string, optimization_goal: string, account_id: any }) => {
  158. if (b?.account_id === '总计') return '--';
  159. return `${b?.bid_mode ? BidModeEnum[b?.bid_mode] : ''} ${a}元/${b?.bid_mode === 'BID_MODE_CPM' ? '千次曝光' : b?.bid_mode === 'BID_MODE_CPC' ? '点击' : OptimizationGoalEnum[b?.optimization_goal]}`
  160. }
  161. },
  162. {
  163. title: '深度优化行为出价',
  164. dataIndex: 'deep_conversion_behavior_bid',
  165. key: 'deep_conversion_behavior_bid',
  166. width: 70,
  167. align: 'center',
  168. render: (a: string, b: { deep_conversion_spec_json: any, account_id: any }) => {
  169. if (b?.account_id === '总计') return '--';
  170. if (b?.deep_conversion_spec_json) {
  171. return a
  172. } else {
  173. return '--'
  174. }
  175. }
  176. },
  177. {
  178. title: '出价类型',
  179. dataIndex: 'smart_bid_type',
  180. key: 'smart_bid_type',
  181. align: 'center',
  182. width: 80,
  183. ellipsis: true,
  184. render: (a: string, b) => {
  185. if (b?.account_id === '总计') return '--';
  186. return a === 'SMART_BID_TYPE_CUSTOM' ? '手动出价' : '自动出价'
  187. }
  188. },
  189. {
  190. title: '出价策略',
  191. dataIndex: 'bid_strategy',
  192. key: 'bid_strategy',
  193. align: 'center',
  194. width: 70,
  195. ellipsis: true,
  196. render: (a: string, b) => {
  197. if (b?.account_id === '总计') return '--';
  198. return BidStrategyEnum[a]
  199. }
  200. },
  201. {
  202. title: '广告组日预算(元)',
  203. dataIndex: 'daily_budget',
  204. key: 'daily_budget',
  205. align: 'center',
  206. width: 70,
  207. sorter: true,
  208. render: (a: string, b: any) => {
  209. if (b?.account_id === '总计') return '--';
  210. return a
  211. }
  212. },
  213. {
  214. title: '是否开启自动版位功能',
  215. dataIndex: 'automatic_site_enabled',
  216. key: 'automatic_site_enabled',
  217. align: 'center',
  218. width: 80,
  219. render: (a: any, b: any) => {
  220. if (b?.account_id === '总计') return '--';
  221. return a ? '开' : '关'
  222. }
  223. },
  224. {
  225. title: '定向条件描述',
  226. dataIndex: 'targeting_translation',
  227. key: 'targeting_translation',
  228. align: 'center',
  229. width: 80,
  230. ellipsis: true,
  231. render: (a: any) => {
  232. return a || '--'
  233. }
  234. },
  235. {
  236. title: '创建时间',
  237. dataIndex: 'created_time',
  238. key: 'created_time',
  239. align: 'center',
  240. width: 140,
  241. ellipsis: true,
  242. render(value, record) {
  243. if (record?.account_id === '总计') return '--';
  244. return value
  245. },
  246. },
  247. {
  248. title: '是否已删除',
  249. dataIndex: 'is_deleted',
  250. key: 'is_deleted',
  251. align: 'center',
  252. width: 60,
  253. render: (a: any, b: any) => {
  254. if (b?.account_id === '总计') return '--';
  255. return <Badge status={!a ? "processing" : "error"} text={a ? '是' : '否'} />
  256. }
  257. },
  258. {
  259. title: '广告状态',
  260. dataIndex: 'system_status',
  261. key: 'system_status',
  262. align: 'center',
  263. width: 70,
  264. ellipsis: true,
  265. render: (a: string) => {
  266. return ADGROUP_STATUS[a]
  267. }
  268. },
  269. {
  270. title: '标记备注',
  271. dataIndex: 'tag_remark',
  272. key: 'tag_remark',
  273. align: 'center',
  274. width: 100,
  275. ellipsis: true,
  276. render(value, b) {
  277. if (b?.account_id === '总计') return '--';
  278. return value || '--'
  279. },
  280. },
  281. {
  282. title: '广告详情',
  283. dataIndex: 'cost_speed',
  284. key: 'cost_speed',
  285. align: 'center',
  286. width: 80,
  287. className: 'padding2',
  288. render: (a: any, b: any) => {
  289. if (b?.account_id === '总计') return '--';
  290. return <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', lineHeight: 'normal', fontSize: 14 }}>
  291. <RocketSvg /> <a onClick={() => details(b)} style={{ marginLeft: 10 }}>详情</a>
  292. </div>
  293. }
  294. },
  295. {
  296. title: '操作',
  297. dataIndex: 'cz',
  298. key: 'cz',
  299. width: 130,
  300. align: 'center',
  301. render: (a: any, b: any) => {
  302. if (b?.account_id === '总计') return '--';
  303. return <Space>
  304. <Dropdown overlay={<Menu>
  305. <Menu.Item><a onClick={() => log(b)}>告警日志</a></Menu.Item>
  306. <Menu.Item><a onClick={() => handleTag(b)}>打标记</a></Menu.Item>
  307. {b?.tag_value ? <Menu.Item><a style={{ color: 'red' }} onClick={() => delTag(b)}>删除标记</a></Menu.Item> : undefined}
  308. </Menu>}>
  309. <a><Space size={2}>更多 <DownOutlined /></Space></a>
  310. </Dropdown>
  311. <a style={{ color: '#1890ff' }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.account_id}/admanage/index?tab=adgroup&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[],%22search_name%22:%22${b.adgroup_id}%22}`)} target="_blank">腾讯广告</a>
  312. </Space>
  313. }
  314. }
  315. ]
  316. let adDataArr: ColumnsType<any> = [
  317. {
  318. title: '消耗',
  319. dataIndex: 'cost_total',
  320. key: 'cost_total',
  321. align: 'center',
  322. width: 110,
  323. sorter: true,
  324. render: (a: any, b: any) => {
  325. return <StatisticNull data={b} field='cost_total' />
  326. }
  327. },
  328. {
  329. title: '曝光量',
  330. dataIndex: 'view_total',
  331. key: 'view_total',
  332. align: 'center',
  333. width: 100,
  334. sorter: true,
  335. render: (a: any, b: any) => {
  336. return <StatisticNull data={b} field='view_total' />
  337. }
  338. },
  339. {
  340. title: '千次曝光成本',
  341. dataIndex: 'thousand_display_price_total',
  342. key: 'thousand_display_price_total',
  343. align: 'center',
  344. width: 110,
  345. sorter: true,
  346. render: (a: any, b: any) => {
  347. return <StatisticNull data={b} field='thousand_display_price_total' precision={2} />
  348. }
  349. },
  350. {
  351. title: '点击量',
  352. dataIndex: 'click_total',
  353. key: 'click_total',
  354. align: 'center',
  355. width: 110,
  356. sorter: true,
  357. render: (a: any, b: any) => {
  358. return <StatisticNull data={b} field='click_total' />
  359. }
  360. },
  361. {
  362. title: '点击率',
  363. dataIndex: 'ctr_total',
  364. key: 'ctr_total',
  365. align: 'center',
  366. width: 110,
  367. sorter: true,
  368. render: (a: any, b: any) => {
  369. if (b?.ctr_total !== undefined && b?.ctr_total !== null) {
  370. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  371. } else {
  372. return '--'
  373. }
  374. }
  375. },
  376. {
  377. title: '点击均价',
  378. dataIndex: 'cpc_total',
  379. key: 'cpc_total',
  380. align: 'center',
  381. width: 110,
  382. sorter: true,
  383. render: (a: any, b: any) => {
  384. return <StatisticNull data={b} field='cpc_total' />
  385. }
  386. },
  387. {
  388. title: '不感兴趣点击次数',
  389. dataIndex: 'no_interest_count_total',
  390. key: 'no_interest_count_total',
  391. align: 'center',
  392. width: 110,
  393. sorter: true,
  394. render: (a: any, b: any) => {
  395. return <StatisticNull data={b} field='no_interest_count_total' />
  396. }
  397. },
  398. {
  399. title: '朋友圈视频播放次数',
  400. dataIndex: 'video_play_count_total',
  401. key: 'video_play_count_total',
  402. align: 'center',
  403. width: 110,
  404. sorter: true,
  405. render: (a: any, b: any) => {
  406. return <StatisticNull data={b} field='video_play_count_total' />
  407. }
  408. },
  409. {
  410. title: '下载次数',
  411. dataIndex: 'download_count_total',
  412. key: 'download_count_total',
  413. align: 'center',
  414. width: 110,
  415. sorter: true,
  416. render: (a: any, b: any) => {
  417. return <StatisticNull data={b} field='download_count_total' />
  418. }
  419. },
  420. {
  421. title: '安装次数',
  422. dataIndex: 'install_count_total',
  423. key: 'install_count_total',
  424. align: 'center',
  425. width: 110,
  426. sorter: true,
  427. render: (a: any, b: any) => {
  428. return <StatisticNull data={b} field='install_count_total' />
  429. }
  430. },
  431. {
  432. title: '激活次数',
  433. dataIndex: 'activated_count_total',
  434. key: 'activated_count_total',
  435. align: 'center',
  436. width: 110,
  437. sorter: true,
  438. render: (a: any, b: any) => {
  439. return <StatisticNull data={b} field='activated_count_total' />
  440. }
  441. },
  442. {
  443. title: '公众号关注人数',
  444. dataIndex: 'mp_follow_uv_total',
  445. key: 'mp_follow_uv_total',
  446. align: 'center',
  447. width: 110,
  448. sorter: true,
  449. render: (a: any, b: any) => {
  450. return <StatisticNull data={b} field='mp_follow_uv_total' />
  451. }
  452. },
  453. {
  454. title: '公众号关注成本',
  455. dataIndex: 'mp_follow_cost_total',
  456. key: 'mp_follow_cost_total',
  457. align: 'center',
  458. width: 110,
  459. sorter: true,
  460. render: (a: any, b: any) => {
  461. return <StatisticNull data={b} field='mp_follow_cost_total' />
  462. }
  463. },
  464. {
  465. title: '公众号关注率',
  466. dataIndex: 'mp_follow_rate_total',
  467. key: 'mp_follow_rate_total',
  468. align: 'center',
  469. width: 110,
  470. sorter: true,
  471. render: (a: any, b: any) => {
  472. if (b?.mp_follow_rate_total !== undefined && b?.mp_follow_rate_total !== null) {
  473. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  474. } else {
  475. return '--'
  476. }
  477. }
  478. },
  479. {
  480. title: '公众号关注次数',
  481. dataIndex: 'mp_follow_pv_total',
  482. key: 'mp_follow_pv_total',
  483. align: 'center',
  484. width: 110,
  485. sorter: true,
  486. render: (a: any, b: any) => {
  487. return <StatisticNull data={b} field='mp_follow_pv_total' />
  488. }
  489. },
  490. {
  491. title: '公众号关注次数成本',
  492. dataIndex: 'mp_follow_pv_cost_total',
  493. key: 'mp_follow_pv_cost_total',
  494. align: 'center',
  495. width: 120,
  496. sorter: true,
  497. render: (a: any, b: any) => {
  498. return <StatisticNull data={b} field='mp_follow_pv_cost_total' precision={2}/>
  499. }
  500. },
  501. {
  502. title: '快应用添加次数',
  503. dataIndex: 'add_quick_app_pv_total',
  504. key: 'add_quick_app_pv_total',
  505. align: 'center',
  506. width: 110,
  507. sorter: true,
  508. render: (a: any, b: any) => {
  509. return <StatisticNull data={b} field='add_quick_app_pv_total' />
  510. }
  511. },
  512. {
  513. title: '快应用添加成本',
  514. dataIndex: 'add_quick_app_cost_total',
  515. key: 'add_quick_app_cost_total',
  516. align: 'center',
  517. width: 110,
  518. sorter: true,
  519. render: (a: any, b: any) => {
  520. return <StatisticNull data={b} field='add_quick_app_cost_total' />
  521. }
  522. },
  523. {
  524. title: '快应用添加率',
  525. dataIndex: 'add_quick_app_rate_total',
  526. key: 'add_quick_app_rate_total',
  527. align: 'center',
  528. width: 110,
  529. sorter: true,
  530. render: (a: any, b: any) => {
  531. if (b?.add_quick_app_rate_total !== undefined && b?.add_quick_app_rate_total !== null) {
  532. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  533. } else {
  534. return '--'
  535. }
  536. }
  537. },
  538. {
  539. title: '加企业微信客服人数',
  540. dataIndex: 'scan_follow_uv_total',
  541. key: 'scan_follow_uv_total',
  542. align: 'center',
  543. width: 120,
  544. sorter: true,
  545. render: (a: any, b: any) => {
  546. return <StatisticNull data={b} field='scan_follow_uv_total' />
  547. }
  548. },
  549. {
  550. title: '加企业微信客服成本',
  551. dataIndex: 'scan_follow_cost_total',
  552. key: 'scan_follow_cost_total',
  553. align: 'center',
  554. width: 120,
  555. sorter: true,
  556. render: (a: any, b: any) => {
  557. return <StatisticNull data={b} field='scan_follow_cost_total' precision={2} />
  558. }
  559. },
  560. {
  561. title: '加企业微信客服率',
  562. dataIndex: 'scan_follow_rate_total',
  563. key: 'scan_follow_rate_total',
  564. align: 'center',
  565. width: 120,
  566. sorter: true,
  567. render: (a: any, b: any) => {
  568. if (b?.scan_follow_rate_total !== undefined && b?.scan_follow_rate_total !== null) {
  569. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  570. } else {
  571. return '--'
  572. }
  573. }
  574. },
  575. {
  576. title: '首日新增下单量',
  577. dataIndex: 'first_day_order_count_total',
  578. key: 'first_day_order_count_total',
  579. align: 'center',
  580. width: 110,
  581. sorter: true,
  582. render: (a: any, b: any) => {
  583. return <StatisticNull data={b} field='first_day_order_count_total' />
  584. }
  585. },
  586. {
  587. title: '首日新增下单金额',
  588. dataIndex: 'first_day_order_amount_total',
  589. key: 'first_day_order_amount_total',
  590. align: 'center',
  591. width: 110,
  592. sorter: true,
  593. render: (a: any, b: any) => {
  594. return <StatisticNull data={b} field='first_day_order_amount_total' />
  595. }
  596. },
  597. {
  598. title: '首日新增下单ROI',
  599. dataIndex: 'first_day_order_roi_total',
  600. key: 'first_day_order_roi_total',
  601. align: 'center',
  602. width: 110,
  603. sorter: true,
  604. render: (a: any, b: any) => {
  605. if (b?.first_day_order_roi_total !== undefined && b?.first_day_order_roi_total !== null) {
  606. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  607. } else {
  608. return '--'
  609. }
  610. }
  611. },
  612. {
  613. title: '订单量',
  614. dataIndex: 'order_count_total',
  615. key: 'order_count_total',
  616. align: 'center',
  617. width: 110,
  618. sorter: true,
  619. render: (a: any, b: any) => {
  620. return <StatisticNull data={b} field='order_count_total' />
  621. }
  622. },
  623. {
  624. title: '订单金额',
  625. dataIndex: 'order_amount_total',
  626. key: 'order_amount_total',
  627. align: 'center',
  628. width: 110,
  629. sorter: true,
  630. render: (a: any, b: any) => {
  631. return <StatisticNull data={b} field='order_amount_total' />
  632. }
  633. },
  634. {
  635. title: '下单成本',
  636. dataIndex: 'order_cost_total',
  637. key: 'order_cost_total',
  638. align: 'center',
  639. width: 110,
  640. sorter: true,
  641. render: (a: any, b: any) => {
  642. return <StatisticNull data={b} field='order_cost_total' precision={2} />
  643. }
  644. },
  645. {
  646. title: '下单率',
  647. dataIndex: 'order_rate_total',
  648. key: 'order_rate_total',
  649. align: 'center',
  650. width: 110,
  651. sorter: true,
  652. render: (a: any, b: any) => {
  653. if (b?.order_rate_total !== undefined && b?.order_rate_total !== null) {
  654. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  655. } else {
  656. return '--'
  657. }
  658. }
  659. },
  660. {
  661. title: '下单ROI',
  662. dataIndex: 'order_roi_total',
  663. key: 'order_roi_total',
  664. align: 'center',
  665. width: 110,
  666. sorter: true,
  667. render: (a: any, b: any) => {
  668. if (b?.order_roi_total !== undefined && b?.order_roi_total !== null) {
  669. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  670. } else {
  671. return '--'
  672. }
  673. }
  674. },
  675. {
  676. title: '客单价',
  677. dataIndex: 'atv_total',
  678. key: 'atv_total',
  679. align: 'center',
  680. width: 110,
  681. sorter: true,
  682. render: (a: any, b: any) => {
  683. return <StatisticNull data={b} field='atv_total' precision={2} />
  684. }
  685. },
  686. {
  687. title: '转化量',
  688. dataIndex: 'conversions_count_total',
  689. key: 'conversions_count_total',
  690. align: 'center',
  691. width: 110,
  692. sorter: true,
  693. render: (a: any, b: any) => {
  694. return <StatisticNull data={b} field='conversions_count_total' />
  695. }
  696. },
  697. {
  698. title: '转化成本',
  699. dataIndex: 'conversions_cost_total',
  700. key: 'conversions_cost_total',
  701. align: 'center',
  702. width: 110,
  703. sorter: true,
  704. render: (a: any, b: any) => {
  705. return <StatisticNull data={b} field='conversions_cost_total' precision={2} />
  706. }
  707. },
  708. {
  709. title: '深度转化',
  710. dataIndex: 'deep_conversions_count_total',
  711. key: 'deep_conversions_count_total',
  712. align: 'center',
  713. width: 110,
  714. sorter: true,
  715. render: (a: any, b: any) => {
  716. return <StatisticNull data={b} field='deep_conversions_count_total' />
  717. }
  718. },
  719. {
  720. title: '转化率',
  721. dataIndex: 'conversions_rate_total',
  722. key: 'conversions_rate_total',
  723. align: 'center',
  724. width: 110,
  725. sorter: true,
  726. render: (a: any, b: any) => {
  727. if (b?.conversions_rate_total !== undefined && b?.conversions_rate_total !== null) {
  728. return <Statistic value={a ? a.toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  729. } else {
  730. return '--'
  731. }
  732. }
  733. },
  734. {
  735. title: '加粉数',
  736. dataIndex: 'add_fans_count_total',
  737. key: 'add_fans_count_total',
  738. align: 'center',
  739. width: 110,
  740. sorter: true,
  741. render: (a: any, b: any) => {
  742. return <StatisticNull data={b} field='add_fans_count_total' />
  743. }
  744. },
  745. {
  746. title: '加粉成本',
  747. dataIndex: 'add_fans_cost_total',
  748. key: 'add_fans_cost_total',
  749. align: 'center',
  750. width: 110,
  751. sorter: true,
  752. render: (a: any, b: any) => {
  753. return <StatisticNull data={b} field='add_fans_cost_total' precision={2} />
  754. }
  755. },
  756. ]
  757. return [
  758. ...adArr,
  759. ...adDataArr
  760. ]
  761. }
  762. export default tablePlanConfig