tableConfigNature.tsx 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. import React from "react"
  2. import style from './index.less'
  3. import { Statistic } from "antd"
  4. import { gameClassifyEnum } from "@/components/QueryForm/const"
  5. import { version } from "../../components/TableData"
  6. import moment from "moment"
  7. function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
  8. const getFieldDta = () => {
  9. let defaultValue = [ // 默认展示字段
  10. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  11. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  12. { label: '增', key: 'increase', type: '付费趋势' },
  13. { label: '回', key: 'back', type: '付费趋势' },
  14. { label: '倍', key: 'multiples', type: '付费趋势' },
  15. ]
  16. let mySelectFieldData = localStorage.getItem(`myAdFieldConfig${version}_游戏每日数据`)
  17. let newSelectFieldData: any = {}
  18. if (mySelectFieldData) {
  19. newSelectFieldData = JSON.parse(mySelectFieldData).date_field
  20. } else {
  21. newSelectFieldData = defaultValue
  22. }
  23. return newSelectFieldData
  24. }
  25. // 买量付费趋势
  26. const buyC = Array(90).fill('').map((_item: string, index: number) => {
  27. let field = `buyAmountD${index + 1}Trend`
  28. let data = {
  29. title: `D${index + 1}(买)`,
  30. dataIndex: `D${index + 1}Buy`,
  31. label: "买量付费趋势",
  32. align: "center",
  33. width: 110,
  34. render: (a: any, b: any) => {
  35. let date1 = moment()
  36. if (b?.costDate === '总计') {
  37. if (b?.beginDay) {
  38. date1 = moment(b?.beginDay)
  39. } else {
  40. date1 = moment()
  41. }
  42. } else {
  43. date1 = moment(b.costDate)
  44. }
  45. let dt = moment()
  46. let day = dt.diff(date1, 'day');
  47. let fieldData = getFieldDta()
  48. if (fieldData?.length > 0 && index <= day) {
  49. let data: any = {}
  50. let keyS: string[] = fieldData?.map((item: any) => item.key)
  51. switch (fieldData[0].type) {
  52. case '付费趋势':
  53. if (b?.[field]) {
  54. data = b?.[field]
  55. return <div className={style.dbox}>
  56. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  57. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  58. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  59. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  60. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  61. </div>
  62. }
  63. return '--'
  64. }
  65. }
  66. return '--'
  67. },
  68. }
  69. return data
  70. })
  71. const buyM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
  72. let field = `buyAmountM${index}Trend`
  73. let data = {
  74. title: `M${index}(买)`,
  75. dataIndex: `M${index}Buy`,
  76. label: "买量付费趋势",
  77. align: "center",
  78. width: 110,
  79. render: (a: any, b: any) => {
  80. let date1 = moment()
  81. if (b?.costDate === '总计') {
  82. if (b?.beginDay) {
  83. date1 = moment(b?.beginDay)
  84. } else {
  85. date1 = moment()
  86. }
  87. } else {
  88. date1 = moment(b.costDate)
  89. }
  90. let dt = moment()
  91. let day = dt.diff(date1, 'day');
  92. let fieldData = getFieldDta()
  93. if (fieldData?.length > 0 && index * 30 <= day) {
  94. let data: any = {}
  95. let keyS: string[] = fieldData?.map((item: any) => item.key)
  96. switch (fieldData[0].type) {
  97. case '付费趋势':
  98. if (b?.[field]) {
  99. data = b?.[field]
  100. return <div className={style.dbox}>
  101. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  102. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  103. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  104. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  105. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  106. </div>
  107. }
  108. return '--'
  109. }
  110. }
  111. return '--'
  112. },
  113. }
  114. return data
  115. })
  116. let natureDefaultStart = 14
  117. // 自然量
  118. const natureC = Array(90).fill('').map((_item: string, index: number) => {
  119. let field = `natureAmountD${index + 1}Trend`
  120. let data = {
  121. title: `D${index + 1}(自)`,
  122. dataIndex: `D${index + 1}Nature`,
  123. label: "自然量付费趋势",
  124. align: "center",
  125. width: 110,
  126. render: (a: any, b: any) => {
  127. let date1 = moment()
  128. if (b?.costDate === '总计') {
  129. if (b?.beginDay) {
  130. date1 = moment(b?.beginDay)
  131. } else {
  132. date1 = moment()
  133. }
  134. } else {
  135. date1 = moment(b.costDate)
  136. }
  137. let dt = moment()
  138. let day = dt.diff(date1, 'day');
  139. let fieldData = getFieldDta()
  140. if (fieldData?.length > 0 && index <= day) {
  141. let data: any = {}
  142. let keyS: string[] = fieldData?.map((item: any) => item.key)
  143. switch (fieldData[0].type) {
  144. case '付费趋势':
  145. if (b?.[field]) {
  146. data = b?.[field]
  147. return <div className={style.dbox}>
  148. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  149. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  150. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  151. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  152. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  153. </div>
  154. }
  155. return '--'
  156. }
  157. }
  158. return '--'
  159. },
  160. }
  161. data['default'] = natureDefaultStart + index
  162. return data
  163. })
  164. const natureM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
  165. let field = `natureAmountM${index}Trend`
  166. let data = {
  167. title: `M${index}(自)`,
  168. dataIndex: `M${index}Nature`,
  169. label: "自然量付费趋势",
  170. align: "center",
  171. width: 110,
  172. render: (a: any, b: any) => {
  173. let date1 = moment()
  174. if (b?.costDate === '总计') {
  175. if (b?.beginDay) {
  176. date1 = moment(b?.beginDay)
  177. } else {
  178. date1 = moment()
  179. }
  180. } else {
  181. date1 = moment(b.costDate)
  182. }
  183. let dt = moment()
  184. let day = dt.diff(date1, 'day');
  185. let fieldData = getFieldDta()
  186. if (fieldData?.length > 0 && index * 30 <= day) {
  187. let data: any = {}
  188. let keyS: string[] = fieldData?.map((item: any) => item.key)
  189. switch (fieldData[0].type) {
  190. case '付费趋势':
  191. if (b?.[field]) {
  192. data = b?.[field]
  193. return <div className={style.dbox}>
  194. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  195. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  196. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  197. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  198. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  199. </div>
  200. }
  201. return '--'
  202. }
  203. }
  204. return '--'
  205. },
  206. }
  207. data['default'] = natureDefaultStart + 90 + num
  208. return data
  209. })
  210. // 总付费趋势
  211. const zC = Array(90).fill('').map((_item: string, index: number) => {
  212. let field = `amountD${index + 1}Trend`
  213. let data = {
  214. title: `D${index + 1}(总)`,
  215. dataIndex: `D${index + 1}`,
  216. label: "总付费趋势",
  217. align: "center",
  218. width: 110,
  219. render: (a: any, b: any) => {
  220. let date1 = moment()
  221. if (b?.costDate === '总计') {
  222. if (b?.beginDay) {
  223. date1 = moment(b?.beginDay)
  224. } else {
  225. date1 = moment()
  226. }
  227. } else {
  228. date1 = moment(b.costDate)
  229. }
  230. let dt = moment()
  231. let day = dt.diff(date1, 'day');
  232. let fieldData = getFieldDta()
  233. if (fieldData?.length > 0 && index <= day) {
  234. let data: any = {}
  235. let keyS: string[] = fieldData?.map((item: any) => item.key)
  236. switch (fieldData[0].type) {
  237. case '付费趋势':
  238. if (b?.[field]) {
  239. data = b?.[field]
  240. return <div className={style.dbox}>
  241. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  242. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  243. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  244. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  245. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  246. </div>
  247. }
  248. return '--'
  249. }
  250. }
  251. return '--'
  252. },
  253. }
  254. return data
  255. })
  256. const zM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
  257. let field = `amountM${index}Trend`
  258. let data = {
  259. title: `M${index}(总)`,
  260. dataIndex: `M${index}`,
  261. label: "总付费趋势",
  262. align: "center",
  263. width: 110,
  264. render: (a: any, b: any) => {
  265. let date1 = moment()
  266. if (b?.costDate === '总计') {
  267. if (b?.beginDay) {
  268. date1 = moment(b?.beginDay)
  269. } else {
  270. date1 = moment()
  271. }
  272. } else {
  273. date1 = moment(b.costDate)
  274. }
  275. let dt = moment()
  276. let day = dt.diff(date1, 'day');
  277. let fieldData = getFieldDta()
  278. if (fieldData?.length > 0 && index * 30 <= day) {
  279. let data: any = {}
  280. let keyS: string[] = fieldData?.map((item: any) => item.key)
  281. switch (fieldData[0].type) {
  282. case '付费趋势':
  283. if (b?.[field]) {
  284. data = b?.[field]
  285. return <div className={style.dbox}>
  286. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  287. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  288. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  289. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  290. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  291. </div>
  292. }
  293. return '--'
  294. }
  295. }
  296. return '--'
  297. },
  298. }
  299. return data
  300. })
  301. return [
  302. {
  303. label: '游戏信息',
  304. data: [
  305. { title: '推广游戏名称', dataIndex: 'gameName', label: '游戏信息', align: 'center', width: 70, default: 2 },
  306. {
  307. title: '推广游戏应用类型', dataIndex: 'gameClassify', label: '游戏信息', align: 'center', width: 80,
  308. render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
  309. }
  310. ]
  311. },
  312. {
  313. label: '时间',
  314. data: [
  315. { title: '日期', dataIndex: 'costDate', label: '时间', align: 'center', width: 90, default: 1 },
  316. ]
  317. },
  318. {
  319. label: '消耗',
  320. data: [
  321. {
  322. title: '消耗', dataIndex: 'cost', label: '消耗', align: 'center', width: 90, sorter: true, default: 3,
  323. render: (a: string) => <Statistic value={a || 0} />
  324. }
  325. ]
  326. },
  327. {
  328. label: '买量用户数据',
  329. data: [
  330. { title: '买量注册人数', dataIndex: 'buyRegNum', label: '买量用户数据', align: 'center', width: 70, sorter: true },
  331. { title: '买量注册成本', dataIndex: 'buyRegCost', label: '买量用户数据', align: 'center', width: 70, sorter: true }
  332. ]
  333. },
  334. {
  335. label: '自然量用户数据',
  336. data: [
  337. { title: '自然量注册人数', dataIndex: 'natureRegNum', label: '自然量用户数据', align: 'center', width: 70, default: 4, sorter: true },
  338. { title: '自然量注册成本', dataIndex: 'natureRegCost', label: '自然量用户数据', align: 'center', width: 70, default: 5, sorter: true }
  339. ]
  340. },
  341. {
  342. label: '总用户数据',
  343. data: [
  344. { title: '注册人数', dataIndex: 'regNum', label: '总用户数据', align: 'center', width: 70, sorter: true },
  345. { title: '注册成本', dataIndex: 'regCost', label: '总用户数据', align: 'center', width: 70, sorter: true }
  346. ]
  347. },
  348. {
  349. label: '买量付费数据',
  350. data: [
  351. { title: '买量首日新用户充值次数', dataIndex: 'buyFirstNewUserAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  352. { title: '买量首日新用户充值人数', dataIndex: 'buyFirstNewUserAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  353. {
  354. title: '买量首日新用户充值金额', dataIndex: 'buyFirstNewUserAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  355. render: (a: string) => <Statistic value={a || 0} />
  356. },
  357. { title: '买量老用户充值次数', dataIndex: 'buyOldUserCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  358. { title: '买量老用户充值人数', dataIndex: 'buyOldUserNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  359. {
  360. title: '买量老用户充值金额', dataIndex: 'buyOldUserAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  361. render: (a: string) => <Statistic value={a || 0} />
  362. },
  363. { title: '买量账面充值次数', dataIndex: 'buyAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  364. { title: '买量账面充值人数', dataIndex: 'buyAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  365. {
  366. title: '买量账面充值金额', dataIndex: 'buyAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  367. render: (a: string) => <Statistic value={a || 0} />
  368. },
  369. { title: '买量新用户累计充值次数', dataIndex: 'buyNewUserTotalAmountCount', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  370. { title: '买量新用户累计充值人数', dataIndex: 'buyNewUserTotalAmountNum', label: '买量付费数据', align: 'center', width: 70, sorter: true },
  371. {
  372. title: '买量新用户累计充值金额', dataIndex: 'buyNewUserTotalAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  373. render: (a: string) => <Statistic value={a || 0} />
  374. },
  375. {
  376. title: '买量首日ROI', dataIndex: 'buyFirstRoi', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  377. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  378. },
  379. {
  380. title: '买量总ROI', dataIndex: 'buyTotalRoi', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  381. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  382. },
  383. {
  384. title: '买量首日付费率', dataIndex: 'buyFirstAmountRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  385. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  386. },
  387. {
  388. title: '买量至今付费率', tips: '买量至今付费率=新用户累计充值人数/注册人数', dataIndex: 'buyTodayAmountRate', label: '买量付费数据', align: 'center', width: 80, sorter: true,
  389. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  390. },
  391. {
  392. title: '买量新用户付费比', dataIndex: 'buyNewUserRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  393. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  394. },
  395. {
  396. title: '买量首日客单价', dataIndex: 'buyFirstAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  397. render: (a: string) => <Statistic value={a || 0} />
  398. },
  399. {
  400. title: '买量首日充值成本', dataIndex: 'buyFirstNewUserRechargeCost', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  401. render: (a: string) => <Statistic value={a || 0} />
  402. },
  403. {
  404. title: '买量总充值成本', dataIndex: 'buyTotalRechargeCost', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  405. render: (a: string) => <Statistic value={a || 0} />
  406. },
  407. {
  408. title: '买量至今客单价', tips: '买量至今客单价=新用户累计充值金额/新用户累计充值次数', dataIndex: 'buyTodayAvgAmount', label: '买量付费数据', align: 'center', width: 80, sorter: true,
  409. render: (a: string) => <Statistic value={a || 0} />
  410. },
  411. {
  412. title: '买量账面客单价', dataIndex: 'buyAvgAmount', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  413. render: (a: string) => <Statistic value={a || 0} />
  414. },
  415. {
  416. title: '买量复充率', tips: '买量复充率=新用户复充人数/新用户累计充值人数(新用户复充人数为累计充值次数n≥2)', dataIndex: 'buyUserAgainRate', label: '买量付费数据', align: 'center', width: 80, sorter: true,
  417. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  418. },
  419. {
  420. title: '买量单日付费100+人数', dataIndex: 'buyHundredUserNum', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  421. render: (a: string) => <Statistic value={a || 0} />
  422. },
  423. {
  424. title: '买量单日付费100+成本', dataIndex: 'buyHundredUserNumCost', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  425. render: (a: string) => <Statistic value={a || 0} />
  426. },
  427. {
  428. title: '买量首日创角人数', dataIndex: 'buyFirstRoleNum', label: '买量付费数据', align: 'center', width: 80, sorter: true,
  429. render: (a: string) => <Statistic value={a || 0} />
  430. },
  431. {
  432. title: '买量创角人数', dataIndex: 'buyRoleNum', label: '买量付费数据', align: 'center', width: 75, sorter: true,
  433. render: (a: string) => <Statistic value={a || 0} />
  434. },
  435. {
  436. title: '买量新用户累计创角人数', dataIndex: 'buyNewUserTotalRoleNum', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  437. render: (a: string) => <Statistic value={a || 0} />
  438. },
  439. {
  440. title: '买量首日创角人数成本', dataIndex: 'buyFirstRoleNumCost', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  441. render: (a: string) => <Statistic value={a || 0} precision={2} />
  442. },
  443. {
  444. title: '买量创角人数成本', dataIndex: 'buyRoleNumCost', label: '买量付费数据', align: 'center', width: 75, sorter: true,
  445. render: (a: string) => <Statistic value={a || 0} precision={2} />
  446. },
  447. {
  448. title: '买量新用户累计创角人数成本', dataIndex: 'buyNewUserTotalRoleNumCost', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  449. render: (a: string) => <Statistic value={a || 0} precision={2} />
  450. },
  451. {
  452. title: '买量首日创角率', dataIndex: 'buyFirstRoleNumRate', label: '买量付费数据', align: 'center', width: 75, sorter: true,
  453. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  454. },
  455. {
  456. title: '买量创角率', dataIndex: 'buyRoleNumRate', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  457. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  458. },
  459. {
  460. title: '买量新用户累计创角率', dataIndex: 'buyNewUserTotalRoleNumRate', label: '买量付费数据', align: 'center', width: 90, sorter: true,
  461. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  462. },
  463. {
  464. title: '买量新增注册ARPPU', dataIndex: 'buyRegUserArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  465. render: (a: string) => <Statistic value={a || 0} />
  466. },
  467. {
  468. title: '买量首日付费ARPPU', dataIndex: 'buyFirstAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  469. render: (a: string) => <Statistic value={a || 0} />
  470. },
  471. {
  472. title: '买量至今付费ARPPU', dataIndex: 'buyTodayAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  473. render: (a: string) => <Statistic value={a || 0} />
  474. },
  475. {
  476. title: '买量账面ARPPU', dataIndex: 'buyAmountArpu', label: '买量付费数据', align: 'center', width: 70, sorter: true,
  477. render: (a: string) => <Statistic value={a || 0} />
  478. },
  479. ]
  480. },
  481. {
  482. label: '自然量付费数据',
  483. data: [
  484. { title: '自然量首日新用户充值次数', dataIndex: 'natureFirstNewUserAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  485. { title: '自然量首日新用户充值人数', dataIndex: 'natureFirstNewUserAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 6, sorter: true },
  486. {
  487. title: '自然量首日新用户充值金额', dataIndex: 'natureFirstNewUserAmount', label: '自然量付费数据', align: 'center', width: 70, default: 7, sorter: true,
  488. render: (a: string) => <Statistic value={a || 0} />
  489. },
  490. { title: '自然量老用户充值次数', dataIndex: 'natureOldUserCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  491. { title: '自然量老用户充值人数', dataIndex: 'natureOldUserNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  492. {
  493. title: '自然量老用户充值金额', dataIndex: 'natureOldUserAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  494. render: (a: string) => <Statistic value={a || 0} />
  495. },
  496. { title: '自然量账面充值次数', dataIndex: 'natureAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  497. { title: '自然量账面充值人数', dataIndex: 'natureAmountNum', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  498. {
  499. title: '自然量账面充值金额', dataIndex: 'natureAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  500. render: (a: string) => <Statistic value={a || 0} />
  501. },
  502. { title: '自然量新用户累计充值次数', dataIndex: 'natureNewUserTotalAmountCount', label: '自然量付费数据', align: 'center', width: 70, sorter: true },
  503. { title: '自然量新用户累计充值人数', dataIndex: 'natureNewUserTotalAmountNum', label: '自然量付费数据', align: 'center', width: 70, default: 8, sorter: true },
  504. {
  505. title: '自然量新用户累计充值金额', dataIndex: 'natureNewUserTotalAmount', label: '自然量付费数据', align: 'center', width: 70, default: 9, sorter: true,
  506. render: (a: string) => <Statistic value={a || 0} />
  507. },
  508. {
  509. title: '自然量首日ROI', dataIndex: 'natureFirstRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true, default: 10,
  510. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  511. },
  512. {
  513. title: '自然量总ROI', dataIndex: 'natureTotalRoi', label: '自然量付费数据', align: 'center', width: 70, sorter: true, default: 11,
  514. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  515. },
  516. {
  517. title: '自然量首日付费率', dataIndex: 'natureFirstAmountRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  518. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  519. },
  520. {
  521. title: '自然量至今付费率', tips: '自然量至今付费率=新用户累计充值人数/注册人数', dataIndex: 'natureTodayAmountRate', label: '自然量付费数据', align: 'center', width: 80, sorter: true,
  522. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  523. },
  524. {
  525. title: '自然量新用户付费比', dataIndex: 'natureNewUserRate', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  526. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  527. },
  528. {
  529. title: '自然量首日客单价', dataIndex: 'natureFirstAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  530. render: (a: string) => <Statistic value={a || 0} />
  531. },
  532. {
  533. title: '自然量首日充值成本', dataIndex: 'natureFirstNewUserRechargeCost', label: '自然量付费数据', align: 'center', width: 70, default: 12, sorter: true,
  534. render: (a: string) => <Statistic value={a || 0} />
  535. },
  536. {
  537. title: '自然量总充值成本', dataIndex: 'natureTotalRechargeCost', label: '自然量付费数据', align: 'center', width: 70, default: 13, sorter: true,
  538. render: (a: string) => <Statistic value={a || 0} />
  539. },
  540. {
  541. title: '自然量至今客单价', tips: '自然量至今客单价=新用户累计充值金额/新用户累计充值次数', dataIndex: 'natureTodayAvgAmount', label: '自然量付费数据', align: 'center', width: 80, sorter: true,
  542. render: (a: string) => <Statistic value={a || 0} />
  543. },
  544. {
  545. title: '自然量账面客单价', dataIndex: 'natureAvgAmount', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  546. render: (a: string) => <Statistic value={a || 0} />
  547. },
  548. {
  549. title: '自然量复充率', tips: '自然量复充率=新用户复充人数/新用户累计充值人数(新用户复充人数为累计充值次数n≥2)', dataIndex: 'natureUserAgainRate', label: '自然量付费数据', align: 'center', width: 80, sorter: true,
  550. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  551. },
  552. {
  553. title: '自然量单日付费100+人数', dataIndex: 'natureHundredUserNum', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  554. render: (a: string) => <Statistic value={a || 0} />
  555. },
  556. {
  557. title: '自然量单日付费100+成本', dataIndex: 'natureHundredUserNumCost', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  558. render: (a: string) => <Statistic value={a || 0} precision={2} />
  559. },
  560. {
  561. title: '自然量首日创角人数', dataIndex: 'natureFirstRoleNum', label: '自然量付费数据', align: 'center', width: 80, sorter: true,
  562. },
  563. {
  564. title: '自然量创角人数', dataIndex: 'natureRoleNum', label: '自然量付费数据', align: 'center', width: 75, sorter: true,
  565. render: (a: string) => <Statistic value={a || 0} />
  566. },
  567. {
  568. title: '自然量新用户累计创角人数', dataIndex: 'natureNewUserTotalRoleNum', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  569. render: (a: string) => <Statistic value={a || 0} />
  570. },
  571. {
  572. title: '自然量首日创角人数成本', dataIndex: 'natureFirstRoleNumCost', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  573. render: (a: string) => <Statistic value={a || 0} precision={2} />
  574. },
  575. {
  576. title: '自然量创角人数成本', dataIndex: 'natureRoleNumCost', label: '自然量付费数据', align: 'center', width: 85, sorter: true,
  577. render: (a: string) => <Statistic value={a || 0} precision={2} />
  578. },
  579. {
  580. title: '自然量新用户累计创角人数成本', dataIndex: 'natureNewUserTotalRoleNumCost', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  581. render: (a: string) => <Statistic value={a || 0} />
  582. },
  583. {
  584. title: '自然量首日创角率', dataIndex: 'natureFirstRoleNumRate', label: '自然量付费数据', align: 'center', width: 75, sorter: true,
  585. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  586. },
  587. {
  588. title: '自然量创角率', dataIndex: 'natureRoleNumRate', label: '自然量付费数据', align: 'center', width: 75, sorter: true,
  589. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  590. },
  591. {
  592. title: '自然量新用户累计创角率', dataIndex: 'natureNewUserTotalRoleNumRate', label: '自然量付费数据', align: 'center', width: 90, sorter: true,
  593. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  594. },
  595. {
  596. title: '自然量新增注册ARPPU', dataIndex: 'natureRegUserArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  597. render: (a: string) => <Statistic value={a || 0} />
  598. },
  599. {
  600. title: '自然量首日付费ARPPU', dataIndex: 'natureFirstAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  601. render: (a: string) => <Statistic value={a || 0} />
  602. },
  603. {
  604. title: '自然量至今付费ARPPU', dataIndex: 'natureTodayAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  605. render: (a: string) => <Statistic value={a || 0} />
  606. },
  607. {
  608. title: '自然量账面ARPPU', dataIndex: 'natureAmountArpu', label: '自然量付费数据', align: 'center', width: 70, sorter: true,
  609. render: (a: string) => <Statistic value={a || 0} />
  610. }
  611. ]
  612. },
  613. {
  614. label: '总付费数据',
  615. data: [
  616. { title: '总首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
  617. { title: '总首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
  618. {
  619. title: '总首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  620. render: (a: string) => <Statistic value={a || 0} />
  621. },
  622. { title: '总老用户充值次数', dataIndex: 'oldUserCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
  623. { title: '总老用户充值人数', dataIndex: 'oldUserNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
  624. {
  625. title: '总老用户充值金额', dataIndex: 'oldUserAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  626. render: (a: string) => <Statistic value={a || 0} />
  627. },
  628. { title: '总账面充值次数', dataIndex: 'amountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
  629. { title: '总账面充值人数', dataIndex: 'amountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
  630. {
  631. title: '总账面充值金额', dataIndex: 'amount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  632. render: (a: string) => <Statistic value={a || 0} />
  633. },
  634. { title: '总新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '总付费数据', align: 'center', width: 70, sorter: true },
  635. { title: '总新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '总付费数据', align: 'center', width: 70, sorter: true },
  636. {
  637. title: '总新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  638. render: (a: string) => <Statistic value={a || 0} />
  639. },
  640. {
  641. title: '总首日ROI', dataIndex: 'firstRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
  642. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  643. },
  644. {
  645. title: '总总ROI', dataIndex: 'totalRoi', label: '总付费数据', align: 'center', width: 70, sorter: true,
  646. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  647. },
  648. {
  649. title: '总首日付费率', dataIndex: 'firstAmountRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
  650. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  651. },
  652. {
  653. title: '总至今付费率', tips: '至今付费率(总)=新用户累计充值人数/注册人数', dataIndex: 'todayAmountRate', label: '总付费数据', align: 'center', width: 80, sorter: true,
  654. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  655. },
  656. {
  657. title: '总新用户付费比', dataIndex: 'newUserRate', label: '总付费数据', align: 'center', width: 70, sorter: true,
  658. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  659. },
  660. {
  661. title: '总首日客单价', dataIndex: 'firstAvgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  662. render: (a: string) => <Statistic value={a || 0} />
  663. },
  664. {
  665. title: '总首日充值成本', dataIndex: 'firstNewUserRechargeCost', label: '总付费数据', align: 'center', width: 70, sorter: true,
  666. render: (a: string) => <Statistic value={a || 0} />
  667. },
  668. {
  669. title: '总总充值成本', dataIndex: 'totalRechargeCost', label: '总付费数据', align: 'center', width: 70, sorter: true,
  670. render: (a: string) => <Statistic value={a || 0} />
  671. },
  672. {
  673. title: '总至今客单价', tips: '至今客单价(总)=新用户累计充值金额/新用户累计充值次数', dataIndex: 'todayAvgAmount', label: '总付费数据', align: 'center', width: 80, sorter: true,
  674. render: (a: string) => <Statistic value={a || 0} />
  675. },
  676. {
  677. title: '总账面客单价', dataIndex: 'avgAmount', label: '总付费数据', align: 'center', width: 70, sorter: true,
  678. render: (a: string) => <Statistic value={a || 0} />
  679. },
  680. {
  681. title: '总复充率', tips: '复充率(总)=新用户复充人数/新用户累计充值人数(新用户复充人数为累计充值次数n≥2)', dataIndex: 'userAgainRate', label: '总付费数据', align: 'center', width: 80, sorter: true,
  682. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  683. },
  684. {
  685. title: '总单日付费100+人数', dataIndex: 'hundredUserNum', label: '总付费数据', align: 'center', width: 90, sorter: true,
  686. render: (a: string) => <Statistic value={a || 0} />
  687. },
  688. {
  689. title: '总单日付费100+成本', dataIndex: 'hundredUserNumCost', label: '总付费数据', align: 'center', width: 90, sorter: true,
  690. render: (a: string) => <Statistic value={a || 0} precision={2} />
  691. },
  692. {
  693. title: '总首日创角人数', dataIndex: 'firstRoleNum', label: '总付费数据', align: 'center', width: 80, sorter: true,
  694. render: (a: string) => <Statistic value={a || 0} />
  695. },
  696. {
  697. title: '总创角人数', dataIndex: 'roleNum', label: '总付费数据', align: 'center', width: 70, sorter: true,
  698. render: (a: string) => <Statistic value={a || 0} />
  699. },
  700. {
  701. title: '总新用户累计创角人数', dataIndex: 'newUserTotalRoleNum', label: '总付费数据', align: 'center', width: 85, sorter: true,
  702. render: (a: string) => <Statistic value={a || 0} />
  703. },
  704. {
  705. title: '总首日创角人数成本', dataIndex: 'firstRoleNumCost', label: '总付费数据', align: 'center', width: 80, sorter: true,
  706. render: (a: string) => <Statistic value={a || 0} precision={2} />
  707. },
  708. {
  709. title: '总创角人数成本', dataIndex: 'roleNumCost', label: '总付费数据', align: 'center', width: 75, sorter: true,
  710. render: (a: string) => <Statistic value={a || 0} precision={2} />
  711. },
  712. {
  713. title: '总新用户累计创角人数成本', dataIndex: 'newUserTotalRoleNumCost', label: '总付费数据', align: 'center', width: 90, sorter: true,
  714. render: (a: string) => <Statistic value={a || 0} precision={2} />
  715. },
  716. {
  717. title: '总首日创角率', dataIndex: 'firstRoleNumRate', label: '总付费数据', align: 'center', width: 75, sorter: true,
  718. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  719. },
  720. {
  721. title: '总创角率', dataIndex: 'roleNumRate', label: '总付费数据', align: 'center', width: 75, sorter: true,
  722. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  723. },
  724. {
  725. title: '总新用户累计创角率', dataIndex: 'newUserTotalRoleNumRate', label: '总付费数据', align: 'center', width: 90, sorter: true,
  726. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  727. },
  728. {
  729. title: '总新增注册ARPPU', dataIndex: 'regUserArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
  730. render: (a: string) => <Statistic value={a || 0} />
  731. },
  732. {
  733. title: '总首日付费ARPPU', dataIndex: 'firstAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
  734. render: (a: string) => <Statistic value={a || 0} />
  735. },
  736. {
  737. title: '总至今付费ARPPU', dataIndex: 'todayAmountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
  738. render: (a: string) => <Statistic value={a || 0} />
  739. },
  740. {
  741. title: '总账面ARPPU', dataIndex: 'amountArpu', label: '总付费数据', align: 'center', width: 70, sorter: true,
  742. render: (a: string) => <Statistic value={a || 0} />
  743. }
  744. ]
  745. },
  746. {
  747. fieldSHow: {
  748. label: '付费趋势区间字段展示',
  749. saveField: 'date_field',
  750. defaultValue: [ // 默认展示字段
  751. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  752. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  753. { label: '增', key: 'increase', type: '付费趋势' },
  754. { label: '回', key: 'back', type: '付费趋势' },
  755. { label: '倍', key: 'multiples', type: '付费趋势' },
  756. ],
  757. data: [
  758. {
  759. label: '付费趋势',
  760. data: [
  761. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  762. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  763. { label: '增', key: 'increase', type: '付费趋势' },
  764. { label: '回', key: 'back', type: '付费趋势' },
  765. { label: '倍', key: 'multiples', type: '付费趋势' },
  766. ]
  767. }
  768. ]
  769. },
  770. label: '买量付费趋势',
  771. data: [
  772. ...buyC,
  773. ...buyM,
  774. {
  775. title: "总(买)",
  776. dataIndex: "totalBuy",
  777. label: "买量付费趋势",
  778. align: "center",
  779. width: 110,
  780. render: (a: any, b: any) => {
  781. let fieldData = getFieldDta()
  782. if (fieldData?.length > 0) {
  783. let data: any = {}
  784. let keyS: string[] = fieldData?.map((item: any) => item.key)
  785. switch (fieldData[0].type) {
  786. case '付费趋势':
  787. if (b?.buyAmountSumTrend) {
  788. data = b?.buyAmountSumTrend
  789. return <div className={style.dbox}>
  790. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  791. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  792. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  793. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  794. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  795. </div>
  796. }
  797. return '--'
  798. }
  799. }
  800. return '--'
  801. },
  802. }]
  803. },
  804. {
  805. label: '自然量付费趋势',
  806. data: [
  807. ...natureC,
  808. ...natureM,
  809. {
  810. title: "总(自)",
  811. dataIndex: "totalNature",
  812. label: "自然量付费趋势",
  813. align: "center",
  814. width: 110,
  815. default: 113,
  816. render: (a: any, b: any) => {
  817. let fieldData = getFieldDta()
  818. if (fieldData?.length > 0) {
  819. let data: any = {}
  820. let keyS: string[] = fieldData?.map((item: any) => item.key)
  821. switch (fieldData[0].type) {
  822. case '付费趋势':
  823. if (b?.natureAmountSumTrend) {
  824. data = b?.natureAmountSumTrend
  825. return <div className={style.dbox}>
  826. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  827. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  828. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  829. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  830. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  831. </div>
  832. }
  833. return '--'
  834. }
  835. }
  836. return '--'
  837. },
  838. }]
  839. },
  840. {
  841. label: '总付费趋势',
  842. data: [
  843. ...zC,
  844. ...zM,
  845. {
  846. title: "总(总)",
  847. dataIndex: "total",
  848. label: "总付费趋势",
  849. align: "center",
  850. width: 110,
  851. render: (a: any, b: any) => {
  852. let fieldData = getFieldDta()
  853. if (fieldData?.length > 0) {
  854. let data: any = {}
  855. let keyS: string[] = fieldData?.map((item: any) => item.key)
  856. switch (fieldData[0].type) {
  857. case '付费趋势':
  858. if (b?.amountSumTrend) {
  859. data = b?.amountSumTrend
  860. return <div className={style.dbox}>
  861. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  862. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  863. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  864. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  865. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  866. </div>
  867. }
  868. return '--'
  869. }
  870. }
  871. return '--'
  872. },
  873. }]
  874. },
  875. {
  876. label: '操作',
  877. data: [
  878. {
  879. title: '操作',
  880. dataIndex: 'cz',
  881. label: '操作',
  882. default: 114,
  883. align: 'center',
  884. width: 75,
  885. render: (a: number, b: any) => {
  886. if (b?.costDate === '总计') {
  887. return '--'
  888. }
  889. return <a onClick={() => rechargeTrendHandle(b)}>复充趋势</a>
  890. },
  891. }
  892. ]
  893. }
  894. ]
  895. }
  896. export default columnsNature12