verce-vue-test 0.0.85 → 0.0.86
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/components/element-rewrite/ElTablePro.vue +13 -0
- package/src/views/foreign-currency-authorization/adapter.ts +70 -0
- package/src/views/foreign-currency-authorization/api.ts +26 -37
- package/src/views/foreign-currency-authorization/index.vue +264 -61
- package/src/views/foreign-currency-authorization/types.ts +32 -3
- package/src/views/foreign-currency-settlement/components/ForeignSettlementFlowPanel.vue +90 -176
- package/src/views/foreign-currency-settlement/components/ForeignSettlementForecastPanel.vue +103 -191
- package/src/views/foreign-currency-settlement/foreign-currency-settlement.css +0 -233
- package/src/views/foreign-currency-settlement/index.vue +0 -72
- package/src/views/foreign-currency-settlement/options.ts +1 -156
- package/src/views/foreign-currency-settlement/types.ts +0 -12
- package/src/views/foreign-currency-authorization/mock.ts +0 -116
- package/src/views/foreign-currency-settlement/components/ForeignSettlementDetailView.vue +0 -121
|
@@ -23,6 +23,9 @@ export type ForeignAuthorizationIdType = '0' | '1' | '2' | '3' | '4' | '5' | '6'
|
|
|
23
23
|
/** 通用是否标识。 */
|
|
24
24
|
export type ForeignAuthorizationYesNo = '0' | '1'
|
|
25
25
|
|
|
26
|
+
/** 授权审核状态。 */
|
|
27
|
+
export type ForeignAuthorizationReviewStatus = 'pending' | 'approved' | 'rejected'
|
|
28
|
+
|
|
26
29
|
/** 外币授权查询条件。 */
|
|
27
30
|
export type ForeignCurrencyAuthorizationFilter = {
|
|
28
31
|
posDate: string
|
|
@@ -64,12 +67,38 @@ export type ForeignCurrencyAuthorizationRow = {
|
|
|
64
67
|
linkWay: string
|
|
65
68
|
supervisor: string
|
|
66
69
|
author: string
|
|
70
|
+
reviewStatus: ForeignAuthorizationReviewStatus
|
|
71
|
+
rejectReason: string
|
|
67
72
|
posRemark: string
|
|
68
73
|
}
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
/** 140207001 返回的原始协议行。 */
|
|
76
|
+
export type ForeignCurrencyAuthorizationApiRow = Partial<Omit<
|
|
77
|
+
ForeignCurrencyAuthorizationRow,
|
|
78
|
+
'id' | 'forecastAmt' | 'reviewStatus' | 'rejectReason'
|
|
79
|
+
>> & {
|
|
80
|
+
id?: string | number
|
|
81
|
+
forecastAmt?: string | number
|
|
82
|
+
oposStausCode?: string
|
|
83
|
+
refuseRemark?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 140207001 业务响应体。 */
|
|
87
|
+
export type ForeignCurrencyAuthorizationQueryResponseBody = {
|
|
88
|
+
resultList?: ForeignCurrencyAuthorizationApiRow[]
|
|
89
|
+
totalCount?: string | number
|
|
90
|
+
totalPage?: string | number
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** 120207001 业务请求体。 */
|
|
94
|
+
export type ForeignCurrencyAuthorizationReviewRequestBody = {
|
|
95
|
+
author: string
|
|
96
|
+
id: string
|
|
97
|
+
nostro: string
|
|
98
|
+
oposStausCode: '00' | '99'
|
|
99
|
+
refType: ForeignAuthorizationBusinessType
|
|
100
|
+
refuseRemark: string
|
|
101
|
+
valueDate: string
|
|
73
102
|
}
|
|
74
103
|
|
|
75
104
|
export function createDefaultForeignCurrencyAuthorizationFilter(): ForeignCurrencyAuthorizationFilter {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {
|
|
3
|
-
computed,
|
|
4
3
|
onActivated,
|
|
5
4
|
onBeforeUnmount,
|
|
6
5
|
onDeactivated,
|
|
@@ -8,12 +7,11 @@ import {
|
|
|
8
7
|
reactive,
|
|
9
8
|
ref,
|
|
10
9
|
} from 'vue'
|
|
11
|
-
import {
|
|
10
|
+
import { FullScreen, InfoFilled, Search } from '@element-plus/icons-vue'
|
|
12
11
|
import { queryForeignSettlementFlows } from '../api'
|
|
13
12
|
import {
|
|
14
13
|
currencyOptions,
|
|
15
14
|
flowColumns,
|
|
16
|
-
getDefaultColumnProps,
|
|
17
15
|
messageTypeOptions,
|
|
18
16
|
payDirectionOptions,
|
|
19
17
|
verifyStatusOptions,
|
|
@@ -36,7 +34,7 @@ import { useScopedMessage } from '../../ForecastInfo/useScopedMessage'
|
|
|
36
34
|
|
|
37
35
|
/**
|
|
38
36
|
* 外币流水信息业务面板。
|
|
39
|
-
*
|
|
37
|
+
* 流水筛选、分页、勾选和请求生命周期独立于预报组件,列配置统一交由 ElTablePro 管理。
|
|
40
38
|
*/
|
|
41
39
|
const props = defineProps<{
|
|
42
40
|
layout: ForeignSettlementCardLayout
|
|
@@ -48,7 +46,6 @@ const props = defineProps<{
|
|
|
48
46
|
const emit = defineEmits<{
|
|
49
47
|
changeLayout: [layout: ForeignSettlementCardLayout]
|
|
50
48
|
toggleFullscreen: []
|
|
51
|
-
viewDetail: [row: ForeignSettlementFlowRow]
|
|
52
49
|
}>()
|
|
53
50
|
|
|
54
51
|
const pageMessage = useScopedMessage(() => props.overlayContainer)
|
|
@@ -61,11 +58,12 @@ const rows = ref<ForeignSettlementFlowRow[]>([])
|
|
|
61
58
|
const selectedRows = ref<ForeignSettlementFlowRow[]>([])
|
|
62
59
|
const selectionResetKey = ref(0)
|
|
63
60
|
const filterDrawerVisible = ref(false)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
|
|
62
|
+
type TableOverlayController = {
|
|
63
|
+
closeTransientOverlays: () => void
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const flowTable = ref<TableOverlayController | null>(null)
|
|
69
67
|
|
|
70
68
|
let requestController: AbortController | null = null
|
|
71
69
|
let panelActive = true
|
|
@@ -167,16 +165,9 @@ function handleReset() {
|
|
|
167
165
|
pageMessage.info('流水筛选条件已重置')
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
void loadFlows()
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function handlePageSizeUpdate(nextPageSize: number) {
|
|
177
|
-
if (pageSize.value === nextPageSize) return
|
|
178
|
-
pageSize.value = nextPageSize
|
|
179
|
-
page.value = 1
|
|
168
|
+
function handlePaginationChange(pagination: { page: number; pageSize: number }) {
|
|
169
|
+
page.value = pagination.page
|
|
170
|
+
pageSize.value = pagination.pageSize
|
|
180
171
|
void loadFlows()
|
|
181
172
|
}
|
|
182
173
|
|
|
@@ -184,43 +175,18 @@ function handleSelectionChange(selection: ForeignSettlementFlowRow[]) {
|
|
|
184
175
|
selectedRows.value = selection
|
|
185
176
|
}
|
|
186
177
|
|
|
187
|
-
function openDetail(row: ForeignSettlementFlowRow) {
|
|
188
|
-
filterDrawerVisible.value = false
|
|
189
|
-
columnDrawerVisible.value = false
|
|
190
|
-
emit('viewDetail', { ...row })
|
|
191
|
-
}
|
|
192
|
-
|
|
193
178
|
function getSequence(index: number) {
|
|
194
179
|
return (page.value - 1) * pageSize.value + index + 1
|
|
195
180
|
}
|
|
196
181
|
|
|
197
|
-
function setColumnDrawerVisible(visible: boolean) {
|
|
198
|
-
if (!visible && visibleColumnProps.value.length === 0) {
|
|
199
|
-
visibleColumnProps.value = getDefaultColumnProps(flowColumns)
|
|
200
|
-
}
|
|
201
|
-
columnDrawerVisible.value = visible
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function selectAllColumns() {
|
|
205
|
-
visibleColumnProps.value = flowColumns.map((column) => column.prop)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function resetColumns() {
|
|
209
|
-
visibleColumnProps.value = getDefaultColumnProps(flowColumns)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function closeVisibleOverlays() {
|
|
213
|
-
filterDrawerVisible.value = false
|
|
214
|
-
columnDrawerVisible.value = false
|
|
215
|
-
pageMessage.closeAll()
|
|
216
|
-
}
|
|
217
|
-
|
|
218
182
|
function closeTransientOverlays() {
|
|
219
183
|
cancelPendingRequest()
|
|
220
|
-
|
|
184
|
+
filterDrawerVisible.value = false
|
|
185
|
+
flowTable.value?.closeTransientOverlays()
|
|
186
|
+
pageMessage.closeAll()
|
|
221
187
|
}
|
|
222
188
|
|
|
223
|
-
defineExpose({ closeTransientOverlays
|
|
189
|
+
defineExpose({ closeTransientOverlays })
|
|
224
190
|
|
|
225
191
|
onMounted(() => {
|
|
226
192
|
void loadFlows()
|
|
@@ -243,7 +209,6 @@ onBeforeUnmount(() => {
|
|
|
243
209
|
<header class="forecast-info-card__header">
|
|
244
210
|
<div class="foreign-currency-settlement-title-group">
|
|
245
211
|
<h2 id="foreign-currency-flow-info-title" class="forecast-info-card__title">流水信息</h2>
|
|
246
|
-
<span class="foreign-currency-settlement-badge">外币</span>
|
|
247
212
|
</div>
|
|
248
213
|
|
|
249
214
|
<div class="forecast-info-header-actions">
|
|
@@ -331,103 +296,83 @@ onBeforeUnmount(() => {
|
|
|
331
296
|
</div>
|
|
332
297
|
|
|
333
298
|
<section class="forecast-info-table-area" aria-label="外币流水信息列表">
|
|
334
|
-
<
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
class="
|
|
358
|
-
|
|
299
|
+
<ElTablePro
|
|
300
|
+
ref="flowTable"
|
|
301
|
+
v-model:page="page"
|
|
302
|
+
v-model:page-size="pageSize"
|
|
303
|
+
v-loading="loading"
|
|
304
|
+
:data="rows"
|
|
305
|
+
:total="total"
|
|
306
|
+
:page-sizes="[10, 20, 50, 100]"
|
|
307
|
+
:selection-reset-key="selectionResetKey"
|
|
308
|
+
:append-to="overlayContainer || undefined"
|
|
309
|
+
table-key="foreign-currency-settlement-flow-info"
|
|
310
|
+
row-key="tranRefNo"
|
|
311
|
+
border
|
|
312
|
+
stripe
|
|
313
|
+
size="small"
|
|
314
|
+
table-layout="auto"
|
|
315
|
+
height="100%"
|
|
316
|
+
col-btn-size="small"
|
|
317
|
+
class="forecast-info-table foreign-currency-settlement-table foreign-currency-settlement-table-shell"
|
|
318
|
+
@selection-change="handleSelectionChange"
|
|
319
|
+
@pagination-change="handlePaginationChange"
|
|
320
|
+
>
|
|
321
|
+
<template #toolbar>
|
|
322
|
+
<span v-if="selectedRows.length" class="foreign-currency-settlement-selection-count">
|
|
323
|
+
已选 {{ selectedRows.length }} 笔
|
|
324
|
+
</span>
|
|
325
|
+
</template>
|
|
326
|
+
|
|
327
|
+
<el-table-column
|
|
328
|
+
type="selection"
|
|
329
|
+
column-key="selection"
|
|
330
|
+
width="46"
|
|
331
|
+
align="center"
|
|
332
|
+
fixed="left"
|
|
333
|
+
disabled
|
|
334
|
+
/>
|
|
335
|
+
<el-table-column
|
|
336
|
+
type="index"
|
|
337
|
+
column-key="sequence"
|
|
338
|
+
label="序号"
|
|
339
|
+
width="62"
|
|
340
|
+
align="center"
|
|
341
|
+
fixed="left"
|
|
342
|
+
:index="getSequence"
|
|
343
|
+
disabled
|
|
344
|
+
/>
|
|
345
|
+
<el-table-column
|
|
346
|
+
v-for="column in flowColumns"
|
|
347
|
+
:key="column.prop"
|
|
348
|
+
:prop="column.prop"
|
|
349
|
+
:column-key="column.prop"
|
|
350
|
+
:label="column.label"
|
|
351
|
+
:min-width="column.minWidth"
|
|
352
|
+
:align="column.format === 'amount' ? 'right' : 'center'"
|
|
353
|
+
:visible="column.defaultVisible === true"
|
|
359
354
|
>
|
|
360
|
-
<
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
<el-table-column
|
|
371
|
-
v-for="column in displayedColumns"
|
|
372
|
-
:key="column.prop"
|
|
373
|
-
:prop="column.prop"
|
|
374
|
-
:column-key="column.prop"
|
|
375
|
-
:label="column.label"
|
|
376
|
-
:min-width="column.minWidth"
|
|
377
|
-
:align="column.format === 'amount' ? 'right' : 'center'"
|
|
378
|
-
>
|
|
379
|
-
<template #default="{ row }">
|
|
380
|
-
<el-tag
|
|
381
|
-
v-if="column.format === 'verifyStatus'"
|
|
382
|
-
:type="getForeignSettlementVerifyTagType(row[column.prop])"
|
|
383
|
-
effect="plain"
|
|
384
|
-
size="small"
|
|
385
|
-
>
|
|
386
|
-
{{ formatForeignSettlementCell(row[column.prop], column.format) }}
|
|
387
|
-
</el-tag>
|
|
388
|
-
<span v-else>{{ formatForeignSettlementCell(row[column.prop], column.format) }}</span>
|
|
389
|
-
</template>
|
|
390
|
-
</el-table-column>
|
|
391
|
-
|
|
392
|
-
<el-table-column
|
|
393
|
-
column-key="operations"
|
|
394
|
-
label="操作"
|
|
395
|
-
width="82"
|
|
396
|
-
fixed="right"
|
|
397
|
-
align="center"
|
|
398
|
-
>
|
|
399
|
-
<template #default="{ row }">
|
|
400
|
-
<div class="forecast-info-row-actions">
|
|
401
|
-
<el-button link type="primary" size="small" :icon="Document" @click.stop="openDetail(row)">
|
|
402
|
-
详情
|
|
403
|
-
</el-button>
|
|
404
|
-
</div>
|
|
405
|
-
</template>
|
|
406
|
-
</el-table-column>
|
|
407
|
-
|
|
408
|
-
<template #empty>
|
|
409
|
-
<div class="foreign-currency-settlement-empty">
|
|
410
|
-
<span class="foreign-currency-settlement-empty__icon"><el-icon><InfoFilled /></el-icon></span>
|
|
411
|
-
<strong>暂无数据</strong>
|
|
412
|
-
<span>暂无符合条件的外币流水信息</span>
|
|
413
|
-
</div>
|
|
355
|
+
<template #default="{ row }">
|
|
356
|
+
<el-tag
|
|
357
|
+
v-if="column.format === 'verifyStatus'"
|
|
358
|
+
:type="getForeignSettlementVerifyTagType(row[column.prop])"
|
|
359
|
+
effect="plain"
|
|
360
|
+
size="small"
|
|
361
|
+
>
|
|
362
|
+
{{ formatForeignSettlementCell(row[column.prop], column.format) }}
|
|
363
|
+
</el-tag>
|
|
364
|
+
<span v-else>{{ formatForeignSettlementCell(row[column.prop], column.format) }}</span>
|
|
414
365
|
</template>
|
|
415
|
-
</el-table>
|
|
416
|
-
|
|
417
|
-
<
|
|
418
|
-
<
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
small
|
|
426
|
-
@update:current-page="handlePageUpdate"
|
|
427
|
-
@update:page-size="handlePageSizeUpdate"
|
|
428
|
-
/>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
366
|
+
</el-table-column>
|
|
367
|
+
|
|
368
|
+
<template #empty>
|
|
369
|
+
<div class="foreign-currency-settlement-empty">
|
|
370
|
+
<span class="foreign-currency-settlement-empty__icon"><el-icon><InfoFilled /></el-icon></span>
|
|
371
|
+
<strong>暂无数据</strong>
|
|
372
|
+
<span>暂无符合条件的外币流水信息</span>
|
|
373
|
+
</div>
|
|
374
|
+
</template>
|
|
375
|
+
</ElTablePro>
|
|
431
376
|
</section>
|
|
432
377
|
|
|
433
378
|
<el-drawer
|
|
@@ -566,36 +511,5 @@ onBeforeUnmount(() => {
|
|
|
566
511
|
</template>
|
|
567
512
|
</el-drawer>
|
|
568
513
|
|
|
569
|
-
<el-drawer
|
|
570
|
-
v-if="columnDrawerVisible"
|
|
571
|
-
:model-value="columnDrawerVisible"
|
|
572
|
-
title="流水信息列配置"
|
|
573
|
-
size="520px"
|
|
574
|
-
:append-to="overlayContainer || undefined"
|
|
575
|
-
destroy-on-close
|
|
576
|
-
:lock-scroll="false"
|
|
577
|
-
class="forecast-info-filter-drawer foreign-currency-settlement-column-drawer"
|
|
578
|
-
@update:model-value="setColumnDrawerVisible"
|
|
579
|
-
>
|
|
580
|
-
<div class="foreign-currency-settlement-column-actions">
|
|
581
|
-
<span>已显示 {{ visibleColumnProps.length }} / {{ flowColumns.length }} 列</span>
|
|
582
|
-
<div>
|
|
583
|
-
<el-button size="small" @click="selectAllColumns">全选</el-button>
|
|
584
|
-
<el-button size="small" @click="resetColumns">恢复默认</el-button>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
|
|
588
|
-
<el-checkbox-group v-model="visibleColumnProps" class="foreign-currency-settlement-column-grid">
|
|
589
|
-
<el-checkbox v-for="column in flowColumns" :key="column.prop" :value="column.prop">
|
|
590
|
-
{{ column.label }}
|
|
591
|
-
</el-checkbox>
|
|
592
|
-
</el-checkbox-group>
|
|
593
|
-
|
|
594
|
-
<template #footer>
|
|
595
|
-
<div class="forecast-info-filter__drawer-actions">
|
|
596
|
-
<el-button type="primary" size="small" @click="setColumnDrawerVisible(false)">完成</el-button>
|
|
597
|
-
</div>
|
|
598
|
-
</template>
|
|
599
|
-
</el-drawer>
|
|
600
514
|
</section>
|
|
601
515
|
</template>
|