| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <cwg-header :title="t('Documentary.console.item23')" />
- <view class="account-content">
- <view class="search-content">
- <view class="search-bar">
- <uni-easyinput v-model="search.cId" placeholder="CID" />
- </view>
- <view class="search-bar">
- </view>
- </view>
- <cwg-tabel
- class="table-container"
- ref="tableRef"
- :columns="columns"
- :mobilePrimaryFields="mobilePrimaryFields"
- :queryParams="search"
- :api="listApi"
- :show-operation="true"
- :showPagination="true"
- >
- <template #action="{ row }">
- <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
- <view class="pc-header-btn">
- <cwg-icon name="crm-ellipsis" :size="24" />
- </view>
- </cwg-dropdown>
- </template>
- </cwg-tabel>
- </view>
- </cwg-page-wrapper>
- </template>
- <script setup lang="ts">
- // 信号源管理
- import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
- import { onLoad } from '@dcloudio/uni-app'
- import { useI18n } from 'vue-i18n' // uni-app 中已集成,但需配置
- import Config from '@/config/index'
- import { lang } from '@/composables/config'
- import { ibApi } from '@/service/ib'
- import { useFilters } from '@/composables/useFilters'
- const { numberFormat, numberDecimal } = useFilters()
- const search = ref({
- cId: '',
- })
- const { t, locale } = useI18n()
- // 表格列配置
- const columns = ref([
- {
- prop: 'dealCId',
- label: t('Label.CidAccount'),
- align: 'center',
- },
- {
- prop: 'pIbNo',
- label: t('Label.AgentNumber'),
- align: 'center',
- },
- {
- prop: 'nickname',
- label: t('Documentary.console.item20'),
- align: 'center',
- },
- {
- prop: 'dealLogin',
- label: t('Documentary.tradingCenter.item18'),
- align: 'center',
- },
- {
- prop: 'dealPlatform',
- label: t('Label.Platform'),
- align: 'center',
- },
- {
- prop: 'dealLeverage',
- label: t('Label.Leverage'),
- align: 'center',
- },
- {
- prop: 'dealLoginType',
- type: 'tag',
- label: t('Label.AccountType'),
- align: 'center',
- tagMap: {
- 1: t('AccountType.ClassicAccount'),
- 2: t('AccountType.SeniorAccount'),
- 5: t('AccountType.SpeedAccount'),
- 6: t('AccountType.SpeedAccount'),
- 7: t('AccountType.StandardAccount'),
- 8: t('AccountType.CentAccount'),
- },
- },
- {
- prop: 'distributionType',
- label: t('Documentary.AgentBackground.item11'),
- align: 'center',
- formatter: ({ row }) => row.distributionType === 1 ? t('Documentary.TundManagement.item59') : '--',
- },
- {
- prop: 'distributionRatio',
- label: t('Documentary.Report.item5'),
- align: 'center',
- },
- {
- prop: 'settlementCycle',
- label: t('Documentary.AgentBackground.item13'),
- align: 'center',
- },
- {
- prop: 'approveTime',
- label: t('Label.ApplyTime'),
- align: 'center',
- },
- {
- prop: 'permissionDisplay',
- type: 'tag',
- label: t('Documentary.AgentBackground.item14'),
- align: 'center',
- tagMap: {
- 1: t('Documentary.AgentBackground.item16'),
- 2: t('Documentary.AgentBackground.item15'),
- },
- },
- {
- prop: 'action',
- label: t('Label.Action'),
- align: 'center',
- slot: 'action',
- },
- ])
- const mobilePrimaryFields = ref([
- {
- prop: 'cId',
- label: t('Label.CidAccount'),
- align: 'center',
- },
- {
- prop: 'ibNo',
- label: t('Label.IbAccount'),
- align: 'center',
- },
- {
- prop: 'name',
- label: t('Ib.Custom.NameLabel'),
- align: 'center',
- },
- {
- prop: 'more',
- type: 'more',
- width: 20,
- align: 'right',
- },
- ])
- const listApi = ref(ibApi.IbSubs)
- const handleDateChange = (val) => {
- search.value.startDate = val[0]
- search.value.endDate = val[1]
- }
- // 下拉菜单配置
- const menuList = (row) => {
- return [
- {
- label: t('Ib.Custom.Btn'),
- type: 'DisplaySettings',
- row,
- show: row.agentUpdatePurview == '1',
- },
- ].filter((item) => item.show)
- }
- const handleMenuClick = (item) => {
- if (item.type == 'DisplaySettings') {
- const { cId, id, permissionDisplay } = item.row
- formInfoRow.value = {
- cId, id, permissionDisplay,
- }
- docVisible.value = true
- } else if (item.type == 'exclusiveCommission') {
- const { cId, id, comPoint1, hide1 } = item.row
- pointForm.value = {
- cId, id, comPoint1, hide1,
- }
- pointVisible.value = true
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .search-content {
- display: flex;
- justify-content: space-between;
- }
- .search-button{
- display: flex;
- align-items: center;
- height: px2rpx(36);
- line-height: px2rpx(36);
- }
- </style>
|