verce-vue-test 0.0.75 → 0.0.76
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/env.d.ts +14 -0
- package/package.json +1 -1
- package/src/App.vue +5 -0
- package/src/router/index.ts +6 -1
- package/src/views/ForecastInfo/store.ts +2 -2
- package/src/views/RmbPositionEstimationView.vue +990 -0
- package/src/views/foreign-currency-position-forecast/api.ts +448 -0
- package/src/views/foreign-currency-position-forecast/components/ForeignPositionForecastEditor.vue +1013 -0
- package/src/views/{ForeignCurrencyPositionForecastView.vue → foreign-currency-position-forecast/index.vue} +314 -386
- package/src/views/foreign-currency-position-forecast/mock.ts +1 -146
- package/src/views/foreign-currency-position-forecast/store.ts +129 -0
- package/src/views/rmb-position-estimation/api.ts +221 -0
- package/src/views/foreign-currency-position-forecast/ForeignPositionForecastEditor.vue +0 -752
|
@@ -1,752 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, nextTick, reactive, ref } from 'vue'
|
|
3
|
-
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
|
4
|
-
import { ArrowLeft, Check, Search } from '@element-plus/icons-vue'
|
|
5
|
-
import type { ForecastEditorMode, ForecastEditorValue } from './editor'
|
|
6
|
-
import {
|
|
7
|
-
formatDate,
|
|
8
|
-
mockCurrentUser,
|
|
9
|
-
type BusinessType,
|
|
10
|
-
type ClientType,
|
|
11
|
-
type ForecastType,
|
|
12
|
-
type ForecastWay,
|
|
13
|
-
type ForeignExchangeType,
|
|
14
|
-
type ForeignPositionForecast,
|
|
15
|
-
type PaymentDirection,
|
|
16
|
-
type PaymentRoute,
|
|
17
|
-
} from './mock'
|
|
18
|
-
import {
|
|
19
|
-
businessTypeOptions,
|
|
20
|
-
clientTypeOptions,
|
|
21
|
-
currencyOptions,
|
|
22
|
-
forecastTypeOptions,
|
|
23
|
-
foreignExchangeTypeOptions,
|
|
24
|
-
organizationOptions,
|
|
25
|
-
payDirectionOptions,
|
|
26
|
-
paymentRouteOptions,
|
|
27
|
-
} from './options'
|
|
28
|
-
|
|
29
|
-
type EditorFormState = {
|
|
30
|
-
predWay: ForecastWay
|
|
31
|
-
businessType: '' | BusinessType
|
|
32
|
-
payDirection: '' | PaymentDirection
|
|
33
|
-
groundBranch: string
|
|
34
|
-
groundBranchCode: string
|
|
35
|
-
predAmount: number | string | undefined
|
|
36
|
-
currency: string
|
|
37
|
-
valueDate: string
|
|
38
|
-
paymentRoute: '' | PaymentRoute
|
|
39
|
-
bankAccount: string
|
|
40
|
-
clientType: '' | ClientType
|
|
41
|
-
clientId: string
|
|
42
|
-
clientName: string
|
|
43
|
-
clientAccount: string
|
|
44
|
-
counterpartyName: string
|
|
45
|
-
counterpartyAccount: string
|
|
46
|
-
receivingBank: string
|
|
47
|
-
receivingBankSwiftCode: string
|
|
48
|
-
foreignExchangeType: '' | ForeignExchangeType
|
|
49
|
-
intermediaryBankSwiftCode: string
|
|
50
|
-
counterpartySwiftCode: string
|
|
51
|
-
documentBusinessNo: string
|
|
52
|
-
purpose: string
|
|
53
|
-
remark: string
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const props = withDefaults(
|
|
57
|
-
defineProps<{
|
|
58
|
-
mode: ForecastEditorMode
|
|
59
|
-
initialRow?: ForeignPositionForecast | null
|
|
60
|
-
saving?: boolean
|
|
61
|
-
}>(),
|
|
62
|
-
{
|
|
63
|
-
initialRow: null,
|
|
64
|
-
saving: false,
|
|
65
|
-
},
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
const emit = defineEmits<{
|
|
69
|
-
back: []
|
|
70
|
-
submit: [value: ForecastEditorValue]
|
|
71
|
-
}>()
|
|
72
|
-
|
|
73
|
-
const formRef = ref<FormInstance>()
|
|
74
|
-
|
|
75
|
-
function createEditorForm(row?: ForeignPositionForecast | null): EditorFormState {
|
|
76
|
-
return {
|
|
77
|
-
predWay: row?.predWay ?? 'PW01',
|
|
78
|
-
businessType: row?.businessType ?? '',
|
|
79
|
-
payDirection: row?.payDirection ?? '',
|
|
80
|
-
groundBranch: row?.groundBranch ?? mockCurrentUser.department,
|
|
81
|
-
groundBranchCode: row?.groundBranchCode ?? mockCurrentUser.organizationCode,
|
|
82
|
-
predAmount: row?.predAmount,
|
|
83
|
-
currency: row?.currency ?? '',
|
|
84
|
-
valueDate: row?.valueDate ?? formatDate(new Date()),
|
|
85
|
-
paymentRoute: row?.paymentRoute ?? '',
|
|
86
|
-
bankAccount: row?.bankAccount ?? '',
|
|
87
|
-
clientType: row?.clientType ?? 'CT01',
|
|
88
|
-
clientId: row?.clientId ?? '',
|
|
89
|
-
clientName: row?.clientName ?? '',
|
|
90
|
-
clientAccount: row?.clientAccount ?? '',
|
|
91
|
-
counterpartyName: row?.counterpartyName ?? '',
|
|
92
|
-
counterpartyAccount: row?.counterpartyAccount ?? '',
|
|
93
|
-
receivingBank: row?.receivingBank ?? '',
|
|
94
|
-
receivingBankSwiftCode: row?.receivingBankSwiftCode ?? '',
|
|
95
|
-
foreignExchangeType: row?.foreignExchangeType ?? '',
|
|
96
|
-
intermediaryBankSwiftCode: row?.intermediaryBankSwiftCode ?? '',
|
|
97
|
-
counterpartySwiftCode: row?.counterpartySwiftCode ?? '',
|
|
98
|
-
documentBusinessNo: row?.documentBusinessNo ?? '',
|
|
99
|
-
purpose: row?.purpose ?? '',
|
|
100
|
-
remark: row?.remark ?? '',
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const form = reactive<EditorFormState>(createEditorForm(props.initialRow))
|
|
105
|
-
|
|
106
|
-
const editorTitle = computed(() => (props.mode === 'add' ? '新增记录' : '修改记录'))
|
|
107
|
-
const forecastDate = computed(() => props.initialRow?.forecastTime.slice(0, 10) || formatDate(new Date()))
|
|
108
|
-
const forecasterName = computed(() => props.initialRow?.forecasterName || mockCurrentUser.userName)
|
|
109
|
-
const forecastDepartment = computed(() => props.initialRow?.forecastDepartment || mockCurrentUser.department)
|
|
110
|
-
const phoneNumber = computed(() => props.initialRow?.phoneNumber || mockCurrentUser.phoneNumber)
|
|
111
|
-
const clientFieldsDisabled = computed(() => form.businessType === '12' || form.businessType === '13')
|
|
112
|
-
const clientTypeRequired = computed(() => form.businessType === '10' || form.businessType === '11')
|
|
113
|
-
const clientDetailsRequired = computed(() => form.businessType === '10')
|
|
114
|
-
const foreignExchangeDisabled = computed(() => form.businessType === '13')
|
|
115
|
-
const foreignExchangeRequired = computed(() => Boolean(form.businessType) && form.businessType !== '13')
|
|
116
|
-
const documentBusinessRequired = computed(() => form.businessType === '11')
|
|
117
|
-
const counterpartyBaseDisabled = computed(
|
|
118
|
-
() => form.businessType === '11' || (form.businessType === '10' && form.payDirection === 'I'),
|
|
119
|
-
)
|
|
120
|
-
const counterpartyDetailsRequired = computed(
|
|
121
|
-
() => form.businessType === '13' || (form.businessType === '10' && form.payDirection === 'O'),
|
|
122
|
-
)
|
|
123
|
-
const counterpartyNameRequired = computed(
|
|
124
|
-
() => form.businessType === '12' || counterpartyDetailsRequired.value,
|
|
125
|
-
)
|
|
126
|
-
const intermediaryBankDisabled = computed(() => form.businessType === '11')
|
|
127
|
-
const clientSearchVisible = computed(
|
|
128
|
-
() => !clientFieldsDisabled.value && form.clientType === 'CT01',
|
|
129
|
-
)
|
|
130
|
-
const paymentRouteDisabled = computed(
|
|
131
|
-
() => !form.businessType || !form.payDirection || !form.currency,
|
|
132
|
-
)
|
|
133
|
-
const bankAccountDisabled = computed(
|
|
134
|
-
() => paymentRouteDisabled.value || !form.paymentRoute,
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
const currentForecastType = computed<ForecastType>(() => {
|
|
138
|
-
const today = formatDate(new Date())
|
|
139
|
-
if (form.valueDate > today) return 'PT01'
|
|
140
|
-
if (form.valueDate === today) return 'PT02'
|
|
141
|
-
return 'PT03'
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
const currentForecastTypeLabel = computed(
|
|
145
|
-
() => forecastTypeOptions.find((option) => option.value === currentForecastType.value)?.label ?? '',
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
const currencyClearingBanks: Record<string, string> = {
|
|
149
|
-
USD: '中国银行纽约分行',
|
|
150
|
-
EUR: '中国银行法兰克福分行',
|
|
151
|
-
HKD: '中国银行香港分行',
|
|
152
|
-
JPY: '中国银行东京分行',
|
|
153
|
-
GBP: '中国银行伦敦分行',
|
|
154
|
-
SGD: '中国银行新加坡分行',
|
|
155
|
-
AUD: '中国银行悉尼分行',
|
|
156
|
-
CAD: '中国银行多伦多分行',
|
|
157
|
-
CHF: '中国银行苏黎世分行',
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const availableBankAccounts = computed(() => {
|
|
161
|
-
if (bankAccountDisabled.value) return []
|
|
162
|
-
|
|
163
|
-
const directBank = currencyClearingBanks[form.currency] ?? `${form.currency} 境外清算行`
|
|
164
|
-
const routeBanks: Record<PaymentRoute, string[]> = {
|
|
165
|
-
'01': [directBank],
|
|
166
|
-
'02': [`总行${form.currency}转汇清算账户`, directBank],
|
|
167
|
-
'03': [`${form.groundBranch}${form.currency}内部清算账户`],
|
|
168
|
-
}
|
|
169
|
-
const options = [...(routeBanks[form.paymentRoute as PaymentRoute] ?? [])]
|
|
170
|
-
|
|
171
|
-
if (form.bankAccount && !options.includes(form.bankAccount)) options.unshift(form.bankAccount)
|
|
172
|
-
return options
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
const mockClientDirectory = [
|
|
176
|
-
{ id: 'C100001', name: '华远国际贸易有限公司', account: '6217800000000001' },
|
|
177
|
-
{ id: 'C100002', name: '海岳科技集团股份有限公司', account: '6217800000000002' },
|
|
178
|
-
{ id: 'C100003', name: '中盛航空服务有限公司', account: '6217800000000003' },
|
|
179
|
-
{ id: 'C100004', name: '远洋装备制造有限公司', account: '6217800000000004' },
|
|
180
|
-
{ id: 'C100005', name: '星河跨境电商有限公司', account: '6217800000000005' },
|
|
181
|
-
]
|
|
182
|
-
|
|
183
|
-
const formRules = computed<FormRules>(() => ({
|
|
184
|
-
businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
|
|
185
|
-
payDirection: [{ required: true, message: '请选择收支方向', trigger: 'change' }],
|
|
186
|
-
groundBranch: [{ required: true, message: '请选择落地机构', trigger: 'change' }],
|
|
187
|
-
predAmount: [
|
|
188
|
-
{ required: true, message: '请输入预报金额', trigger: 'blur' },
|
|
189
|
-
{
|
|
190
|
-
trigger: 'blur',
|
|
191
|
-
validator: (_rule, value, callback) => {
|
|
192
|
-
if (!Number.isFinite(Number(value)) || Number(value) <= 0) {
|
|
193
|
-
callback(new Error('预报金额必须大于 0'))
|
|
194
|
-
return
|
|
195
|
-
}
|
|
196
|
-
callback()
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
currency: [{ required: true, message: '请选择币种', trigger: 'change' }],
|
|
201
|
-
valueDate: [{ required: true, message: '请选择起息日', trigger: 'change' }],
|
|
202
|
-
paymentRoute: [{ required: true, message: '请选择汇款路径', trigger: 'change' }],
|
|
203
|
-
bankAccount: [{ required: true, message: '请选择我方账户行', trigger: 'change' }],
|
|
204
|
-
clientType: clientTypeRequired.value
|
|
205
|
-
? [{ required: true, message: '请选择客户类型', trigger: 'change' }]
|
|
206
|
-
: [],
|
|
207
|
-
clientName: clientDetailsRequired.value
|
|
208
|
-
? [{ required: true, message: '请输入客户名称', trigger: 'blur' }]
|
|
209
|
-
: [],
|
|
210
|
-
clientAccount: clientDetailsRequired.value
|
|
211
|
-
? [{ required: true, message: '请输入客户账号', trigger: 'blur' }]
|
|
212
|
-
: [],
|
|
213
|
-
counterpartyName: counterpartyNameRequired.value
|
|
214
|
-
? [{ required: true, message: '请输入交易对手名称', trigger: 'blur' }]
|
|
215
|
-
: [],
|
|
216
|
-
counterpartyAccount: counterpartyDetailsRequired.value
|
|
217
|
-
? [{ required: true, message: '请输入交易对手账号', trigger: 'blur' }]
|
|
218
|
-
: [],
|
|
219
|
-
receivingBank: counterpartyDetailsRequired.value
|
|
220
|
-
? [{ required: true, message: '请输入交易对手行名称', trigger: 'blur' }]
|
|
221
|
-
: [],
|
|
222
|
-
receivingBankSwiftCode: counterpartyDetailsRequired.value
|
|
223
|
-
? [{ required: true, message: '请输入交易对手行 SwiftCode', trigger: 'blur' }]
|
|
224
|
-
: [],
|
|
225
|
-
foreignExchangeType: foreignExchangeRequired.value
|
|
226
|
-
? [{ required: true, message: '请选择结汇/购汇/现汇', trigger: 'change' }]
|
|
227
|
-
: [],
|
|
228
|
-
documentBusinessNo: documentBusinessRequired.value
|
|
229
|
-
? [{ required: true, message: '请输入单证业务编号', trigger: 'blur' }]
|
|
230
|
-
: [],
|
|
231
|
-
}))
|
|
232
|
-
|
|
233
|
-
function clearCustomerFields() {
|
|
234
|
-
form.clientType = ''
|
|
235
|
-
form.clientId = ''
|
|
236
|
-
form.clientName = ''
|
|
237
|
-
form.clientAccount = ''
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function clearCounterpartyBaseFields() {
|
|
241
|
-
form.counterpartyName = ''
|
|
242
|
-
form.counterpartyAccount = ''
|
|
243
|
-
form.receivingBank = ''
|
|
244
|
-
form.receivingBankSwiftCode = ''
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function clearTransferDependencies() {
|
|
248
|
-
form.currency = ''
|
|
249
|
-
form.paymentRoute = ''
|
|
250
|
-
form.bankAccount = ''
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function clearValidation() {
|
|
254
|
-
nextTick(() => formRef.value?.clearValidate())
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function handleBusinessTypeChange(value: BusinessType) {
|
|
258
|
-
form.payDirection = ''
|
|
259
|
-
clearTransferDependencies()
|
|
260
|
-
form.documentBusinessNo = ''
|
|
261
|
-
form.foreignExchangeType = ''
|
|
262
|
-
|
|
263
|
-
if (value === '10' || value === '11') {
|
|
264
|
-
form.clientType = 'CT01'
|
|
265
|
-
form.clientId = ''
|
|
266
|
-
form.clientName = ''
|
|
267
|
-
form.clientAccount = ''
|
|
268
|
-
} else {
|
|
269
|
-
clearCustomerFields()
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
clearCounterpartyBaseFields()
|
|
273
|
-
form.intermediaryBankSwiftCode = ''
|
|
274
|
-
clearValidation()
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function handlePayDirectionChange() {
|
|
278
|
-
clearTransferDependencies()
|
|
279
|
-
if (form.businessType === '10') clearCounterpartyBaseFields()
|
|
280
|
-
clearValidation()
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function handleCurrencyChange() {
|
|
284
|
-
form.paymentRoute = ''
|
|
285
|
-
form.bankAccount = ''
|
|
286
|
-
clearValidation()
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function handlePaymentRouteChange() {
|
|
290
|
-
form.bankAccount = ''
|
|
291
|
-
clearValidation()
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function handleGroundBranchChange(value: string) {
|
|
295
|
-
form.groundBranchCode = organizationOptions.find((option) => option.value === value)?.code ?? ''
|
|
296
|
-
if (form.paymentRoute === '03') form.bankAccount = ''
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
function handleClientTypeChange() {
|
|
300
|
-
form.clientId = ''
|
|
301
|
-
form.clientName = ''
|
|
302
|
-
form.clientAccount = ''
|
|
303
|
-
clearValidation()
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function handleClientSearch() {
|
|
307
|
-
const keyword = form.clientName.trim().toLocaleLowerCase('zh-CN')
|
|
308
|
-
if (!keyword) {
|
|
309
|
-
ElMessage.warning('客户名称不能为空')
|
|
310
|
-
return
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
const match = mockClientDirectory.find((client) => client.name.toLocaleLowerCase('zh-CN').includes(keyword))
|
|
314
|
-
if (!match) {
|
|
315
|
-
ElMessage.info('未查询到匹配客户,可继续手工录入')
|
|
316
|
-
return
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
form.clientId = match.id
|
|
320
|
-
form.clientName = match.name
|
|
321
|
-
form.clientAccount = match.account
|
|
322
|
-
ElMessage.success('客户信息已回填')
|
|
323
|
-
clearValidation()
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
function handleValueDateChange(value: string) {
|
|
327
|
-
if (!value || !form.currency) return
|
|
328
|
-
const date = new Date(`${value}T12:00:00`)
|
|
329
|
-
if (date.getDay() === 0 || date.getDay() === 6) {
|
|
330
|
-
ElMessage.warning(`当前所选日期为币种 [${form.currency}] 的节假日`)
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
function disablePastDate(date: Date) {
|
|
335
|
-
const today = new Date()
|
|
336
|
-
today.setHours(0, 0, 0, 0)
|
|
337
|
-
return date.getTime() < today.getTime()
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
async function handleSubmit() {
|
|
341
|
-
const valid = await formRef.value?.validate().catch(() => false)
|
|
342
|
-
if (!valid) return
|
|
343
|
-
|
|
344
|
-
if (forecastDate.value > form.valueDate) {
|
|
345
|
-
ElMessage.warning('预报日期不能晚于起息日')
|
|
346
|
-
return
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
const organization = organizationOptions.find((option) => option.value === form.groundBranch)
|
|
350
|
-
const value: ForecastEditorValue = {
|
|
351
|
-
predWay: form.predWay,
|
|
352
|
-
predType: currentForecastType.value,
|
|
353
|
-
businessType: form.businessType as BusinessType,
|
|
354
|
-
payDirection: form.payDirection as PaymentDirection,
|
|
355
|
-
groundBranch: form.groundBranch.trim(),
|
|
356
|
-
groundBranchCode: organization?.code ?? form.groundBranchCode,
|
|
357
|
-
predAmount: Number(form.predAmount),
|
|
358
|
-
currency: form.currency,
|
|
359
|
-
valueDate: form.valueDate,
|
|
360
|
-
paymentRoute: form.paymentRoute as PaymentRoute,
|
|
361
|
-
bankAccount: form.bankAccount,
|
|
362
|
-
clientType: form.clientType,
|
|
363
|
-
clientId: form.clientId.trim(),
|
|
364
|
-
clientName: form.clientName.trim(),
|
|
365
|
-
clientAccount: form.clientAccount.trim(),
|
|
366
|
-
counterpartyName: form.counterpartyName.trim(),
|
|
367
|
-
counterpartyAccount: form.counterpartyAccount.trim(),
|
|
368
|
-
receivingBank: form.receivingBank.trim(),
|
|
369
|
-
receivingBankSwiftCode: form.receivingBankSwiftCode.trim().toUpperCase(),
|
|
370
|
-
foreignExchangeType: form.foreignExchangeType,
|
|
371
|
-
intermediaryBankSwiftCode: form.intermediaryBankSwiftCode.trim().toUpperCase(),
|
|
372
|
-
counterpartySwiftCode: form.counterpartySwiftCode.trim().toUpperCase(),
|
|
373
|
-
documentBusinessNo: form.documentBusinessNo.trim(),
|
|
374
|
-
purpose: form.purpose.trim(),
|
|
375
|
-
remark: form.remark.trim(),
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
emit('submit', value)
|
|
379
|
-
}
|
|
380
|
-
</script>
|
|
381
|
-
|
|
382
|
-
<template>
|
|
383
|
-
<section class="forecast-editor-panel" :aria-label="editorTitle">
|
|
384
|
-
<header class="editor-header">
|
|
385
|
-
<div>
|
|
386
|
-
<div class="editor-heading-line">
|
|
387
|
-
<h2>{{ editorTitle }}</h2>
|
|
388
|
-
<el-tag size="small" effect="plain">{{ currentForecastTypeLabel }}</el-tag>
|
|
389
|
-
</div>
|
|
390
|
-
<p>{{ mode === 'add' ? '预报流水号将在提交后由系统生成' : `预报流水号:${initialRow?.predRefNo}` }}</p>
|
|
391
|
-
</div>
|
|
392
|
-
<el-button :icon="ArrowLeft" :disabled="saving" @click="emit('back')">返回列表</el-button>
|
|
393
|
-
</header>
|
|
394
|
-
|
|
395
|
-
<div class="editor-body">
|
|
396
|
-
<el-form
|
|
397
|
-
ref="formRef"
|
|
398
|
-
:model="form"
|
|
399
|
-
:rules="formRules"
|
|
400
|
-
label-position="top"
|
|
401
|
-
size="small"
|
|
402
|
-
class="forecast-editor-form"
|
|
403
|
-
>
|
|
404
|
-
<div class="editor-grid">
|
|
405
|
-
<el-form-item label="业务类型" prop="businessType">
|
|
406
|
-
<el-select v-model="form.businessType" placeholder="请选择" @change="handleBusinessTypeChange">
|
|
407
|
-
<el-option v-for="option in businessTypeOptions" :key="option.value" v-bind="option" />
|
|
408
|
-
</el-select>
|
|
409
|
-
</el-form-item>
|
|
410
|
-
|
|
411
|
-
<el-form-item label="收支方向" prop="payDirection">
|
|
412
|
-
<el-select v-model="form.payDirection" placeholder="请选择" @change="handlePayDirectionChange">
|
|
413
|
-
<el-option v-for="option in payDirectionOptions" :key="option.value" v-bind="option" />
|
|
414
|
-
</el-select>
|
|
415
|
-
</el-form-item>
|
|
416
|
-
|
|
417
|
-
<el-form-item label="预报人员">
|
|
418
|
-
<el-input :model-value="forecasterName" disabled />
|
|
419
|
-
</el-form-item>
|
|
420
|
-
|
|
421
|
-
<el-form-item label="预报机构">
|
|
422
|
-
<el-input :model-value="forecastDepartment" disabled />
|
|
423
|
-
</el-form-item>
|
|
424
|
-
|
|
425
|
-
<el-form-item label="联系电话">
|
|
426
|
-
<el-input :model-value="phoneNumber" disabled />
|
|
427
|
-
</el-form-item>
|
|
428
|
-
|
|
429
|
-
<el-form-item label="落地机构" prop="groundBranch">
|
|
430
|
-
<el-select
|
|
431
|
-
v-model="form.groundBranch"
|
|
432
|
-
filterable
|
|
433
|
-
placeholder="请选择机构"
|
|
434
|
-
@change="handleGroundBranchChange"
|
|
435
|
-
>
|
|
436
|
-
<el-option
|
|
437
|
-
v-for="option in organizationOptions"
|
|
438
|
-
:key="option.code"
|
|
439
|
-
:label="option.label"
|
|
440
|
-
:value="option.value"
|
|
441
|
-
/>
|
|
442
|
-
</el-select>
|
|
443
|
-
</el-form-item>
|
|
444
|
-
|
|
445
|
-
<el-form-item label="预报金额(元)" prop="predAmount">
|
|
446
|
-
<ElInputThousandth v-model="form.predAmount" placeholder="请输入预报金额" />
|
|
447
|
-
</el-form-item>
|
|
448
|
-
|
|
449
|
-
<el-form-item label="预报日期">
|
|
450
|
-
<el-input :model-value="forecastDate" disabled />
|
|
451
|
-
</el-form-item>
|
|
452
|
-
|
|
453
|
-
<el-form-item label="币种" prop="currency">
|
|
454
|
-
<el-select v-model="form.currency" filterable placeholder="请选择" @change="handleCurrencyChange">
|
|
455
|
-
<el-option v-for="option in currencyOptions" :key="option.value" v-bind="option" />
|
|
456
|
-
</el-select>
|
|
457
|
-
</el-form-item>
|
|
458
|
-
|
|
459
|
-
<el-form-item label="起息日" prop="valueDate">
|
|
460
|
-
<el-date-picker
|
|
461
|
-
v-model="form.valueDate"
|
|
462
|
-
type="date"
|
|
463
|
-
value-format="YYYY-MM-DD"
|
|
464
|
-
format="YYYY-MM-DD"
|
|
465
|
-
:disabled-date="disablePastDate"
|
|
466
|
-
placeholder="请选择"
|
|
467
|
-
@change="handleValueDateChange"
|
|
468
|
-
/>
|
|
469
|
-
</el-form-item>
|
|
470
|
-
|
|
471
|
-
<el-form-item label="汇款路径" prop="paymentRoute">
|
|
472
|
-
<el-select
|
|
473
|
-
v-model="form.paymentRoute"
|
|
474
|
-
:disabled="paymentRouteDisabled"
|
|
475
|
-
:placeholder="paymentRouteDisabled ? '请先选择业务类型、方向和币种' : '请选择'"
|
|
476
|
-
@change="handlePaymentRouteChange"
|
|
477
|
-
>
|
|
478
|
-
<el-option v-for="option in paymentRouteOptions" :key="option.value" v-bind="option" />
|
|
479
|
-
</el-select>
|
|
480
|
-
</el-form-item>
|
|
481
|
-
|
|
482
|
-
<el-form-item label="单证业务编号" prop="documentBusinessNo">
|
|
483
|
-
<el-input v-model="form.documentBusinessNo" maxlength="80" placeholder="请输入" />
|
|
484
|
-
</el-form-item>
|
|
485
|
-
|
|
486
|
-
<el-form-item label="客户类型" prop="clientType">
|
|
487
|
-
<el-select
|
|
488
|
-
v-model="form.clientType"
|
|
489
|
-
:disabled="clientFieldsDisabled"
|
|
490
|
-
placeholder="请选择"
|
|
491
|
-
@change="handleClientTypeChange"
|
|
492
|
-
>
|
|
493
|
-
<el-option v-for="option in clientTypeOptions" :key="option.value" v-bind="option" />
|
|
494
|
-
</el-select>
|
|
495
|
-
</el-form-item>
|
|
496
|
-
|
|
497
|
-
<el-form-item label="客户名称" prop="clientName">
|
|
498
|
-
<div class="control-with-action">
|
|
499
|
-
<el-input
|
|
500
|
-
v-model="form.clientName"
|
|
501
|
-
:disabled="clientFieldsDisabled"
|
|
502
|
-
maxlength="80"
|
|
503
|
-
placeholder="请输入客户名称"
|
|
504
|
-
/>
|
|
505
|
-
<el-button
|
|
506
|
-
v-if="clientSearchVisible"
|
|
507
|
-
:icon="Search"
|
|
508
|
-
:disabled="clientFieldsDisabled"
|
|
509
|
-
@click="handleClientSearch"
|
|
510
|
-
>
|
|
511
|
-
查询
|
|
512
|
-
</el-button>
|
|
513
|
-
</div>
|
|
514
|
-
</el-form-item>
|
|
515
|
-
|
|
516
|
-
<el-form-item label="客户账号" prop="clientAccount">
|
|
517
|
-
<el-input
|
|
518
|
-
v-model="form.clientAccount"
|
|
519
|
-
:disabled="clientFieldsDisabled"
|
|
520
|
-
maxlength="40"
|
|
521
|
-
placeholder="请输入客户账号"
|
|
522
|
-
/>
|
|
523
|
-
</el-form-item>
|
|
524
|
-
<div class="form-grid-spacer" aria-hidden="true"></div>
|
|
525
|
-
|
|
526
|
-
<el-form-item label="交易对手名称" prop="counterpartyName">
|
|
527
|
-
<el-input
|
|
528
|
-
v-model="form.counterpartyName"
|
|
529
|
-
:disabled="counterpartyBaseDisabled"
|
|
530
|
-
maxlength="80"
|
|
531
|
-
placeholder="请输入交易对手名称"
|
|
532
|
-
/>
|
|
533
|
-
</el-form-item>
|
|
534
|
-
|
|
535
|
-
<el-form-item label="交易对手账号" prop="counterpartyAccount">
|
|
536
|
-
<el-input
|
|
537
|
-
v-model="form.counterpartyAccount"
|
|
538
|
-
:disabled="counterpartyBaseDisabled"
|
|
539
|
-
maxlength="40"
|
|
540
|
-
placeholder="请输入交易对手账号"
|
|
541
|
-
/>
|
|
542
|
-
</el-form-item>
|
|
543
|
-
|
|
544
|
-
<el-form-item label="交易对手行名称" prop="receivingBank">
|
|
545
|
-
<el-input
|
|
546
|
-
v-model="form.receivingBank"
|
|
547
|
-
:disabled="counterpartyBaseDisabled"
|
|
548
|
-
maxlength="30"
|
|
549
|
-
placeholder="请输入交易对手行名称"
|
|
550
|
-
/>
|
|
551
|
-
</el-form-item>
|
|
552
|
-
|
|
553
|
-
<el-form-item label="交易对手行 SwiftCode" prop="receivingBankSwiftCode">
|
|
554
|
-
<el-input
|
|
555
|
-
v-model="form.receivingBankSwiftCode"
|
|
556
|
-
:disabled="counterpartyBaseDisabled"
|
|
557
|
-
maxlength="30"
|
|
558
|
-
placeholder="请输入 SwiftCode"
|
|
559
|
-
/>
|
|
560
|
-
</el-form-item>
|
|
561
|
-
|
|
562
|
-
<el-form-item label="结汇/购汇/现汇" prop="foreignExchangeType">
|
|
563
|
-
<el-select
|
|
564
|
-
v-model="form.foreignExchangeType"
|
|
565
|
-
:disabled="foreignExchangeDisabled"
|
|
566
|
-
placeholder="请选择"
|
|
567
|
-
>
|
|
568
|
-
<el-option v-for="option in foreignExchangeTypeOptions" :key="option.value" v-bind="option" />
|
|
569
|
-
</el-select>
|
|
570
|
-
</el-form-item>
|
|
571
|
-
|
|
572
|
-
<el-form-item label="中间行 SwiftCode">
|
|
573
|
-
<el-input
|
|
574
|
-
v-model="form.intermediaryBankSwiftCode"
|
|
575
|
-
:disabled="intermediaryBankDisabled"
|
|
576
|
-
maxlength="30"
|
|
577
|
-
placeholder="选填"
|
|
578
|
-
/>
|
|
579
|
-
</el-form-item>
|
|
580
|
-
|
|
581
|
-
<el-form-item label="我方账户行" prop="bankAccount">
|
|
582
|
-
<el-select
|
|
583
|
-
v-model="form.bankAccount"
|
|
584
|
-
filterable
|
|
585
|
-
:disabled="bankAccountDisabled"
|
|
586
|
-
:placeholder="bankAccountDisabled ? '请先选择汇款路径' : '请选择'"
|
|
587
|
-
>
|
|
588
|
-
<el-option v-for="bank in availableBankAccounts" :key="bank" :label="bank" :value="bank" />
|
|
589
|
-
</el-select>
|
|
590
|
-
</el-form-item>
|
|
591
|
-
|
|
592
|
-
<el-form-item label="交易对手 SwiftCode">
|
|
593
|
-
<el-input v-model="form.counterpartySwiftCode" maxlength="30" placeholder="选填" />
|
|
594
|
-
</el-form-item>
|
|
595
|
-
|
|
596
|
-
<el-form-item label="用途/原因" class="editor-full-row">
|
|
597
|
-
<el-input v-model="form.purpose" maxlength="255" placeholder="请输入用途或原因" />
|
|
598
|
-
</el-form-item>
|
|
599
|
-
|
|
600
|
-
<el-form-item label="备注" class="editor-full-row">
|
|
601
|
-
<el-input
|
|
602
|
-
v-model="form.remark"
|
|
603
|
-
type="textarea"
|
|
604
|
-
:rows="4"
|
|
605
|
-
maxlength="255"
|
|
606
|
-
show-word-limit
|
|
607
|
-
placeholder="请输入备注"
|
|
608
|
-
/>
|
|
609
|
-
</el-form-item>
|
|
610
|
-
</div>
|
|
611
|
-
</el-form>
|
|
612
|
-
</div>
|
|
613
|
-
|
|
614
|
-
<footer class="editor-actions">
|
|
615
|
-
<el-button :icon="ArrowLeft" :disabled="saving" @click="emit('back')">返回</el-button>
|
|
616
|
-
<el-button type="primary" :icon="Check" :loading="saving" @click="handleSubmit">
|
|
617
|
-
{{ mode === 'add' ? '提交' : '保存修改' }}
|
|
618
|
-
</el-button>
|
|
619
|
-
</footer>
|
|
620
|
-
</section>
|
|
621
|
-
</template>
|
|
622
|
-
|
|
623
|
-
<style scoped>
|
|
624
|
-
.forecast-editor-panel {
|
|
625
|
-
overflow: hidden;
|
|
626
|
-
border: 1px solid var(--page-line, #dce3ec);
|
|
627
|
-
border-radius: 7px;
|
|
628
|
-
background: #fff;
|
|
629
|
-
box-shadow: 0 3px 12px rgba(30, 55, 90, .045);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
.editor-header {
|
|
633
|
-
display: flex;
|
|
634
|
-
align-items: center;
|
|
635
|
-
justify-content: space-between;
|
|
636
|
-
gap: 24px;
|
|
637
|
-
padding: 14px 20px;
|
|
638
|
-
border-bottom: 1px solid #e3e8ef;
|
|
639
|
-
background: #f8fafc;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
.editor-heading-line {
|
|
643
|
-
display: flex;
|
|
644
|
-
align-items: center;
|
|
645
|
-
gap: 10px;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
.editor-header h2 {
|
|
649
|
-
margin: 0;
|
|
650
|
-
color: #172033;
|
|
651
|
-
font-size: 17px;
|
|
652
|
-
font-weight: 700;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
.editor-header p {
|
|
656
|
-
margin: 5px 0 0;
|
|
657
|
-
color: #7b8798;
|
|
658
|
-
font-size: 12px;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.editor-body {
|
|
662
|
-
max-width: 1120px;
|
|
663
|
-
margin: 0 auto;
|
|
664
|
-
padding: 22px 28px 14px;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
.editor-grid {
|
|
668
|
-
display: grid;
|
|
669
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
670
|
-
gap: 2px 32px;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.forecast-editor-form :deep(.el-form-item) {
|
|
674
|
-
min-width: 0;
|
|
675
|
-
margin-bottom: 17px;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.forecast-editor-form :deep(.el-form-item__label) {
|
|
679
|
-
height: 25px;
|
|
680
|
-
padding: 0;
|
|
681
|
-
color: #475467;
|
|
682
|
-
font-size: 12px;
|
|
683
|
-
font-weight: 600;
|
|
684
|
-
line-height: 25px;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
.forecast-editor-form :deep(.el-input),
|
|
688
|
-
.forecast-editor-form :deep(.el-select),
|
|
689
|
-
.forecast-editor-form :deep(.el-date-editor) {
|
|
690
|
-
width: 100%;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
.forecast-editor-form :deep(.el-input__wrapper),
|
|
694
|
-
.forecast-editor-form :deep(.el-select__wrapper),
|
|
695
|
-
.forecast-editor-form :deep(.el-textarea__inner) {
|
|
696
|
-
border-radius: 5px;
|
|
697
|
-
box-shadow: 0 0 0 1px #d6dee9 inset;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
.forecast-editor-form :deep(.is-disabled .el-input__wrapper),
|
|
701
|
-
.forecast-editor-form :deep(.is-disabled.el-select__wrapper) {
|
|
702
|
-
background: #f2f4f7;
|
|
703
|
-
box-shadow: 0 0 0 1px #e2e6ec inset;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
.control-with-action {
|
|
707
|
-
display: grid;
|
|
708
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
709
|
-
gap: 8px;
|
|
710
|
-
width: 100%;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.editor-full-row {
|
|
714
|
-
grid-column: 1 / -1;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
.editor-actions {
|
|
718
|
-
display: flex;
|
|
719
|
-
justify-content: center;
|
|
720
|
-
gap: 12px;
|
|
721
|
-
padding: 13px 20px;
|
|
722
|
-
border-top: 1px solid #e3e8ef;
|
|
723
|
-
background: #fbfcfe;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
.editor-actions .el-button {
|
|
727
|
-
min-width: 100px;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
@media (max-width: 900px) {
|
|
731
|
-
.editor-header {
|
|
732
|
-
align-items: flex-start;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.editor-body {
|
|
736
|
-
padding: 18px 16px 8px;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
.editor-grid {
|
|
740
|
-
grid-template-columns: 1fr;
|
|
741
|
-
gap: 0;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.form-grid-spacer {
|
|
745
|
-
display: none;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.editor-full-row {
|
|
749
|
-
grid-column: auto;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
</style>
|