|
@@ -4,15 +4,15 @@
|
|
|
<view class="info-card">
|
|
<view class="info-card">
|
|
|
<cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
|
|
<cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
|
|
|
@reset="handleReset" />
|
|
@reset="handleReset" />
|
|
|
- <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
|
|
|
|
|
|
|
+ <cwg-tabel ref="tableRef" :columns="columns" :immediate="false" :mobilePrimaryFields="mobilePrimaryFields"
|
|
|
:queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
|
|
:queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
|
|
|
<template #symbol="{ row }">
|
|
<template #symbol="{ row }">
|
|
|
<view class="symbol-cell">
|
|
<view class="symbol-cell">
|
|
|
<view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
|
|
<view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
|
|
|
- }}</view>
|
|
|
|
|
|
|
+ }}</view>
|
|
|
<view class="desc">{{ row.openPrice }}
|
|
<view class="desc">{{ row.openPrice }}
|
|
|
<text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
|
|
<text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
|
|
|
- }}{{ t('Label.Lot') }}</text>
|
|
|
|
|
|
|
+ }}{{ t('Label.Lot') }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -31,40 +31,9 @@ import { computed, ref, nextTick } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
const { t, locale } = useI18n();
|
|
const { t, locale } = useI18n();
|
|
|
import { customApi } from '@/service/custom';
|
|
import { customApi } from '@/service/custom';
|
|
|
-const search = ref(
|
|
|
|
|
- {
|
|
|
|
|
- "reportType": 3,
|
|
|
|
|
- "agentId": null,
|
|
|
|
|
- "groupType": null,
|
|
|
|
|
- "login": "",
|
|
|
|
|
- "cId": "",
|
|
|
|
|
- "customName": "",
|
|
|
|
|
- "ibNo": "",
|
|
|
|
|
- "symbol": "",
|
|
|
|
|
- "cmdName": "",
|
|
|
|
|
- "platform": "MT4",
|
|
|
|
|
- "salesNo": "",
|
|
|
|
|
- "salesName": "",
|
|
|
|
|
- "dwType": null,
|
|
|
|
|
- "customType": 0,
|
|
|
|
|
- "rankingType": 1,
|
|
|
|
|
- "loginTypes": [],
|
|
|
|
|
- "isShort": 0,
|
|
|
|
|
- "detail_type": 4,
|
|
|
|
|
- "date": [
|
|
|
|
|
- "1970-01-01",
|
|
|
|
|
- "2026-03-27"
|
|
|
|
|
- ],
|
|
|
|
|
- "startDate": "1970-01-01",
|
|
|
|
|
- "endDate": "2026-03-27",
|
|
|
|
|
- "orderColumn": null,
|
|
|
|
|
- "orderType": null,
|
|
|
|
|
- "page": {
|
|
|
|
|
- "current": 1,
|
|
|
|
|
- "row": 10
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-)
|
|
|
|
|
|
|
+import { useAccountOptions } from '@/composables/useAccountOptions'
|
|
|
|
|
+const { loginOptions, isLoaded } = useAccountOptions()
|
|
|
|
|
+const search = ref()
|
|
|
const typeMap = computed(() => ([
|
|
const typeMap = computed(() => ([
|
|
|
{ value: null, text: t('Custom.PaymentHistory.All') },
|
|
{ value: null, text: t('Custom.PaymentHistory.All') },
|
|
|
{ value: 1, text: t('Custom.PaymentHistory.Deposit') },
|
|
{ value: 1, text: t('Custom.PaymentHistory.Deposit') },
|
|
@@ -160,26 +129,25 @@ const mobilePrimaryFields = computed(() => [
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
// 动态传入筛选字段配置
|
|
// 动态传入筛选字段配置
|
|
|
-const filterFields = computed(() => [
|
|
|
|
|
-
|
|
|
|
|
- { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
|
|
|
|
|
- { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
|
|
|
|
|
- {
|
|
|
|
|
- key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
|
|
|
|
|
- },
|
|
|
|
|
|
|
+const filterFields = computed(() => [
|
|
|
|
|
+ isLoaded.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions.value || [] },
|
|
|
{ key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
|
|
{ key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
|
|
|
])
|
|
])
|
|
|
const searchParams = ref({})
|
|
const searchParams = ref({})
|
|
|
const tableRef = ref(null)
|
|
const tableRef = ref(null)
|
|
|
const handleSearch = (params) => {
|
|
const handleSearch = (params) => {
|
|
|
search.value = params
|
|
search.value = params
|
|
|
|
|
+ search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
|
|
|
|
|
+ if(!search.value.platform) return
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value.refreshTable()
|
|
tableRef.value.refreshTable()
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const handleReset = (emptyParams) => {
|
|
|
|
|
- search.value = emptyParams
|
|
|
|
|
|
|
+const handleReset = (params) => {
|
|
|
|
|
+ search.value = params
|
|
|
|
|
+ search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
|
|
|
|
|
+ if(!search.value.platform) return
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value.refreshTable()
|
|
tableRef.value.refreshTable()
|
|
|
})
|
|
})
|