verce-vue-test 0.0.151 → 0.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/views/ForecastInfo/RmbPositionSettlement.vue +78 -51
- package/src/views/ForecastInfo/forecast-info.css +15 -18
- package/src/views/foreign-currency-position-forecast/index.vue +350 -72
- package/src/views/foreign-currency-position-forecast/options.ts +0 -5
- package/src/views/foreign-currency-position-forecast/store.ts +0 -14
- package/src/views/foreign-currency-settlement/index.vue +57 -2
- package/src/views/foreign-currency-time-parameter-management/index.vue +140 -24
- package/file-note-assistant-0.1.8.vsix +0 -0
|
@@ -43,7 +43,6 @@ import {
|
|
|
43
43
|
forecastTypeOptions,
|
|
44
44
|
forecastWayOptions,
|
|
45
45
|
foreignExchangeTypeOptions,
|
|
46
|
-
ftuFilterOptions,
|
|
47
46
|
payDirectionOptions,
|
|
48
47
|
type SelectOption,
|
|
49
48
|
verifyStatusOptions,
|
|
@@ -57,18 +56,11 @@ const forecastStore = useForeignPositionForecastStore()
|
|
|
57
56
|
const {
|
|
58
57
|
filterForm,
|
|
59
58
|
appliedFilters,
|
|
60
|
-
successfulFilters,
|
|
61
|
-
allRows,
|
|
62
|
-
totalCount,
|
|
63
59
|
selectedRows,
|
|
64
60
|
selectionResetKey,
|
|
65
61
|
isLoading,
|
|
66
62
|
isQuerying,
|
|
67
63
|
filterCollapsed,
|
|
68
|
-
currentPage,
|
|
69
|
-
pageSize,
|
|
70
|
-
successfulPage,
|
|
71
|
-
successfulPageSize,
|
|
72
64
|
pageMode,
|
|
73
65
|
editorMode,
|
|
74
66
|
editorRecord,
|
|
@@ -83,6 +75,21 @@ const { clearTableSelection, resetFilterForm } = forecastStore
|
|
|
83
75
|
const amountRangeValid = ref(true)
|
|
84
76
|
const amountRangeRef = ref<any>(null)
|
|
85
77
|
const authorizationActionPredRefNo = ref('')
|
|
78
|
+
type FtuTableMode = 'query' | 'exclude'
|
|
79
|
+
|
|
80
|
+
const activeTable = ref<FtuTableMode>('query')
|
|
81
|
+
const queryRows = ref<ForeignPositionForecast[]>([])
|
|
82
|
+
const queryTotalCount = ref(0)
|
|
83
|
+
const queryPage = ref(1)
|
|
84
|
+
const queryPageSize = ref(25)
|
|
85
|
+
const querySuccessfulPage = ref(1)
|
|
86
|
+
const querySuccessfulPageSize = ref(25)
|
|
87
|
+
const excludedFtuRows = ref<ForeignPositionForecast[]>([])
|
|
88
|
+
const excludedFtuTotalCount = ref(0)
|
|
89
|
+
const excludedFtuPage = ref(1)
|
|
90
|
+
const excludedFtuPageSize = ref(25)
|
|
91
|
+
const excludedFtuSuccessfulPage = ref(1)
|
|
92
|
+
const excludedFtuSuccessfulPageSize = ref(25)
|
|
86
93
|
const forecastSort = ref<any>({
|
|
87
94
|
amtOrder: '1',
|
|
88
95
|
predOrder: '',
|
|
@@ -113,6 +120,35 @@ const tableDefaultSort = computed<any>(() => {
|
|
|
113
120
|
|
|
114
121
|
let listRequestController: AbortController | null = null
|
|
115
122
|
|
|
123
|
+
const successfulFiltersByTable: Record<FtuTableMode, any> = {
|
|
124
|
+
query: cloneFilters(appliedFilters.value),
|
|
125
|
+
exclude: cloneFilters(appliedFilters.value),
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function getTableState(mode: FtuTableMode) {
|
|
129
|
+
return mode === 'query'
|
|
130
|
+
? {
|
|
131
|
+
rows: queryRows,
|
|
132
|
+
totalCount: queryTotalCount,
|
|
133
|
+
page: queryPage,
|
|
134
|
+
pageSize: queryPageSize,
|
|
135
|
+
successfulPage: querySuccessfulPage,
|
|
136
|
+
successfulPageSize: querySuccessfulPageSize,
|
|
137
|
+
}
|
|
138
|
+
: {
|
|
139
|
+
rows: excludedFtuRows,
|
|
140
|
+
totalCount: excludedFtuTotalCount,
|
|
141
|
+
page: excludedFtuPage,
|
|
142
|
+
pageSize: excludedFtuPageSize,
|
|
143
|
+
successfulPage: excludedFtuSuccessfulPage,
|
|
144
|
+
successfulPageSize: excludedFtuSuccessfulPageSize,
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const activeTableTitle = computed(() => (
|
|
149
|
+
activeTable.value === 'query' ? 'FTU 预报' : '已剔除 FTU 预报'
|
|
150
|
+
))
|
|
151
|
+
|
|
116
152
|
function getOptionLabel(options: SelectOption[], value: string) {
|
|
117
153
|
return options.find((option) => option.value === value)?.label ?? value
|
|
118
154
|
}
|
|
@@ -141,7 +177,7 @@ type ForeignForecastTableColumn = {
|
|
|
141
177
|
}
|
|
142
178
|
|
|
143
179
|
/** 普通业务字段统一由列配置维护,避免模板重复声明列结构。 */
|
|
144
|
-
const
|
|
180
|
+
const baseForecastTableColumns: ForeignForecastTableColumn[] = [
|
|
145
181
|
{
|
|
146
182
|
key: 'predRefNo',
|
|
147
183
|
prop: 'predRefNo',
|
|
@@ -325,6 +361,32 @@ const forecastTableColumns: ForeignForecastTableColumn[] = [
|
|
|
325
361
|
},
|
|
326
362
|
]
|
|
327
363
|
|
|
364
|
+
/** 默认把常用字段前置,其余字段保持原有相对顺序。 */
|
|
365
|
+
const preferredForecastColumnKeys: Array<keyof ForeignPositionForecast> = [
|
|
366
|
+
'predRefNo',
|
|
367
|
+
'predStatus',
|
|
368
|
+
'groundBranch',
|
|
369
|
+
'valueDate',
|
|
370
|
+
'currency',
|
|
371
|
+
'bankAccount',
|
|
372
|
+
'predAmount',
|
|
373
|
+
'clientName',
|
|
374
|
+
'counterpartyName',
|
|
375
|
+
'businessType',
|
|
376
|
+
'verifyStatus',
|
|
377
|
+
'predWay',
|
|
378
|
+
'forecastTime',
|
|
379
|
+
]
|
|
380
|
+
|
|
381
|
+
const forecastTableColumns: ForeignForecastTableColumn[] = [
|
|
382
|
+
...preferredForecastColumnKeys
|
|
383
|
+
.map((key) => baseForecastTableColumns.find((column) => column.key === key))
|
|
384
|
+
.filter((column): column is ForeignForecastTableColumn => Boolean(column)),
|
|
385
|
+
...baseForecastTableColumns.filter(
|
|
386
|
+
(column) => !preferredForecastColumnKeys.includes(column.key),
|
|
387
|
+
),
|
|
388
|
+
]
|
|
389
|
+
|
|
328
390
|
function getTableColumnText(
|
|
329
391
|
column: ForeignForecastTableColumn,
|
|
330
392
|
row: ForeignPositionForecast,
|
|
@@ -362,11 +424,12 @@ function toProtocolStatusList(values: string[], prefix: string) {
|
|
|
362
424
|
.join(',')
|
|
363
425
|
}
|
|
364
426
|
|
|
365
|
-
async function loadForecastRows() {
|
|
427
|
+
async function loadForecastRows(mode: FtuTableMode = activeTable.value) {
|
|
366
428
|
listRequestController?.abort()
|
|
367
429
|
const controller = new AbortController()
|
|
368
430
|
listRequestController = controller
|
|
369
431
|
isLoading.value = true
|
|
432
|
+
const tableState = getTableState(mode)
|
|
370
433
|
|
|
371
434
|
try {
|
|
372
435
|
const searchParams = sharedSearchParams.value
|
|
@@ -388,8 +451,8 @@ async function loadForecastRows() {
|
|
|
388
451
|
amtOrder: searchParams.amtOrder,
|
|
389
452
|
predOrder: searchParams.predOrder,
|
|
390
453
|
timeOrder: searchParams.timeOrder,
|
|
391
|
-
pageIndex:
|
|
392
|
-
pageSize: pageSize.value,
|
|
454
|
+
pageIndex: tableState.page.value,
|
|
455
|
+
pageSize: tableState.pageSize.value,
|
|
393
456
|
})
|
|
394
457
|
|
|
395
458
|
if (controller.signal.aborted || listRequestController !== controller) return false
|
|
@@ -399,20 +462,20 @@ async function loadForecastRows() {
|
|
|
399
462
|
? responseBody.resultInfos
|
|
400
463
|
: []
|
|
401
464
|
const responseTotalCount = Number(responseBody?.totalCount)
|
|
402
|
-
|
|
403
|
-
totalCount.value = Number.isFinite(responseTotalCount)
|
|
465
|
+
tableState.rows.value = resultInfos.map(toFrontendRow)
|
|
466
|
+
tableState.totalCount.value = Number.isFinite(responseTotalCount)
|
|
404
467
|
? responseTotalCount
|
|
405
468
|
: resultInfos.length
|
|
406
|
-
|
|
407
|
-
successfulPage.value =
|
|
408
|
-
successfulPageSize.value = pageSize.value
|
|
469
|
+
successfulFiltersByTable[mode] = cloneFilters(appliedFilters.value)
|
|
470
|
+
tableState.successfulPage.value = tableState.page.value
|
|
471
|
+
tableState.successfulPageSize.value = tableState.pageSize.value
|
|
409
472
|
clearTableSelection()
|
|
410
473
|
return true
|
|
411
474
|
} catch (error) {
|
|
412
475
|
if (controller.signal.aborted || isAbortError(error)) return false
|
|
413
|
-
appliedFilters.value = cloneFilters(
|
|
414
|
-
|
|
415
|
-
pageSize.value = successfulPageSize.value
|
|
476
|
+
appliedFilters.value = cloneFilters(successfulFiltersByTable[mode])
|
|
477
|
+
tableState.page.value = tableState.successfulPage.value
|
|
478
|
+
tableState.pageSize.value = tableState.successfulPageSize.value
|
|
416
479
|
ElMessage.error(error instanceof Error ? error.message : '外币头寸预报查询失败')
|
|
417
480
|
return false
|
|
418
481
|
} finally {
|
|
@@ -423,16 +486,20 @@ async function loadForecastRows() {
|
|
|
423
486
|
}
|
|
424
487
|
}
|
|
425
488
|
|
|
426
|
-
async function handleQuery() {
|
|
489
|
+
async function handleQuery(mode: FtuTableMode = 'query') {
|
|
427
490
|
if (!validateAmountRange() || isQuerying.value) return
|
|
428
491
|
|
|
492
|
+
activeTable.value = mode
|
|
429
493
|
clearTableSelection()
|
|
430
494
|
isQuerying.value = true
|
|
431
495
|
|
|
432
496
|
try {
|
|
433
|
-
appliedFilters.value =
|
|
434
|
-
|
|
435
|
-
|
|
497
|
+
appliedFilters.value = {
|
|
498
|
+
...cloneFilters(filterForm.value),
|
|
499
|
+
ftuFilter: mode === 'query' ? '1' : '0',
|
|
500
|
+
}
|
|
501
|
+
getTableState(mode).page.value = 1
|
|
502
|
+
await loadForecastRows(mode)
|
|
436
503
|
} finally {
|
|
437
504
|
isQuerying.value = false
|
|
438
505
|
}
|
|
@@ -480,25 +547,28 @@ async function handleSortChange({
|
|
|
480
547
|
) return
|
|
481
548
|
|
|
482
549
|
forecastSort.value = nextSort
|
|
483
|
-
|
|
550
|
+
const tableState = getTableState(activeTable.value)
|
|
551
|
+
tableState.page.value = 1
|
|
484
552
|
clearTableSelection()
|
|
485
|
-
await loadForecastRows()
|
|
553
|
+
await loadForecastRows(activeTable.value)
|
|
486
554
|
}
|
|
487
555
|
|
|
488
556
|
async function handlePaginationChange(pagination: { page: number; pageSize: number }) {
|
|
489
|
-
|
|
490
|
-
|
|
557
|
+
const tableState = getTableState(activeTable.value)
|
|
558
|
+
tableState.page.value = pagination.page
|
|
559
|
+
tableState.pageSize.value = pagination.pageSize
|
|
491
560
|
clearTableSelection()
|
|
492
|
-
await loadForecastRows()
|
|
561
|
+
await loadForecastRows(activeTable.value)
|
|
493
562
|
}
|
|
494
563
|
|
|
495
564
|
async function refreshAfterMutation(resetToFirstPage = false) {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
565
|
+
const tableState = getTableState(activeTable.value)
|
|
566
|
+
if (resetToFirstPage) tableState.page.value = 1
|
|
567
|
+
const loaded = await loadForecastRows(activeTable.value)
|
|
568
|
+
if (!loaded || tableState.rows.value.length > 0 || tableState.page.value <= 1) return
|
|
499
569
|
|
|
500
|
-
|
|
501
|
-
await loadForecastRows()
|
|
570
|
+
tableState.page.value = Math.max(1, Math.ceil(tableState.totalCount.value / tableState.pageSize.value))
|
|
571
|
+
await loadForecastRows(activeTable.value)
|
|
502
572
|
}
|
|
503
573
|
|
|
504
574
|
function getEditRestriction(row: ForeignPositionForecast) {
|
|
@@ -547,6 +617,12 @@ const singleSelectionTip = computed(() => {
|
|
|
547
617
|
return ''
|
|
548
618
|
})
|
|
549
619
|
|
|
620
|
+
const approvalButtonTip = computed(() => {
|
|
621
|
+
if (selectedRows.value.length === 0) return '请先选择要审批的数据'
|
|
622
|
+
if (approvalAction.value !== null) return '审批操作进行中'
|
|
623
|
+
return ''
|
|
624
|
+
})
|
|
625
|
+
|
|
550
626
|
const selectedEditRestriction = computed(() => (
|
|
551
627
|
singleSelectedRow.value ? getEditRestriction(singleSelectedRow.value) : ''
|
|
552
628
|
))
|
|
@@ -679,8 +755,8 @@ async function handleAuthorization(row: ForeignPositionForecast) {
|
|
|
679
755
|
const message = await updateForeignPositionForecastAuthorization(
|
|
680
756
|
row.predRefNo,
|
|
681
757
|
authorization,
|
|
682
|
-
|
|
683
|
-
pageSize.value,
|
|
758
|
+
getTableState(activeTable.value).page.value,
|
|
759
|
+
getTableState(activeTable.value).pageSize.value,
|
|
684
760
|
)
|
|
685
761
|
ElMessage.success(message)
|
|
686
762
|
await refreshAfterMutation()
|
|
@@ -756,7 +832,7 @@ async function handleApproval(approved: boolean) {
|
|
|
756
832
|
}
|
|
757
833
|
|
|
758
834
|
onMounted(() => {
|
|
759
|
-
void
|
|
835
|
+
void handleQuery('query')
|
|
760
836
|
})
|
|
761
837
|
|
|
762
838
|
onBeforeUnmount(() => {
|
|
@@ -778,7 +854,7 @@ onBeforeUnmount(() => {
|
|
|
778
854
|
|
|
779
855
|
<template v-else>
|
|
780
856
|
<section class="query-panel" aria-label="外币头寸预报查询条件">
|
|
781
|
-
<el-form :model="filterForm" label-position="top" size="small" class="query-form" @submit.prevent="handleQuery">
|
|
857
|
+
<el-form :model="filterForm" label-position="top" size="small" class="query-form" @submit.prevent="handleQuery('query')">
|
|
782
858
|
<div class="query-grid" :class="{ 'is-collapsed': filterCollapsed }">
|
|
783
859
|
<el-form-item label="起息日">
|
|
784
860
|
<el-date-picker
|
|
@@ -841,12 +917,6 @@ onBeforeUnmount(() => {
|
|
|
841
917
|
</el-select>
|
|
842
918
|
</el-form-item>
|
|
843
919
|
|
|
844
|
-
<el-form-item label="筛选FTU" class="filter-secondary">
|
|
845
|
-
<el-select v-model="filterForm.ftuFilter" placeholder="请选择" clearable>
|
|
846
|
-
<el-option v-for="option in ftuFilterOptions" :key="option.value" v-bind="option" />
|
|
847
|
-
</el-select>
|
|
848
|
-
</el-form-item>
|
|
849
|
-
|
|
850
920
|
<el-form-item label="机构名称" class="filter-secondary">
|
|
851
921
|
<el-input v-model="filterForm.organizationName" placeholder="请输入机构名称" clearable />
|
|
852
922
|
</el-form-item>
|
|
@@ -902,7 +972,22 @@ onBeforeUnmount(() => {
|
|
|
902
972
|
{{ filterCollapsed ? '展开筛选' : '收起筛选' }}
|
|
903
973
|
</el-button>
|
|
904
974
|
<el-button :icon="RefreshLeft" @click="handleReset">重置</el-button>
|
|
905
|
-
<el-button
|
|
975
|
+
<el-button
|
|
976
|
+
native-type="submit"
|
|
977
|
+
type="primary"
|
|
978
|
+
:icon="Search"
|
|
979
|
+
:loading="isQuerying && activeTable === 'query'"
|
|
980
|
+
>
|
|
981
|
+
查询
|
|
982
|
+
</el-button>
|
|
983
|
+
<el-button
|
|
984
|
+
type="primary"
|
|
985
|
+
:icon="Search"
|
|
986
|
+
:loading="isQuerying && activeTable === 'exclude'"
|
|
987
|
+
@click="handleQuery('exclude')"
|
|
988
|
+
>
|
|
989
|
+
剔除FTU
|
|
990
|
+
</el-button>
|
|
906
991
|
</div>
|
|
907
992
|
</div>
|
|
908
993
|
</el-form>
|
|
@@ -931,17 +1016,18 @@ onBeforeUnmount(() => {
|
|
|
931
1016
|
已选记录包含多个币种,暂不进行金额汇总
|
|
932
1017
|
</div>
|
|
933
1018
|
|
|
934
|
-
<section class="table-panel" aria-label="
|
|
1019
|
+
<section class="table-panel" :aria-label="`外币头寸预报列表(${activeTableTitle})`">
|
|
935
1020
|
<ElTablePro
|
|
936
|
-
v-
|
|
937
|
-
v-model:page
|
|
1021
|
+
v-if="activeTable === 'query'"
|
|
1022
|
+
v-model:page="queryPage"
|
|
1023
|
+
v-model:page-size="queryPageSize"
|
|
938
1024
|
v-loading="isLoading"
|
|
939
|
-
:data="
|
|
940
|
-
:total="
|
|
1025
|
+
:data="queryRows"
|
|
1026
|
+
:total="queryTotalCount"
|
|
941
1027
|
:page-sizes="[10, 25, 50, 100]"
|
|
942
1028
|
:selection-reset-key="selectionResetKey"
|
|
943
1029
|
:default-sort="tableDefaultSort"
|
|
944
|
-
table-key="foreign-currency-position-forecast"
|
|
1030
|
+
table-key="foreign-currency-position-forecast-query"
|
|
945
1031
|
row-key="predRefNo"
|
|
946
1032
|
size="small"
|
|
947
1033
|
border
|
|
@@ -1017,28 +1103,46 @@ onBeforeUnmount(() => {
|
|
|
1017
1103
|
</span>
|
|
1018
1104
|
</el-tooltip>
|
|
1019
1105
|
<span class="operation-divider" aria-hidden="true"></span>
|
|
1020
|
-
<el-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
:
|
|
1025
|
-
:loading="approvalAction === 'approve'"
|
|
1026
|
-
:disabled="approvalAction !== null"
|
|
1027
|
-
@click="handleApproval(true)"
|
|
1106
|
+
<el-tooltip
|
|
1107
|
+
:content="approvalButtonTip"
|
|
1108
|
+
placement="top"
|
|
1109
|
+
:show-after="200"
|
|
1110
|
+
:disabled="!approvalButtonTip"
|
|
1028
1111
|
>
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1112
|
+
<span class="toolbar-action-tooltip">
|
|
1113
|
+
<el-button
|
|
1114
|
+
size="small"
|
|
1115
|
+
type="primary"
|
|
1116
|
+
plain
|
|
1117
|
+
:icon="CircleCheck"
|
|
1118
|
+
:loading="approvalAction === 'approve'"
|
|
1119
|
+
:disabled="approvalAction !== null || selectedRows.length === 0"
|
|
1120
|
+
@click="handleApproval(true)"
|
|
1121
|
+
>
|
|
1122
|
+
审批确认
|
|
1123
|
+
</el-button>
|
|
1124
|
+
</span>
|
|
1125
|
+
</el-tooltip>
|
|
1126
|
+
<el-tooltip
|
|
1127
|
+
:content="approvalButtonTip"
|
|
1128
|
+
placement="top"
|
|
1129
|
+
:show-after="200"
|
|
1130
|
+
:disabled="!approvalButtonTip"
|
|
1039
1131
|
>
|
|
1040
|
-
|
|
1041
|
-
|
|
1132
|
+
<span class="toolbar-action-tooltip">
|
|
1133
|
+
<el-button
|
|
1134
|
+
size="small"
|
|
1135
|
+
type="primary"
|
|
1136
|
+
plain
|
|
1137
|
+
:icon="CircleClose"
|
|
1138
|
+
:loading="approvalAction === 'reject'"
|
|
1139
|
+
:disabled="approvalAction !== null || selectedRows.length === 0"
|
|
1140
|
+
@click="handleApproval(false)"
|
|
1141
|
+
>
|
|
1142
|
+
审批拒绝
|
|
1143
|
+
</el-button>
|
|
1144
|
+
</span>
|
|
1145
|
+
</el-tooltip>
|
|
1042
1146
|
</div>
|
|
1043
1147
|
</template>
|
|
1044
1148
|
|
|
@@ -1051,7 +1155,7 @@ onBeforeUnmount(() => {
|
|
|
1051
1155
|
</template>
|
|
1052
1156
|
|
|
1053
1157
|
<el-table-column type="selection" column-key="selection" width="48" fixed="left" reserve-selection disabled />
|
|
1054
|
-
<el-table-column type="index" column-key="sequence" label="序号" width="62" fixed="left" :index="(index: number) => (
|
|
1158
|
+
<el-table-column type="index" column-key="sequence" label="序号" width="62" fixed="left" :index="(index: number) => (queryPage - 1) * queryPageSize + index + 1" disabled />
|
|
1055
1159
|
<el-table-column
|
|
1056
1160
|
v-for="column in forecastTableColumns"
|
|
1057
1161
|
:key="column.key"
|
|
@@ -1064,6 +1168,169 @@ onBeforeUnmount(() => {
|
|
|
1064
1168
|
:sortable="column.sortable"
|
|
1065
1169
|
:sort-orders="column.sortOrders"
|
|
1066
1170
|
:show-overflow-tooltip="column.showOverflowTooltip"
|
|
1171
|
+
:visible="column.key !== 'predRefNo'"
|
|
1172
|
+
>
|
|
1173
|
+
<template #default="{ row }">
|
|
1174
|
+
<span :class="{ 'money-cell': column.render === 'money' }">
|
|
1175
|
+
{{ getTableColumnText(column, row) }}
|
|
1176
|
+
</span>
|
|
1177
|
+
</template>
|
|
1178
|
+
</el-table-column>
|
|
1179
|
+
</ElTablePro>
|
|
1180
|
+
|
|
1181
|
+
<ElTablePro
|
|
1182
|
+
v-else
|
|
1183
|
+
v-model:page="excludedFtuPage"
|
|
1184
|
+
v-model:page-size="excludedFtuPageSize"
|
|
1185
|
+
v-loading="isLoading"
|
|
1186
|
+
:data="excludedFtuRows"
|
|
1187
|
+
:total="excludedFtuTotalCount"
|
|
1188
|
+
:page-sizes="[10, 25, 50, 100]"
|
|
1189
|
+
:selection-reset-key="selectionResetKey"
|
|
1190
|
+
:default-sort="tableDefaultSort"
|
|
1191
|
+
table-key="foreign-currency-position-forecast-exclude-ftu"
|
|
1192
|
+
row-key="predRefNo"
|
|
1193
|
+
size="small"
|
|
1194
|
+
border
|
|
1195
|
+
stripe
|
|
1196
|
+
:height="tableHeight"
|
|
1197
|
+
empty-text="无记录"
|
|
1198
|
+
class="forecast-table"
|
|
1199
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
1200
|
+
pagination-size="small"
|
|
1201
|
+
@selection-change="handleSelectionChange"
|
|
1202
|
+
@sort-change="handleSortChange"
|
|
1203
|
+
@pagination-change="handlePaginationChange"
|
|
1204
|
+
>
|
|
1205
|
+
<template #toolbar>
|
|
1206
|
+
<div class="table-toolbar-actions">
|
|
1207
|
+
<el-button size="small" type="primary" :icon="Plus" @click="openAddEditor">新增</el-button>
|
|
1208
|
+
<el-tooltip
|
|
1209
|
+
:content="selectedEditRestriction || singleSelectionTip"
|
|
1210
|
+
placement="top"
|
|
1211
|
+
:show-after="200"
|
|
1212
|
+
:disabled="selectedRows.length === 1 && !selectedEditRestriction"
|
|
1213
|
+
>
|
|
1214
|
+
<span class="toolbar-action-tooltip">
|
|
1215
|
+
<el-button
|
|
1216
|
+
size="small"
|
|
1217
|
+
type="primary"
|
|
1218
|
+
:icon="EditPen"
|
|
1219
|
+
:disabled="!singleSelectedRow || Boolean(selectedEditRestriction)"
|
|
1220
|
+
:plain="!singleSelectedRow || Boolean(selectedEditRestriction)"
|
|
1221
|
+
@click="handleSelectedEdit"
|
|
1222
|
+
>
|
|
1223
|
+
修改
|
|
1224
|
+
</el-button>
|
|
1225
|
+
</span>
|
|
1226
|
+
</el-tooltip>
|
|
1227
|
+
<el-tooltip
|
|
1228
|
+
:content="selectedDeleteRestriction || singleSelectionTip"
|
|
1229
|
+
placement="top"
|
|
1230
|
+
:show-after="200"
|
|
1231
|
+
:disabled="selectedRows.length === 1 && !selectedDeleteRestriction"
|
|
1232
|
+
>
|
|
1233
|
+
<span class="toolbar-action-tooltip">
|
|
1234
|
+
<el-button
|
|
1235
|
+
size="small"
|
|
1236
|
+
type="danger"
|
|
1237
|
+
:icon="Delete"
|
|
1238
|
+
:disabled="!singleSelectedRow || Boolean(selectedDeleteRestriction)"
|
|
1239
|
+
:plain="!singleSelectedRow || Boolean(selectedDeleteRestriction)"
|
|
1240
|
+
@click="handleSelectedDelete"
|
|
1241
|
+
>
|
|
1242
|
+
删除
|
|
1243
|
+
</el-button>
|
|
1244
|
+
</span>
|
|
1245
|
+
</el-tooltip>
|
|
1246
|
+
<el-tooltip
|
|
1247
|
+
:content="selectedAuthorizationRestriction || singleSelectionTip"
|
|
1248
|
+
placement="top"
|
|
1249
|
+
:show-after="200"
|
|
1250
|
+
:disabled="selectedRows.length === 1 && !selectedAuthorizationRestriction"
|
|
1251
|
+
>
|
|
1252
|
+
<span class="toolbar-action-tooltip">
|
|
1253
|
+
<el-button
|
|
1254
|
+
size="small"
|
|
1255
|
+
type="primary"
|
|
1256
|
+
:icon="singleSelectedRow?.authirization === '1' ? CircleClose : CircleCheck"
|
|
1257
|
+
:loading="Boolean(authorizationActionPredRefNo)"
|
|
1258
|
+
:disabled="!singleSelectedRow || Boolean(selectedAuthorizationRestriction) || Boolean(authorizationActionPredRefNo)"
|
|
1259
|
+
:plain="!singleSelectedRow || Boolean(selectedAuthorizationRestriction) || Boolean(authorizationActionPredRefNo)"
|
|
1260
|
+
@click="handleSelectedAuthorization"
|
|
1261
|
+
>
|
|
1262
|
+
{{ singleSelectedRow?.authirization === '1' ? '取消授权' : '授权' }}
|
|
1263
|
+
</el-button>
|
|
1264
|
+
</span>
|
|
1265
|
+
</el-tooltip>
|
|
1266
|
+
<span class="operation-divider" aria-hidden="true"></span>
|
|
1267
|
+
<el-tooltip
|
|
1268
|
+
:content="approvalButtonTip"
|
|
1269
|
+
placement="top"
|
|
1270
|
+
:show-after="200"
|
|
1271
|
+
:disabled="!approvalButtonTip"
|
|
1272
|
+
>
|
|
1273
|
+
<span class="toolbar-action-tooltip">
|
|
1274
|
+
<el-button
|
|
1275
|
+
size="small"
|
|
1276
|
+
type="primary"
|
|
1277
|
+
plain
|
|
1278
|
+
:icon="CircleCheck"
|
|
1279
|
+
:loading="approvalAction === 'approve'"
|
|
1280
|
+
:disabled="approvalAction !== null || selectedRows.length === 0"
|
|
1281
|
+
@click="handleApproval(true)"
|
|
1282
|
+
>
|
|
1283
|
+
审批确认
|
|
1284
|
+
</el-button>
|
|
1285
|
+
</span>
|
|
1286
|
+
</el-tooltip>
|
|
1287
|
+
<el-tooltip
|
|
1288
|
+
:content="approvalButtonTip"
|
|
1289
|
+
placement="top"
|
|
1290
|
+
:show-after="200"
|
|
1291
|
+
:disabled="!approvalButtonTip"
|
|
1292
|
+
>
|
|
1293
|
+
<span class="toolbar-action-tooltip">
|
|
1294
|
+
<el-button
|
|
1295
|
+
size="small"
|
|
1296
|
+
type="primary"
|
|
1297
|
+
plain
|
|
1298
|
+
:icon="CircleClose"
|
|
1299
|
+
:loading="approvalAction === 'reject'"
|
|
1300
|
+
:disabled="approvalAction !== null || selectedRows.length === 0"
|
|
1301
|
+
@click="handleApproval(false)"
|
|
1302
|
+
>
|
|
1303
|
+
审批拒绝
|
|
1304
|
+
</el-button>
|
|
1305
|
+
</span>
|
|
1306
|
+
</el-tooltip>
|
|
1307
|
+
<span class="table-scope">{{ activeTableTitle }}</span>
|
|
1308
|
+
</div>
|
|
1309
|
+
</template>
|
|
1310
|
+
|
|
1311
|
+
<template #toolbar-right>
|
|
1312
|
+
<div class="table-toolbar-actions">
|
|
1313
|
+
<span class="selection-count">已选 {{ selectedRows.length }} 笔</span>
|
|
1314
|
+
<el-button size="small" :icon="UploadFilled">导入</el-button>
|
|
1315
|
+
<el-button size="small" :icon="Download" @click="handleExport">导出</el-button>
|
|
1316
|
+
</div>
|
|
1317
|
+
</template>
|
|
1318
|
+
|
|
1319
|
+
<el-table-column type="selection" column-key="selection" width="48" fixed="left" reserve-selection disabled />
|
|
1320
|
+
<el-table-column type="index" column-key="sequence" label="序号" width="62" fixed="left" :index="(index: number) => (excludedFtuPage - 1) * excludedFtuPageSize + index + 1" disabled />
|
|
1321
|
+
<el-table-column
|
|
1322
|
+
v-for="column in forecastTableColumns"
|
|
1323
|
+
:key="column.key"
|
|
1324
|
+
:column-key="column.key"
|
|
1325
|
+
:prop="column.prop"
|
|
1326
|
+
:label="column.label"
|
|
1327
|
+
:width="column.width"
|
|
1328
|
+
:align="column.align"
|
|
1329
|
+
:fixed="column.fixed"
|
|
1330
|
+
:sortable="column.sortable"
|
|
1331
|
+
:sort-orders="column.sortOrders"
|
|
1332
|
+
:show-overflow-tooltip="column.showOverflowTooltip"
|
|
1333
|
+
:visible="column.key !== 'predRefNo'"
|
|
1067
1334
|
>
|
|
1068
1335
|
<template #default="{ row }">
|
|
1069
1336
|
<span :class="{ 'money-cell': column.render === 'money' }">
|
|
@@ -1179,6 +1446,17 @@ onBeforeUnmount(() => {
|
|
|
1179
1446
|
flex-wrap: wrap;
|
|
1180
1447
|
}
|
|
1181
1448
|
|
|
1449
|
+
.table-scope {
|
|
1450
|
+
display: inline-flex;
|
|
1451
|
+
align-items: center;
|
|
1452
|
+
min-height: 24px;
|
|
1453
|
+
margin-right: 4px;
|
|
1454
|
+
color: #98a2b3;
|
|
1455
|
+
font-size: 12px;
|
|
1456
|
+
font-weight: 500;
|
|
1457
|
+
white-space: nowrap;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1182
1460
|
.toolbar-action-tooltip {
|
|
1183
1461
|
display: inline-flex;
|
|
1184
1462
|
}
|
|
@@ -55,11 +55,6 @@ export const authirizationOptions = [
|
|
|
55
55
|
{ value: '0', label: '未授权' },
|
|
56
56
|
] satisfies SelectOption[]
|
|
57
57
|
|
|
58
|
-
export const ftuFilterOptions = [
|
|
59
|
-
{ value: '1', label: '是' },
|
|
60
|
-
{ value: '0', label: '否' },
|
|
61
|
-
] satisfies SelectOption[]
|
|
62
|
-
|
|
63
58
|
export const currencyOptions = [
|
|
64
59
|
{ value: 'CNY', label: 'CNY-人民币' },
|
|
65
60
|
{ value: 'USD', label: 'USD-美元' },
|
|
@@ -40,18 +40,11 @@ export const useForeignPositionForecastStore = defineStore(
|
|
|
40
40
|
() => {
|
|
41
41
|
const filterForm = reactive<FilterState>(createEmptyFilters())
|
|
42
42
|
const appliedFilters = ref<FilterState>(createEmptyFilters())
|
|
43
|
-
const successfulFilters = ref<FilterState>(createEmptyFilters())
|
|
44
|
-
const allRows = ref<ForeignPositionForecast[]>([])
|
|
45
|
-
const totalCount = ref(0)
|
|
46
43
|
const selectedRows = ref<ForeignPositionForecast[]>([])
|
|
47
44
|
const selectionResetKey = ref(0)
|
|
48
45
|
const isLoading = ref(false)
|
|
49
46
|
const isQuerying = ref(false)
|
|
50
47
|
const filterCollapsed = ref(false)
|
|
51
|
-
const currentPage = ref(1)
|
|
52
|
-
const pageSize = ref(25)
|
|
53
|
-
const successfulPage = ref(1)
|
|
54
|
-
const successfulPageSize = ref(25)
|
|
55
48
|
|
|
56
49
|
const pageMode = ref<PageMode>('list')
|
|
57
50
|
const editorMode = ref<ForecastEditorMode>('add')
|
|
@@ -101,18 +94,11 @@ export const useForeignPositionForecastStore = defineStore(
|
|
|
101
94
|
return {
|
|
102
95
|
filterForm,
|
|
103
96
|
appliedFilters,
|
|
104
|
-
successfulFilters,
|
|
105
|
-
allRows,
|
|
106
|
-
totalCount,
|
|
107
97
|
selectedRows,
|
|
108
98
|
selectionResetKey,
|
|
109
99
|
isLoading,
|
|
110
100
|
isQuerying,
|
|
111
101
|
filterCollapsed,
|
|
112
|
-
currentPage,
|
|
113
|
-
pageSize,
|
|
114
|
-
successfulPage,
|
|
115
|
-
successfulPageSize,
|
|
116
102
|
pageMode,
|
|
117
103
|
editorMode,
|
|
118
104
|
editorRecord,
|