tableConfig.tsx 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. import WidthEllipsis from "@/components/widthEllipsis"
  2. import { Statistic } from "antd"
  3. import React from "react"
  4. function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
  5. return [
  6. {
  7. label: '订单明细',
  8. data: [
  9. {
  10. title: '日期(订单创建日期)', dataIndex: 'day1', label: '订单明细', align: 'center', width: 85, default: 1,
  11. render: (a: string, b: any) => (<WidthEllipsis value={b?.day} />)
  12. },
  13. {
  14. title: '商户订单号', dataIndex: 'orderId', label: '订单明细', align: 'center', width: 120, default: 2,
  15. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  16. },
  17. {
  18. title: 'CP订单号', dataIndex: 'cpOrderId', label: '订单明细', align: 'center', width: 130, default: 3,
  19. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  20. },
  21. {
  22. title: '第三方支付订单号', dataIndex: 'merchantOrderNo', label: '订单明细', align: 'center', width: 85, default: 4,
  23. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  24. },
  25. { title: '玩家ID', dataIndex: 'gameUserId', label: '订单明细', align: 'center', width: 65, default: 5 },
  26. {
  27. title: '玩家账号', dataIndex: 'username', label: '订单明细', align: 'center', width: 95, default: 6,
  28. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  29. },
  30. {
  31. title: '玩家注册时间', dataIndex: 'regTime', label: '订单明细', align: 'center', width: 135, default: 7,
  32. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  33. },
  34. { title: '玩家注册渠道', dataIndex: 'agentId', label: '订单明细', align: 'center', width: 95, default: 8 },
  35. { title: '玩家注册游戏', dataIndex: 'gameId', label: '订单明细', align: 'center', width: 95, default: 9 },
  36. { title: 'CP名称', dataIndex: 'cpName', label: '订单明细', align: 'center', width: 95, default: 10 },
  37. {
  38. title: '玩家注册游戏应用类型', dataIndex: 'classify', label: '订单明细', align: 'center', width: 110, default: 11,
  39. render: (a: string) => {
  40. if (a) {
  41. let one = a.charAt(0)
  42. switch (one) {
  43. case '3':
  44. return 'Android'
  45. case '4':
  46. return 'IOS'
  47. case '5':
  48. return 'H5'
  49. case '6':
  50. return '小程序'
  51. default:
  52. return '--'
  53. }
  54. } else return '--'
  55. }
  56. },
  57. {
  58. title: '归因投放人员', dataIndex: 'zxPitcherName', label: '订单明细', align: 'center', width: 80, default: 12,
  59. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  60. },
  61. {
  62. title: '归因推广账号', dataIndex: 'accountId', label: '订单明细', align: 'center', width: 80, default: 13,
  63. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  64. },
  65. {
  66. title: '归因媒体', dataIndex: 'accountType', label: '订单明细', align: 'center', width: 85, default: 14,
  67. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  68. },
  69. {
  70. title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 80, default: 15,
  71. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  72. },
  73. {
  74. title: '玩家充值游戏', dataIndex: 'orderGameId', label: '订单明细', align: 'center', width: 80, default: 16,
  75. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  76. },
  77. {
  78. title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 70, default: 17,
  79. render: (a: string) => {
  80. if (a) {
  81. let one = a.charAt(0)
  82. switch (one) {
  83. case '3':
  84. return 'Android'
  85. case '4':
  86. return 'IOS'
  87. case '5':
  88. return 'H5'
  89. case '6':
  90. return '小程序'
  91. default:
  92. return '--'
  93. }
  94. } else return '--'
  95. }
  96. },
  97. {
  98. title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 18,
  99. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  100. },
  101. {
  102. title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 95, default: 19,
  103. render: (a: any) => <Statistic value={a || 0} precision={2} />
  104. },
  105. {
  106. title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 95, default: 20,
  107. render: (a: any) => <Statistic value={a || 0} precision={2} />
  108. },
  109. {
  110. title: '支付方式', dataIndex: 'payWay', label: '订单明细', align: 'center', width: 65, default: 21,
  111. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  112. },
  113. {
  114. title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 22,
  115. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  116. },
  117. {
  118. title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 23,
  119. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  120. },
  121. { title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 95, default: 24 },
  122. {
  123. title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 95, default: 25,
  124. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  125. },
  126. {
  127. title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 75, default: 26,
  128. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  129. },
  130. {
  131. title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 75, default: 27,
  132. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  133. },
  134. {
  135. title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 75, default: 28,
  136. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  137. },
  138. {
  139. title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 29,
  140. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  141. },
  142. {
  143. title: '创建时间', dataIndex: 'day', label: '订单明细', align: 'center', width: 135, default: 30,
  144. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  145. },
  146. {
  147. title: '支付时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 31,
  148. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  149. },
  150. {
  151. title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 32,
  152. render: (a: string, b: any) => {
  153. return { '1': '待处理', '2': '成功', '3': '失败' }[a]
  154. }
  155. },
  156. {
  157. title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 33,
  158. render: (a: any) => {
  159. return a === 1 ? '是' : '否'
  160. }
  161. },
  162. ]
  163. },
  164. ]
  165. }
  166. export default columns12