recording.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. import { useI18n } from 'vue-i18n'
  2. import { useFilters } from '../../../composables/useFilters'
  3. import { computed } from 'vue'
  4. export const useRecordingConst = () => {
  5. const { t } = useI18n()
  6. const { numberFormat } = useFilters()
  7. const columnList = computed(() => ({
  8. 1: [
  9. { prop: 'platform', label: t('Ib.Recording.Platform') },
  10. {
  11. prop: 'accountType', label: t('Ib.Recording.AccountType'),
  12. type: 'tag',
  13. tagMap: {
  14. 1: t('AccountType.ClassicAccount'),
  15. 2: t('AccountType.SeniorAccount'),
  16. 7: t('AccountType.StandardAccount'),
  17. 8: t('AccountType.CentAccount'),
  18. },
  19. },
  20. { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
  21. {
  22. prop: 'leverage', label: t('Ib.Recording.Lever'),
  23. formatter: ({ row }) => row.leverage ? `1:${row.leverage}` : '--',
  24. },
  25. { prop: 'commission', label: t('Ib.Recording.Commission') },
  26. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  27. {
  28. prop: 'status', label: t('Ib.Recording.Status'),
  29. type: 'tag',
  30. tagMap: {
  31. 1: t('State.ToBeProcessed'),
  32. 2: t('State.Completed'),
  33. 3: t('State.Refused'),
  34. },
  35. },
  36. {
  37. prop: 'approveDesc', label: t('Ib.Recording.Note'),
  38. type: 'note'
  39. },
  40. ],
  41. 2: [
  42. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  43. {
  44. prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
  45. formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
  46. },
  47. {
  48. prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
  49. formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
  50. },
  51. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  52. {
  53. prop: 'status', label: t('Ib.Recording.Status'),
  54. type: 'tag',
  55. tagMap: {
  56. 1: t('State.ToBeProcessed'),
  57. 2: t('State.Completed'),
  58. 3: t('State.Refused'),
  59. },
  60. },
  61. {
  62. prop: 'approveDesc', label: t('Ib.Recording.Note'),
  63. type: 'note'
  64. },
  65. ],
  66. 3: [
  67. { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
  68. { prop: 'to', label: t('Ib.Recording.IntoAccount') },
  69. { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
  70. {
  71. prop: 'amount', label: t('Ib.Recording.Amount'),
  72. formatter: ({ row }) => numberFormat(row.amount ?? 0),
  73. },
  74. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  75. {
  76. prop: 'status', label: t('Ib.Recording.Status'),
  77. type: 'tag',
  78. tagMap: {
  79. 1: t('State.ToBeProcessed'),
  80. 2: t('State.Completed'),
  81. 3: t('State.Refused'),
  82. },
  83. },
  84. {
  85. prop: 'approveDesc', label: t('Ib.Recording.Note'),
  86. type: 'note'
  87. },
  88. ],
  89. 4: [
  90. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  91. {
  92. prop: 'loginType', label: t('Ib.Recording.AccountType'),
  93. type: 'tag',
  94. tagMap: {
  95. 1: t('AccountType.ClassicAccount'),
  96. 2: t('AccountType.SeniorAccount'),
  97. 7: t('AccountType.StandardAccount'),
  98. 8: t('AccountType.CentAccount'),
  99. },
  100. },
  101. { prop: 'title', label: t('Label.Describe') },
  102. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  103. {
  104. prop: 'status', label: t('Ib.Recording.Status'),
  105. type: 'tag',
  106. tagMap: {
  107. 1: t('State.ToBeProcessed'),
  108. 2: t('State.Completed'),
  109. 3: t('State.Refused'),
  110. },
  111. },
  112. {
  113. prop: 'approveDesc', label: t('Ib.Recording.Note'),
  114. type: 'note'
  115. },
  116. ],
  117. 5: [
  118. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  119. {
  120. prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
  121. formatter: ({ row }) => row.oldPoint || '0',
  122. },
  123. {
  124. prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
  125. formatter: ({ row }) => row.newPoint || '0',
  126. },
  127. {
  128. prop: 'oldHide', label: t('Drawer.Label.OldHide'),
  129. formatter: ({ row }) => row.oldHide || '0',
  130. },
  131. {
  132. prop: 'newHide', label: t('Drawer.Label.NewHide'),
  133. formatter: ({ row }) => row.newHide || '0',
  134. },
  135. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  136. {
  137. prop: 'status', label: t('Ib.Recording.Status'),
  138. type: 'tag',
  139. tagMap: {
  140. 1: t('State.ToBeProcessed'),
  141. 2: t('State.Completed'),
  142. 3: t('State.Refused'),
  143. },
  144. },
  145. {
  146. prop: 'approveDesc', label: t('Ib.Recording.Note'),
  147. type: 'note'
  148. },
  149. ],
  150. 6: [
  151. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  152. { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
  153. { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
  154. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  155. {
  156. prop: 'status', label: t('Ib.Recording.Status'),
  157. type: 'tag',
  158. tagMap: {
  159. 1: t('State.ToBeProcessed'),
  160. 2: t('State.Completed'),
  161. 3: t('State.Refused'),
  162. },
  163. },
  164. { prop: 'approveDesc', label: t('Ib.Recording.Note') },
  165. ],
  166. 7: [
  167. { prop: 'typeName', label: t('Label.Type') },
  168. { prop: 'newPercent', label: t('Label.NewPercentage') },
  169. { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
  170. { prop: 'newVipFx', label: t('Label.NewAdvancedForex') },
  171. { prop: 'newClassicCfd', label: t('Label.NewClassicCFD') },
  172. { prop: 'newVipCfd', label: t('Label.NewAdvancedCFD') },
  173. { prop: 'newComPointOne', label: t('Label.NewCommission10') },
  174. { prop: 'newComPointTwo', label: t('Label.NewCommission20') },
  175. { prop: 'newComPointThree', label: t('Label.NewCommission30') },
  176. { prop: 'newInstantFx', label: t('Label.NewSpeedForex') },
  177. { prop: 'newInstantMetal', label: t('Label.NewSpeedMetal') },
  178. ],
  179. 8: [
  180. { prop: 'cId', label: t('Label.CidAccount') },
  181. { prop: 'ibNo', label: t('Label.IBAccount') },
  182. {
  183. prop: 'amount', label: t('Label.AmountMoney'),
  184. formatter: ({ row }) => numberFormat(row.amount ?? '--'),
  185. },
  186. { prop: 'currency', label: t('Label.Currency') },
  187. { prop: 'serial', label: t('Label.SerialNumber') },
  188. {
  189. prop: 'remitChannelName', label: t('Label.WithdrawalWay'),
  190. slot: 'remitChannelName',
  191. },
  192. { prop: 'addTime', label: t('Label.ApplyTime') },
  193. {
  194. prop: 'status', label: t('Label.State'),
  195. slot: 'status',
  196. },
  197. {
  198. prop: 'approveDesc', label: t('Label.Note'),
  199. type: 'note'
  200. },
  201. ],
  202. 9: [
  203. { prop: 'cId', label: t('Label.CidAccount') },
  204. { prop: 'mam', label: 'MAM' },
  205. { prop: 'platform', label: t('Label.Platform') },
  206. { prop: 'sub', label: t('Ib.Settings.HangUndo') },
  207. {
  208. prop: 'type', label: t('Label.Type'),
  209. type: 'tag',
  210. tagMap: {
  211. 1: t('Ib.Settings.Hang'),
  212. 2: t('Ib.Settings.Undo'),
  213. },
  214. },
  215. { prop: 'addTime', label: t('Label.ApplyTime') },
  216. {
  217. prop: 'status', label: t('Label.State'),
  218. type: 'tag',
  219. tagMap: {
  220. 1: t('State.ToBeProcessed'),
  221. 2: t('State.Completed'),
  222. 3: t('State.Refused'),
  223. },
  224. },
  225. { prop: 'approveDesc', label: t('Label.Note'), slot: 'approveDesc' },
  226. ],
  227. 10: [
  228. { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
  229. { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
  230. { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
  231. {
  232. prop: 'withdrawAmount', label: t('Custom.Recording.Amount'),
  233. formatter: ({ row }) => numberFormat(row.withdrawAmount ?? '--'),
  234. },
  235. { prop: 'addTime', label: t('Custom.Recording.ApplicationDate') },
  236. {
  237. prop: 'status', label: t('Custom.Recording.Status'),
  238. formatter: ({ row }) => {
  239. if (row.status == 1) {
  240. return t('State.ToBeProcessed')
  241. }
  242. if (row.status == 2 && row.withdrawStatus == 2 &&
  243. row.depositStatus == 2) {
  244. return t('State.Completed')
  245. }
  246. if (row.status == 2 && (row.withdrawStatus == 1 ||
  247. row.depositStatus == 1)) {
  248. return t('State.InTheProcessing')
  249. }
  250. if (row.status == 3 || row.withdrawStatus == 3 || row.depositStatus == 3) {
  251. return t('State.Refused')
  252. }
  253. },
  254. },
  255. { prop: 'approveDesc', label: t('Custom.Recording.Note'), type: 'note' },
  256. ],
  257. 11: [
  258. { prop: 'cId', label: t('Label.CidAccount') },
  259. { prop: 'pIbNo', label: t('Label.AttributionNumber') },
  260. { prop: 'email', label: t('Label.Email') },
  261. { prop: 'addTime', label: t('Label.ApplyTime') },
  262. { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
  263. { prop: 'accountId', label: t('Ib.PammManager.accountId') },
  264. { prop: 'percent', label: t('Ib.PammManager.percent') },
  265. {
  266. prop: 'status', label: t('Label.State'),
  267. type: 'tag',
  268. tagMap: {
  269. 1: t('State.ToBeProcessed'),
  270. 2: t('State.Completed'),
  271. 3: t('State.Refused'),
  272. },
  273. },
  274. { prop: 'approveDesc', label: t('Label.Descr'), type: 'note' },
  275. ],
  276. 12: [
  277. { prop: 'cId', label: t('Label.CidAccount') },
  278. { prop: 'pIbNo', label: t('Label.AttributionNumber') },
  279. { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
  280. { prop: 'accountId', label: t('Ib.PammManager.accountId') },
  281. { prop: 'percent', label: t('Ib.PammManager.percent') },
  282. { prop: 'platform', label: t('Label.Platform') },
  283. { prop: 'addTime', label: t('Label.ApplyTime') },
  284. { prop: 'sub', label: t('Label.ApplicationAccount') },
  285. {
  286. prop: 'type', label: t('Label.Type'),
  287. type: 'tag',
  288. tagMap: {
  289. 1: t('Ib.Settings.Hang'),
  290. 2: t('Ib.Settings.Undo'),
  291. },
  292. },
  293. {
  294. prop: 'status', label: t('Label.State'),
  295. type: 'tag',
  296. tagMap: {
  297. 1: t('State.ToBeProcessed'),
  298. 2: t('State.Completed'),
  299. 3: t('State.Refused'),
  300. },
  301. },
  302. { prop: 'approveDesc', label: t('Label.Descr'), type: 'note' },
  303. { prop: 'approveTime', label: t('Label.ProcessingDate') },
  304. ],
  305. 13: [
  306. { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
  307. { prop: 'depositIbNo', label: t('AmountLabel.item5') },
  308. {
  309. prop: 'amount', label: t('Ib.Recording.Amount'),
  310. formatter: ({ row }) => numberFormat(row.amount ?? '--'),
  311. },
  312. { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
  313. { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
  314. { prop: 'approveDesc', label: t('Ib.Recording.Note'), type: 'note' },
  315. ],
  316. }))
  317. const mobileList = computed(() => ({
  318. 1: [
  319. { prop: 'platform', label: t('Ib.Recording.Platform') },
  320. {
  321. prop: 'accountType', label: t('Ib.Recording.AccountType'),
  322. type: 'tag',
  323. tagMap: {
  324. 1: t('AccountType.ClassicAccount'),
  325. 2: t('AccountType.SeniorAccount'),
  326. 7: t('AccountType.StandardAccount'),
  327. 8: t('AccountType.CentAccount'),
  328. },
  329. },
  330. { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
  331. ],
  332. 2: [
  333. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  334. {
  335. prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
  336. formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
  337. },
  338. {
  339. prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
  340. formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
  341. },
  342. ],
  343. 3: [
  344. { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
  345. { prop: 'to', label: t('Ib.Recording.IntoAccount') },
  346. { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
  347. ],
  348. 4: [
  349. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  350. {
  351. prop: 'loginType', label: t('Ib.Recording.AccountType'),
  352. type: 'tag',
  353. tagMap: {
  354. 1: t('AccountType.ClassicAccount'),
  355. 2: t('AccountType.SeniorAccount'),
  356. 7: t('AccountType.StandardAccount'),
  357. 8: t('AccountType.CentAccount'),
  358. },
  359. },
  360. { prop: 'title', label: t('Label.Describe') },
  361. ],
  362. 5: [
  363. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  364. {
  365. prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
  366. formatter: ({ row }) => row.oldPoint || '0',
  367. },
  368. {
  369. prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
  370. formatter: ({ row }) => row.newPoint || '0',
  371. },
  372. ],
  373. 6: [
  374. { prop: 'login', label: t('Ib.Recording.TradingAccount') },
  375. { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
  376. { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
  377. ],
  378. 7: [
  379. { prop: 'typeName', label: t('Label.Type') },
  380. { prop: 'newPercent', label: t('Label.NewPercentage') },
  381. { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
  382. ],
  383. 8: [
  384. { prop: 'cId', label: t('Label.CidAccount') },
  385. { prop: 'ibNo', label: t('Label.IBAccount') },
  386. {
  387. prop: 'amount', label: t('Label.AmountMoney'),
  388. formatter: ({ row }) => numberFormat(row.amount ?? '--'),
  389. },
  390. ],
  391. 9: [
  392. { prop: 'cId', label: t('Label.CidAccount') },
  393. { prop: 'mam', label: 'MAM' },
  394. { prop: 'platform', label: t('Label.Platform') },
  395. ],
  396. 10: [
  397. { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
  398. { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
  399. { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
  400. ],
  401. 11: [
  402. { prop: 'cId', label: t('Label.CidAccount') },
  403. { prop: 'pIbNo', label: t('Label.AttributionNumber') },
  404. { prop: 'email', label: t('Label.Email') },
  405. ],
  406. 12: [
  407. { prop: 'cId', label: t('Label.CidAccount') },
  408. { prop: 'pIbNo', label: t('Label.AttributionNumber') },
  409. { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
  410. ],
  411. 13: [
  412. { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
  413. { prop: 'depositIbNo', label: t('AmountLabel.item5') },
  414. {
  415. prop: 'amount', label: t('Ib.Recording.Amount'),
  416. formatter: ({ row }) => numberFormat(row.amount ?? '--'),
  417. },
  418. ],
  419. }))
  420. // api 列表
  421. const apiList = computed(() => ({
  422. 1: 'mamApplyList',
  423. 2: 'mamLeverageApplyList',
  424. 3: 'agentBalanceTransferList',
  425. 4: 'CustomRecordAccount',
  426. 5: 'customCommissionApplyList',
  427. 6: 'agentBelongChangeList',
  428. 7: 'agentPointChangeList',
  429. 8: 'agentWithdrawList',
  430. 9: 'mamSubsApplyRecording',
  431. 10: 'agentTransferList',
  432. 11: 'mamApplyList',
  433. 12: 'mamSubsApplyRecording',
  434. 13: 'agentBalanceCommissionSearchList',
  435. }))
  436. return { columnList, mobileList, apiList }
  437. }