verce-vue-test 0.0.110 → 0.0.111
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/denglong.vue
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1456,7 +1456,6 @@ onBeforeUnmount(() => {
|
|
|
1456
1456
|
<el-select
|
|
1457
1457
|
v-model="forecastFilterForm.ftuFilter"
|
|
1458
1458
|
:append-to="overlayContainer || undefined"
|
|
1459
|
-
:persistent="false"
|
|
1460
1459
|
size="small"
|
|
1461
1460
|
placeholder="请选择"
|
|
1462
1461
|
clearable
|
|
@@ -1475,7 +1474,6 @@ onBeforeUnmount(() => {
|
|
|
1475
1474
|
<el-select
|
|
1476
1475
|
v-model="forecastFilterForm.direction"
|
|
1477
1476
|
:append-to="overlayContainer || undefined"
|
|
1478
|
-
:persistent="false"
|
|
1479
1477
|
size="small"
|
|
1480
1478
|
placeholder="请选择"
|
|
1481
1479
|
clearable
|
|
@@ -1494,7 +1492,6 @@ onBeforeUnmount(() => {
|
|
|
1494
1492
|
<el-select
|
|
1495
1493
|
v-model="forecastFilterForm.currency"
|
|
1496
1494
|
:append-to="overlayContainer || undefined"
|
|
1497
|
-
:persistent="false"
|
|
1498
1495
|
size="small"
|
|
1499
1496
|
placeholder="请选择"
|
|
1500
1497
|
filterable
|
|
@@ -1707,7 +1704,6 @@ onBeforeUnmount(() => {
|
|
|
1707
1704
|
<el-select
|
|
1708
1705
|
v-model="forecastFilterForm.ftuFilter"
|
|
1709
1706
|
:append-to="overlayContainer || undefined"
|
|
1710
|
-
:persistent="false"
|
|
1711
1707
|
size="small"
|
|
1712
1708
|
placeholder="请选择"
|
|
1713
1709
|
clearable
|
|
@@ -1726,7 +1722,6 @@ onBeforeUnmount(() => {
|
|
|
1726
1722
|
<el-select
|
|
1727
1723
|
v-model="forecastFilterForm.direction"
|
|
1728
1724
|
:append-to="overlayContainer || undefined"
|
|
1729
|
-
:persistent="false"
|
|
1730
1725
|
size="small"
|
|
1731
1726
|
placeholder="请选择"
|
|
1732
1727
|
clearable
|
|
@@ -1745,7 +1740,6 @@ onBeforeUnmount(() => {
|
|
|
1745
1740
|
<el-select
|
|
1746
1741
|
v-model="forecastFilterForm.currency"
|
|
1747
1742
|
:append-to="overlayContainer || undefined"
|
|
1748
|
-
:persistent="false"
|
|
1749
1743
|
size="small"
|
|
1750
1744
|
placeholder="请选择"
|
|
1751
1745
|
filterable
|
|
@@ -1767,7 +1761,6 @@ onBeforeUnmount(() => {
|
|
|
1767
1761
|
<el-select
|
|
1768
1762
|
v-model="forecastFilterForm.businessType"
|
|
1769
1763
|
:append-to="overlayContainer || undefined"
|
|
1770
|
-
:persistent="false"
|
|
1771
1764
|
size="small"
|
|
1772
1765
|
placeholder="请选择"
|
|
1773
1766
|
clearable
|
|
@@ -1786,7 +1779,6 @@ onBeforeUnmount(() => {
|
|
|
1786
1779
|
<el-select
|
|
1787
1780
|
v-model="forecastFilterForm.forecastWay"
|
|
1788
1781
|
:append-to="overlayContainer || undefined"
|
|
1789
|
-
:persistent="false"
|
|
1790
1782
|
size="small"
|
|
1791
1783
|
placeholder="请选择"
|
|
1792
1784
|
clearable
|
|
@@ -1805,7 +1797,6 @@ onBeforeUnmount(() => {
|
|
|
1805
1797
|
<el-select
|
|
1806
1798
|
v-model="forecastFilterForm.verifyStatus"
|
|
1807
1799
|
:append-to="overlayContainer || undefined"
|
|
1808
|
-
:persistent="false"
|
|
1809
1800
|
size="small"
|
|
1810
1801
|
placeholder="请选择"
|
|
1811
1802
|
clearable
|
|
@@ -1830,7 +1821,6 @@ onBeforeUnmount(() => {
|
|
|
1830
1821
|
v-model="forecastFilterForm.bankCode"
|
|
1831
1822
|
:append-to="overlayContainer || undefined"
|
|
1832
1823
|
:loading="forecastAccountBankLoading"
|
|
1833
|
-
:persistent="false"
|
|
1834
1824
|
size="small"
|
|
1835
1825
|
placeholder="请选择账户行"
|
|
1836
1826
|
filterable
|
|
@@ -1955,7 +1945,6 @@ onBeforeUnmount(() => {
|
|
|
1955
1945
|
<el-select
|
|
1956
1946
|
v-model="flowFilterForm.direction"
|
|
1957
1947
|
:append-to="overlayContainer || undefined"
|
|
1958
|
-
:persistent="false"
|
|
1959
1948
|
size="small"
|
|
1960
1949
|
placeholder="请选择"
|
|
1961
1950
|
clearable
|
|
@@ -1974,7 +1963,6 @@ onBeforeUnmount(() => {
|
|
|
1974
1963
|
<el-select
|
|
1975
1964
|
v-model="flowFilterForm.currency"
|
|
1976
1965
|
:append-to="overlayContainer || undefined"
|
|
1977
|
-
:persistent="false"
|
|
1978
1966
|
size="small"
|
|
1979
1967
|
placeholder="请选择"
|
|
1980
1968
|
filterable
|
|
@@ -1996,7 +1984,6 @@ onBeforeUnmount(() => {
|
|
|
1996
1984
|
<el-select
|
|
1997
1985
|
v-model="flowFilterForm.verifyStatus"
|
|
1998
1986
|
:append-to="overlayContainer || undefined"
|
|
1999
|
-
:persistent="false"
|
|
2000
1987
|
size="small"
|
|
2001
1988
|
placeholder="请选择"
|
|
2002
1989
|
clearable
|
|
@@ -2193,7 +2180,6 @@ onBeforeUnmount(() => {
|
|
|
2193
2180
|
<el-select
|
|
2194
2181
|
v-model="flowFilterForm.direction"
|
|
2195
2182
|
:append-to="overlayContainer || undefined"
|
|
2196
|
-
:persistent="false"
|
|
2197
2183
|
size="small"
|
|
2198
2184
|
placeholder="请选择"
|
|
2199
2185
|
clearable
|
|
@@ -2212,7 +2198,6 @@ onBeforeUnmount(() => {
|
|
|
2212
2198
|
<el-select
|
|
2213
2199
|
v-model="flowFilterForm.currency"
|
|
2214
2200
|
:append-to="overlayContainer || undefined"
|
|
2215
|
-
:persistent="false"
|
|
2216
2201
|
size="small"
|
|
2217
2202
|
placeholder="请选择"
|
|
2218
2203
|
filterable
|
|
@@ -2234,7 +2219,6 @@ onBeforeUnmount(() => {
|
|
|
2234
2219
|
<el-select
|
|
2235
2220
|
v-model="flowFilterForm.messageTypes"
|
|
2236
2221
|
:append-to="overlayContainer || undefined"
|
|
2237
|
-
:persistent="false"
|
|
2238
2222
|
size="small"
|
|
2239
2223
|
placeholder="请选择或输入代码"
|
|
2240
2224
|
multiple
|
|
@@ -2259,7 +2243,6 @@ onBeforeUnmount(() => {
|
|
|
2259
2243
|
<el-select
|
|
2260
2244
|
v-model="flowFilterForm.verifyStatus"
|
|
2261
2245
|
:append-to="overlayContainer || undefined"
|
|
2262
|
-
:persistent="false"
|
|
2263
2246
|
size="small"
|
|
2264
2247
|
placeholder="请选择"
|
|
2265
2248
|
clearable
|
|
@@ -2284,7 +2267,6 @@ onBeforeUnmount(() => {
|
|
|
2284
2267
|
v-model="flowFilterForm.bankCode"
|
|
2285
2268
|
:append-to="overlayContainer || undefined"
|
|
2286
2269
|
:loading="flowAccountBankLoading"
|
|
2287
|
-
:persistent="false"
|
|
2288
2270
|
size="small"
|
|
2289
2271
|
placeholder="请选择账户行"
|
|
2290
2272
|
filterable
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import baseHttpClient, { type TamResponse } from '@/utils/baseHttpClient'
|
|
2
2
|
import type {
|
|
3
|
+
RmbPositionForecastDetail,
|
|
3
4
|
RmbPositionForecastFilter,
|
|
4
5
|
RmbPositionForecastListResult,
|
|
5
6
|
RmbPositionForecastRow,
|
|
6
7
|
} from './types'
|
|
7
8
|
|
|
8
9
|
const QUERY_TRAN_CODE = '/TAM/0001/140101001'
|
|
10
|
+
const CREATE_TRAN_CODE = '/TAM/0001/120101001'
|
|
11
|
+
const UPDATE_TRAN_CODE = '/TAM/0001/120101002'
|
|
12
|
+
const DELETE_TRAN_CODE = '/TAM/0001/120101003'
|
|
13
|
+
const DETAIL_TRAN_CODE = '/TAM/0001/140101002'
|
|
9
14
|
|
|
10
15
|
type RmbPositionForecastQueryParams = {
|
|
11
16
|
busiType: string
|
|
@@ -24,19 +29,29 @@ type RmbPositionForecastQueryParams = {
|
|
|
24
29
|
|
|
25
30
|
type RmbPositionForecastApiRow = {
|
|
26
31
|
busiType?: string
|
|
32
|
+
billDate?: string
|
|
33
|
+
billNo?: string
|
|
27
34
|
clientName?: string
|
|
28
35
|
clientType?: string
|
|
29
36
|
competAcct?: string
|
|
30
37
|
competName?: string
|
|
38
|
+
eduFlag?: string
|
|
31
39
|
groundBranch?: string
|
|
32
40
|
groundBranchCode?: string
|
|
41
|
+
linkMan?: string
|
|
33
42
|
payChannel?: string
|
|
34
43
|
payDirec?: string
|
|
44
|
+
phoneNo?: string
|
|
35
45
|
predAmt?: string
|
|
46
|
+
predBranch?: string
|
|
47
|
+
predBranchName?: string
|
|
36
48
|
predCode?: string
|
|
37
49
|
predDate?: string
|
|
50
|
+
predName?: string
|
|
38
51
|
predRefNo?: string
|
|
39
52
|
predStatus?: string
|
|
53
|
+
purpose?: string
|
|
54
|
+
remark?: string
|
|
40
55
|
standardName?: string
|
|
41
56
|
tranDate?: string
|
|
42
57
|
verifyAmt?: string
|
|
@@ -48,6 +63,30 @@ type RmbPositionForecastResponseBody = {
|
|
|
48
63
|
totalCount?: string | number
|
|
49
64
|
}
|
|
50
65
|
|
|
66
|
+
export type RmbPositionForecastMutationValue = {
|
|
67
|
+
predRefNo?: string
|
|
68
|
+
tradeDate: string
|
|
69
|
+
payDirection: string
|
|
70
|
+
payChannel: string
|
|
71
|
+
predAmount: number
|
|
72
|
+
groundBranch: string
|
|
73
|
+
groundBranchCode?: string
|
|
74
|
+
clientType: string
|
|
75
|
+
clientName: string
|
|
76
|
+
counterpartyName: string
|
|
77
|
+
counterpartyAccount: string
|
|
78
|
+
businessType: string
|
|
79
|
+
forecastDate: string
|
|
80
|
+
billDate?: string
|
|
81
|
+
billNo?: string
|
|
82
|
+
linkMan?: string
|
|
83
|
+
phoneNo?: string
|
|
84
|
+
predName?: string
|
|
85
|
+
predBranchName?: string
|
|
86
|
+
purpose?: string
|
|
87
|
+
remark?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
51
90
|
function invalidField(field: string, value: unknown): never {
|
|
52
91
|
const displayValue = String(value ?? '').trim() || '空值'
|
|
53
92
|
throw new Error(`人民币头寸预报接口返回的 ${field} 无效:${displayValue}`)
|
|
@@ -130,6 +169,48 @@ function toFrontendRow(row: RmbPositionForecastApiRow): RmbPositionForecastRow {
|
|
|
130
169
|
}
|
|
131
170
|
}
|
|
132
171
|
|
|
172
|
+
function toFrontendDetail(row: RmbPositionForecastApiRow): RmbPositionForecastDetail {
|
|
173
|
+
return {
|
|
174
|
+
...toFrontendRow(row),
|
|
175
|
+
billDate: String(row.billDate ?? ''),
|
|
176
|
+
billNo: String(row.billNo ?? ''),
|
|
177
|
+
eduFlag: String(row.eduFlag ?? ''),
|
|
178
|
+
linkMan: String(row.linkMan ?? ''),
|
|
179
|
+
phoneNo: String(row.phoneNo ?? ''),
|
|
180
|
+
predBranch: String(row.predBranch ?? ''),
|
|
181
|
+
predBranchName: String(row.predBranchName ?? ''),
|
|
182
|
+
predCode: String(row.predCode ?? ''),
|
|
183
|
+
predName: String(row.predName ?? ''),
|
|
184
|
+
purpose: String(row.purpose ?? ''),
|
|
185
|
+
remark: String(row.remark ?? ''),
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function toProtocolMutationBody(value: RmbPositionForecastMutationValue) {
|
|
190
|
+
return {
|
|
191
|
+
busiType: value.businessType,
|
|
192
|
+
clientName: value.clientName.trim(),
|
|
193
|
+
clientType: value.clientType,
|
|
194
|
+
competAcct: value.counterpartyAccount.trim(),
|
|
195
|
+
competName: value.counterpartyName.trim(),
|
|
196
|
+
groundBranch: value.groundBranchCode?.trim() || value.groundBranch.trim(),
|
|
197
|
+
groundBranchName: value.groundBranch.trim(),
|
|
198
|
+
payChannel: value.payChannel,
|
|
199
|
+
payDirec: value.payDirection,
|
|
200
|
+
predAmt: String(value.predAmount),
|
|
201
|
+
predDate: value.forecastDate,
|
|
202
|
+
tranDate: value.tradeDate,
|
|
203
|
+
...(value.billDate !== undefined ? { billDate: value.billDate } : {}),
|
|
204
|
+
...(value.billNo !== undefined ? { billNo: value.billNo } : {}),
|
|
205
|
+
...(value.linkMan !== undefined ? { linkMan: value.linkMan } : {}),
|
|
206
|
+
...(value.phoneNo !== undefined ? { phoneNo: value.phoneNo } : {}),
|
|
207
|
+
...(value.predName !== undefined ? { predName: value.predName } : {}),
|
|
208
|
+
...(value.predBranchName !== undefined ? { predOrgName: value.predBranchName } : {}),
|
|
209
|
+
...(value.purpose !== undefined ? { purpose: value.purpose } : {}),
|
|
210
|
+
...(value.remark !== undefined ? { remark: value.remark } : {}),
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
133
214
|
function createQueryParams(filters: RmbPositionForecastFilter): RmbPositionForecastQueryParams {
|
|
134
215
|
const predStatus = filters.deleteStatus === '1'
|
|
135
216
|
? '3,4,5'
|
|
@@ -178,3 +259,54 @@ export async function queryRmbPositionForecasts(
|
|
|
178
259
|
totalCount,
|
|
179
260
|
}
|
|
180
261
|
}
|
|
262
|
+
|
|
263
|
+
/** 新增人民币头寸预报(120101001)。 */
|
|
264
|
+
export function createRmbPositionForecast(value: RmbPositionForecastMutationValue) {
|
|
265
|
+
return baseHttpClient.post<TamResponse<Record<string, never>>>(
|
|
266
|
+
CREATE_TRAN_CODE,
|
|
267
|
+
{
|
|
268
|
+
...toProtocolMutationBody(value),
|
|
269
|
+
custInfoSeq: '',
|
|
270
|
+
},
|
|
271
|
+
)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** 修改人民币头寸预报,接口以 predRefSeq 接收列表中的 predRefNo(120101002)。 */
|
|
275
|
+
export function updateRmbPositionForecast(value: RmbPositionForecastMutationValue) {
|
|
276
|
+
const predRefSeq = String(value.predRefNo ?? '').trim()
|
|
277
|
+
if (!predRefSeq) throw new Error('预报流水号不能为空')
|
|
278
|
+
|
|
279
|
+
return baseHttpClient.post<TamResponse<Record<string, never>>>(
|
|
280
|
+
UPDATE_TRAN_CODE,
|
|
281
|
+
{
|
|
282
|
+
...toProtocolMutationBody(value),
|
|
283
|
+
custRefSeq: '',
|
|
284
|
+
predRefSeq,
|
|
285
|
+
},
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** 删除人民币头寸预报,文档字段名为 predRefSeqs(120101003)。 */
|
|
290
|
+
export function deleteRmbPositionForecast(predRefNos: string[]) {
|
|
291
|
+
const predRefSeqs = [...new Set(predRefNos.map((item) => item.trim()).filter(Boolean))]
|
|
292
|
+
if (predRefSeqs.length === 0) throw new Error('预报流水号不能为空')
|
|
293
|
+
|
|
294
|
+
return baseHttpClient.post<TamResponse<Record<string, never>>>(
|
|
295
|
+
DELETE_TRAN_CODE,
|
|
296
|
+
{ predRefSeqs },
|
|
297
|
+
)
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** 根据预报流水号查询完整详情(140101002)。 */
|
|
301
|
+
export async function getRmbPositionForecastDetail(
|
|
302
|
+
predRefNo: string,
|
|
303
|
+
signal?: AbortSignal,
|
|
304
|
+
): Promise<RmbPositionForecastDetail> {
|
|
305
|
+
const response = await baseHttpClient.post<TamResponse<RmbPositionForecastApiRow>>(
|
|
306
|
+
DETAIL_TRAN_CODE,
|
|
307
|
+
{ predRefNo },
|
|
308
|
+
{ signal },
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
return toFrontendDetail(response.body)
|
|
312
|
+
}
|
|
@@ -32,9 +32,17 @@ import {
|
|
|
32
32
|
verifyStatusOptions,
|
|
33
33
|
type SelectOption,
|
|
34
34
|
} from './options'
|
|
35
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
createRmbPositionForecast,
|
|
37
|
+
deleteRmbPositionForecast,
|
|
38
|
+
getRmbPositionForecastDetail,
|
|
39
|
+
queryRmbPositionForecasts,
|
|
40
|
+
updateRmbPositionForecast,
|
|
41
|
+
type RmbPositionForecastMutationValue,
|
|
42
|
+
} from './api'
|
|
36
43
|
import { getLocalDateString } from './mock'
|
|
37
44
|
import type {
|
|
45
|
+
RmbPositionForecastDetail,
|
|
38
46
|
RmbPositionForecastFilter,
|
|
39
47
|
RmbPositionForecastRow,
|
|
40
48
|
} from './types'
|
|
@@ -125,14 +133,17 @@ let activeQueryController: AbortController | null = null
|
|
|
125
133
|
|
|
126
134
|
const detailVisible = ref(false)
|
|
127
135
|
const transactionVisible = ref(false)
|
|
128
|
-
const detailRecord = ref<
|
|
136
|
+
const detailRecord = ref<RmbPositionForecastDetail | null>(null)
|
|
129
137
|
const transactionRecord = ref<RmbPositionForecastRow | null>(null)
|
|
138
|
+
const isDetailLoading = ref(false)
|
|
130
139
|
|
|
131
140
|
const editorVisible = ref(false)
|
|
132
141
|
const editorMode = ref<EditorMode>('add')
|
|
133
142
|
const editingRefNo = ref('')
|
|
134
143
|
const editorFormRef = ref<FormInstance>()
|
|
135
144
|
const editorForm = reactive<EditorForm>(createEditorForm())
|
|
145
|
+
const isSubmitting = ref(false)
|
|
146
|
+
const deletingRefNo = ref('')
|
|
136
147
|
|
|
137
148
|
const importVisible = ref(false)
|
|
138
149
|
const importFileName = ref('')
|
|
@@ -337,9 +348,19 @@ onBeforeUnmount(() => {
|
|
|
337
348
|
activeQueryController?.abort()
|
|
338
349
|
})
|
|
339
350
|
|
|
340
|
-
function openDetail(row: RmbPositionForecastRow) {
|
|
341
|
-
detailRecord.value =
|
|
351
|
+
async function openDetail(row: RmbPositionForecastRow) {
|
|
352
|
+
detailRecord.value = null
|
|
342
353
|
detailVisible.value = true
|
|
354
|
+
isDetailLoading.value = true
|
|
355
|
+
|
|
356
|
+
try {
|
|
357
|
+
detailRecord.value = await getRmbPositionForecastDetail(row.predRefNo)
|
|
358
|
+
} catch (error) {
|
|
359
|
+
detailVisible.value = false
|
|
360
|
+
ElMessage.error(error instanceof Error ? error.message : '人民币头寸预报详情查询失败')
|
|
361
|
+
} finally {
|
|
362
|
+
isDetailLoading.value = false
|
|
363
|
+
}
|
|
343
364
|
}
|
|
344
365
|
|
|
345
366
|
function openTransactionStatus(row: RmbPositionForecastRow) {
|
|
@@ -420,11 +441,6 @@ function openCopyEditor(row: RmbPositionForecastRow) {
|
|
|
420
441
|
editorVisible.value = true
|
|
421
442
|
}
|
|
422
443
|
|
|
423
|
-
function createReferenceNo() {
|
|
424
|
-
const datePart = getLocalDateString().replaceAll('-', '')
|
|
425
|
-
return `RMB${datePart}${String(Date.now()).slice(-7)}`
|
|
426
|
-
}
|
|
427
|
-
|
|
428
444
|
function getLocalDateTimeString() {
|
|
429
445
|
const now = new Date()
|
|
430
446
|
const pad = (value: number) => String(value).padStart(2, '0')
|
|
@@ -432,6 +448,8 @@ function getLocalDateTimeString() {
|
|
|
432
448
|
}
|
|
433
449
|
|
|
434
450
|
async function submitEditor() {
|
|
451
|
+
if (isSubmitting.value) return
|
|
452
|
+
|
|
435
453
|
try {
|
|
436
454
|
await editorFormRef.value?.validate()
|
|
437
455
|
} catch {
|
|
@@ -439,39 +457,44 @@ async function submitEditor() {
|
|
|
439
457
|
}
|
|
440
458
|
|
|
441
459
|
const existing = records.value.find((row) => row.predRefNo === editingRefNo.value)
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
|
|
460
|
+
const mode = editorMode.value
|
|
461
|
+
const mutationValue: RmbPositionForecastMutationValue = {
|
|
462
|
+
predRefNo: mode === 'edit' ? editingRefNo.value : undefined,
|
|
445
463
|
tradeDate: editorForm.tradeDate,
|
|
446
|
-
payDirection: editorForm.payDirection
|
|
447
|
-
payChannel: editorForm.payChannel
|
|
448
|
-
verifyStatus: editorMode.value === 'edit' && existing ? existing.verifyStatus : '1',
|
|
464
|
+
payDirection: editorForm.payDirection,
|
|
465
|
+
payChannel: editorForm.payChannel,
|
|
449
466
|
predAmount: editorForm.predAmount,
|
|
450
|
-
verifyAmount: editorMode.value === 'edit' && existing ? existing.verifyAmount : 0,
|
|
451
467
|
groundBranch: editorForm.groundBranch.trim(),
|
|
452
|
-
groundBranchCode: existing?.groundBranchCode
|
|
453
|
-
clientType: editorForm.clientType
|
|
468
|
+
groundBranchCode: existing?.groundBranchCode,
|
|
469
|
+
clientType: editorForm.clientType,
|
|
454
470
|
clientName: editorForm.clientName.trim(),
|
|
455
471
|
counterpartyName: editorForm.counterpartyName.trim(),
|
|
456
|
-
standardName: editorForm.standardName.trim(),
|
|
457
472
|
counterpartyAccount: editorForm.counterpartyAccount.trim(),
|
|
458
|
-
businessType: editorForm.businessType
|
|
459
|
-
forecastDate:
|
|
473
|
+
businessType: editorForm.businessType,
|
|
474
|
+
forecastDate: mode === 'edit' && existing
|
|
475
|
+
? existing.forecastDate
|
|
476
|
+
: getLocalDateTimeString(),
|
|
460
477
|
}
|
|
461
478
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
ElMessage.success(editorMode.value === 'copy' ? '预报复制成功' : '预报新增成功')
|
|
470
|
-
}
|
|
479
|
+
isSubmitting.value = true
|
|
480
|
+
try {
|
|
481
|
+
if (mode === 'edit') {
|
|
482
|
+
await updateRmbPositionForecast(mutationValue)
|
|
483
|
+
} else {
|
|
484
|
+
await createRmbPositionForecast(mutationValue)
|
|
485
|
+
}
|
|
471
486
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
487
|
+
editorVisible.value = false
|
|
488
|
+
const targetPage = mode === 'edit' ? currentPage.value : 1
|
|
489
|
+
await loadForecasts(cloneFilter(appliedFilters.value), targetPage, pageSize.value)
|
|
490
|
+
ElMessage.success(
|
|
491
|
+
mode === 'edit' ? '预报修改成功' : mode === 'copy' ? '预报复制成功' : '预报新增成功',
|
|
492
|
+
)
|
|
493
|
+
} catch (error) {
|
|
494
|
+
ElMessage.error(error instanceof Error ? error.message : '人民币头寸预报保存失败')
|
|
495
|
+
} finally {
|
|
496
|
+
isSubmitting.value = false
|
|
497
|
+
}
|
|
475
498
|
}
|
|
476
499
|
|
|
477
500
|
async function handleDelete(row: RmbPositionForecastRow) {
|
|
@@ -501,15 +524,20 @@ async function handleDelete(row: RmbPositionForecastRow) {
|
|
|
501
524
|
return
|
|
502
525
|
}
|
|
503
526
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
527
|
+
deletingRefNo.value = row.predRefNo
|
|
528
|
+
try {
|
|
529
|
+
await deleteRmbPositionForecast([row.predRefNo])
|
|
530
|
+
await loadForecasts(
|
|
531
|
+
cloneFilter(appliedFilters.value),
|
|
532
|
+
currentPage.value,
|
|
533
|
+
pageSize.value,
|
|
534
|
+
)
|
|
535
|
+
ElMessage.success('删除操作成功')
|
|
536
|
+
} catch (error) {
|
|
537
|
+
ElMessage.error(error instanceof Error ? error.message : '人民币头寸预报删除失败')
|
|
538
|
+
} finally {
|
|
539
|
+
deletingRefNo.value = ''
|
|
540
|
+
}
|
|
513
541
|
}
|
|
514
542
|
|
|
515
543
|
const handleUploadChange: UploadProps['onChange'] = (file) => {
|
|
@@ -852,7 +880,15 @@ async function exportCsv() {
|
|
|
852
880
|
<el-button link type="primary" size="small" :icon="EditPen" @click.stop="openEditEditor(row)">
|
|
853
881
|
修改
|
|
854
882
|
</el-button>
|
|
855
|
-
<el-button
|
|
883
|
+
<el-button
|
|
884
|
+
link
|
|
885
|
+
type="danger"
|
|
886
|
+
size="small"
|
|
887
|
+
:icon="Delete"
|
|
888
|
+
:loading="deletingRefNo === row.predRefNo"
|
|
889
|
+
:disabled="Boolean(deletingRefNo) && deletingRefNo !== row.predRefNo"
|
|
890
|
+
@click.stop="handleDelete(row)"
|
|
891
|
+
>
|
|
856
892
|
删除
|
|
857
893
|
</el-button>
|
|
858
894
|
<el-button link type="primary" size="small" :icon="CopyDocument" @click.stop="openCopyEditor(row)">
|
|
@@ -865,27 +901,39 @@ async function exportCsv() {
|
|
|
865
901
|
</section>
|
|
866
902
|
|
|
867
903
|
<el-dialog v-model="detailVisible" title="人民币头寸预报详细信息" width="860px" destroy-on-close>
|
|
868
|
-
<
|
|
869
|
-
<el-descriptions-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
904
|
+
<div v-loading="isDetailLoading" class="detail-loading">
|
|
905
|
+
<el-descriptions v-if="detailRecord" :column="3" border class="detail-descriptions">
|
|
906
|
+
<el-descriptions-item label="预报流水号" :span="2">{{ detailRecord.predRefNo }}</el-descriptions-item>
|
|
907
|
+
<el-descriptions-item label="预报状态">
|
|
908
|
+
{{ getOptionLabel(forecastStatusOptions, detailRecord.predStatus) }}
|
|
909
|
+
</el-descriptions-item>
|
|
910
|
+
<el-descriptions-item label="交易日期">{{ formatCompactDate(detailRecord.tradeDate) }}</el-descriptions-item>
|
|
911
|
+
<el-descriptions-item label="收支方向">{{ getOptionLabel(payDirectionOptions, detailRecord.payDirection) }}</el-descriptions-item>
|
|
912
|
+
<el-descriptions-item label="支付渠道">{{ getOptionLabel(payChannelOptions, detailRecord.payChannel) }}</el-descriptions-item>
|
|
913
|
+
<el-descriptions-item label="预报金额">{{ formatMoney(detailRecord.predAmount) }} 元</el-descriptions-item>
|
|
914
|
+
<el-descriptions-item label="已核销金额">{{ formatMoney(detailRecord.verifyAmount) }} 元</el-descriptions-item>
|
|
915
|
+
<el-descriptions-item label="核销状态">{{ getOptionLabel(verifyStatusOptions, detailRecord.verifyStatus) }}</el-descriptions-item>
|
|
916
|
+
<el-descriptions-item label="落地机构" :span="2">{{ detailRecord.groundBranch }}</el-descriptions-item>
|
|
917
|
+
<el-descriptions-item label="机构代码">{{ detailRecord.groundBranchCode }}</el-descriptions-item>
|
|
918
|
+
<el-descriptions-item label="预报机构" :span="2">{{ detailRecord.predBranchName || detailRecord.predBranch || '—' }}</el-descriptions-item>
|
|
919
|
+
<el-descriptions-item label="预报人员">{{ detailRecord.predName || '—' }}</el-descriptions-item>
|
|
920
|
+
<el-descriptions-item label="客户类型">{{ getOptionLabel(clientTypeOptions, detailRecord.clientType) }}</el-descriptions-item>
|
|
921
|
+
<el-descriptions-item label="客户名称" :span="2">{{ detailRecord.clientName }}</el-descriptions-item>
|
|
922
|
+
<el-descriptions-item label="交易对手名称" :span="2">{{ detailRecord.counterpartyName || '—' }}</el-descriptions-item>
|
|
923
|
+
<el-descriptions-item label="交易对手账号">{{ detailRecord.counterpartyAccount || '—' }}</el-descriptions-item>
|
|
924
|
+
<el-descriptions-item label="标准名称" :span="2">{{ detailRecord.standardName || '—' }}</el-descriptions-item>
|
|
925
|
+
<el-descriptions-item label="业务类型">{{ getOptionLabel(businessTypeOptions, detailRecord.businessType) }}</el-descriptions-item>
|
|
926
|
+
<el-descriptions-item label="联系人">{{ detailRecord.linkMan || '—' }}</el-descriptions-item>
|
|
927
|
+
<el-descriptions-item label="联系电话">{{ detailRecord.phoneNo || '—' }}</el-descriptions-item>
|
|
928
|
+
<el-descriptions-item label="额度标志">{{ detailRecord.eduFlag || '—' }}</el-descriptions-item>
|
|
929
|
+
<el-descriptions-item label="票号">{{ detailRecord.billNo || '—' }}</el-descriptions-item>
|
|
930
|
+
<el-descriptions-item label="出票日">{{ detailRecord.billDate || '—' }}</el-descriptions-item>
|
|
931
|
+
<el-descriptions-item label="预报人员编号">{{ detailRecord.predCode || '—' }}</el-descriptions-item>
|
|
932
|
+
<el-descriptions-item label="用途" :span="3">{{ detailRecord.purpose || '—' }}</el-descriptions-item>
|
|
933
|
+
<el-descriptions-item label="备注" :span="3">{{ detailRecord.remark || '—' }}</el-descriptions-item>
|
|
934
|
+
<el-descriptions-item label="预报日期" :span="3">{{ detailRecord.forecastDate }}</el-descriptions-item>
|
|
935
|
+
</el-descriptions>
|
|
936
|
+
</div>
|
|
889
937
|
<template #footer>
|
|
890
938
|
<el-button @click="detailVisible = false">关闭</el-button>
|
|
891
939
|
</template>
|
|
@@ -966,13 +1014,13 @@ async function exportCsv() {
|
|
|
966
1014
|
<el-input v-model="editorForm.counterpartyAccount" maxlength="40" placeholder="请输入" />
|
|
967
1015
|
</el-form-item>
|
|
968
1016
|
<el-form-item label="标准名称" class="editor-full-row">
|
|
969
|
-
<el-input v-model="editorForm.standardName"
|
|
1017
|
+
<el-input v-model="editorForm.standardName" disabled placeholder="由详情接口返回" />
|
|
970
1018
|
</el-form-item>
|
|
971
1019
|
</div>
|
|
972
1020
|
</el-form>
|
|
973
1021
|
<template #footer>
|
|
974
1022
|
<el-button @click="editorVisible = false">取消</el-button>
|
|
975
|
-
<el-button type="primary" @click="submitEditor">保存</el-button>
|
|
1023
|
+
<el-button type="primary" :loading="isSubmitting" @click="submitEditor">保存</el-button>
|
|
976
1024
|
</template>
|
|
977
1025
|
</el-dialog>
|
|
978
1026
|
|
|
@@ -1263,6 +1311,10 @@ async function exportCsv() {
|
|
|
1263
1311
|
color: #d14343;
|
|
1264
1312
|
}
|
|
1265
1313
|
|
|
1314
|
+
.detail-loading {
|
|
1315
|
+
min-height: 120px;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1266
1318
|
.detail-descriptions :deep(.el-descriptions__label) {
|
|
1267
1319
|
width: 126px;
|
|
1268
1320
|
color: #667085;
|
|
@@ -83,6 +83,21 @@ export type RmbPositionForecastRow = {
|
|
|
83
83
|
forecastDate: string
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/** 140101002 详情接口相较列表额外返回的业务字段。 */
|
|
87
|
+
export type RmbPositionForecastDetail = RmbPositionForecastRow & {
|
|
88
|
+
billDate: string
|
|
89
|
+
billNo: string
|
|
90
|
+
eduFlag: string
|
|
91
|
+
linkMan: string
|
|
92
|
+
phoneNo: string
|
|
93
|
+
predBranch: string
|
|
94
|
+
predBranchName: string
|
|
95
|
+
predCode: string
|
|
96
|
+
predName: string
|
|
97
|
+
purpose: string
|
|
98
|
+
remark: string
|
|
99
|
+
}
|
|
100
|
+
|
|
86
101
|
/** 列表查询的标准分页结果。 */
|
|
87
102
|
export type RmbPositionForecastListResult = {
|
|
88
103
|
result: RmbPositionForecastRow[]
|