verce-vue-test 0.0.90 → 0.0.92

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.
Files changed (116) hide show
  1. package/docs/payment-tam-online.md +177 -2
  2. package/package.json +1 -1
  3. package/src/api/account-bank.ts +61 -0
  4. package/src/components/business/AccountBankSelect.vue +142 -0
  5. package/src/components/business/Public/TokenTag.vue +104 -0
  6. package/src/components/index.ts +8 -0
  7. package/src/views/foreign-currency-authorization/index.vue +5 -5
  8. package/src/views/foreign-currency-position-forecast/components/ForeignPositionForecastEditor.vue +4 -32
  9. package/src/views/foreign-currency-settlement/components/ForeignSettlementFlowPanel.vue +52 -5
  10. package/src/views/foreign-currency-settlement/components/ForeignSettlementForecastPanel.vue +55 -13
  11. package/src/views/foreign-currency-settlement/foreign-currency-settlement.css +21 -2
  12. package/src/views/foreign-currency-settlement/index.vue +1 -1
  13. package/src/views/foreign-currency-settlement/options.ts +2 -2
  14. package/src/views/foreign-currency-settlement/store.ts +17 -8
  15. package/src/views/foreign-currency-settlement/types.ts +6 -5
  16. package/src/views/foreign-currency-settlement/useScopedMessage.ts +55 -0
  17. package/.claude/settings.local.json +0 -9
  18. package/.playwright-cli/console-2026-07-09T06-04-17-080Z.log +0 -1
  19. package/.playwright-cli/console-2026-07-09T06-12-15-073Z.log +0 -1
  20. package/.playwright-cli/console-2026-07-09T06-26-29-737Z.log +0 -1
  21. package/.playwright-cli/console-2026-07-09T07-23-15-426Z.log +0 -1
  22. package/.playwright-cli/console-2026-07-09T07-24-26-534Z.log +0 -1
  23. package/.playwright-cli/console-2026-07-09T07-30-40-534Z.log +0 -1
  24. package/.playwright-cli/console-2026-07-09T07-36-44-016Z.log +0 -1
  25. package/.playwright-cli/console-2026-07-09T07-41-10-340Z.log +0 -1
  26. package/.playwright-cli/console-2026-07-09T07-43-15-882Z.log +0 -1
  27. package/.playwright-cli/console-2026-07-09T07-46-22-087Z.log +0 -1
  28. package/.playwright-cli/console-2026-07-09T07-49-21-886Z.log +0 -1
  29. package/.playwright-cli/console-2026-07-09T08-09-19-969Z.log +0 -1
  30. package/.playwright-cli/console-2026-07-09T08-11-30-991Z.log +0 -1
  31. package/.playwright-cli/console-2026-07-09T08-16-26-237Z.log +0 -1
  32. package/.playwright-cli/console-2026-07-09T08-41-08-975Z.log +0 -2
  33. package/.playwright-cli/console-2026-07-09T09-33-59-980Z.log +0 -2
  34. package/.playwright-cli/page-2026-07-09T05-18-52-868Z.yml +0 -66
  35. package/.playwright-cli/page-2026-07-09T05-29-33-800Z.yml +0 -66
  36. package/.playwright-cli/page-2026-07-09T05-30-01-271Z.yml +0 -270
  37. package/.playwright-cli/page-2026-07-09T05-31-30-776Z.yml +0 -63
  38. package/.playwright-cli/page-2026-07-09T05-31-50-991Z.yml +0 -270
  39. package/.playwright-cli/page-2026-07-09T05-33-28-782Z.yml +0 -66
  40. package/.playwright-cli/page-2026-07-09T05-33-51-915Z.yml +0 -270
  41. package/.playwright-cli/page-2026-07-09T05-42-00-004Z.yml +0 -63
  42. package/.playwright-cli/page-2026-07-09T06-01-57-002Z.yml +0 -264
  43. package/.playwright-cli/page-2026-07-09T06-04-17-487Z.yml +0 -273
  44. package/.playwright-cli/page-2026-07-09T06-04-52-168Z.yml +0 -273
  45. package/.playwright-cli/page-2026-07-09T06-12-15-498Z.yml +0 -267
  46. package/.playwright-cli/page-2026-07-09T06-12-35-238Z.yml +0 -267
  47. package/.playwright-cli/page-2026-07-09T06-26-30-006Z.yml +0 -66
  48. package/.playwright-cli/page-2026-07-09T06-26-54-045Z.yml +0 -335
  49. package/.playwright-cli/page-2026-07-09T06-27-15-581Z.yml +0 -251
  50. package/.playwright-cli/page-2026-07-09T06-27-18-660Z.yml +0 -315
  51. package/.playwright-cli/page-2026-07-09T06-27-36-307Z.yml +0 -251
  52. package/.playwright-cli/page-2026-07-09T06-27-39-489Z.yml +0 -271
  53. package/.playwright-cli/page-2026-07-09T07-23-15-855Z.yml +0 -247
  54. package/.playwright-cli/page-2026-07-09T07-23-33-545Z.yml +0 -329
  55. package/.playwright-cli/page-2026-07-09T07-23-43-166Z.yml +0 -247
  56. package/.playwright-cli/page-2026-07-09T07-23-47-127Z.yml +0 -309
  57. package/.playwright-cli/page-2026-07-09T07-24-26-906Z.yml +0 -247
  58. package/.playwright-cli/page-2026-07-09T07-30-41-042Z.yml +0 -247
  59. package/.playwright-cli/page-2026-07-09T07-30-55-046Z.yml +0 -329
  60. package/.playwright-cli/page-2026-07-09T07-31-07-705Z.yml +0 -247
  61. package/.playwright-cli/page-2026-07-09T07-31-13-150Z.yml +0 -309
  62. package/.playwright-cli/page-2026-07-09T07-31-23-534Z.yml +0 -247
  63. package/.playwright-cli/page-2026-07-09T07-31-27-447Z.yml +0 -263
  64. package/.playwright-cli/page-2026-07-09T07-36-44-447Z.yml +0 -247
  65. package/.playwright-cli/page-2026-07-09T07-36-57-287Z.yml +0 -329
  66. package/.playwright-cli/page-2026-07-09T07-37-02-984Z.yml +0 -247
  67. package/.playwright-cli/page-2026-07-09T07-37-09-572Z.yml +0 -263
  68. package/.playwright-cli/page-2026-07-09T07-41-10-769Z.yml +0 -247
  69. package/.playwright-cli/page-2026-07-09T07-41-23-329Z.yml +0 -320
  70. package/.playwright-cli/page-2026-07-09T07-43-16-350Z.yml +0 -261
  71. package/.playwright-cli/page-2026-07-09T07-46-22-489Z.yml +0 -261
  72. package/.playwright-cli/page-2026-07-09T07-46-39-112Z.yml +0 -277
  73. package/.playwright-cli/page-2026-07-09T07-49-22-338Z.yml +0 -261
  74. package/.playwright-cli/page-2026-07-09T08-09-20-400Z.yml +0 -269
  75. package/.playwright-cli/page-2026-07-09T08-09-37-336Z.yml +0 -324
  76. package/.playwright-cli/page-2026-07-09T08-11-31-421Z.yml +0 -269
  77. package/.playwright-cli/page-2026-07-09T08-16-26-654Z.yml +0 -269
  78. package/.playwright-cli/page-2026-07-09T08-16-46-658Z.yml +0 -285
  79. package/.playwright-cli/page-2026-07-09T08-41-09-376Z.yml +0 -269
  80. package/.playwright-cli/page-2026-07-09T08-41-31-949Z.yml +0 -748
  81. package/.playwright-cli/page-2026-07-09T08-45-14-780Z.png +0 -0
  82. package/.playwright-cli/page-2026-07-09T09-34-00-473Z.yml +0 -272
  83. package/.playwright-cli/page-2026-07-09T09-34-17-738Z.yml +0 -711
  84. package/.playwright-cli/page-2026-07-09T09-34-38-429Z.yml +0 -708
  85. package/.playwright-cli/page-2026-07-09T09-36-12-424Z.yml +0 -743
  86. package/.playwright-cli/page-2026-07-09T09-36-31-519Z.png +0 -0
  87. package/.vscode/settings.json +0 -8
  88. package/output/playwright/forecast-info-filters-split-vertical.png +0 -0
  89. package/output/playwright/forecast-info-flow-drawer-all-filters-1672x941.png +0 -0
  90. package/output/playwright/forecast-info-flow-filter-fields.png +0 -0
  91. package/output/playwright/forecast-info-flow-query-params.png +0 -0
  92. package/output/playwright/forecast-info-forecast-drawer-all-filters-1672x941.png +0 -0
  93. package/output/playwright/forecast-info-forecast-table-fields.png +0 -0
  94. package/output/playwright/forecast-info-horizontal-date-width.png +0 -0
  95. package/output/playwright/forecast-info-horizontal-filter-one-line.png +0 -0
  96. package/output/playwright/forecast-info-horizontal-one-filter-1672x941.png +0 -0
  97. package/output/playwright/forecast-info-icon-switch-default-horizontal-1672x941.png +0 -0
  98. package/output/playwright/forecast-info-icon-switch-tooltip-1672x941.png +0 -0
  99. package/output/playwright/forecast-info-inline-filters-1672x941.png +0 -0
  100. package/output/playwright/forecast-info-layout-horizontal-1440x900.png +0 -0
  101. package/output/playwright/forecast-info-layout-horizontal-1672x941.png +0 -0
  102. package/output/playwright/forecast-info-layout-horizontal-compact-1672x941.png +0 -0
  103. package/output/playwright/forecast-info-layout-vertical-1672x941.png +0 -0
  104. package/output/playwright/forecast-info-operation-column-1672x941.png +0 -0
  105. package/output/playwright/forecast-info-pinia-flow-switch-horizontal-1672x941.png +0 -0
  106. package/output/playwright/forecast-info-pinia-layout-vertical-1672x941.png +0 -0
  107. package/output/playwright/forecast-info-single-trade-date.png +0 -0
  108. package/output/playwright/forecast-info-split-components-1672x941.png +0 -0
  109. package/output/playwright/forecast-info-table-pro-1672x941.png +0 -0
  110. package/output/playwright/forecast-info-three-vue-structure.png +0 -0
  111. package/output/playwright/forecast-info-vertical-date-width.png +0 -0
  112. package/output/playwright/forecast-info-vertical-filter-left-align.png +0 -0
  113. package/output/playwright/forecast-info-vertical-two-filters-1672x941.png +0 -0
  114. package/output/playwright/home-1672x941.png +0 -0
  115. package/output/playwright/home-preview-1672x941.png +0 -0
  116. package/output/playwright/home-reference-vs-preview.png +0 -0
@@ -9156,7 +9156,183 @@ POST /TAM/0001/140206018
9156
9156
  > 200 Response
9157
9157
 
9158
9158
  ```
9159
- {"body":{"resultInfos":[{"bankAcct":"string","bankName":"string"}]},"head":{"adminUserId":"string","agentBranchId":"string","apprUserId":"string","areaCode":"string","batch":true,"branchId":"string","consumerId":"string","consumerSeqNo":"string","ctrlBits":"string","digitalSign":"string","extra":{},"fileFlag":"string","filePath":"string","isBatch":true,"msgId":"string","origSender":"string","pageIndex":"string","pageSize":"string","retCode":"string","retMsg":"string","retMsg2":"string","retStatus":"string","spanId":"string","traceId":"string","tranCode":"string","tranDate":"string","tranTimestamp":"string","userId":"string","verifyUserId":"string","versionId":"string"}}
9159
+ {
9160
+ "head": {
9161
+ "consumerId": "TAM001",
9162
+ "tranCode": "/TAM/0001/140206018",
9163
+ "versionId": "0001",
9164
+ "ctrlBits": "00004000",
9165
+ "tranDate": "20260720",
9166
+ "consumerSeqNo": "superuser62026072028072858",
9167
+ "tranTimestamp": "141432",
9168
+ "pageSize": "10",
9169
+ "pageIndex": "1",
9170
+ "traceId": "",
9171
+ "spanId": "",
9172
+ "userId": "superuser6",
9173
+ "verifyUserId": "",
9174
+ "adminUserId": "",
9175
+ "apprUserId": "",
9176
+ "branchId": "25001",
9177
+ "areaCode": "0000",
9178
+ "digitalSign": "",
9179
+ "fileFlag": "N",
9180
+ "filePath": "",
9181
+ "isBatch": false,
9182
+ "extra": {},
9183
+ "retStatus": "S",
9184
+ "retCode": "00000",
9185
+ "retMsg": "交易成功"
9186
+ },
9187
+ "body": {
9188
+ "resultInfos": [
9189
+ {
9190
+ "bankAcct": "4445",
9191
+ "bankName": "4445-1323"
9192
+ },
9193
+ {
9194
+ "bankAcct": "3214",
9195
+ "bankName": "3214-323"
9196
+ },
9197
+ {
9198
+ "bankAcct": "ICBKKZKX",
9199
+ "bankName": "ICBKKZKX-中国工商银行(阿拉木图)股份公司"
9200
+ },
9201
+ {
9202
+ "bankAcct": "ICBKCNBJXXX",
9203
+ "bankName": "ICBKCNBJXXX-丹麦克朗主账户行"
9204
+ },
9205
+ {
9206
+ "bankAcct": "BOFMCAM2XXX",
9207
+ "bankName": "BOFMCAM2XXX-加拿大元主账户行"
9208
+ },
9209
+ {
9210
+ "bankAcct": "SPDBCNSHXXX",
9211
+ "bankName": "SPDBCNSHXXX-加拿大元账户行"
9212
+ },
9213
+ {
9214
+ "bankAcct": "ICBKCNBJXXX",
9215
+ "bankName": "ICBKCNBJXXX-挪威克朗主账户行"
9216
+ },
9217
+ {
9218
+ "bankAcct": "OCBCSGSGXXX",
9219
+ "bankName": "OCBCSGSGXXX-新加坡元主账户行"
9220
+ },
9221
+ {
9222
+ "bankAcct": "SMBCJPJTXXX",
9223
+ "bankName": "SMBCJPJTXXX-日元主账户行"
9224
+ },
9225
+ {
9226
+ "bankAcct": "ICBKCNBJBJM",
9227
+ "bankName": "ICBKCNBJBJM-日元账户行"
9228
+ },
9229
+ {
9230
+ "bankAcct": "BBRUBEBB010",
9231
+ "bankName": "BBRUBEBB010-欧元账户行"
9232
+ },
9233
+ {
9234
+ "bankAcct": "CEDELULLXXX",
9235
+ "bankName": "CEDELULLXXX-欧元账户行"
9236
+ },
9237
+ {
9238
+ "bankAcct": "DEUTDEFFXXX",
9239
+ "bankName": "DEUTDEFFXXX-欧元账户行"
9240
+ },
9241
+ {
9242
+ "bankAcct": "ICBKCNBJBJM",
9243
+ "bankName": "ICBKCNBJBJM-欧元账户行"
9244
+ },
9245
+ {
9246
+ "bankAcct": "ICBKDEFFXXX",
9247
+ "bankName": "ICBKDEFFXXX-欧元账户行"
9248
+ },
9249
+ {
9250
+ "bankAcct": "HSBCHKHHHKH",
9251
+ "bankName": "HSBCHKHHHKH-港元主账户行"
9252
+ },
9253
+ {
9254
+ "bankAcct": "CEDELULLXXX",
9255
+ "bankName": "CEDELULLXXX-港元账户行"
9256
+ },
9257
+ {
9258
+ "bankAcct": "PCBCCNBJXXX",
9259
+ "bankName": "PCBCCNBJXXX-港元账户行"
9260
+ },
9261
+ {
9262
+ "bankAcct": "SCBLHKHHXXX",
9263
+ "bankName": "SCBLHKHHXXX-港元账户行"
9264
+ },
9265
+ {
9266
+ "bankAcct": "ANZBAU3MXXX",
9267
+ "bankName": "ANZBAU3MXXX-澳元主帐户行"
9268
+ },
9269
+ {
9270
+ "bankAcct": "SPDBCNSHXXX",
9271
+ "bankName": "SPDBCNSHXXX-澳大利亚元账户行"
9272
+ },
9273
+ {
9274
+ "bankAcct": "ICBKCNBJXXX",
9275
+ "bankName": "ICBKCNBJXXX-瑞典克朗主账户行"
9276
+ },
9277
+ {
9278
+ "bankAcct": "ICBKCNBJXXX",
9279
+ "bankName": "ICBKCNBJXXX-瑞士法郎主账户行"
9280
+ },
9281
+ {
9282
+ "bankAcct": "SPDBCNSHXXX",
9283
+ "bankName": "SPDBCNSHXXX-瑞士法郎账户行"
9284
+ },
9285
+ {
9286
+ "bankAcct": "CITIUS33XXX",
9287
+ "bankName": "CITIUS33XXX-美元主账户行"
9288
+ },
9289
+ {
9290
+ "bankAcct": "BKCHCNBJ110",
9291
+ "bankName": "BKCHCNBJ110-美元账户行"
9292
+ },
9293
+ {
9294
+ "bankAcct": "BKCHHKHHXXX",
9295
+ "bankName": "BKCHHKHHXXX-美元账户行"
9296
+ },
9297
+ {
9298
+ "bankAcct": "BKTRUS33XXX",
9299
+ "bankName": "BKTRUS33XXX-美元账户行"
9300
+ },
9301
+ {
9302
+ "bankAcct": "CEDELULLXXX",
9303
+ "bankName": "CEDELULLXXX-美元账户行"
9304
+ },
9305
+ {
9306
+ "bankAcct": "MRMDUS33XXX",
9307
+ "bankName": "MRMDUS33XXX-美元账户行"
9308
+ },
9309
+ {
9310
+ "bankAcct": "PNBPUS3NNYC",
9311
+ "bankName": "PNBPUS3NNYC-美元账户行"
9312
+ },
9313
+ {
9314
+ "bankAcct": "BARCGB22XXX",
9315
+ "bankName": "BARCGB22XXX-英镑主账户行"
9316
+ },
9317
+ {
9318
+ "bankAcct": "SPDBCNSHXXX",
9319
+ "bankName": "SPDBCNSHXXX-英镑账户行"
9320
+ },
9321
+ {
9322
+ "bankAcct": "CS0101",
9323
+ "bankName": "CS0101-账户行行名"
9324
+ },
9325
+ {
9326
+ "bankAcct": "ZHHHH11",
9327
+ "bankName": "ZHHHH11-账户行行名"
9328
+ },
9329
+ {
9330
+ "bankAcct": "1234",
9331
+ "bankName": "1234-驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器二无群二驱蚊器"
9332
+ }
9333
+ ]
9334
+ }
9335
+ }
9160
9336
  ```
9161
9337
 
9162
9338
  ### 返回结果
@@ -60579,4 +60755,3 @@ Tam142207001Out
60579
60755
  |---|---|---|---|---|---|
60580
60756
  |body|[Tam120207001Out.Body](#schematam120207001out.body)|false|none||none|
60581
60757
  |head|[HeadOut](#schemaheadout)|false|none||none|
60582
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -0,0 +1,61 @@
1
+ import baseHttpClient, {
2
+ type HttpRequestOptions,
3
+ type TamResponse,
4
+ } from '@/utils/baseHttpClient'
5
+
6
+ const ACCOUNT_BANK_QUERY_TRAN_CODE = '/TAM/0001/140206018'
7
+
8
+ export type AccountBankQuery = {
9
+ acctType?: string
10
+ ccy?: string
11
+ zmqFlag?: string
12
+ }
13
+
14
+ export type AccountBankOption = {
15
+ bankAcct: string
16
+ bankName: string
17
+ }
18
+
19
+ type AccountBankResponseBody = {
20
+ resultInfos?: Array<Partial<AccountBankOption>>
21
+ }
22
+
23
+ export async function queryAccountBanks(
24
+ params: AccountBankQuery = {},
25
+ options?: HttpRequestOptions,
26
+ ) {
27
+ const response = await baseHttpClient.post<TamResponse<AccountBankResponseBody>>(
28
+ ACCOUNT_BANK_QUERY_TRAN_CODE,
29
+ {
30
+ acctType: String(params.acctType ?? '').trim(),
31
+ ccy: String(params.ccy ?? '').trim(),
32
+ zmqFlag: String(params.zmqFlag ?? '').trim(),
33
+ },
34
+ options,
35
+ )
36
+
37
+ if (!Array.isArray(response.body.resultInfos)) {
38
+ throw new Error('账户行接口返回结构不正确')
39
+ }
40
+
41
+ const result: AccountBankOption[] = []
42
+ const seen = new Set<string>()
43
+
44
+ response.body.resultInfos.forEach((row) => {
45
+ const bankAcct = String(row.bankAcct ?? '').trim()
46
+ const bankName = String(row.bankName ?? '').trim()
47
+ if (!bankAcct) return
48
+
49
+ const option = {
50
+ bankAcct,
51
+ bankName: bankName || bankAcct,
52
+ }
53
+ const optionKey = `${option.bankAcct}\u0000${option.bankName}`
54
+ if (seen.has(optionKey)) return
55
+
56
+ seen.add(optionKey)
57
+ result.push(option)
58
+ })
59
+
60
+ return result
61
+ }
@@ -0,0 +1,142 @@
1
+ <script setup lang="ts">
2
+ import { computed, onBeforeUnmount, ref, watch } from 'vue'
3
+ import { ElMessage } from 'element-plus'
4
+ import {
5
+ queryAccountBanks,
6
+ type AccountBankOption,
7
+ } from '@/api/account-bank'
8
+
9
+ const props = withDefaults(
10
+ defineProps<{
11
+ modelValue: string
12
+ currency?: string
13
+ accountType?: string
14
+ mainAccountFlag?: string
15
+ disabled?: boolean
16
+ clearable?: boolean
17
+ placeholder?: string
18
+ size?: 'small' | 'default' | 'large'
19
+ appendTo?: HTMLElement
20
+ }>(),
21
+ {
22
+ currency: '',
23
+ accountType: '',
24
+ mainAccountFlag: '',
25
+ disabled: false,
26
+ clearable: true,
27
+ placeholder: '请选择账户行',
28
+ size: 'default',
29
+ appendTo: undefined,
30
+ },
31
+ )
32
+
33
+ const emit = defineEmits<{
34
+ 'update:modelValue': [value: string]
35
+ change: [value: string]
36
+ }>()
37
+
38
+ const options = ref<AccountBankOption[]>([])
39
+ const loading = ref(false)
40
+ const loadedQueryKey = ref('')
41
+ let requestController: AbortController | null = null
42
+ let requestVersion = 0
43
+
44
+ const queryKey = computed(() => [
45
+ props.accountType.trim(),
46
+ props.currency.trim(),
47
+ props.mainAccountFlag.trim(),
48
+ ].join('\u0000'))
49
+
50
+ const selectOptions = computed(() => {
51
+ const currentValue = props.modelValue.trim()
52
+ if (!currentValue || options.value.some((option) => option.bankAcct === currentValue)) {
53
+ return options.value
54
+ }
55
+
56
+ return [
57
+ {
58
+ bankAcct: currentValue,
59
+ bankName: currentValue,
60
+ },
61
+ ...options.value,
62
+ ]
63
+ })
64
+
65
+ async function loadOptions() {
66
+ if (loading.value || loadedQueryKey.value === queryKey.value) return
67
+
68
+ requestController?.abort()
69
+ const controller = new AbortController()
70
+ const currentVersion = ++requestVersion
71
+ requestController = controller
72
+ loading.value = true
73
+
74
+ try {
75
+ const result = await queryAccountBanks(
76
+ {
77
+ acctType: props.accountType,
78
+ ccy: props.currency,
79
+ zmqFlag: props.mainAccountFlag,
80
+ },
81
+ { signal: controller.signal },
82
+ )
83
+
84
+ if (controller.signal.aborted || currentVersion !== requestVersion) return
85
+ options.value = result
86
+ loadedQueryKey.value = queryKey.value
87
+ } catch (error) {
88
+ if (controller.signal.aborted || currentVersion !== requestVersion) return
89
+ ElMessage.error(error instanceof Error ? error.message : '账户行查询失败')
90
+ } finally {
91
+ if (currentVersion === requestVersion) {
92
+ requestController = null
93
+ loading.value = false
94
+ }
95
+ }
96
+ }
97
+
98
+ function handleVisibleChange(visible: boolean) {
99
+ if (visible) void loadOptions()
100
+ }
101
+
102
+ function handleChange(value: string) {
103
+ emit('update:modelValue', value)
104
+ emit('change', value)
105
+ }
106
+
107
+ watch(queryKey, () => {
108
+ requestController?.abort()
109
+ requestController = null
110
+ requestVersion += 1
111
+ loading.value = false
112
+ loadedQueryKey.value = ''
113
+ options.value = []
114
+ })
115
+
116
+ onBeforeUnmount(() => {
117
+ requestController?.abort()
118
+ })
119
+ </script>
120
+
121
+ <template>
122
+ <el-select
123
+ :model-value="modelValue"
124
+ :append-to="appendTo"
125
+ :disabled="disabled"
126
+ :loading="loading"
127
+ :clearable="clearable"
128
+ :placeholder="placeholder"
129
+ :size="size"
130
+ filterable
131
+ :persistent="false"
132
+ @update:model-value="handleChange"
133
+ @visible-change="handleVisibleChange"
134
+ >
135
+ <el-option
136
+ v-for="option in selectOptions"
137
+ :key="`${option.bankAcct}-${option.bankName}`"
138
+ :label="option.bankName"
139
+ :value="option.bankAcct"
140
+ />
141
+ </el-select>
142
+ </template>
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <span
3
+ v-if="currencyCode"
4
+ class="token-tag"
5
+ :style="tagStyle"
6
+ :title="displayLabel"
7
+ :aria-label="displayLabel"
8
+ >
9
+ <span class="token-tag__code">{{ currencyCode }}</span>
10
+ <span v-if="!compact && currencyName" class="token-tag__name">
11
+ {{ currencyName }}
12
+ </span>
13
+ </span>
14
+ </template>
15
+
16
+ <script setup name="TokenTag">
17
+ import { computed } from "vue"
18
+
19
+ const DEFAULT_COLOR = "#667085"
20
+
21
+ const currencyMap = {
22
+ CNY: { name: "人民币", color: "#C7372F" },
23
+ USD: { name: "美元", color: "#277A53" },
24
+ HKD: { name: "港元", color: "#9F2147" },
25
+ EUR: { name: "欧元", color: "#1F5AA6" },
26
+ AUD: { name: "澳大利亚元", color: "#B26A00" },
27
+ CHF: { name: "瑞士法郎", color: "#D52B1E" },
28
+ GBP: { name: "英镑", color: "#243B6B" },
29
+ CAD: { name: "加拿大元", color: "#C91F37" },
30
+ NZD: { name: "新西兰元", color: "#1F365C" },
31
+ SGD: { name: "新加坡元", color: "#D0342C" },
32
+ JPY: { name: "日元", color: "#BC002D" },
33
+ SEK: { name: "瑞典克朗", color: "#006AA7" },
34
+ NOK: { name: "挪威克朗", color: "#BA0C2F" },
35
+ DKK: { name: "丹麦克朗", color: "#C8102E" },
36
+ KZT: { name: "哈萨克斯坦坚戈", color: "#0095C8" }
37
+ }
38
+
39
+ const props = defineProps({
40
+ value: {
41
+ type: [String, Number],
42
+ required: true
43
+ },
44
+ // 紧凑模式下只展示币种代码,适合空间有限的表格列。
45
+ compact: {
46
+ type: Boolean,
47
+ default: false
48
+ }
49
+ })
50
+
51
+ const currencyCode = computed(() => String(props.value ?? "").trim().toUpperCase())
52
+ const currency = computed(() => currencyMap[currencyCode.value])
53
+ const currencyName = computed(() => currency.value?.name ?? "")
54
+ const displayLabel = computed(() => {
55
+ return currencyName.value
56
+ ? `${currencyCode.value} ${currencyName.value}`
57
+ : currencyCode.value
58
+ })
59
+
60
+ const tagStyle = computed(() => {
61
+ const color = currency.value?.color ?? DEFAULT_COLOR
62
+
63
+ return {
64
+ "--token-tag-color": color,
65
+ "--token-tag-background": `${color}14`,
66
+ "--token-tag-border": `${color}2E`
67
+ }
68
+ })
69
+ </script>
70
+
71
+ <style scoped>
72
+ .token-tag {
73
+ display: inline-flex;
74
+ width: 160px;
75
+ align-items: center;
76
+ justify-content: center;
77
+ gap: 6px;
78
+ padding: 3px 9px;
79
+ color: var(--token-tag-color);
80
+ background: var(--token-tag-background);
81
+ border: 1px solid var(--token-tag-border);
82
+ border-radius: 999px;
83
+ box-sizing: border-box;
84
+ font-size: 12px;
85
+ line-height: 18px;
86
+ text-align: center;
87
+ white-space: nowrap;
88
+ vertical-align: middle;
89
+ }
90
+
91
+ .token-tag__code {
92
+ flex: none;
93
+ font-weight: 650;
94
+ letter-spacing: 0.04em;
95
+ font-variant-numeric: tabular-nums;
96
+ }
97
+
98
+ .token-tag__name {
99
+ min-width: 0;
100
+ overflow: hidden;
101
+ opacity: 0.82;
102
+ text-overflow: ellipsis;
103
+ }
104
+ </style>
@@ -1,5 +1,6 @@
1
1
  import type { App, Component } from 'vue'
2
2
 
3
+ import TokenTag from './business/Public/TokenTag.vue'
3
4
  import ElButtonPro from './element-rewrite/ElButtonPro.vue'
4
5
  import ElFormDialog from './element-rewrite/ElFormDialog.vue'
5
6
  import ElInputThousandth from './element-rewrite/ElInputThousandth.vue'
@@ -18,6 +19,13 @@ type GlobalComponentDefinition = {
18
19
  }
19
20
 
20
21
  const globalComponentDefinitions: GlobalComponentDefinition[] = [
22
+ {
23
+ name: 'TokenTag',
24
+ component: TokenTag,
25
+ category: '展示组件',
26
+ description: '根据币种代码展示对应币种名称和主题颜色标签。',
27
+ filePath: 'src/components/business/Public/TokenTag.vue',
28
+ },
21
29
  {
22
30
  name: 'ElButtonPro',
23
31
  component: ElButtonPro,
@@ -9,6 +9,7 @@ import {
9
9
  RefreshLeft,
10
10
  Search,
11
11
  } from '@element-plus/icons-vue'
12
+ import AccountBankSelect from '@/components/business/AccountBankSelect.vue'
12
13
  import API from './api'
13
14
  import { toAuthorizationRow } from './adapter'
14
15
  import {
@@ -177,7 +178,7 @@ async function handleReview(action: 'approve' | 'reject') {
177
178
  return
178
179
  }
179
180
  if (!nostro) {
180
- ElMessage.warning('请输入账户行')
181
+ ElMessage.warning('请选择账户行')
181
182
  return
182
183
  }
183
184
  if (!detailEditForm.valueDate) {
@@ -547,13 +548,12 @@ onBeforeUnmount(() => {
547
548
  {{ detailRecord.rdfibic }}
548
549
  </el-descriptions-item>
549
550
  <el-descriptions-item label="账户行" :span="3">
550
- <el-input
551
+ <AccountBankSelect
551
552
  v-model="detailEditForm.nostro"
552
553
  class="detail-edit-control"
553
- maxlength="160"
554
- placeholder="请输入账户行"
554
+ :currency="detailRecord.currency"
555
+ placeholder="请选择账户行"
555
556
  size="small"
556
- clearable
557
557
  />
558
558
  </el-descriptions-item>
559
559
  <el-descriptions-item label="是否退汇">
@@ -2,6 +2,7 @@
2
2
  import { computed, nextTick, reactive, ref } from 'vue'
3
3
  import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
4
4
  import { ArrowLeft, Check, Search } from '@element-plus/icons-vue'
5
+ import AccountBankSelect from '@/components/business/AccountBankSelect.vue'
5
6
  import { searchForeignPositionClients } from '../api'
6
7
  import type { ForecastEditorMode, ForecastEditorValue } from '../editor'
7
8
  import {
@@ -235,33 +236,6 @@ const currentForecastType = computed<ForecastType>(() => {
235
236
  return 'PT03'
236
237
  })
237
238
 
238
- const currencyClearingBanks: Record<string, string> = {
239
- USD: '中国银行纽约分行',
240
- EUR: '中国银行法兰克福分行',
241
- HKD: '中国银行香港分行',
242
- JPY: '中国银行东京分行',
243
- GBP: '中国银行伦敦分行',
244
- SGD: '中国银行新加坡分行',
245
- AUD: '中国银行悉尼分行',
246
- CAD: '中国银行多伦多分行',
247
- CHF: '中国银行苏黎世分行',
248
- }
249
-
250
- const availableBankAccounts = computed(() => {
251
- if (bankAccountDisabled.value) return []
252
-
253
- const directBank = currencyClearingBanks[form.currency] ?? `${form.currency} 境外清算行`
254
- const routeBanks: Record<PaymentRoute, string[]> = {
255
- '01': [directBank],
256
- '02': [`总行${form.currency}转汇清算账户`, directBank],
257
- '03': [`${form.groundBranch}${form.currency}内部清算账户`],
258
- }
259
- const options = [...(routeBanks[form.paymentRoute as PaymentRoute] ?? [])]
260
-
261
- if (form.bankAccount && !options.includes(form.bankAccount)) options.unshift(form.bankAccount)
262
- return options
263
- })
264
-
265
239
  const formRules = computed<FormRules>(() => ({
266
240
  businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
267
241
  payDirection: isLegacyFieldRequired('payDirection')
@@ -698,14 +672,12 @@ async function handleSubmit() {
698
672
  </el-form-item>
699
673
 
700
674
  <el-form-item label="我方账户行" prop="bankAccount">
701
- <el-select
675
+ <AccountBankSelect
702
676
  v-model="form.bankAccount"
703
- filterable
677
+ :currency="form.currency"
704
678
  :disabled="bankAccountDisabled"
705
679
  :placeholder="bankAccountDisabled ? '请先选择汇款路径' : '请选择'"
706
- >
707
- <el-option v-for="bank in availableBankAccounts" :key="bank" :label="bank" :value="bank" />
708
- </el-select>
680
+ />
709
681
  </el-form-item>
710
682
 
711
683
  <el-form-item label="交易对手 SwiftCode">