verce-vue-test 0.0.89 → 0.0.91
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-authorization/index.vue +16 -11
- package/src/views/rmb-position-estimation/DetailedList.vue +340 -0
- package/src/views/rmb-position-estimation/api.ts +26 -0
- package/src/views/rmb-position-estimation/index.vue +21 -9
- package/src/views/rmb-position-estimation/types.ts +44 -0
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { onBeforeUnmount, onMounted, reactive, ref } from 'vue'
|
|
3
3
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
4
|
-
import { useLoginStore } from '@/stores/login'
|
|
5
4
|
import {
|
|
6
5
|
ArrowLeft,
|
|
7
6
|
CircleCheck,
|
|
@@ -32,7 +31,6 @@ import {
|
|
|
32
31
|
const filterForm = reactive<ForeignCurrencyAuthorizationFilter>(
|
|
33
32
|
createDefaultForeignCurrencyAuthorizationFilter(),
|
|
34
33
|
)
|
|
35
|
-
const loginStore = useLoginStore()
|
|
36
34
|
const appliedFilters = ref<ForeignCurrencyAuthorizationFilter>(cloneFilter(filterForm))
|
|
37
35
|
const records = ref<ForeignCurrencyAuthorizationRow[]>([])
|
|
38
36
|
const totalCount = ref(0)
|
|
@@ -43,6 +41,7 @@ const isQuerying = ref(false)
|
|
|
43
41
|
const pageMode = ref<'list' | 'detail'>('list')
|
|
44
42
|
const detailRecord = ref<ForeignCurrencyAuthorizationRow | null>(null)
|
|
45
43
|
const detailEditForm = reactive({
|
|
44
|
+
author: '',
|
|
46
45
|
nostro: '',
|
|
47
46
|
valueDate: '',
|
|
48
47
|
rejectReason: '',
|
|
@@ -63,12 +62,6 @@ function displayValue(value: string) {
|
|
|
63
62
|
return value || '—'
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
function getCurrentAuthor() {
|
|
67
|
-
return loginStore.username.trim()
|
|
68
|
-
|| String(import.meta.env.VITE_TAM_USER_NAME || '').trim()
|
|
69
|
-
|| '管理员'
|
|
70
|
-
}
|
|
71
|
-
|
|
72
65
|
function reviewStatusLabel(status: ForeignCurrencyAuthorizationRow['reviewStatus']) {
|
|
73
66
|
if (status === 'approved') return '已通过'
|
|
74
67
|
if (status === 'rejected') return '已驳回'
|
|
@@ -159,6 +152,7 @@ async function handlePaginationChange(pagination: { page: number; pageSize: numb
|
|
|
159
152
|
function openDetail(row: ForeignCurrencyAuthorizationRow) {
|
|
160
153
|
detailRecord.value = row
|
|
161
154
|
Object.assign(detailEditForm, {
|
|
155
|
+
author: row.author,
|
|
162
156
|
nostro: row.nostro,
|
|
163
157
|
valueDate: row.valueDate,
|
|
164
158
|
rejectReason: row.rejectReason,
|
|
@@ -175,8 +169,13 @@ async function handleReview(action: 'approve' | 'reject') {
|
|
|
175
169
|
const row = detailRecord.value
|
|
176
170
|
if (!row || reviewAction.value) return
|
|
177
171
|
|
|
172
|
+
const author = detailEditForm.author.trim()
|
|
178
173
|
const nostro = detailEditForm.nostro.trim()
|
|
179
174
|
const rejectReason = detailEditForm.rejectReason.trim()
|
|
175
|
+
if (!author) {
|
|
176
|
+
ElMessage.warning('请输入授权人')
|
|
177
|
+
return
|
|
178
|
+
}
|
|
180
179
|
if (!nostro) {
|
|
181
180
|
ElMessage.warning('请输入账户行')
|
|
182
181
|
return
|
|
@@ -207,7 +206,6 @@ async function handleReview(action: 'approve' | 'reject') {
|
|
|
207
206
|
|
|
208
207
|
reviewAction.value = action
|
|
209
208
|
try {
|
|
210
|
-
const author = getCurrentAuthor()
|
|
211
209
|
const response = await API.reviewAPI({
|
|
212
210
|
author,
|
|
213
211
|
id: row.id,
|
|
@@ -580,7 +578,14 @@ onBeforeUnmount(() => {
|
|
|
580
578
|
<el-descriptions-item label="联系电话">{{ detailRecord.linkWay }}</el-descriptions-item>
|
|
581
579
|
<el-descriptions-item label="复核人">{{ detailRecord.supervisor }}</el-descriptions-item>
|
|
582
580
|
<el-descriptions-item label="授权人">
|
|
583
|
-
|
|
581
|
+
<el-input
|
|
582
|
+
v-model="detailEditForm.author"
|
|
583
|
+
class="detail-edit-control"
|
|
584
|
+
maxlength="50"
|
|
585
|
+
placeholder="请输入授权人"
|
|
586
|
+
size="small"
|
|
587
|
+
clearable
|
|
588
|
+
/>
|
|
584
589
|
</el-descriptions-item>
|
|
585
590
|
<el-descriptions-item label="报备说明" :span="2">
|
|
586
591
|
{{ displayValue(detailRecord.posRemark) }}
|
|
@@ -602,7 +607,7 @@ onBeforeUnmount(() => {
|
|
|
602
607
|
</div>
|
|
603
608
|
|
|
604
609
|
<footer class="detail-actions" aria-label="授权审核操作">
|
|
605
|
-
<span class="detail-actions__hint"
|
|
610
|
+
<span class="detail-actions__hint">账户行、汇款起息日与授权人将在审核时一并保存</span>
|
|
606
611
|
<div class="detail-actions__buttons">
|
|
607
612
|
<el-button :icon="ArrowLeft" @click="returnToList">返回</el-button>
|
|
608
613
|
<el-button
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
3
|
+
import { ArrowLeft } from '@element-plus/icons-vue'
|
|
4
|
+
import { ElMessage } from 'element-plus'
|
|
5
|
+
import { formatThousands } from '@/utils/formatters'
|
|
6
|
+
import API from './api'
|
|
7
|
+
import type {
|
|
8
|
+
RmbPositionPredictionDetail,
|
|
9
|
+
RmbPositionTransactionDetail,
|
|
10
|
+
} from './types'
|
|
11
|
+
|
|
12
|
+
type DetailRow = RmbPositionPredictionDetail | RmbPositionTransactionDetail
|
|
13
|
+
type DetailColumn = {
|
|
14
|
+
prop: keyof RmbPositionPredictionDetail | keyof RmbPositionTransactionDetail
|
|
15
|
+
label: string
|
|
16
|
+
minWidth: number
|
|
17
|
+
align?: 'left' | 'center' | 'right'
|
|
18
|
+
formatter?: (value: unknown) => string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{
|
|
22
|
+
ind: number
|
|
23
|
+
id: string
|
|
24
|
+
tranDate: string
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
back: []
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
/** 标题顺序与主表点击索引 0-41 严格对应。 */
|
|
32
|
+
const detailTitles = [
|
|
33
|
+
'回购(拆借)到期,CD发行、投资及到期收入报备金额明细列表',
|
|
34
|
+
'回购(拆借)到期,CD发行、投资及到期支出报备金额明细列表',
|
|
35
|
+
'回购(拆借)到期,CD发行、投资及到期收入未核销金额明细列表',
|
|
36
|
+
'回购(拆借)到期,CD发行、投资及到期支出未核销金额明细列表',
|
|
37
|
+
'债券承销收入报备金额明细列表',
|
|
38
|
+
'债券承销支出报备金额明细列表',
|
|
39
|
+
'债券承销收入未核销金额明细列表',
|
|
40
|
+
'债券承销支出未核销金额明细列表',
|
|
41
|
+
'票据业务收入报备金额明细列表',
|
|
42
|
+
'票据业务支出报备金额明细列表',
|
|
43
|
+
'票据业务收入未核销金额明细列表',
|
|
44
|
+
'票据业务支出未核销金额明细列表',
|
|
45
|
+
'托管业务收入报备金额明细列表',
|
|
46
|
+
'托管业务支出报备金额明细列表',
|
|
47
|
+
'托管业务收入未核销金额明细列表',
|
|
48
|
+
'托管业务支出未核销金额明细列表',
|
|
49
|
+
'同业业务收入报备金额明细列表',
|
|
50
|
+
'同业业务支出报备金额明细列表',
|
|
51
|
+
'同业业务收入未核销金额明细列表',
|
|
52
|
+
'同业业务支出未核销金额明细列表',
|
|
53
|
+
'支行、营业部大额收付报备合计(3亿及以上)收入报备金额明细列表',
|
|
54
|
+
'支行、营业部大额收付报备合计(3亿及以上)支出报备金额明细列表',
|
|
55
|
+
'支行、营业部大额收付报备合计(3亿及以上)收入未核销金额明细列表',
|
|
56
|
+
'支行、营业部大额收付报备合计(3亿及以上)支出未核销金额明细列表',
|
|
57
|
+
'理财业务发生额及到期收入报备金额明细列表',
|
|
58
|
+
'理财业务发生额及到期支出报备金额明细列表',
|
|
59
|
+
'理财业务发生额及到期收入未核销金额明细列表',
|
|
60
|
+
'理财业务发生额及到期支出未核销金额明细列表',
|
|
61
|
+
'其他收入报备金额明细列表',
|
|
62
|
+
'其他支出报备金额明细列表',
|
|
63
|
+
'其他收入未核销金额明细列表',
|
|
64
|
+
'其他支出未核销金额明细列表',
|
|
65
|
+
'现金出入库、净额轧差业务、财政准备金退缴报文【606报文】收入明细列表',
|
|
66
|
+
'现金出入库、净额轧差业务、财政准备金退缴报文【606报文】支出明细列表',
|
|
67
|
+
'1亿以下未核销大额业务流水【除606以外的报文】收入明细列表',
|
|
68
|
+
'1亿以下未核销大额业务流水【除606以外的报文】支出明细列表',
|
|
69
|
+
'1亿及以上未核销大/小额业务流水【除606以外的报文】收入明细列表',
|
|
70
|
+
'1亿及以上未核销大/小额业务流水【除606以外的报文】支出明细列表',
|
|
71
|
+
'今日资金交易新业务收付合计收入报备金额明细列表',
|
|
72
|
+
'今日资金交易新业务收付合计支出报备金额明细列表',
|
|
73
|
+
'今日资金交易新业务收付合计收入未核销金额明细列表',
|
|
74
|
+
'今日资金交易新业务收付合计支出未核销金额明细列表',
|
|
75
|
+
] as const
|
|
76
|
+
|
|
77
|
+
const businessTypeMap: Record<string, string> = {
|
|
78
|
+
'1': '对公/个人客户收付',
|
|
79
|
+
'2': '本票签发/兑付',
|
|
80
|
+
'3': '三省一市汇票签发/兑付',
|
|
81
|
+
'4': '分行资金调拨',
|
|
82
|
+
'5': '同业业务',
|
|
83
|
+
'6': '资金业务',
|
|
84
|
+
'7': '理财业务',
|
|
85
|
+
'8': '债券承销业务',
|
|
86
|
+
'9': '司库业务',
|
|
87
|
+
'10': '现金出入库',
|
|
88
|
+
'11': '财政准备金退缴',
|
|
89
|
+
'12': '同业清算款项收付',
|
|
90
|
+
'13': '财政零余额业务',
|
|
91
|
+
'14': '银行承兑汇票',
|
|
92
|
+
'15': '托管业务',
|
|
93
|
+
'16': '票据业务',
|
|
94
|
+
}
|
|
95
|
+
const payChannelMap: Record<string, string> = {
|
|
96
|
+
'1': '大额支付',
|
|
97
|
+
'2': '小额支付',
|
|
98
|
+
'3': '票据交换',
|
|
99
|
+
'4': '同城支付',
|
|
100
|
+
'7': '网联支付',
|
|
101
|
+
}
|
|
102
|
+
const payDirectionMap: Record<string, string> = { '0': '支出', '1': '收入', '2': '支出' }
|
|
103
|
+
const verifyStatusMap: Record<string, string> = {
|
|
104
|
+
'1': '未核销',
|
|
105
|
+
'2': '已核销',
|
|
106
|
+
'3': '部分核销',
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function mapValue(mapping: Record<string, string>, value: unknown) {
|
|
110
|
+
const text = String(value ?? '').trim()
|
|
111
|
+
return mapping[text] ?? text
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function formatAmount(value: unknown) {
|
|
115
|
+
return formatThousands(value, '0.00')
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const predictionColumns: DetailColumn[] = [
|
|
119
|
+
{ prop: 'predRefNo', label: '预报流水号', minWidth: 150 },
|
|
120
|
+
{ prop: 'verifyStatus', label: '核销状态', minWidth: 92, align: 'center', formatter: (value) => mapValue(verifyStatusMap, value) },
|
|
121
|
+
{ prop: 'payChannel', label: '支付渠道', minWidth: 100, formatter: (value) => mapValue(payChannelMap, value) },
|
|
122
|
+
{ prop: 'groundBranch', label: '落地支行', minWidth: 130 },
|
|
123
|
+
{ prop: 'payDirec', label: '收支方向', minWidth: 92, align: 'center', formatter: (value) => mapValue(payDirectionMap, value) },
|
|
124
|
+
{ prop: 'predAmt', label: '预报金额(元)', minWidth: 130, align: 'right', formatter: formatAmount },
|
|
125
|
+
{ prop: 'verifyAmt', label: '已核销金额(元)', minWidth: 140, align: 'right', formatter: formatAmount },
|
|
126
|
+
{ prop: 'clientName', label: '客户名称', minWidth: 160 },
|
|
127
|
+
{ prop: 'competName', label: '交易对手名称', minWidth: 160 },
|
|
128
|
+
{ prop: 'busiType', label: '业务类型', minWidth: 150, formatter: (value) => mapValue(businessTypeMap, value) },
|
|
129
|
+
{ prop: 'upOrg', label: '上级单位', minWidth: 140 },
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
const transactionColumns: DetailColumn[] = [
|
|
133
|
+
{ prop: 'refNo', label: '交易参考号', minWidth: 160 },
|
|
134
|
+
{ prop: 'verifyStatus', label: '核销状态', minWidth: 92, align: 'center', formatter: (value) => mapValue(verifyStatusMap, value) },
|
|
135
|
+
{ prop: 'payChannel', label: '支付渠道', minWidth: 100, formatter: (value) => mapValue(payChannelMap, value) },
|
|
136
|
+
{ prop: 'groundBranch', label: '落地支行', minWidth: 130 },
|
|
137
|
+
{ prop: 'payDirec', label: '收支方向', minWidth: 92, align: 'center', formatter: (value) => mapValue(payDirectionMap, value) },
|
|
138
|
+
{ prop: 'amt', label: '金额(元)', minWidth: 130, align: 'right', formatter: formatAmount },
|
|
139
|
+
{ prop: 'payerName', label: '付款人名称', minWidth: 160 },
|
|
140
|
+
{ prop: 'payeeName', label: '收款人名称', minWidth: 160 },
|
|
141
|
+
{ prop: 'busiType', label: '支付系统业务类型', minWidth: 170, formatter: (value) => mapValue(businessTypeMap, value) },
|
|
142
|
+
{ prop: 'upOrg', label: '上级单位', minWidth: 140 },
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
const transactionIndexes = new Set([32, 33, 34, 35, 36, 37])
|
|
146
|
+
const isTransactionDetail = computed(() => transactionIndexes.has(props.ind))
|
|
147
|
+
const title = computed(() => detailTitles[props.ind] ?? '人民币头寸匡算明细列表')
|
|
148
|
+
const tableColumns = computed(() => (
|
|
149
|
+
isTransactionDetail.value ? transactionColumns : predictionColumns
|
|
150
|
+
))
|
|
151
|
+
|
|
152
|
+
const tableLoading = ref(false)
|
|
153
|
+
const tableData = ref<DetailRow[]>([])
|
|
154
|
+
const pageSize = ref(10)
|
|
155
|
+
const pageIndex = ref(1)
|
|
156
|
+
const total = ref(0)
|
|
157
|
+
let requestController: AbortController | null = null
|
|
158
|
+
|
|
159
|
+
function isAbortError(error: unknown) {
|
|
160
|
+
return error instanceof DOMException && error.name === 'AbortError'
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
async function getList() {
|
|
164
|
+
requestController?.abort()
|
|
165
|
+
const controller = new AbortController()
|
|
166
|
+
requestController = controller
|
|
167
|
+
tableLoading.value = true
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
const response = await API.detailAPI(
|
|
171
|
+
{ position: props.id, tranDate: props.tranDate },
|
|
172
|
+
pageIndex.value,
|
|
173
|
+
pageSize.value,
|
|
174
|
+
{ signal: controller.signal },
|
|
175
|
+
)
|
|
176
|
+
if (controller.signal.aborted || requestController !== controller) return
|
|
177
|
+
|
|
178
|
+
const rows = isTransactionDetail.value
|
|
179
|
+
? response.body.tranList
|
|
180
|
+
: response.body.predList
|
|
181
|
+
tableData.value = Array.isArray(rows) ? rows : []
|
|
182
|
+
|
|
183
|
+
const totalCount = Number(response.body.totalCount)
|
|
184
|
+
total.value = Number.isFinite(totalCount) && totalCount >= 0 ? totalCount : 0
|
|
185
|
+
} catch (error) {
|
|
186
|
+
if (!isAbortError(error)) {
|
|
187
|
+
tableData.value = []
|
|
188
|
+
total.value = 0
|
|
189
|
+
ElMessage.error(error instanceof Error ? error.message : '人民币头寸匡算详情查询失败')
|
|
190
|
+
}
|
|
191
|
+
} finally {
|
|
192
|
+
if (requestController === controller) {
|
|
193
|
+
tableLoading.value = false
|
|
194
|
+
requestController = null
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function handleSizeChange(value: number) {
|
|
200
|
+
pageIndex.value = 1
|
|
201
|
+
pageSize.value = value
|
|
202
|
+
getList()
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function handleCurrentChange(value: number) {
|
|
206
|
+
pageIndex.value = value
|
|
207
|
+
getList()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function displayCell(row: DetailRow, column: DetailColumn) {
|
|
211
|
+
const value = Reflect.get(row, column.prop)
|
|
212
|
+
if (column.formatter) return column.formatter(value)
|
|
213
|
+
return value === undefined || value === null || value === '' ? '-' : String(value)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
onMounted(getList)
|
|
217
|
+
onBeforeUnmount(() => requestController?.abort())
|
|
218
|
+
</script>
|
|
219
|
+
|
|
220
|
+
<template>
|
|
221
|
+
<section class="detail-page">
|
|
222
|
+
<header class="detail-header">
|
|
223
|
+
<el-button :icon="ArrowLeft" @click="emit('back')">返回</el-button>
|
|
224
|
+
<h2 class="detail-title">{{ title }}</h2>
|
|
225
|
+
<span class="header-placeholder" aria-hidden="true"></span>
|
|
226
|
+
</header>
|
|
227
|
+
|
|
228
|
+
<el-table
|
|
229
|
+
v-loading="tableLoading"
|
|
230
|
+
class="detail-table"
|
|
231
|
+
border
|
|
232
|
+
fit
|
|
233
|
+
highlight-current-row
|
|
234
|
+
max-height="640"
|
|
235
|
+
:data="tableData"
|
|
236
|
+
empty-text="暂无明细数据"
|
|
237
|
+
>
|
|
238
|
+
<el-table-column type="selection" width="48" />
|
|
239
|
+
<el-table-column
|
|
240
|
+
v-for="column in tableColumns"
|
|
241
|
+
:key="column.prop"
|
|
242
|
+
:prop="column.prop"
|
|
243
|
+
:label="column.label"
|
|
244
|
+
:min-width="column.minWidth"
|
|
245
|
+
:align="column.align ?? 'left'"
|
|
246
|
+
show-overflow-tooltip
|
|
247
|
+
>
|
|
248
|
+
<template #default="{ row }">
|
|
249
|
+
{{ displayCell(row, column) }}
|
|
250
|
+
</template>
|
|
251
|
+
</el-table-column>
|
|
252
|
+
</el-table>
|
|
253
|
+
|
|
254
|
+
<el-pagination
|
|
255
|
+
class="detail-pagination"
|
|
256
|
+
:page-sizes="[10, 20, 50, 100]"
|
|
257
|
+
:page-size="pageSize"
|
|
258
|
+
:current-page="pageIndex"
|
|
259
|
+
:total="total"
|
|
260
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
261
|
+
@size-change="handleSizeChange"
|
|
262
|
+
@current-change="handleCurrentChange"
|
|
263
|
+
/>
|
|
264
|
+
</section>
|
|
265
|
+
</template>
|
|
266
|
+
|
|
267
|
+
<style scoped>
|
|
268
|
+
.detail-page {
|
|
269
|
+
width: calc(100% - 20px);
|
|
270
|
+
margin: 10px;
|
|
271
|
+
padding: 20px;
|
|
272
|
+
border-radius: 20px;
|
|
273
|
+
color: #1f2937;
|
|
274
|
+
background: #fff;
|
|
275
|
+
box-sizing: border-box;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.detail-header {
|
|
279
|
+
display: grid;
|
|
280
|
+
grid-template-columns: 88px minmax(0, 1fr) 88px;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: 12px;
|
|
283
|
+
margin-bottom: 16px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.detail-title {
|
|
287
|
+
margin: 0;
|
|
288
|
+
color: #1f2937;
|
|
289
|
+
font-size: 20px;
|
|
290
|
+
font-weight: 600;
|
|
291
|
+
line-height: 1.4;
|
|
292
|
+
text-align: center;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.header-placeholder {
|
|
296
|
+
width: 88px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.detail-table {
|
|
300
|
+
width: 100%;
|
|
301
|
+
margin-bottom: 20px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.detail-table :deep(.el-table__cell) {
|
|
305
|
+
padding: 7px 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.detail-table :deep(.el-table__header-wrapper th) {
|
|
309
|
+
color: #334155;
|
|
310
|
+
background: #f8fafc;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.detail-pagination {
|
|
314
|
+
justify-content: flex-end;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
@media screen and (max-width: 760px) {
|
|
318
|
+
.detail-page {
|
|
319
|
+
padding: 14px;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.detail-header {
|
|
323
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.detail-title {
|
|
327
|
+
font-size: 17px;
|
|
328
|
+
text-align: left;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.header-placeholder {
|
|
332
|
+
display: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.detail-pagination {
|
|
336
|
+
justify-content: flex-start;
|
|
337
|
+
overflow-x: auto;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
</style>
|
|
@@ -3,6 +3,8 @@ import baseHttpClient, {
|
|
|
3
3
|
type TamResponse,
|
|
4
4
|
} from '@/utils/baseHttpClient'
|
|
5
5
|
import type {
|
|
6
|
+
RmbPositionDetailRequestBody,
|
|
7
|
+
RmbPositionDetailResponseBody,
|
|
6
8
|
RmbPositionEstimationRequestBody,
|
|
7
9
|
RmbPositionHistoryRequestBody,
|
|
8
10
|
} from './types'
|
|
@@ -50,6 +52,30 @@ const API = {
|
|
|
50
52
|
options,
|
|
51
53
|
)
|
|
52
54
|
},
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 根据主表单元格坐标分页查询明细。
|
|
58
|
+
* 分页字段属于 TAM 公共 `head`,业务 `body` 只传位置与交易日期。
|
|
59
|
+
*/
|
|
60
|
+
detailAPI: (
|
|
61
|
+
params: RmbPositionDetailRequestBody,
|
|
62
|
+
pageIndex: number,
|
|
63
|
+
pageSize: number,
|
|
64
|
+
options?: HttpRequestOptions,
|
|
65
|
+
) => {
|
|
66
|
+
return baseHttpClient.post<TamResponse<RmbPositionDetailResponseBody>>(
|
|
67
|
+
'/TAM/0001/140103007',
|
|
68
|
+
params,
|
|
69
|
+
{
|
|
70
|
+
...options,
|
|
71
|
+
tamHead: {
|
|
72
|
+
...options?.tamHead,
|
|
73
|
+
pageIndex,
|
|
74
|
+
pageSize,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
)
|
|
78
|
+
},
|
|
53
79
|
}
|
|
54
80
|
|
|
55
81
|
export default API
|
|
@@ -12,6 +12,7 @@ import { computed, onBeforeUnmount, reactive, ref } from 'vue'
|
|
|
12
12
|
import { Download, Search } from '@element-plus/icons-vue'
|
|
13
13
|
import { ElMessage } from 'element-plus'
|
|
14
14
|
import API from './api'
|
|
15
|
+
import DetailedList from './DetailedList.vue'
|
|
15
16
|
import {
|
|
16
17
|
rmbPositionAmountFields,
|
|
17
18
|
rmbPositionHistoryAmountFields,
|
|
@@ -90,6 +91,9 @@ type LinkedCell = {
|
|
|
90
91
|
field: RmbPositionAmountField
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
/** 当前打开的明细坐标;为 null 时显示筛选条件和匡算主表。 */
|
|
95
|
+
type DetailSelection = Pick<LinkedCell, 'id' | 'index'>
|
|
96
|
+
|
|
93
97
|
/**
|
|
94
98
|
* 校验匡算接口的原始 body,并收敛为页面可安全使用的结构。
|
|
95
99
|
* 缺少的金额字段统一补为 0.00;已返回但金额格式非法时仍抛错,避免错误数据参与汇总。
|
|
@@ -358,6 +362,7 @@ const form = reactive<FormState>({
|
|
|
358
362
|
|
|
359
363
|
// result 为 null 表示尚未完成匡算,此时计算结果区域显示为空而不是 0。
|
|
360
364
|
const result = ref<RmbPositionEstimationResponseBody | null>(null)
|
|
365
|
+
const detailSelection = ref<DetailSelection | null>(null)
|
|
361
366
|
const loading = ref(false)
|
|
362
367
|
const loadingText = ref('正在进行头寸匡算…')
|
|
363
368
|
// 日期历史查询和匡算查询共用控制器;新请求启动前会取消旧请求,防止旧响应覆盖新状态。
|
|
@@ -749,17 +754,17 @@ async function handleDateChange() {
|
|
|
749
754
|
}
|
|
750
755
|
}
|
|
751
756
|
|
|
752
|
-
/**
|
|
753
|
-
* 结果数字点击入口。目前仅打印联查参数;后续接入明细页时可在此统一跳转或打开弹窗。
|
|
754
|
-
*/
|
|
757
|
+
/** 点击匡算结果后隐藏主表,并按单元格坐标打开对应明细组件。 */
|
|
755
758
|
function openLink(field: RmbPositionAmountField) {
|
|
756
759
|
const cell = linkedCellMap.get(field)
|
|
757
|
-
if (!cell) return
|
|
760
|
+
if (!cell || !result.value) return
|
|
758
761
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
762
|
+
detailSelection.value = { id: cell.id, index: cell.index }
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/** 返回主表时只关闭详情,不重置筛选条件、录入内容及匡算结果。 */
|
|
766
|
+
function closeDetail() {
|
|
767
|
+
detailSelection.value = null
|
|
763
768
|
}
|
|
764
769
|
|
|
765
770
|
/**
|
|
@@ -888,7 +893,14 @@ onBeforeUnmount(() => {
|
|
|
888
893
|
</script>
|
|
889
894
|
|
|
890
895
|
<template>
|
|
891
|
-
<
|
|
896
|
+
<DetailedList
|
|
897
|
+
v-if="detailSelection"
|
|
898
|
+
:ind="detailSelection.index"
|
|
899
|
+
:id="detailSelection.id"
|
|
900
|
+
:tran-date="form.tranDate"
|
|
901
|
+
@back="closeDetail"
|
|
902
|
+
/>
|
|
903
|
+
<div v-else class="rmb-position-estimation-page">
|
|
892
904
|
<!-- 顶部操作区:日期切换负责历史回填,查询和导出共享下方计算参数。 -->
|
|
893
905
|
<div class="query-section">
|
|
894
906
|
<el-form
|
|
@@ -177,3 +177,47 @@ export type RmbPositionHistoryResponseBody = Partial<Record<
|
|
|
177
177
|
RmbPositionHistoryAmountField | RmbPositionHistoryRemarkField,
|
|
178
178
|
string
|
|
179
179
|
>>
|
|
180
|
+
|
|
181
|
+
/** `/TAM/0001/140103007` 明细查询的业务请求体。 */
|
|
182
|
+
export type RmbPositionDetailRequestBody = {
|
|
183
|
+
/** 主表可点击金额单元格的坐标,例如 `C5`、`D24`。 */
|
|
184
|
+
position: string
|
|
185
|
+
/** 交易日期,格式为 `YYYYMMDD`。 */
|
|
186
|
+
tranDate: string
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** 预报类坐标返回的明细记录。 */
|
|
190
|
+
export type RmbPositionPredictionDetail = {
|
|
191
|
+
busiType?: string
|
|
192
|
+
clientName?: string
|
|
193
|
+
competName?: string
|
|
194
|
+
groundBranch?: string
|
|
195
|
+
payChannel?: string
|
|
196
|
+
payDirec?: string
|
|
197
|
+
predAmt?: string
|
|
198
|
+
predRefNo?: string
|
|
199
|
+
upOrg?: string
|
|
200
|
+
verifyAmt?: string
|
|
201
|
+
verifyStatus?: string
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** 606 报文及分档流水坐标返回的明细记录。 */
|
|
205
|
+
export type RmbPositionTransactionDetail = {
|
|
206
|
+
amt?: string
|
|
207
|
+
busiType?: string
|
|
208
|
+
groundBranch?: string
|
|
209
|
+
payChannel?: string
|
|
210
|
+
payDirec?: string
|
|
211
|
+
payeeName?: string
|
|
212
|
+
payerName?: string
|
|
213
|
+
refNo?: string
|
|
214
|
+
upOrg?: string
|
|
215
|
+
verifyStatus?: string
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** 详情接口会按点击坐标只返回 `predList` 或 `tranList` 中的一种。 */
|
|
219
|
+
export type RmbPositionDetailResponseBody = {
|
|
220
|
+
predList?: RmbPositionPredictionDetail[]
|
|
221
|
+
tranList?: RmbPositionTransactionDetail[]
|
|
222
|
+
totalCount: string | number
|
|
223
|
+
}
|