| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- import { useI18n } from 'vue-i18n'
- import { useFilters } from '../../../composables/useFilters'
- import { computed } from 'vue'
- export const useRecordingConst = () => {
- const { t } = useI18n()
- const { numberFormat } = useFilters()
- const columnList = computed(() => ({
- 1: [
- { prop: 'platform', label: t('Ib.Recording.Platform') },
- {
- prop: 'accountType', label: t('Ib.Recording.AccountType'),
- type: 'tag',
- tagMap: {
- 1: t('AccountType.ClassicAccount'),
- 2: t('AccountType.SeniorAccount'),
- 7: t('AccountType.StandardAccount'),
- 8: t('AccountType.CentAccount'),
- },
- },
- { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
- {
- prop: 'leverage', label: t('Ib.Recording.Lever'),
- formatter: ({ row }) => row.leverage ? `1:${row.leverage}` : '--',
- },
- { prop: 'commission', label: t('Ib.Recording.Commission') },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- {
- prop: 'approveDesc', label: t('Ib.Recording.Note'),
- type: 'note'
- },
- ],
- 2: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
- formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
- },
- {
- prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
- formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
- },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- {
- prop: 'approveDesc', label: t('Ib.Recording.Note'),
- type: 'note'
- },
- ],
- 3: [
- { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
- { prop: 'to', label: t('Ib.Recording.IntoAccount') },
- { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
- {
- prop: 'amount', label: t('Ib.Recording.Amount'),
- formatter: ({ row }) => numberFormat(row.amount ?? 0),
- },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- {
- prop: 'approveDesc', label: t('Ib.Recording.Note'),
- type: 'note'
- },
- ],
- 4: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'loginType', label: t('Ib.Recording.AccountType'),
- type: 'tag',
- tagMap: {
- 1: t('AccountType.ClassicAccount'),
- 2: t('AccountType.SeniorAccount'),
- 7: t('AccountType.StandardAccount'),
- 8: t('AccountType.CentAccount'),
- },
- },
- { prop: 'title', label: t('Label.Describe') },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- {
- prop: 'approveDesc', label: t('Ib.Recording.Note'),
- type: 'note'
- },
- ],
- 5: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
- formatter: ({ row }) => row.oldPoint || '0',
- },
- {
- prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
- formatter: ({ row }) => row.newPoint || '0',
- },
- {
- prop: 'oldHide', label: t('Drawer.Label.OldHide'),
- formatter: ({ row }) => row.oldHide || '0',
- },
- {
- prop: 'newHide', label: t('Drawer.Label.NewHide'),
- formatter: ({ row }) => row.newHide || '0',
- },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- {
- prop: 'approveDesc', label: t('Ib.Recording.Note'),
- type: 'note'
- },
- ],
- 6: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
- { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Ib.Recording.Status'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- { prop: 'approveDesc', label: t('Ib.Recording.Note') },
- ],
- 7: [
- { prop: 'typeName', label: t('Label.Type') },
- { prop: 'newPercent', label: t('Label.NewPercentage') },
- { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
- { prop: 'newVipFx', label: t('Label.NewAdvancedForex') },
- { prop: 'newClassicCfd', label: t('Label.NewClassicCFD') },
- { prop: 'newVipCfd', label: t('Label.NewAdvancedCFD') },
- { prop: 'newComPointOne', label: t('Label.NewCommission10') },
- { prop: 'newComPointTwo', label: t('Label.NewCommission20') },
- { prop: 'newComPointThree', label: t('Label.NewCommission30') },
- { prop: 'newInstantFx', label: t('Label.NewSpeedForex') },
- { prop: 'newInstantMetal', label: t('Label.NewSpeedMetal') },
- ],
- 8: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'ibNo', label: t('Label.IBAccount') },
- {
- prop: 'amount', label: t('Label.AmountMoney'),
- formatter: ({ row }) => numberFormat(row.amount ?? '--'),
- },
- { prop: 'currency', label: t('Label.Currency') },
- { prop: 'serial', label: t('Label.SerialNumber') },
- {
- prop: 'remitChannelName', label: t('Label.WithdrawalWay'),
- slot: 'remitChannelName',
- },
- { prop: 'addTime', label: t('Label.ApplyTime') },
- {
- prop: 'status', label: t('Label.State'),
- slot: 'status',
- },
- {
- prop: 'approveDesc', label: t('Label.Note'),
- type: 'note'
- },
- ],
- 9: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'mam', label: 'MAM' },
- { prop: 'platform', label: t('Label.Platform') },
- { prop: 'sub', label: t('Ib.Settings.HangUndo') },
- {
- prop: 'type', label: t('Label.Type'),
- type: 'tag',
- tagMap: {
- 1: t('Ib.Settings.Hang'),
- 2: t('Ib.Settings.Undo'),
- },
- },
- { prop: 'addTime', label: t('Label.ApplyTime') },
- {
- prop: 'status', label: t('Label.State'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- { prop: 'approveDesc', label: t('Label.Note'), slot: 'approveDesc' },
- ],
- 10: [
- { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
- { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
- { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
- {
- prop: 'withdrawAmount', label: t('Custom.Recording.Amount'),
- formatter: ({ row }) => numberFormat(row.withdrawAmount ?? '--'),
- },
- { prop: 'addTime', label: t('Custom.Recording.ApplicationDate') },
- {
- prop: 'status', label: t('Custom.Recording.Status'),
- formatter: ({ row }) => {
- if (row.status == 1) {
- return t('State.ToBeProcessed')
- }
- if (row.status == 2 && row.withdrawStatus == 2 &&
- row.depositStatus == 2) {
- return t('State.Completed')
- }
- if (row.status == 2 && (row.withdrawStatus == 1 ||
- row.depositStatus == 1)) {
- return t('State.InTheProcessing')
- }
- if (row.status == 3 || row.withdrawStatus == 3 || row.depositStatus == 3) {
- return t('State.Refused')
- }
- },
- },
- { prop: 'approveDesc', label: t('Custom.Recording.Note'), type: 'note' },
- ],
- 11: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'pIbNo', label: t('Label.AttributionNumber') },
- { prop: 'email', label: t('Label.Email') },
- { prop: 'addTime', label: t('Label.ApplyTime') },
- { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
- { prop: 'accountId', label: t('Ib.PammManager.accountId') },
- { prop: 'percent', label: t('Ib.PammManager.percent') },
- {
- prop: 'status', label: t('Label.State'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- { prop: 'approveDesc', label: t('Label.Descr'), type: 'note' },
- ],
- 12: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'pIbNo', label: t('Label.AttributionNumber') },
- { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
- { prop: 'accountId', label: t('Ib.PammManager.accountId') },
- { prop: 'percent', label: t('Ib.PammManager.percent') },
- { prop: 'platform', label: t('Label.Platform') },
- { prop: 'addTime', label: t('Label.ApplyTime') },
- { prop: 'sub', label: t('Label.ApplicationAccount') },
- {
- prop: 'type', label: t('Label.Type'),
- type: 'tag',
- tagMap: {
- 1: t('Ib.Settings.Hang'),
- 2: t('Ib.Settings.Undo'),
- },
- },
- {
- prop: 'status', label: t('Label.State'),
- type: 'tag',
- tagMap: {
- 1: t('State.ToBeProcessed'),
- 2: t('State.Completed'),
- 3: t('State.Refused'),
- },
- },
- { prop: 'approveDesc', label: t('Label.Descr'), type: 'note' },
- { prop: 'approveTime', label: t('Label.ProcessingDate') },
- ],
- 13: [
- { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
- { prop: 'depositIbNo', label: t('AmountLabel.item5') },
- {
- prop: 'amount', label: t('Ib.Recording.Amount'),
- formatter: ({ row }) => numberFormat(row.amount ?? '--'),
- },
- { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
- { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
- { prop: 'approveDesc', label: t('Ib.Recording.Note'), type: 'note' },
- ],
- }))
- const mobileList = computed(() => ({
- 1: [
- { prop: 'platform', label: t('Ib.Recording.Platform') },
- {
- prop: 'accountType', label: t('Ib.Recording.AccountType'),
- type: 'tag',
- tagMap: {
- 1: t('AccountType.ClassicAccount'),
- 2: t('AccountType.SeniorAccount'),
- 7: t('AccountType.StandardAccount'),
- 8: t('AccountType.CentAccount'),
- },
- },
- { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
- ],
- 2: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
- formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
- },
- {
- prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
- formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
- },
- ],
- 3: [
- { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
- { prop: 'to', label: t('Ib.Recording.IntoAccount') },
- { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
- ],
- 4: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'loginType', label: t('Ib.Recording.AccountType'),
- type: 'tag',
- tagMap: {
- 1: t('AccountType.ClassicAccount'),
- 2: t('AccountType.SeniorAccount'),
- 7: t('AccountType.StandardAccount'),
- 8: t('AccountType.CentAccount'),
- },
- },
- { prop: 'title', label: t('Label.Describe') },
- ],
- 5: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- {
- prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
- formatter: ({ row }) => row.oldPoint || '0',
- },
- {
- prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
- formatter: ({ row }) => row.newPoint || '0',
- },
- ],
- 6: [
- { prop: 'login', label: t('Ib.Recording.TradingAccount') },
- { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
- { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
- ],
- 7: [
- { prop: 'typeName', label: t('Label.Type') },
- { prop: 'newPercent', label: t('Label.NewPercentage') },
- { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
- ],
- 8: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'ibNo', label: t('Label.IBAccount') },
- {
- prop: 'amount', label: t('Label.AmountMoney'),
- formatter: ({ row }) => numberFormat(row.amount ?? '--'),
- },
- ],
- 9: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'mam', label: 'MAM' },
- { prop: 'platform', label: t('Label.Platform') },
- ],
- 10: [
- { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
- { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
- { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
- ],
- 11: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'pIbNo', label: t('Label.AttributionNumber') },
- { prop: 'email', label: t('Label.Email') },
- ],
- 12: [
- { prop: 'cId', label: t('Label.CidAccount') },
- { prop: 'pIbNo', label: t('Label.AttributionNumber') },
- { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
- ],
- 13: [
- { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
- { prop: 'depositIbNo', label: t('AmountLabel.item5') },
- {
- prop: 'amount', label: t('Ib.Recording.Amount'),
- formatter: ({ row }) => numberFormat(row.amount ?? '--'),
- },
- ],
- }))
- // api 列表
- const apiList = computed(() => ({
- 1: 'mamApplyList',
- 2: 'mamLeverageApplyList',
- 3: 'agentBalanceTransferList',
- 4: 'CustomRecordAccount',
- 5: 'customCommissionApplyList',
- 6: 'agentBelongChangeList',
- 7: 'agentPointChangeList',
- 8: 'agentWithdrawList',
- 9: 'mamSubsApplyRecording',
- 10: 'agentTransferList',
- 11: 'mamApplyList',
- 12: 'mamSubsApplyRecording',
- 13: 'agentBalanceCommissionSearchList',
- }))
- return { columnList, mobileList, apiList }
- }
|