verce-vue-test 0.0.151 → 0.0.152
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/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
package/package.json
CHANGED
|
@@ -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,
|
|
@@ -93,7 +93,17 @@ const paymentRouteMap: Record<string, string> = {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// 两张表的字段、默认显隐和格式化方式统一由列配置维护。
|
|
96
|
-
|
|
96
|
+
function orderColumns<T extends { prop: string }>(columns: T[], preferredProps: string[]) {
|
|
97
|
+
const preferredSet = new Set(preferredProps)
|
|
98
|
+
return [
|
|
99
|
+
...preferredProps
|
|
100
|
+
.map((prop) => columns.find((column) => column.prop === prop))
|
|
101
|
+
.filter((column): column is T => Boolean(column)),
|
|
102
|
+
...columns.filter((column) => !preferredSet.has(column.prop)),
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const baseForecastColumns = [
|
|
97
107
|
{ prop: 'predRefNo', label: '预报流水号', minWidth: 146, defaultVisible: true },
|
|
98
108
|
{ prop: 'tranDate', label: '起息日期', minWidth: 108, format: 'date', defaultVisible: true },
|
|
99
109
|
{ prop: 'payDirec', label: '收支方向', minWidth: 94, format: 'direction', defaultVisible: true },
|
|
@@ -123,7 +133,7 @@ const forecastColumns = [
|
|
|
123
133
|
{ prop: 'phoneNo', label: '联系电话', minWidth: 126 },
|
|
124
134
|
]
|
|
125
135
|
|
|
126
|
-
const
|
|
136
|
+
const baseFlowColumns = [
|
|
127
137
|
{ prop: 'tranRefNo', label: '流水号', minWidth: 154, defaultVisible: true },
|
|
128
138
|
{ prop: 'tranDate', label: '交易录入日期', minWidth: 120, format: 'date', defaultVisible: true },
|
|
129
139
|
{ prop: 'valueDate', label: '起息日', minWidth: 106, format: 'date', defaultVisible: true },
|
|
@@ -176,6 +186,51 @@ const flowColumns = [
|
|
|
176
186
|
{ prop: 'remark', label: '备注', minWidth: 160 },
|
|
177
187
|
]
|
|
178
188
|
|
|
189
|
+
const forecastColumns = orderColumns(baseForecastColumns, [
|
|
190
|
+
'groundBranch',
|
|
191
|
+
'ccy',
|
|
192
|
+
'bankAcct',
|
|
193
|
+
'predAmt',
|
|
194
|
+
'payDirec',
|
|
195
|
+
'clientName',
|
|
196
|
+
'competName',
|
|
197
|
+
'predWay',
|
|
198
|
+
'tranDate',
|
|
199
|
+
'tranType',
|
|
200
|
+
'verifyStatus',
|
|
201
|
+
])
|
|
202
|
+
|
|
203
|
+
const flowDefaultVisibleProps = new Set([
|
|
204
|
+
'branchCode',
|
|
205
|
+
'ccy',
|
|
206
|
+
'bankCode',
|
|
207
|
+
'tranAmt',
|
|
208
|
+
'paymentType',
|
|
209
|
+
'acctName',
|
|
210
|
+
'othAcctName',
|
|
211
|
+
'msgType',
|
|
212
|
+
'valueDate',
|
|
213
|
+
'verifyStatus',
|
|
214
|
+
'insertTime',
|
|
215
|
+
])
|
|
216
|
+
|
|
217
|
+
const flowColumns = orderColumns(baseFlowColumns, [
|
|
218
|
+
'branchCode',
|
|
219
|
+
'ccy',
|
|
220
|
+
'bankCode',
|
|
221
|
+
'tranAmt',
|
|
222
|
+
'paymentType',
|
|
223
|
+
'acctName',
|
|
224
|
+
'othAcctName',
|
|
225
|
+
'msgType',
|
|
226
|
+
'valueDate',
|
|
227
|
+
'verifyStatus',
|
|
228
|
+
'insertTime',
|
|
229
|
+
]).map((column) => ({
|
|
230
|
+
...column,
|
|
231
|
+
defaultVisible: flowDefaultVisibleProps.has(column.prop),
|
|
232
|
+
}))
|
|
233
|
+
|
|
179
234
|
// 将协议字段值转换为表格中的中文显示文本。
|
|
180
235
|
const optionMaps = {
|
|
181
236
|
direction: Object.fromEntries(payDirectionOptions.map((option) => [option.value, option.label])),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { nextTick, onMounted, reactive, ref } from 'vue'
|
|
2
|
+
import { computed, nextTick, onMounted, reactive, ref } from 'vue'
|
|
3
3
|
import { ElMessageBox } from 'element-plus'
|
|
4
4
|
import {
|
|
5
5
|
Delete,
|
|
@@ -56,6 +56,7 @@ function stringValue(...values) {
|
|
|
56
56
|
return String(value ?? '').trim()
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/** 将输入值转换为普通对象,避免读取空节点时报错。 */
|
|
59
60
|
function toRecord(value) {
|
|
60
61
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : {}
|
|
61
62
|
}
|
|
@@ -85,12 +86,14 @@ function normalizeTimeParameterRow(source) {
|
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
/** 根据编码从选项中获取中文显示名称。 */
|
|
88
90
|
function optionLabel(options, value) {
|
|
89
91
|
const normalizedValue = String(value ?? '').trim()
|
|
90
92
|
if (!normalizedValue) return '—'
|
|
91
93
|
return options.find((item) => item.value === normalizedValue)?.label || ''
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
/** 读取机构节点中的机构代码和机构名称。 */
|
|
94
97
|
function readOrganization(node) {
|
|
95
98
|
const attributes = toRecord(node.attributes)
|
|
96
99
|
return {
|
|
@@ -135,6 +138,7 @@ function collectOrganizations(node, result, seenCodes) {
|
|
|
135
138
|
collectOrganizations(current.children, result, seenCodes)
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
/** 将机构树转换为远程搜索下拉框选项。 */
|
|
138
142
|
function toOrganizationOptions(tree, keyword = '') {
|
|
139
143
|
const organizations = []
|
|
140
144
|
collectOrganizations(tree, organizations, new Set())
|
|
@@ -174,55 +178,107 @@ function createOrganizationCascaderOptions(node, seenCodes) {
|
|
|
174
178
|
}]
|
|
175
179
|
}
|
|
176
180
|
|
|
181
|
+
/** 创建默认查询条件。 */
|
|
177
182
|
function createDefaultFilter() {
|
|
178
183
|
return {
|
|
184
|
+
// 查询机构代码
|
|
179
185
|
filterOrgCode: '',
|
|
186
|
+
// 查询币种
|
|
180
187
|
filterCcy: '',
|
|
181
188
|
}
|
|
182
189
|
}
|
|
183
190
|
|
|
191
|
+
/** 创建新增和修改共用的表单字段。 */
|
|
184
192
|
function createDefaultForm() {
|
|
185
193
|
return {
|
|
194
|
+
// 机构代码
|
|
186
195
|
orgCode: '',
|
|
196
|
+
// 机构名称
|
|
187
197
|
orgName: '',
|
|
198
|
+
// 币种代码
|
|
188
199
|
ccy: '',
|
|
200
|
+
// 汇款路径代码
|
|
189
201
|
paymentRoute: '',
|
|
202
|
+
// 业务类型代码,仅用于列表展示
|
|
190
203
|
tranType: '',
|
|
204
|
+
// 预报截止时间
|
|
191
205
|
pardStartTime: '',
|
|
206
|
+
// 补报截止时间
|
|
192
207
|
pardEndTime: '',
|
|
208
|
+
// 金额范围
|
|
193
209
|
predUsdAmtRan: '',
|
|
210
|
+
// 备注
|
|
194
211
|
remark: '',
|
|
195
212
|
}
|
|
196
213
|
}
|
|
197
214
|
|
|
215
|
+
// 查询条件
|
|
198
216
|
const filterForm = reactive(createDefaultFilter())
|
|
217
|
+
// 已提交的查询条件
|
|
199
218
|
const appliedFilters = ref({ ...filterForm })
|
|
219
|
+
// 时间参数列表数据
|
|
200
220
|
const records = ref([])
|
|
221
|
+
// 当前选中的列表行
|
|
201
222
|
const selectedRows = ref([])
|
|
223
|
+
// 列表总条数
|
|
202
224
|
const totalCount = ref(0)
|
|
225
|
+
// 当前页码
|
|
203
226
|
const currentPage = ref(1)
|
|
227
|
+
// 每页条数
|
|
204
228
|
const pageSize = ref(25)
|
|
229
|
+
// 列表加载状态
|
|
205
230
|
const loading = ref(false)
|
|
231
|
+
// 查询按钮加载状态
|
|
206
232
|
const querying = ref(false)
|
|
233
|
+
// 用于重置表格选中状态的标识
|
|
207
234
|
const selectionResetKey = ref(0)
|
|
235
|
+
// 当前查询请求序号
|
|
208
236
|
let activeQueryRequestId = 0
|
|
209
237
|
|
|
238
|
+
// 原始机构树数据
|
|
210
239
|
const organizationTree = ref(null)
|
|
240
|
+
// 新增表单的机构下拉选项
|
|
211
241
|
const organizationOptions = ref([])
|
|
242
|
+
// 查询条件的机构级联选项
|
|
212
243
|
const organizationCascaderOptions = ref([])
|
|
244
|
+
// 机构数据加载状态
|
|
213
245
|
const organizationLoading = ref(false)
|
|
246
|
+
// 当前机构树请求,避免重复请求
|
|
214
247
|
let organizationRequest = null
|
|
248
|
+
// 机构级联选择器配置
|
|
215
249
|
const organizationCascaderProps = {
|
|
216
250
|
checkStrictly: true,
|
|
217
251
|
emitPath: false,
|
|
218
252
|
}
|
|
219
253
|
|
|
254
|
+
// 详细信息弹窗显示状态
|
|
220
255
|
const dialogVisible = ref(false)
|
|
256
|
+
// 弹窗模式:create 新增,edit 修改
|
|
221
257
|
const dialogMode = ref('create')
|
|
258
|
+
// 表单实例引用
|
|
222
259
|
const formRef = ref()
|
|
260
|
+
// 新增/修改表单数据
|
|
223
261
|
const form = reactive(createDefaultForm())
|
|
262
|
+
// 表单提交状态
|
|
224
263
|
const submitting = ref(false)
|
|
264
|
+
// 删除操作状态
|
|
225
265
|
const deleting = ref(false)
|
|
266
|
+
// 修改按钮是否禁用
|
|
267
|
+
const editDisabled = computed(() => selectedRows.value.length !== 1)
|
|
268
|
+
// 修改按钮禁用原因
|
|
269
|
+
const editDisabledReason = computed(() => {
|
|
270
|
+
if (selectedRows.value.length === 0) return '请先选择一条数据'
|
|
271
|
+
if (selectedRows.value.length > 1) return '修改操作只能选择一条数据'
|
|
272
|
+
return ''
|
|
273
|
+
})
|
|
274
|
+
// 删除按钮是否禁用
|
|
275
|
+
const deleteDisabled = computed(() => selectedRows.value.length === 0 || deleting.value)
|
|
276
|
+
// 删除按钮禁用原因
|
|
277
|
+
const deleteDisabledReason = computed(() => {
|
|
278
|
+
if (selectedRows.value.length === 0) return '请先选择要删除的数据'
|
|
279
|
+
if (deleting.value) return '删除处理中,请稍候'
|
|
280
|
+
return ''
|
|
281
|
+
})
|
|
226
282
|
|
|
227
283
|
/** 截止时间必须使用 24 小时制,兼容 HH:mm 和 HH:mm:ss。 */
|
|
228
284
|
function validateTime(_rule, value, callback) {
|
|
@@ -252,12 +308,13 @@ function validateAmount(_rule, value, callback) {
|
|
|
252
308
|
callback()
|
|
253
309
|
}
|
|
254
310
|
|
|
311
|
+
// 表单字段校验规则
|
|
255
312
|
const formRules = {
|
|
256
313
|
orgCode: [{ required: true, message: '请选择机构', trigger: 'change' }],
|
|
257
314
|
ccy: [{ required: true, message: '请选择币种', trigger: 'change' }],
|
|
258
315
|
paymentRoute: [{ required: true, message: '请选择汇款路径', trigger: 'change' }],
|
|
259
|
-
pardStartTime: [{ validator: validateTime, trigger: ['blur', 'change'] }],
|
|
260
|
-
pardEndTime: [{ validator: validateTime, trigger: ['blur', 'change'] }],
|
|
316
|
+
pardStartTime: [{ required: true, validator: validateTime, trigger: ['blur', 'change'] }],
|
|
317
|
+
pardEndTime: [{ required: true, validator: validateTime, trigger: ['blur', 'change'] }],
|
|
261
318
|
predUsdAmtRan: [{ validator: validateAmount, trigger: ['blur', 'change'] }],
|
|
262
319
|
}
|
|
263
320
|
|
|
@@ -270,6 +327,7 @@ function validateTimeRange() {
|
|
|
270
327
|
return true
|
|
271
328
|
}
|
|
272
329
|
|
|
330
|
+
/** 从接口响应中兼容读取列表数据。 */
|
|
273
331
|
function getResponseRows(response) {
|
|
274
332
|
const body = response?.body ?? {}
|
|
275
333
|
if (Array.isArray(body.resultInfos)) return body.resultInfos
|
|
@@ -278,6 +336,7 @@ function getResponseRows(response) {
|
|
|
278
336
|
return []
|
|
279
337
|
}
|
|
280
338
|
|
|
339
|
+
/** 按当前条件加载时间参数列表。 */
|
|
281
340
|
async function loadRows() {
|
|
282
341
|
const requestId = ++activeQueryRequestId
|
|
283
342
|
loading.value = true
|
|
@@ -311,6 +370,7 @@ async function loadRows() {
|
|
|
311
370
|
}
|
|
312
371
|
}
|
|
313
372
|
|
|
373
|
+
/** 提交查询条件并回到第一页。 */
|
|
314
374
|
async function handleQuery() {
|
|
315
375
|
if (querying.value) return
|
|
316
376
|
querying.value = true
|
|
@@ -326,24 +386,29 @@ async function handleQuery() {
|
|
|
326
386
|
}
|
|
327
387
|
}
|
|
328
388
|
|
|
389
|
+
/** 清空查询条件。 */
|
|
329
390
|
function handleReset() {
|
|
330
391
|
Object.assign(filterForm, createDefaultFilter())
|
|
331
392
|
}
|
|
332
393
|
|
|
394
|
+
/** 处理表格分页变化。 */
|
|
333
395
|
async function handlePaginationChange(pagination) {
|
|
334
396
|
currentPage.value = pagination.page
|
|
335
397
|
pageSize.value = pagination.pageSize
|
|
336
398
|
await loadRows()
|
|
337
399
|
}
|
|
338
400
|
|
|
401
|
+
/** 保存表格当前选中行。 */
|
|
339
402
|
function handleSelectionChange(rows) {
|
|
340
403
|
selectedRows.value = rows
|
|
341
404
|
}
|
|
342
405
|
|
|
406
|
+
/** 生成时间参数记录的唯一行键。 */
|
|
343
407
|
function getRowKey(row) {
|
|
344
408
|
return `${row.orgCode}+${row.ccy}+${row.paymentRoute}`
|
|
345
409
|
}
|
|
346
410
|
|
|
411
|
+
/** 懒加载机构树,并复用进行中的请求。 */
|
|
347
412
|
async function ensureOrganizationTree() {
|
|
348
413
|
if (organizationTree.value) return
|
|
349
414
|
if (organizationRequest) return organizationRequest
|
|
@@ -368,20 +433,24 @@ async function ensureOrganizationTree() {
|
|
|
368
433
|
return organizationRequest
|
|
369
434
|
}
|
|
370
435
|
|
|
436
|
+
/** 处理新增表单机构下拉框的展开事件。 */
|
|
371
437
|
async function handleOrganizationVisibleChange(visible) {
|
|
372
438
|
if (visible) await ensureOrganizationTree()
|
|
373
439
|
}
|
|
374
440
|
|
|
441
|
+
/** 按机构代码或名称筛选新增表单选项。 */
|
|
375
442
|
async function searchOrganizations(keyword) {
|
|
376
443
|
await ensureOrganizationTree()
|
|
377
444
|
organizationOptions.value = toOrganizationOptions(organizationTree.value, keyword)
|
|
378
445
|
}
|
|
379
446
|
|
|
447
|
+
/** 根据选中的机构代码回填机构名称。 */
|
|
380
448
|
function handleOrganizationChange(code) {
|
|
381
449
|
const option = organizationOptions.value.find((item) => item.organizationCode === code)
|
|
382
450
|
form.orgName = option?.organizationName || ''
|
|
383
451
|
}
|
|
384
452
|
|
|
453
|
+
/** 按机构代码或名称过滤查询区级联节点。 */
|
|
385
454
|
function filterOrganizationNode(node, keyword) {
|
|
386
455
|
const option = node?.data
|
|
387
456
|
const normalizedKeyword = keyword.trim().toLocaleLowerCase('zh-CN')
|
|
@@ -391,10 +460,12 @@ function filterOrganizationNode(node, keyword) {
|
|
|
391
460
|
))
|
|
392
461
|
}
|
|
393
462
|
|
|
463
|
+
/** 统一显示操作结果提示。 */
|
|
394
464
|
function showOperationResult(message) {
|
|
395
465
|
return ElMessageBox.alert(message, '提示').catch(() => undefined)
|
|
396
466
|
}
|
|
397
467
|
|
|
468
|
+
/** 打开新增时间参数弹窗并重置表单。 */
|
|
398
469
|
function openCreate() {
|
|
399
470
|
dialogMode.value = 'create'
|
|
400
471
|
Object.assign(form, createDefaultForm())
|
|
@@ -405,6 +476,7 @@ function openCreate() {
|
|
|
405
476
|
void nextTick(() => formRef.value?.clearValidate())
|
|
406
477
|
}
|
|
407
478
|
|
|
479
|
+
/** 校验选中记录后打开修改弹窗。 */
|
|
408
480
|
async function openEdit() {
|
|
409
481
|
try {
|
|
410
482
|
await ElMessageBox.confirm('您是否确定修改选中数据?', '提 示', {
|
|
@@ -445,6 +517,7 @@ function createSubmitPayload() {
|
|
|
445
517
|
: payload
|
|
446
518
|
}
|
|
447
519
|
|
|
520
|
+
/** 校验并提交新增或修改表单。 */
|
|
448
521
|
async function submitForm() {
|
|
449
522
|
if (submitting.value) return
|
|
450
523
|
const valid = await formRef.value?.validate().catch(() => false)
|
|
@@ -476,6 +549,7 @@ function buildDeleteFilterParam(rows) {
|
|
|
476
549
|
.join(',')
|
|
477
550
|
}
|
|
478
551
|
|
|
552
|
+
/** 确认并删除当前选中的时间参数记录。 */
|
|
479
553
|
async function handleDelete() {
|
|
480
554
|
if (deleting.value) return
|
|
481
555
|
if (selectedRows.value.length === 0) {
|
|
@@ -583,6 +657,7 @@ onMounted(() => {
|
|
|
583
657
|
size="small"
|
|
584
658
|
:icon="Search"
|
|
585
659
|
:loading="querying"
|
|
660
|
+
v-permission="'query'"
|
|
586
661
|
@click="handleQuery"
|
|
587
662
|
>
|
|
588
663
|
查询
|
|
@@ -611,22 +686,54 @@ onMounted(() => {
|
|
|
611
686
|
@selection-change="handleSelectionChange"
|
|
612
687
|
>
|
|
613
688
|
<template #toolbar>
|
|
614
|
-
<el-button type="primary" size="small" :icon="Plus" @click="openCreate">
|
|
615
|
-
新增
|
|
616
|
-
</el-button>
|
|
617
|
-
<el-button type="primary" plain size="small" :icon="EditPen" @click="openEdit">
|
|
618
|
-
修改
|
|
619
|
-
</el-button>
|
|
620
689
|
<el-button
|
|
621
690
|
type="primary"
|
|
622
|
-
plain
|
|
623
691
|
size="small"
|
|
624
|
-
:icon="
|
|
625
|
-
|
|
626
|
-
@click="
|
|
692
|
+
:icon="Plus"
|
|
693
|
+
v-permission="'add'"
|
|
694
|
+
@click="openCreate"
|
|
627
695
|
>
|
|
628
|
-
|
|
696
|
+
新增
|
|
629
697
|
</el-button>
|
|
698
|
+
<el-tooltip
|
|
699
|
+
:disabled="!editDisabled"
|
|
700
|
+
:content="editDisabledReason"
|
|
701
|
+
placement="top"
|
|
702
|
+
>
|
|
703
|
+
<span>
|
|
704
|
+
<el-button
|
|
705
|
+
type="primary"
|
|
706
|
+
plain
|
|
707
|
+
size="small"
|
|
708
|
+
:icon="EditPen"
|
|
709
|
+
:disabled="editDisabled"
|
|
710
|
+
v-permission="'edit'"
|
|
711
|
+
@click="openEdit"
|
|
712
|
+
>
|
|
713
|
+
修改
|
|
714
|
+
</el-button>
|
|
715
|
+
</span>
|
|
716
|
+
</el-tooltip>
|
|
717
|
+
<el-tooltip
|
|
718
|
+
:disabled="!deleteDisabled"
|
|
719
|
+
:content="deleteDisabledReason"
|
|
720
|
+
placement="top"
|
|
721
|
+
>
|
|
722
|
+
<span>
|
|
723
|
+
<el-button
|
|
724
|
+
type="primary"
|
|
725
|
+
plain
|
|
726
|
+
size="small"
|
|
727
|
+
:icon="Delete"
|
|
728
|
+
:loading="deleting"
|
|
729
|
+
:disabled="deleteDisabled"
|
|
730
|
+
v-permission="'delete'"
|
|
731
|
+
@click="handleDelete"
|
|
732
|
+
>
|
|
733
|
+
删除
|
|
734
|
+
</el-button>
|
|
735
|
+
</span>
|
|
736
|
+
</el-tooltip>
|
|
630
737
|
</template>
|
|
631
738
|
|
|
632
739
|
<el-table-column type="selection" width="44" fixed="left" align="center" disabled />
|
|
@@ -681,6 +788,7 @@ onMounted(() => {
|
|
|
681
788
|
ref="formRef"
|
|
682
789
|
:model="form"
|
|
683
790
|
:rules="formRules"
|
|
791
|
+
class="time-parameter-form"
|
|
684
792
|
label-width="126px"
|
|
685
793
|
size="small"
|
|
686
794
|
>
|
|
@@ -708,13 +816,21 @@ onMounted(() => {
|
|
|
708
816
|
</template>
|
|
709
817
|
<template v-else>
|
|
710
818
|
<el-form-item label="机构代码">
|
|
711
|
-
<el-input v-model="form.orgCode"
|
|
819
|
+
<el-input v-model="form.orgCode" disabled />
|
|
712
820
|
</el-form-item>
|
|
713
821
|
<el-form-item label="机构名称">
|
|
714
|
-
<el-input v-model="form.orgName"
|
|
822
|
+
<el-input v-model="form.orgName" disabled />
|
|
715
823
|
</el-form-item>
|
|
716
824
|
</template>
|
|
717
825
|
|
|
826
|
+
<el-form-item label="金额范围(元)" prop="predUsdAmtRan">
|
|
827
|
+
<el-input
|
|
828
|
+
v-model="form.predUsdAmtRan"
|
|
829
|
+
maxlength="60"
|
|
830
|
+
placeholder="请输入金额范围"
|
|
831
|
+
:disabled="dialogMode === 'edit'"
|
|
832
|
+
/>
|
|
833
|
+
</el-form-item>
|
|
718
834
|
<el-form-item label="币种" prop="ccy">
|
|
719
835
|
<el-select
|
|
720
836
|
v-if="dialogMode === 'create'"
|
|
@@ -724,7 +840,7 @@ onMounted(() => {
|
|
|
724
840
|
>
|
|
725
841
|
<el-option v-for="option in currencyOptions" :key="option.value" v-bind="option" />
|
|
726
842
|
</el-select>
|
|
727
|
-
<el-input v-else :model-value="optionLabel(currencyOptions, form.ccy)"
|
|
843
|
+
<el-input v-else :model-value="optionLabel(currencyOptions, form.ccy)" disabled />
|
|
728
844
|
</el-form-item>
|
|
729
845
|
<el-form-item label="汇款路径" prop="paymentRoute">
|
|
730
846
|
<el-select
|
|
@@ -737,12 +853,9 @@ onMounted(() => {
|
|
|
737
853
|
<el-input
|
|
738
854
|
v-else
|
|
739
855
|
:model-value="optionLabel(paymentRouteOptions, form.paymentRoute)"
|
|
740
|
-
|
|
856
|
+
disabled
|
|
741
857
|
/>
|
|
742
858
|
</el-form-item>
|
|
743
|
-
<el-form-item v-if="dialogMode === 'edit' && form.tranType" label="业务类型">
|
|
744
|
-
<el-input :model-value="optionLabel(transactionTypeOptions, form.tranType)" readonly />
|
|
745
|
-
</el-form-item>
|
|
746
859
|
<el-form-item label="预报截止时间" prop="pardStartTime">
|
|
747
860
|
<el-time-picker
|
|
748
861
|
v-model="form.pardStartTime"
|
|
@@ -759,9 +872,6 @@ onMounted(() => {
|
|
|
759
872
|
placeholder="请选择补报截止时间"
|
|
760
873
|
/>
|
|
761
874
|
</el-form-item>
|
|
762
|
-
<el-form-item label="金额范围(元)" prop="predUsdAmtRan">
|
|
763
|
-
<el-input v-model="form.predUsdAmtRan" maxlength="60" placeholder="请输入金额范围" />
|
|
764
|
-
</el-form-item>
|
|
765
875
|
<el-form-item label="备注">
|
|
766
876
|
<el-input
|
|
767
877
|
v-model="form.remark"
|
|
@@ -782,3 +892,9 @@ onMounted(() => {
|
|
|
782
892
|
</el-dialog>
|
|
783
893
|
</main>
|
|
784
894
|
</template>
|
|
895
|
+
|
|
896
|
+
<style scoped>
|
|
897
|
+
.time-parameter-form :deep(.el-form-item__content > *) {
|
|
898
|
+
width: 100%;
|
|
899
|
+
}
|
|
900
|
+
</style>
|
|
Binary file
|