verce-vue-test 0.0.78 → 0.0.80
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/App.vue +5 -0
- package/src/router/index.ts +5 -0
- package/src/views/ForecastInfo/api.ts +60 -0
- package/src/views/ForecastInfo/components/FlowInfoPanel.vue +33 -6
- package/src/views/ForecastInfo/components/ForecastInfoPanel.vue +25 -15
- package/src/views/ForecastInfo/store.ts +62 -497
- package/src/views/rmb-position-estimation/README.md +543 -0
- package/src/views/rmb-position-estimation/index.vue +3 -2
- package/src/views/rmb-position-forecast/index.vue +1496 -0
- package/src/views/rmb-position-forecast/mock.ts +165 -0
- package/src/views/rmb-position-forecast/options.ts +82 -0
- package/src/views/rmb-position-forecast/types.ts +110 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -40,6 +40,7 @@ const searchableMenus: MenuSearchItem[] = [
|
|
|
40
40
|
{ value: '千分位输入', path: '/thousandth' },
|
|
41
41
|
{ value: '数字区间', path: '/number-range' },
|
|
42
42
|
{ value: '头寸预报', path: '/position-forecast' },
|
|
43
|
+
{ value: '人民币头寸预报', path: '/rmb-position-forecast' },
|
|
43
44
|
{ value: '外币头寸预报', path: '/foreign-currency-position-forecast' },
|
|
44
45
|
{ value: '头寸预报执行', path: '/position-forecast-execution' },
|
|
45
46
|
{ value: '预报信息', path: '/forecast-info' },
|
|
@@ -132,6 +133,10 @@ function toggleCollapse() {
|
|
|
132
133
|
<el-icon><DataLine /></el-icon>
|
|
133
134
|
<span>头寸预报</span>
|
|
134
135
|
</el-menu-item>
|
|
136
|
+
<el-menu-item index="/rmb-position-forecast">
|
|
137
|
+
<el-icon><DataLine /></el-icon>
|
|
138
|
+
<span>人民币头寸预报</span>
|
|
139
|
+
</el-menu-item>
|
|
135
140
|
<el-menu-item index="/foreign-currency-position-forecast">
|
|
136
141
|
<el-icon><DataLine /></el-icon>
|
|
137
142
|
<span>外币头寸预报</span>
|
package/src/router/index.ts
CHANGED
|
@@ -70,6 +70,11 @@ const router = createRouter({
|
|
|
70
70
|
name: 'positionForecast',
|
|
71
71
|
component: () => import('../views/PositionForecastView.vue'),
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
path: '/rmb-position-forecast',
|
|
75
|
+
name: 'rmbPositionForecast',
|
|
76
|
+
component: () => import('../views/rmb-position-forecast/index.vue'),
|
|
77
|
+
},
|
|
73
78
|
{
|
|
74
79
|
path: '/foreign-currency-position-forecast',
|
|
75
80
|
name: 'foreignCurrencyPositionForecast',
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import baseHttpClient, { type TamResponse } from '@/utils/baseHttpClient'
|
|
2
|
+
import type {
|
|
3
|
+
FlowInfoQueryParams,
|
|
4
|
+
FlowInfoRow,
|
|
5
|
+
ForecastInfoOperationResult,
|
|
6
|
+
ForecastInfoQueryParams,
|
|
7
|
+
ForecastInfoRow,
|
|
8
|
+
VerificationRequestParams,
|
|
9
|
+
} from './store'
|
|
10
|
+
|
|
11
|
+
type QueryPageParams = {
|
|
12
|
+
pageNum: number
|
|
13
|
+
pageSize: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ListResponse<T> = {
|
|
17
|
+
resultList: T[]
|
|
18
|
+
totalCount: string | number
|
|
19
|
+
totalPage?: string | number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* forecast-info 页面 TAM 接口。
|
|
24
|
+
* `baseHttpClient` 负责组装 TAM 公共报文头,这里只透传业务参数。
|
|
25
|
+
*/
|
|
26
|
+
const API = {
|
|
27
|
+
/** 分页查询预报信息。 */
|
|
28
|
+
forecastQueryAPI: (params: ForecastInfoQueryParams & QueryPageParams) => {
|
|
29
|
+
return baseHttpClient.post<TamResponse<ListResponse<ForecastInfoRow>>>(
|
|
30
|
+
'/TAM/0001/140102001',
|
|
31
|
+
params,
|
|
32
|
+
)
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/** 分页查询流水信息。 */
|
|
36
|
+
flowQueryAPI: (params: FlowInfoQueryParams & QueryPageParams) => {
|
|
37
|
+
return baseHttpClient.post<TamResponse<ListResponse<FlowInfoRow>>>(
|
|
38
|
+
'/TAM/0001/140102002',
|
|
39
|
+
params,
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
/** 核销所选预报信息及关联流水信息。 */
|
|
44
|
+
verifyAPI: (params: VerificationRequestParams) => {
|
|
45
|
+
return baseHttpClient.post<TamResponse<ForecastInfoOperationResult>>(
|
|
46
|
+
'/TAM/0001/120102001',
|
|
47
|
+
params,
|
|
48
|
+
)
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
/** 撤销所选预报信息及关联流水信息的核销。 */
|
|
52
|
+
cancelVerifyAPI: (params: VerificationRequestParams) => {
|
|
53
|
+
return baseHttpClient.post<TamResponse<ForecastInfoOperationResult>>(
|
|
54
|
+
'/TAM/0001/120102002',
|
|
55
|
+
params,
|
|
56
|
+
)
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default API
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
computed,
|
|
4
|
+
onActivated,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
onDeactivated,
|
|
7
|
+
onMounted,
|
|
8
|
+
reactive,
|
|
9
|
+
ref,
|
|
10
|
+
type Component,
|
|
11
|
+
} from 'vue'
|
|
3
12
|
import { storeToRefs } from 'pinia'
|
|
4
13
|
import { FullScreen, Search } from '@element-plus/icons-vue'
|
|
5
14
|
import type { RangeValue } from '@/components/NumberRange.vue'
|
|
@@ -56,6 +65,11 @@ const statusOptions = [
|
|
|
56
65
|
{ label: '已核销', value: '2' },
|
|
57
66
|
]
|
|
58
67
|
|
|
68
|
+
/** 流水表格中的核销状态保留后端编码,展示时转换为业务文本。 */
|
|
69
|
+
const verifyStatusMap: Record<string, string> = Object.fromEntries(
|
|
70
|
+
statusOptions.map((option) => [option.value, option.label]),
|
|
71
|
+
)
|
|
72
|
+
|
|
59
73
|
/** 当前为演示机构选项;真实接口接入后替换为机构字典即可。 */
|
|
60
74
|
const groundBranchOptions = [
|
|
61
75
|
{ label: '总行营业部', value: 'head-office' },
|
|
@@ -87,12 +101,12 @@ const flowColumns: TableColumn[] = [
|
|
|
87
101
|
]
|
|
88
102
|
|
|
89
103
|
const defaultFlowForm = () => ({
|
|
90
|
-
tranDate: '2026-07-
|
|
104
|
+
tranDate: '2026-07-07',
|
|
91
105
|
payDirec: '',
|
|
92
106
|
clientName: '',
|
|
93
107
|
competName: '',
|
|
94
108
|
payChannel: '',
|
|
95
|
-
transAmtRange: [
|
|
109
|
+
transAmtRange: [100_000_000, null] as RangeValue,
|
|
96
110
|
verifyStatus: '',
|
|
97
111
|
groundBranch: '',
|
|
98
112
|
})
|
|
@@ -211,8 +225,8 @@ function buildFlowQueryParams(): FlowInfoQueryParams {
|
|
|
211
225
|
}
|
|
212
226
|
}
|
|
213
227
|
|
|
214
|
-
/**
|
|
215
|
-
async function
|
|
228
|
+
/** 查询从第一页开始;自动查询时不额外弹出成功提示。 */
|
|
229
|
+
async function queryFlowInfo(showSuccessMessage: boolean) {
|
|
216
230
|
const generation = ++flowQueryGeneration
|
|
217
231
|
flowPage.value = 1
|
|
218
232
|
const params = buildFlowQueryParams()
|
|
@@ -233,9 +247,19 @@ async function handleFlowQuery() {
|
|
|
233
247
|
if (!loaded || !isPanelActive.value || generation !== flowQueryGeneration) return
|
|
234
248
|
|
|
235
249
|
flowDrawerVisible.value = false
|
|
236
|
-
pageMessage.success('已查询流水信息')
|
|
250
|
+
if (showSuccessMessage) pageMessage.success('已查询流水信息')
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** 手动查询保留成功反馈。 */
|
|
254
|
+
function handleFlowQuery() {
|
|
255
|
+
return queryFlowInfo(true)
|
|
237
256
|
}
|
|
238
257
|
|
|
258
|
+
/** 首次进入页面即使用表单默认条件查询流水数据。 */
|
|
259
|
+
onMounted(() => {
|
|
260
|
+
void queryFlowInfo(false)
|
|
261
|
+
})
|
|
262
|
+
|
|
239
263
|
/** 只重置界面筛选条件,当前表格数据继续保留。 */
|
|
240
264
|
function handleFlowReset() {
|
|
241
265
|
resetFlowForm()
|
|
@@ -411,6 +435,9 @@ function getFlowSequence(index: number) {
|
|
|
411
435
|
<template v-if="column.prop === 'amt'" #default="{ row }">
|
|
412
436
|
{{ formatThousands(row.amt) }}
|
|
413
437
|
</template>
|
|
438
|
+
<template v-else-if="column.prop === 'verifyStatus'" #default="{ row }">
|
|
439
|
+
{{ verifyStatusMap[String(row.verifyStatus)] ?? row.verifyStatus ?? '-' }}
|
|
440
|
+
</template>
|
|
414
441
|
</el-table-column>
|
|
415
442
|
<template #empty>
|
|
416
443
|
<el-empty description="暂无数据" :image-size="54" />
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
computed,
|
|
4
|
+
onActivated,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
onDeactivated,
|
|
7
|
+
onMounted,
|
|
8
|
+
reactive,
|
|
9
|
+
ref,
|
|
10
|
+
type Component,
|
|
11
|
+
} from 'vue'
|
|
3
12
|
import { storeToRefs } from 'pinia'
|
|
4
13
|
import {
|
|
5
14
|
CircleCheck,
|
|
6
|
-
CirclePlus,
|
|
7
15
|
DataAnalysis,
|
|
8
16
|
EditPen,
|
|
9
17
|
FullScreen,
|
|
@@ -150,10 +158,10 @@ const forecastColumns: TableColumn[] = [
|
|
|
150
158
|
* 金额范围在前端以元组保存,提交时会拆成 startTransAmt/endTransAmt 两个接口字段。
|
|
151
159
|
*/
|
|
152
160
|
const defaultForecastForm = () => ({
|
|
153
|
-
tradeDate: '2026-07-
|
|
161
|
+
tradeDate: '2026-07-07',
|
|
154
162
|
direction: '',
|
|
155
163
|
businessType: '',
|
|
156
|
-
amountRange: [
|
|
164
|
+
amountRange: [100_000_000, null] as RangeValue,
|
|
157
165
|
channel: '',
|
|
158
166
|
verification: '',
|
|
159
167
|
clientName: '',
|
|
@@ -329,8 +337,8 @@ function buildForecastQueryParams(): ForecastInfoQueryParams {
|
|
|
329
337
|
}
|
|
330
338
|
}
|
|
331
339
|
|
|
332
|
-
/**
|
|
333
|
-
async function
|
|
340
|
+
/** 查询从第一页开始;自动查询时不额外弹出成功提示。 */
|
|
341
|
+
async function queryForecastInfo(showSuccessMessage: boolean) {
|
|
334
342
|
const generation = ++forecastQueryGeneration
|
|
335
343
|
const params = buildForecastQueryParams()
|
|
336
344
|
forecastPage.value = 1
|
|
@@ -350,20 +358,25 @@ async function handleForecastQuery() {
|
|
|
350
358
|
if (!loaded || !isPanelActive.value || generation !== forecastQueryGeneration) return
|
|
351
359
|
|
|
352
360
|
forecastDrawerVisible.value = false
|
|
353
|
-
pageMessage.success('已查询预报信息')
|
|
361
|
+
if (showSuccessMessage) pageMessage.success('已查询预报信息')
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/** 手动查询保留成功反馈。 */
|
|
365
|
+
function handleForecastQuery() {
|
|
366
|
+
return queryForecastInfo(true)
|
|
354
367
|
}
|
|
355
368
|
|
|
369
|
+
/** 首次进入页面即使用表单默认条件查询预报数据。 */
|
|
370
|
+
onMounted(() => {
|
|
371
|
+
void queryForecastInfo(false)
|
|
372
|
+
})
|
|
373
|
+
|
|
356
374
|
/** 重置仅影响界面筛选项,保留当前表格数据直到用户再次查询。 */
|
|
357
375
|
function handleForecastReset() {
|
|
358
376
|
resetForecastForm()
|
|
359
377
|
pageMessage.info('预报筛选条件已重置')
|
|
360
378
|
}
|
|
361
379
|
|
|
362
|
-
/** 新增等尚未对接接口的工具栏操作统一使用临时提示。 */
|
|
363
|
-
function handleToolbarAction(action: string) {
|
|
364
|
-
pageMessage.info(`${action}功能待接入`)
|
|
365
|
-
}
|
|
366
|
-
|
|
367
380
|
/** 修改入口只展示在已核销行,状态 2 由后端约定为已核销。 */
|
|
368
381
|
function isForecastVerified(row: ForecastInfoRow) {
|
|
369
382
|
return toQueryText(row.verifyStatus) === '2'
|
|
@@ -623,9 +636,6 @@ function handleForecastPaginationChange(_value: { page: number; pageSize: number
|
|
|
623
636
|
>
|
|
624
637
|
<!-- 批量操作依赖 Pinia 的跨表多选状态;核销规则由 store 统一校验。 -->
|
|
625
638
|
<template #toolbar>
|
|
626
|
-
<el-button type="primary" plain size="small" :icon="CirclePlus" @click="handleToolbarAction('新增')">
|
|
627
|
-
新增
|
|
628
|
-
</el-button>
|
|
629
639
|
<el-button
|
|
630
640
|
type="primary"
|
|
631
641
|
plain
|