verce-vue-test 0.0.103 → 0.0.105

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
Binary file
package/src/App.vue CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  TrendCharts,
17
17
  Bell,
18
18
  Search,
19
+ OfficeBuilding,
19
20
  } from '@element-plus/icons-vue'
20
21
 
21
22
  const isCollapse = ref(false)
@@ -47,9 +48,11 @@ const searchableMenus: MenuSearchItem[] = [
47
48
  { value: '外币授权', path: '/foreign-currency-authorization' },
48
49
  { value: '外币手工核销', path: '/foreign-currency-settlement' },
49
50
  { value: '外币资金调拨', path: '/foreign-currency-fund-allocation' },
51
+ { value: '自贸区机构管理', path: '/free-trade-zone-organization-management' },
50
52
  { value: '预报员页看板', path: '/position-forecast-execution' },
51
53
  { value: '人民币手工核销', path: '/forecast-info' },
52
- { value: '人民币头寸匡算', path: '/rmb-position-estimation' },
54
+ { value: '人民币匡算报表', path: '/rmb-position-estimation' },
55
+ { value: '人民币匡算', path: '/rmb-estimation' },
53
56
  { value: '资金驾驶舱', path: '/fund-cockpit' },
54
57
  { value: '通知公告', path: '/notice-announcement' },
55
58
  { value: '占位符页面', path: '/placeholder' },
@@ -164,7 +167,10 @@ function toggleCollapse() {
164
167
  <span>人民币手工核销</span>
165
168
  </el-menu-item>
166
169
  <el-menu-item index="/rmb-position-estimation">
167
- <span>人民币头寸匡算</span>
170
+ <span>人民币匡算报表</span>
171
+ </el-menu-item>
172
+ <el-menu-item index="/rmb-estimation">
173
+ <span>人民币匡算</span>
168
174
  </el-menu-item>
169
175
  </el-sub-menu>
170
176
  <el-sub-menu index="foreign-currency">
@@ -185,6 +191,10 @@ function toggleCollapse() {
185
191
  <span>外币资金调拨</span>
186
192
  </el-menu-item>
187
193
  </el-sub-menu>
194
+ <el-menu-item index="/free-trade-zone-organization-management">
195
+ <el-icon><OfficeBuilding /></el-icon>
196
+ <span>自贸区机构管理</span>
197
+ </el-menu-item>
188
198
  <el-menu-item index="/notice-announcement">
189
199
  <el-icon><Bell /></el-icon>
190
200
  <span>通知公告</span>
@@ -95,6 +95,11 @@ const router = createRouter({
95
95
  name: 'foreignCurrencyFundAllocation',
96
96
  component: () => import('../views/foreign-currency-fund-allocation/index.vue'),
97
97
  },
98
+ {
99
+ path: '/free-trade-zone-organization-management',
100
+ name: 'freeTradeZoneOrganizationManagement',
101
+ component: () => import('../views/free-trade-zone-organization-management/index.vue'),
102
+ },
98
103
  {
99
104
  path: '/position-forecast-execution',
100
105
  name: 'positionForecastExecution',
@@ -110,6 +115,11 @@ const router = createRouter({
110
115
  name: 'rmbPositionEstimation',
111
116
  component: () => import('../views/rmb-position-estimation/index.vue'),
112
117
  },
118
+ {
119
+ path: '/rmb-estimation',
120
+ name: 'rmbEstimation',
121
+ component: () => import('../views/rmb-estimation/index.vue'),
122
+ },
113
123
  {
114
124
  path: '/fund-cockpit',
115
125
  name: 'fundCockpit',
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <div class="free-trade-zone-organization-management-page"></div>
3
+ </template>
@@ -0,0 +1,418 @@
1
+ <script setup lang="ts">
2
+ import { onBeforeUnmount, onMounted, ref } from 'vue'
3
+ import { ArrowLeft, InfoFilled, Search } from '@element-plus/icons-vue'
4
+ import { ElMessage } from 'element-plus'
5
+ import { formatThousands } from '@/utils/formatters'
6
+ import {
7
+ queryEndOfDayBorrowingEstimation,
8
+ type EndOfDayBorrowingEstimationResult,
9
+ } from './api'
10
+
11
+ const emit = defineEmits<{
12
+ back: []
13
+ }>()
14
+
15
+ type LedgerItem = {
16
+ key: keyof EndOfDayBorrowingEstimationResult
17
+ label: string
18
+ description: string
19
+ tone?: 'income' | 'expense'
20
+ }
21
+
22
+ const ledgerItems: LedgerItem[] = [
23
+ {
24
+ key: 'fzAmt',
25
+ label: '法定准备金',
26
+ description: '法定准备金金额',
27
+ },
28
+ {
29
+ key: 'pdAmt',
30
+ label: '总分行铺底资金之和',
31
+ description: '总行及各分行铺底资金合计',
32
+ },
33
+ {
34
+ key: 'rhAmt',
35
+ label: '人行时点头寸',
36
+ description: '人民银行时点头寸金额',
37
+ },
38
+ {
39
+ key: 'rzAmt',
40
+ label: '日终头寸',
41
+ description: '日终时点头寸金额',
42
+ },
43
+ {
44
+ key: 'unverifyAmtIn',
45
+ label: '预报未核销收入金额',
46
+ description: '已预报但尚未核销的收入金额',
47
+ tone: 'income',
48
+ },
49
+ {
50
+ key: 'unverifyAmtOut',
51
+ label: '预报未核销支出金额',
52
+ description: '已预报但尚未核销的支出金额',
53
+ tone: 'expense',
54
+ },
55
+ ]
56
+
57
+ const loading = ref(false)
58
+ const result = ref<EndOfDayBorrowingEstimationResult>({})
59
+ let requestController: AbortController | null = null
60
+
61
+ function displayAmount(value: string | undefined) {
62
+ return formatThousands(value, '--')
63
+ }
64
+
65
+ function isNegative(value: string | undefined) {
66
+ const normalizedValue = String(value ?? '').replace(/,/g, '').trim()
67
+ return /^-\d+(?:\.\d+)?$/.test(normalizedValue)
68
+ }
69
+
70
+ async function loadResult() {
71
+ requestController?.abort()
72
+ const controller = new AbortController()
73
+ requestController = controller
74
+ loading.value = true
75
+
76
+ try {
77
+ const response = await queryEndOfDayBorrowingEstimation({ signal: controller.signal })
78
+ if (controller.signal.aborted || requestController !== controller) return
79
+ result.value = response.body ?? {}
80
+ } catch (error) {
81
+ if (error instanceof DOMException && error.name === 'AbortError') return
82
+ ElMessage.error(error instanceof Error ? error.message : '日终拆借数匡算查询失败')
83
+ } finally {
84
+ if (requestController === controller) {
85
+ loading.value = false
86
+ requestController = null
87
+ }
88
+ }
89
+ }
90
+
91
+ onMounted(loadResult)
92
+ onBeforeUnmount(() => requestController?.abort())
93
+ </script>
94
+
95
+ <template>
96
+ <section
97
+ v-loading="loading"
98
+ class="borrowing-estimation-page"
99
+ element-loading-text="正在查询日终拆借数匡算结果…"
100
+ >
101
+ <header class="page-toolbar">
102
+ <el-button class="back-button" :icon="ArrowLeft" @click="emit('back')">返回</el-button>
103
+ <div class="title-wrap">
104
+ <h2 class="page-title">日终拆借数匡算</h2>
105
+ <span class="tran-code">TAM · 140103003</span>
106
+ </div>
107
+ <el-button
108
+ class="query-button"
109
+ type="primary"
110
+ :icon="Search"
111
+ :loading="loading"
112
+ @click="loadResult"
113
+ >
114
+ 重新查询
115
+ </el-button>
116
+ </header>
117
+
118
+ <section class="primary-result">
119
+ <span class="primary-label">日终拆借数</span>
120
+ <div class="primary-amount">
121
+ <strong class="primary-value">{{ displayAmount(result.cjAmt) }}</strong>
122
+ <span class="primary-unit">元</span>
123
+ </div>
124
+ </section>
125
+
126
+ <section class="ledger-panel">
127
+ <header class="ledger-heading">
128
+ <h3>TAM交易明细</h3>
129
+ <span>(TAM交易号:140103003)</span>
130
+ </header>
131
+
132
+ <div class="ledger-table">
133
+ <div class="ledger-row ledger-row--head">
134
+ <span>项目</span>
135
+ <span>说明</span>
136
+ <span>金额(元)</span>
137
+ </div>
138
+
139
+ <div
140
+ v-for="(item, index) in ledgerItems"
141
+ :key="item.key"
142
+ class="ledger-row"
143
+ >
144
+ <div class="ledger-name">
145
+ <span class="item-order">{{ index + 1 }}</span>
146
+ <strong>{{ item.label }}</strong>
147
+ </div>
148
+ <span class="ledger-description">{{ item.description }}</span>
149
+ <div
150
+ class="ledger-amount"
151
+ :class="{
152
+ 'ledger-amount--income': item.tone === 'income',
153
+ 'ledger-amount--expense': item.tone === 'expense',
154
+ 'ledger-amount--negative': !item.tone && isNegative(result[item.key]),
155
+ }"
156
+ >
157
+ <strong>{{ displayAmount(result[item.key]) }}</strong>
158
+ <span>元</span>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <footer class="ledger-footer">
164
+ <el-icon><InfoFilled /></el-icon>
165
+ <span>数据来源:TAM 交易 140103003,页面金额单位为元</span>
166
+ </footer>
167
+ </section>
168
+ </section>
169
+ </template>
170
+
171
+ <style scoped>
172
+ .borrowing-estimation-page {
173
+ min-height: 620px;
174
+ color: #102757;
175
+ background: #f8fbff;
176
+ }
177
+
178
+ .page-toolbar {
179
+ display: grid;
180
+ grid-template-columns: 1fr auto 1fr;
181
+ align-items: center;
182
+ gap: 24px;
183
+ min-height: 88px;
184
+ padding: 0 2px;
185
+ }
186
+
187
+ .page-toolbar > :last-child {
188
+ justify-self: end;
189
+ }
190
+
191
+ .back-button,
192
+ .query-button {
193
+ min-height: 42px;
194
+ padding-inline: 20px;
195
+ border-radius: 6px;
196
+ font-size: 15px;
197
+ }
198
+
199
+ .title-wrap {
200
+ text-align: center;
201
+ }
202
+
203
+ .page-title {
204
+ margin: 0;
205
+ color: #0d3479;
206
+ font: 700 30px/1.2 "PingFang SC", "Microsoft YaHei", sans-serif;
207
+ letter-spacing: 0.04em;
208
+ }
209
+
210
+ .tran-code {
211
+ display: block;
212
+ width: max-content;
213
+ margin: 7px auto 0;
214
+ padding: 4px 14px;
215
+ border-radius: 999px;
216
+ color: #2e65b4;
217
+ background: #eaf2ff;
218
+ font: 500 13px/1.3 "DIN Alternate", "Microsoft YaHei", sans-serif;
219
+ letter-spacing: 0.04em;
220
+ }
221
+
222
+ .primary-result {
223
+ display: grid;
224
+ grid-template-columns: minmax(180px, 0.55fr) minmax(320px, 1.45fr);
225
+ align-items: center;
226
+ min-height: 168px;
227
+ padding: 28px 52px;
228
+ border-radius: 6px 6px 0 0;
229
+ color: #fff;
230
+ background: #0b3f92;
231
+ }
232
+
233
+ .primary-label {
234
+ padding-left: 4px;
235
+ font-size: 24px;
236
+ font-weight: 700;
237
+ }
238
+
239
+ .primary-amount {
240
+ display: flex;
241
+ align-items: baseline;
242
+ justify-content: flex-end;
243
+ gap: 12px;
244
+ min-width: 0;
245
+ }
246
+
247
+ .primary-value {
248
+ max-width: 100%;
249
+ overflow-wrap: anywhere;
250
+ font: 700 clamp(36px, 5vw, 60px)/1.05 "DIN Alternate", Consolas, monospace;
251
+ letter-spacing: 0.01em;
252
+ }
253
+
254
+ .primary-unit {
255
+ flex: 0 0 auto;
256
+ color: #dbeafe;
257
+ font-size: 20px;
258
+ }
259
+
260
+ .ledger-panel {
261
+ overflow: hidden;
262
+ border: 1px solid #d9e4f5;
263
+ border-top: 0;
264
+ border-radius: 0 0 6px 6px;
265
+ background: #fff;
266
+ box-shadow: 0 10px 30px rgba(29, 78, 150, 0.08);
267
+ }
268
+
269
+ .ledger-heading {
270
+ display: flex;
271
+ align-items: baseline;
272
+ gap: 8px;
273
+ padding: 30px 36px 15px;
274
+ }
275
+
276
+ .ledger-heading h3 {
277
+ margin: 0;
278
+ color: #163d78;
279
+ font-size: 20px;
280
+ }
281
+
282
+ .ledger-heading span {
283
+ color: #62789b;
284
+ font-size: 14px;
285
+ }
286
+
287
+ .ledger-table {
288
+ padding: 0 36px;
289
+ }
290
+
291
+ .ledger-row {
292
+ display: grid;
293
+ grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.3fr) minmax(220px, 0.8fr);
294
+ align-items: center;
295
+ gap: 24px;
296
+ min-height: 72px;
297
+ border-top: 1px dashed #dce5f2;
298
+ }
299
+
300
+ .ledger-row--head {
301
+ min-height: 58px;
302
+ border-top-style: solid;
303
+ border-top-color: #cbdaf0;
304
+ border-bottom: 1px solid #cbdaf0;
305
+ color: #183c74;
306
+ font-size: 14px;
307
+ font-weight: 700;
308
+ }
309
+
310
+ .ledger-row--head > :last-child {
311
+ text-align: right;
312
+ }
313
+
314
+ .ledger-name {
315
+ display: flex;
316
+ align-items: center;
317
+ gap: 16px;
318
+ }
319
+
320
+ .ledger-name strong {
321
+ color: #18345f;
322
+ font-size: 15px;
323
+ }
324
+
325
+ .item-order {
326
+ display: inline-grid;
327
+ width: 28px;
328
+ height: 28px;
329
+ flex: 0 0 28px;
330
+ place-items: center;
331
+ border-radius: 50%;
332
+ color: #fff;
333
+ background: #2777df;
334
+ font: 700 13px/1 "DIN Alternate", sans-serif;
335
+ }
336
+
337
+ .ledger-description {
338
+ color: #61789c;
339
+ font-size: 14px;
340
+ }
341
+
342
+ .ledger-amount {
343
+ display: flex;
344
+ align-items: baseline;
345
+ justify-content: flex-end;
346
+ gap: 8px;
347
+ min-width: 0;
348
+ color: #18345f;
349
+ text-align: right;
350
+ }
351
+
352
+ .ledger-amount strong {
353
+ overflow-wrap: anywhere;
354
+ font: 600 20px/1.2 "DIN Alternate", Consolas, monospace;
355
+ }
356
+
357
+ .ledger-amount span {
358
+ color: #56729c;
359
+ font-size: 14px;
360
+ }
361
+
362
+ .ledger-amount--income {
363
+ color: #07895b;
364
+ }
365
+
366
+ .ledger-amount--expense,
367
+ .ledger-amount--negative {
368
+ color: #d92c2c;
369
+ }
370
+
371
+ .ledger-footer {
372
+ display: flex;
373
+ align-items: center;
374
+ gap: 10px;
375
+ min-height: 58px;
376
+ margin-top: 8px;
377
+ padding: 0 36px;
378
+ color: #5d769b;
379
+ background: #f0f6ff;
380
+ font-size: 13px;
381
+ }
382
+
383
+ .ledger-footer .el-icon {
384
+ color: #2777df;
385
+ font-size: 18px;
386
+ }
387
+
388
+ @media screen and (max-width: 980px) {
389
+ .borrowing-estimation-page {
390
+ overflow-x: auto;
391
+ }
392
+
393
+ .primary-result,
394
+ .ledger-panel {
395
+ min-width: 820px;
396
+ }
397
+ }
398
+
399
+ @media screen and (max-width: 680px) {
400
+ .page-toolbar {
401
+ grid-template-columns: 1fr auto;
402
+ min-width: 0;
403
+ }
404
+
405
+ .page-title {
406
+ display: none;
407
+ }
408
+
409
+ .tran-code {
410
+ margin: 0;
411
+ }
412
+
413
+ .back-button,
414
+ .query-button {
415
+ padding-inline: 14px;
416
+ }
417
+ }
418
+ </style>