tableConfig.tsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. import React from "react"
  2. import style from './index.less'
  3. import { Space, Statistic } from "antd"
  4. import { gameClassifyEnum } from "@/components/QueryForm/const"
  5. import { version } from "../../components/TableData"
  6. import moment from "moment"
  7. import UserInfo from "./userInfo"
  8. function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
  9. const getFieldDta = () => {
  10. let defaultValue = [ // 默认展示字段
  11. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  12. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  13. { label: '增', key: 'increase', type: '付费趋势' },
  14. { label: '回', key: 'back', type: '付费趋势' },
  15. { label: '倍', key: 'multiples', type: '付费趋势' },
  16. ]
  17. let mySelectFieldData = localStorage.getItem(`myAdFieldConfig${version}_游戏每日数据`)
  18. let newSelectFieldData: any = {}
  19. if (mySelectFieldData) {
  20. newSelectFieldData = JSON.parse(mySelectFieldData).date_field
  21. } else {
  22. newSelectFieldData = defaultValue
  23. }
  24. return newSelectFieldData
  25. }
  26. let defaultStart = 15
  27. // 总付费趋势
  28. const zC = Array(90).fill('').map((_item: string, index: number) => {
  29. let field = `amountD${index + 1}Trend`
  30. let data: any = {
  31. title: `D${index + 1}`,
  32. dataIndex: `D${index + 1}`,
  33. label: "付费趋势",
  34. align: "center",
  35. width: 135,
  36. render: (a: any, b: any) => {
  37. let date1 = moment()
  38. if (b?.costDate === '总计') {
  39. if (b?.beginDay) {
  40. date1 = moment(b?.beginDay)
  41. } else {
  42. date1 = moment()
  43. }
  44. } else {
  45. date1 = moment(b.costDate)
  46. }
  47. let dt = moment()
  48. let day = dt.diff(date1, 'day');
  49. let fieldData = getFieldDta()
  50. if (fieldData?.length > 0 && index <= day) {
  51. let data: any = {}
  52. let keyS: string[] = fieldData?.map((item: any) => item.key)
  53. switch (fieldData[0].type) {
  54. case '付费趋势':
  55. if (b?.[field]) {
  56. data = b?.[field]
  57. return <div className={style.dbox}>
  58. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  59. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  60. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  61. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  62. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  63. </div>
  64. }
  65. return '--'
  66. }
  67. }
  68. return '--'
  69. },
  70. }
  71. if (index < 30) {
  72. data['default'] = defaultStart + index
  73. }
  74. return data
  75. })
  76. const zM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
  77. let field = `amountM${index}Trend`
  78. let data = {
  79. title: `M${index}`,
  80. dataIndex: `M${index}`,
  81. label: "付费趋势",
  82. align: "center",
  83. width: 120,
  84. render: (a: any, b: any) => {
  85. let date1 = moment()
  86. if (b?.costDate === '总计') {
  87. if (b?.beginDay) {
  88. date1 = moment(b?.beginDay)
  89. } else {
  90. date1 = moment()
  91. }
  92. } else {
  93. date1 = moment(b.costDate)
  94. }
  95. let dt = moment()
  96. let day = dt.diff(date1, 'day');
  97. let fieldData = getFieldDta()
  98. if (fieldData?.length > 0 && index * 30 <= day) {
  99. let data: any = {}
  100. let keyS: string[] = fieldData?.map((item: any) => item.key)
  101. switch (fieldData[0].type) {
  102. case '付费趋势':
  103. if (b?.[field]) {
  104. data = b?.[field]
  105. return <div className={style.dbox}>
  106. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  107. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  108. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  109. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  110. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  111. </div>
  112. }
  113. return '--'
  114. }
  115. }
  116. return '--'
  117. },
  118. }
  119. // data['default'] = defaultStart + 90 + num
  120. return data
  121. })
  122. return [
  123. {
  124. label: '游戏信息',
  125. data: [
  126. {
  127. title: '推广游戏名称', dataIndex: 'gameName', label: '游戏信息', align: 'center', width: 70, default: 2,
  128. render: (a: string) => a || '--'
  129. },
  130. {
  131. title: '推广游戏应用类型', dataIndex: 'gameClassify', label: '游戏信息', align: 'center', width: 80,
  132. render: (a: string, b?: any) => (<span>{gameClassifyEnum[a as keyof typeof gameClassifyEnum]}</span>)
  133. }
  134. ]
  135. },
  136. {
  137. label: '时间',
  138. data: [
  139. { title: '日期', dataIndex: 'costDate', label: '时间', align: 'center', width: 90, default: 1 },
  140. ]
  141. },
  142. {
  143. label: '消耗',
  144. data: [
  145. {
  146. title: '消耗', dataIndex: 'cost', label: '消耗', align: 'center', width: 90, sorter: true, default: 3,
  147. render: (a: string) => <Statistic value={a || 0} />
  148. }
  149. ]
  150. },
  151. {
  152. label: '用户数据',
  153. data: [
  154. { title: '注册人数', dataIndex: 'regNum', label: '用户数据', align: 'center', width: 70, default: 4, sorter: true },
  155. { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, default: 5, sorter: true }
  156. ]
  157. },
  158. {
  159. label: '付费数据',
  160. data: [
  161. { title: '首日新用户充值次数', dataIndex: 'firstNewUserAmountCount', label: '付费数据', align: 'center', width: 70, sorter: true },
  162. { title: '首日新用户充值人数', dataIndex: 'firstNewUserAmountNum', label: '付费数据', align: 'center', width: 70, default: 6, sorter: true },
  163. {
  164. title: '首日新用户充值金额', dataIndex: 'firstNewUserAmount', label: '付费数据', align: 'center', width: 70, default: 7, sorter: true,
  165. render: (a: string) => <Statistic value={a || 0} />
  166. },
  167. { title: '老用户充值次数', dataIndex: 'oldUserCount', label: '付费数据', align: 'center', width: 70, sorter: true },
  168. { title: '老用户充值人数', dataIndex: 'oldUserNum', label: '付费数据', align: 'center', width: 70, sorter: true },
  169. {
  170. title: '老用户充值金额', dataIndex: 'oldUserAmount', label: '付费数据', align: 'center', width: 70, sorter: true,
  171. render: (a: string) => <Statistic value={a || 0} />
  172. },
  173. { title: '账面充值次数', dataIndex: 'amountCount', label: '付费数据', align: 'center', width: 70, sorter: true },
  174. { title: '账面充值人数', dataIndex: 'amountNum', label: '付费数据', align: 'center', width: 70, sorter: true },
  175. {
  176. title: '账面充值金额', dataIndex: 'amount', label: '付费数据', align: 'center', width: 70, sorter: true,
  177. render: (a: string) => <Statistic value={a || 0} />
  178. },
  179. { title: '新用户累计充值次数', dataIndex: 'newUserTotalAmountCount', label: '付费数据', align: 'center', width: 70, sorter: true },
  180. { title: '新用户累计充值人数', dataIndex: 'newUserTotalAmountNum', label: '付费数据', align: 'center', width: 70, default: 8, sorter: true },
  181. {
  182. title: '新用户累计充值金额', dataIndex: 'newUserTotalAmount', label: '付费数据', align: 'center', width: 70, default: 9, sorter: true,
  183. render: (a: string) => <Statistic value={a || 0} />
  184. },
  185. {
  186. title: '首日ROI', dataIndex: 'firstRoi', label: '付费数据', align: 'center', width: 70, sorter: true, default: 10,
  187. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  188. },
  189. {
  190. title: '总ROI', dataIndex: 'totalRoi', label: '付费数据', align: 'center', width: 70, sorter: true, default: 11,
  191. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  192. },
  193. {
  194. title: '首日付费率', dataIndex: 'firstAmountRate', label: '付费数据', align: 'center', width: 70, sorter: true,
  195. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  196. },
  197. {
  198. title: '至今付费率', tips: '至今付费率(总)=新用户累计充值人数/注册人数', dataIndex: 'todayAmountRate', label: '付费数据', align: 'center', width: 80, sorter: true,
  199. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  200. },
  201. {
  202. title: '新用户付费比', dataIndex: 'newUserRate', label: '付费数据', align: 'center', width: 70, sorter: true,
  203. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  204. },
  205. {
  206. title: '首日客单价', dataIndex: 'firstAvgAmount', label: '付费数据', align: 'center', width: 70, sorter: true,
  207. render: (a: string) => <Statistic value={a || 0} />
  208. },
  209. {
  210. title: '首日充值成本', dataIndex: 'firstNewUserRechargeCost', label: '付费数据', align: 'center', width: 70, default: 12, sorter: true,
  211. render: (a: string) => <Statistic value={a || 0} />
  212. },
  213. {
  214. title: '总充值成本', dataIndex: 'totalRechargeCost', label: '付费数据', align: 'center', width: 70, default: 13, sorter: true,
  215. render: (a: string) => <Statistic value={a || 0} />
  216. },
  217. {
  218. title: '至今客单价', tips: '至今客单价(总)=新用户累计充值金额/新用户累计充值次数', dataIndex: 'todayAvgAmount', label: '付费数据', align: 'center', width: 80, sorter: true,
  219. render: (a: string) => <Statistic value={a || 0} />
  220. },
  221. {
  222. title: '账面客单价', dataIndex: 'avgAmount', label: '付费数据', align: 'center', width: 70, sorter: true,
  223. render: (a: string) => <Statistic value={a || 0} />
  224. },
  225. {
  226. title: '复充率', tips: '复充率(总)=新用户复充人数/新用户累计充值人数(新用户复充人数为累计充值次数n≥2)', dataIndex: 'userAgainRate', label: '付费数据', align: 'center', width: 80, sorter: true,
  227. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  228. },
  229. {
  230. title: '单日付费100+人数', dataIndex: 'hundredUserNum', label: '付费数据', align: 'center', width: 90, sorter: true,
  231. render: (a: string) => <Statistic value={a || 0} />
  232. },
  233. {
  234. title: '单日付费100+成本', dataIndex: 'hundredUserNumCost', label: '付费数据', align: 'center', width: 90, sorter: true,
  235. render: (a: string) => <Statistic value={a || 0} precision={2} />
  236. },
  237. {
  238. title: '首日创角人数', dataIndex: 'firstRoleNum', label: '付费数据', align: 'center', width: 80, sorter: true,
  239. render: (a: string) => <Statistic value={a || 0} />
  240. },
  241. {
  242. title: '创角人数', dataIndex: 'roleNum', label: '付费数据', align: 'center', width: 70, sorter: true,
  243. render: (a: string) => <Statistic value={a || 0} />
  244. },
  245. {
  246. title: '新用户累计创角人数', dataIndex: 'newUserTotalRoleNum', label: '付费数据', align: 'center', width: 85, sorter: true,
  247. render: (a: string) => <Statistic value={a || 0} />
  248. },
  249. {
  250. title: '首日创角人数成本', dataIndex: 'firstRoleNumCost', label: '付费数据', align: 'center', width: 80, sorter: true,
  251. render: (a: string) => <Statistic value={a || 0} precision={2} />
  252. },
  253. {
  254. title: '创角人数成本', dataIndex: 'roleNumCost', label: '付费数据', align: 'center', width: 75, sorter: true,
  255. render: (a: string) => <Statistic value={a || 0} precision={2} />
  256. },
  257. {
  258. title: '新用户累计创角人数成本', dataIndex: 'newUserTotalRoleNumCost', label: '付费数据', align: 'center', width: 90, sorter: true,
  259. render: (a: string) => <Statistic value={a || 0} precision={2} />
  260. },
  261. {
  262. title: '首日创角率', dataIndex: 'firstRoleNumRate', label: '付费数据', align: 'center', width: 75, sorter: true,
  263. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  264. },
  265. {
  266. title: '创角率', dataIndex: 'roleNumRate', label: '付费数据', align: 'center', width: 75, sorter: true,
  267. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  268. },
  269. {
  270. title: '新用户累计创角率', dataIndex: 'newUserTotalRoleNumRate', label: '付费数据', align: 'center', width: 90, sorter: true,
  271. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  272. },
  273. {
  274. title: '新增注册ARPPU', dataIndex: 'regUserArpu', label: '付费数据', align: 'center', width: 70, sorter: true,
  275. render: (a: string) => <Statistic value={a || 0} />
  276. },
  277. {
  278. title: '首日付费ARPPU', dataIndex: 'firstAmountArpu', label: '付费数据', align: 'center', width: 70, sorter: true,
  279. render: (a: string) => <Statistic value={a || 0} />
  280. },
  281. {
  282. title: '至今付费ARPPU', dataIndex: 'todayAmountArpu', label: '付费数据', align: 'center', width: 70, sorter: true,
  283. render: (a: string) => <Statistic value={a || 0} />
  284. },
  285. {
  286. title: '账面ARPPU', dataIndex: 'amountArpu', label: '付费数据', align: 'center', width: 70, sorter: true,
  287. render: (a: string) => <Statistic value={a || 0} />
  288. },
  289. { title: '首日有效创角人数', dataIndex: 'firstEffectiveRoleNum', label: '付费数据', align: 'center', width: 80, sorter: true, },
  290. { title: '新用户累计有效创角人数', dataIndex: 'newUserTotalEffectiveRoleNum', label: '付费数据', align: 'center', width: 85, sorter: true, },
  291. { title: '有效创角人数', dataIndex: 'effectiveRoleNum', label: '付费数据', align: 'center', width: 70, sorter: true, },
  292. {
  293. title: '首日有效创角率', dataIndex: 'firstEffectiveRoleRate', label: '付费数据', align: 'center', width: 90, sorter: true,
  294. render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  295. },
  296. {
  297. title: '新用户累计有效创角率', dataIndex: 'newUserTotalEffectiveRoleNumRate', label: '付费数据', align: 'center', width: 100, sorter: true,
  298. render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  299. },
  300. {
  301. title: '有效创角率', dataIndex: 'effectiveRoleNumRate', label: '付费数据', align: 'center', width: 90, sorter: true,
  302. render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  303. },
  304. {
  305. title: '首日有效创角成本', dataIndex: 'firstEffectiveRoleNumCost', label: '付费数据', align: 'center', width: 80, sorter: true,
  306. render: (a: string) => <Statistic value={a || 0} precision={2} />
  307. },
  308. {
  309. title: '新用户累计有效创角成本', dataIndex: 'newUserTotalEffectiveRoleNumCost', label: '付费数据', align: 'center', width: 85, sorter: true,
  310. render: (a: string) => <Statistic value={a || 0} precision={2} />
  311. },
  312. {
  313. title: '有效创角成本', dataIndex: 'effectiveRoleNumCost', label: '付费数据', align: 'center', width: 75, sorter: true,
  314. render: (a: string) => <Statistic value={a || 0} precision={2} />
  315. },
  316. { title: '首日有效创角付费人数', dataIndex: 'firstEffectiveRoleAmountNum', label: '付费数据', align: 'center', width: 80, sorter: true, },
  317. { title: '新用户累计有效创角付费人数', dataIndex: 'newUserTotalEffectiveRoleAmountNum', label: '付费数据', align: 'center', width: 95, sorter: true, },
  318. {
  319. title: '首日有效创角付费成本', dataIndex: 'firstEffectiveRoleAmountNumCost', label: '付费数据', align: 'center', width: 80, sorter: true,
  320. render: (a: string) => <Statistic value={a || 0} precision={2} />
  321. },
  322. {
  323. title: '新用户累计有效创角付费成本', dataIndex: 'newUserTotalEffectiveRoleAmountNumCost', label: '付费数据', align: 'center', width: 95, sorter: true,
  324. render: (a: string) => <Statistic value={a || 0} precision={2} />
  325. },
  326. {
  327. title: '首日有效创角付费比', dataIndex: 'firstEffectiveRoleAmountNumRate', label: '付费数据', align: 'center', width: 90, sorter: true,
  328. render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  329. },
  330. {
  331. title: '新用户累计有效创角付费比', dataIndex: 'newUserTotalEffectiveRoleAmountNumRate', label: '付费数据', align: 'center', width: 90, sorter: true,
  332. render: (a: number) => <Statistic value={a || 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  333. },
  334. {
  335. title: '首日有效创角ARPU', dataIndex: 'firstEffectiveRoleArpu', label: '付费数据', align: 'center', width: 70, sorter: true,
  336. render: (a: string) => <Statistic value={a || 0} />
  337. },
  338. {
  339. title: '新用户累计有效创角ARPU', dataIndex: 'newUserTotalEffectiveRoleArpu', label: '付费数据', align: 'center', width: 80, sorter: true,
  340. render: (a: string) => <Statistic value={a || 0} />
  341. },
  342. { title: '首日人均付费次数', dataIndex: 'firstDayAvgCostCount', default: 14, label: '付费数据', align: 'center', width: 70, sorter: true }
  343. ]
  344. },
  345. {
  346. fieldSHow: {
  347. label: '付费趋势区间字段展示',
  348. saveField: 'date_field',
  349. defaultValue: [ // 默认展示字段
  350. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  351. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  352. { label: '增', key: 'increase', type: '付费趋势' },
  353. { label: '回', key: 'back', type: '付费趋势' },
  354. { label: '倍', key: 'multiples', type: '付费趋势' },
  355. ],
  356. data: [
  357. {
  358. label: '付费趋势',
  359. data: [
  360. { label: '充值人数', key: 'rechargeUserCount', type: '付费趋势' },
  361. { label: '充值金额', key: 'rechargeMoney', type: '付费趋势' },
  362. { label: '增', key: 'increase', type: '付费趋势' },
  363. { label: '回', key: 'back', type: '付费趋势' },
  364. { label: '倍', key: 'multiples', type: '付费趋势' },
  365. ]
  366. }
  367. ]
  368. },
  369. label: '总付费趋势',
  370. data: [
  371. ...zC,
  372. ...zM,
  373. {
  374. title: "总",
  375. dataIndex: "total",
  376. label: "付费趋势",
  377. align: "center",
  378. width: 125,
  379. default: 45,
  380. render: (a: any, b: any) => {
  381. let fieldData = getFieldDta()
  382. if (fieldData?.length > 0) {
  383. let data: any = {}
  384. let keyS: string[] = fieldData?.map((item: any) => item.key)
  385. switch (fieldData[0].type) {
  386. case '付费趋势':
  387. if (b?.amountSumTrend) {
  388. data = b?.amountSumTrend
  389. return <div className={style.dbox}>
  390. {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
  391. {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
  392. {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
  393. {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
  394. {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
  395. </div>
  396. }
  397. return '--'
  398. }
  399. }
  400. return '--'
  401. },
  402. }]
  403. },
  404. {
  405. label: '操作',
  406. data: [
  407. {
  408. title: '操作',
  409. dataIndex: 'cz',
  410. label: '操作',
  411. default: 46,
  412. width: 80,
  413. render: (a: number, b: any) => {
  414. if (b?.costDate === '总计') {
  415. return <UserInfo data={b.userDetails} sourceSystem={b.sourceSystem} />
  416. }
  417. return <Space direction="vertical" size={2}>
  418. {b?.gameId ? <a style={{ fontSize: 12 }} onClick={() => rechargeTrendHandle(b)}>复充趋势</a> : '--'}
  419. <UserInfo data={b.userDetails} sourceSystem={b.sourceSystem} />
  420. </Space>
  421. },
  422. }
  423. ]
  424. }
  425. ]
  426. }
  427. export default columnsNature12