verce-vue-test 0.0.95 → 0.0.96
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-fund-allocation/api.ts +28 -32
- package/src/views/foreign-currency-fund-allocation/index.vue +1051 -297
- package/src/views/foreign-currency-fund-allocation/options.ts +25 -13
- package/src/views/foreign-currency-fund-allocation/types.ts +8 -0
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { onBeforeUnmount, onMounted, reactive, ref } from 'vue'
|
|
3
|
-
import {
|
|
2
|
+
import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
ElMessage,
|
|
5
|
+
ElMessageBox,
|
|
6
|
+
type FormInstance,
|
|
7
|
+
type FormRules,
|
|
8
|
+
} from 'element-plus'
|
|
4
9
|
import {
|
|
5
10
|
ArrowDown,
|
|
6
11
|
ArrowRight,
|
|
@@ -14,15 +19,18 @@ import {
|
|
|
14
19
|
RefreshLeft,
|
|
15
20
|
Search,
|
|
16
21
|
} from '@element-plus/icons-vue'
|
|
22
|
+
import {
|
|
23
|
+
queryAccountBanks,
|
|
24
|
+
type AccountBankOption,
|
|
25
|
+
} from '@/api/account-bank'
|
|
17
26
|
import {
|
|
18
27
|
createForeignCurrencyFundAllocation,
|
|
19
28
|
deleteForeignCurrencyFundAllocation,
|
|
20
|
-
exportForeignCurrencyFundAllocations,
|
|
21
29
|
queryForeignCurrencyFundAllocations,
|
|
22
30
|
reviewForeignCurrencyFundAllocation,
|
|
23
31
|
updateForeignCurrencyFundAllocation,
|
|
24
32
|
} from './api'
|
|
25
|
-
import { allocationStatusOptions, currencyOptions } from './options'
|
|
33
|
+
import { allocationStatusOptions, allocationTypeOptions, currencyOptions } from './options'
|
|
26
34
|
import {
|
|
27
35
|
createDefaultFundAllocationFilter,
|
|
28
36
|
normalizeFundAllocationRow,
|
|
@@ -34,11 +42,34 @@ import {
|
|
|
34
42
|
} from './types'
|
|
35
43
|
|
|
36
44
|
type RowAction = 'delete' | 'approve' | 'reject'
|
|
45
|
+
type AllocationFormMode = 'create' | 'edit'
|
|
46
|
+
type AllocationAccountType = '01' | '02'
|
|
47
|
+
type CreateAction = 'save' | 'submit'
|
|
48
|
+
type EditAction = 'save' | 'submit'
|
|
49
|
+
|
|
50
|
+
/** 账户类型注入点:01-总行账户,02-分支行账户。后续可由登录上下文修改该变量。 */
|
|
51
|
+
const injectedAccountType = ref<AllocationAccountType>('01')
|
|
52
|
+
/** 发起信息注入点:字段名与 120206001 保持一致,由登录上下文赋值。 */
|
|
53
|
+
const injectedInitiator = reactive<Pick<ForeignCurrencyFundAllocationCreateBody,
|
|
54
|
+
'createDept' | 'createDeptNmae' | 'createUser' | 'createUserName'
|
|
55
|
+
>>({
|
|
56
|
+
createDept: String(import.meta.env.VITE_TAM_BRANCH_ID || ''),
|
|
57
|
+
createDeptNmae: '',
|
|
58
|
+
createUser: String(import.meta.env.VITE_TAM_USER_ID || ''),
|
|
59
|
+
createUserName: '',
|
|
60
|
+
})
|
|
61
|
+
const accountTypeOptions = [
|
|
62
|
+
{ value: '01', label: '总行账户' },
|
|
63
|
+
{ value: '02', label: '分支行账户' },
|
|
64
|
+
]
|
|
37
65
|
|
|
38
66
|
const filterForm = reactive<ForeignCurrencyFundAllocationFilter>(
|
|
39
67
|
createDefaultFundAllocationFilter(),
|
|
40
68
|
)
|
|
41
69
|
const appliedFilters = ref<ForeignCurrencyFundAllocationFilter>({ ...filterForm })
|
|
70
|
+
const sharedQueryParams = computed<ForeignCurrencyFundAllocationFilter>(() => (
|
|
71
|
+
cloneFilter(appliedFilters.value)
|
|
72
|
+
))
|
|
42
73
|
const records = ref<ForeignCurrencyFundAllocationRow[]>([])
|
|
43
74
|
const totalCount = ref(0)
|
|
44
75
|
const currentPage = ref(1)
|
|
@@ -50,10 +81,14 @@ const detailVisible = ref(false)
|
|
|
50
81
|
const detailRecord = ref<ForeignCurrencyFundAllocationRow | null>(null)
|
|
51
82
|
const createVisible = ref(false)
|
|
52
83
|
const createSubmitting = ref(false)
|
|
53
|
-
const
|
|
84
|
+
const createSubmittingAction = ref<CreateAction | null>(null)
|
|
85
|
+
const createFormRef = ref<FormInstance>()
|
|
54
86
|
const createForm = reactive<ForeignCurrencyFundAllocationCreateBody>(createDefaultAllocationForm())
|
|
55
87
|
const editVisible = ref(false)
|
|
56
88
|
const editSubmitting = ref(false)
|
|
89
|
+
const editSubmittingAction = ref<EditAction | null>(null)
|
|
90
|
+
const editRejectReason = ref('')
|
|
91
|
+
const editFormRef = ref<FormInstance>()
|
|
57
92
|
const editForm = reactive<ForeignCurrencyFundAllocationUpdateBody>({
|
|
58
93
|
acctTypeEdit: '',
|
|
59
94
|
alocTypeEdit: '',
|
|
@@ -71,12 +106,103 @@ const editForm = reactive<ForeignCurrencyFundAllocationUpdateBody>({
|
|
|
71
106
|
valueDateEdit: '',
|
|
72
107
|
zmqFlagEdit: 'N',
|
|
73
108
|
})
|
|
109
|
+
const createAmountInput = computed({
|
|
110
|
+
get: () => createForm.amt,
|
|
111
|
+
set: (value: string) => {
|
|
112
|
+
createForm.amt = sanitizeAmountInput(value)
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
const editAmountInput = computed({
|
|
116
|
+
get: () => editForm.amtEdit,
|
|
117
|
+
set: (value: string) => {
|
|
118
|
+
editForm.amtEdit = sanitizeAmountInput(value)
|
|
119
|
+
},
|
|
120
|
+
})
|
|
74
121
|
const activeRowAction = ref<{ refNo: string; action: RowAction } | null>(null)
|
|
122
|
+
const accountBankOptions = ref<AccountBankOption[]>([])
|
|
123
|
+
const accountBankLoading = ref(false)
|
|
75
124
|
const columnComponentMap: Record<string, string> = {
|
|
76
125
|
ccy: 'TokenTag',
|
|
77
126
|
}
|
|
78
127
|
|
|
79
128
|
let activeQueryController: AbortController | null = null
|
|
129
|
+
let accountBankRequestController: AbortController | null = null
|
|
130
|
+
|
|
131
|
+
function sanitizeAmountInput(value: string) {
|
|
132
|
+
const numericValue = String(value ?? '').replace(/[^\d.]/g, '')
|
|
133
|
+
const decimalPointIndex = numericValue.indexOf('.')
|
|
134
|
+
if (decimalPointIndex === -1) return numericValue
|
|
135
|
+
|
|
136
|
+
const integerPart = numericValue.slice(0, decimalPointIndex) || '0'
|
|
137
|
+
const decimalPart = numericValue
|
|
138
|
+
.slice(decimalPointIndex + 1)
|
|
139
|
+
.replaceAll('.', '')
|
|
140
|
+
.slice(0, 2)
|
|
141
|
+
return `${integerPart}.${decimalPart}`
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function validateAmount(_rule: unknown, value: unknown, callback: (error?: Error) => void) {
|
|
145
|
+
const amount = String(value ?? '').trim().replaceAll(',', '')
|
|
146
|
+
if (!amount) {
|
|
147
|
+
callback(new Error('请输入调拨金额'))
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
if (!/^\d+(?:\.\d{1,2})?$/.test(amount)) {
|
|
151
|
+
callback(new Error('请输入有效的非负金额,最多保留两位小数'))
|
|
152
|
+
return
|
|
153
|
+
}
|
|
154
|
+
callback()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function requiredText(message: string) {
|
|
158
|
+
return (_rule: unknown, value: unknown, callback: (error?: Error) => void) => {
|
|
159
|
+
if (!String(value ?? '').trim()) {
|
|
160
|
+
callback(new Error(message))
|
|
161
|
+
return
|
|
162
|
+
}
|
|
163
|
+
callback()
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function validateDifferentAccount(mode: AllocationFormMode) {
|
|
168
|
+
return (_rule: unknown, value: unknown, callback: (error?: Error) => void) => {
|
|
169
|
+
const inAccount = String(value ?? '').trim().toUpperCase()
|
|
170
|
+
const outAccount = String(
|
|
171
|
+
mode === 'create' ? createForm.outAcctNo : editForm.outAcctNoEdit,
|
|
172
|
+
).trim().toUpperCase()
|
|
173
|
+
|
|
174
|
+
if (inAccount && outAccount && inAccount === outAccount) {
|
|
175
|
+
callback(new Error('调入账户不能和调出账户相同'))
|
|
176
|
+
return
|
|
177
|
+
}
|
|
178
|
+
callback()
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const createFormRules: FormRules<ForeignCurrencyFundAllocationCreateBody> = {
|
|
183
|
+
alocDate: [{ required: true, message: '请选择调拨日期', trigger: 'change' }],
|
|
184
|
+
alocType: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
|
|
185
|
+
ccy: [{ required: true, message: '请选择币种', trigger: 'change' }],
|
|
186
|
+
amt: [{ validator: validateAmount, trigger: 'blur' }],
|
|
187
|
+
valueDate: [{ required: true, message: '请选择起息日', trigger: 'change' }],
|
|
188
|
+
outAcctNo: [{ validator: requiredText('请选择或输入调出账户'), trigger: ['blur', 'change'] }],
|
|
189
|
+
inAcctNo: [
|
|
190
|
+
{ validator: requiredText('请选择或输入调入账户'), trigger: ['blur', 'change'] },
|
|
191
|
+
{ validator: validateDifferentAccount('create'), trigger: ['blur', 'change'] },
|
|
192
|
+
],
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const editFormRules: FormRules<ForeignCurrencyFundAllocationUpdateBody> = {
|
|
196
|
+
alocTypeEdit: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
|
|
197
|
+
ccyEdit: [{ required: true, message: '请选择币种', trigger: 'change' }],
|
|
198
|
+
amtEdit: [{ validator: validateAmount, trigger: 'blur' }],
|
|
199
|
+
valueDateEdit: [{ required: true, message: '请选择起息日', trigger: 'change' }],
|
|
200
|
+
outAcctNoEdit: [{ validator: requiredText('请选择或输入调出账号'), trigger: ['blur', 'change'] }],
|
|
201
|
+
inAcctNoEdit: [
|
|
202
|
+
{ validator: requiredText('请选择或输入调入账号'), trigger: ['blur', 'change'] },
|
|
203
|
+
{ validator: validateDifferentAccount('edit'), trigger: ['blur', 'change'] },
|
|
204
|
+
],
|
|
205
|
+
}
|
|
80
206
|
|
|
81
207
|
function localDateText() {
|
|
82
208
|
const now = new Date()
|
|
@@ -86,25 +212,47 @@ function localDateText() {
|
|
|
86
212
|
|
|
87
213
|
function createDefaultAllocationForm(): ForeignCurrencyFundAllocationCreateBody {
|
|
88
214
|
return {
|
|
89
|
-
acctType:
|
|
215
|
+
acctType: injectedAccountType.value,
|
|
90
216
|
alocDate: localDateText(),
|
|
91
|
-
alocType:
|
|
217
|
+
alocType: injectedAccountType.value,
|
|
92
218
|
amt: '',
|
|
93
219
|
ccy: '',
|
|
94
|
-
createDept:
|
|
95
|
-
createDeptNmae:
|
|
96
|
-
createUser:
|
|
97
|
-
createUserName:
|
|
220
|
+
createDept: injectedInitiator.createDept,
|
|
221
|
+
createDeptNmae: injectedInitiator.createDeptNmae,
|
|
222
|
+
createUser: injectedInitiator.createUser,
|
|
223
|
+
createUserName: injectedInitiator.createUserName,
|
|
98
224
|
fundOpeCent: 'N',
|
|
99
225
|
inAcctNo: '',
|
|
100
226
|
outAcctNo: '',
|
|
101
227
|
remark: '',
|
|
102
|
-
status: '
|
|
228
|
+
status: 'C',
|
|
103
229
|
valueDate: localDateText(),
|
|
104
230
|
zmqFlag: 'N',
|
|
105
231
|
}
|
|
106
232
|
}
|
|
107
233
|
|
|
234
|
+
/** 严格按 120206001 文档组装新增请求体,保留 createDeptNmae 原协议拼写。 */
|
|
235
|
+
function createAllocationRequestBody(status: 'C' | '2'): ForeignCurrencyFundAllocationCreateBody {
|
|
236
|
+
return {
|
|
237
|
+
acctType: createForm.acctType.trim(),
|
|
238
|
+
alocDate: createForm.alocDate,
|
|
239
|
+
alocType: createForm.alocType.trim(),
|
|
240
|
+
amt: createForm.amt.trim().replaceAll(',', ''),
|
|
241
|
+
ccy: createForm.ccy.trim(),
|
|
242
|
+
createDept: createForm.createDept.trim(),
|
|
243
|
+
createDeptNmae: createForm.createDeptNmae.trim(),
|
|
244
|
+
createUser: createForm.createUser.trim(),
|
|
245
|
+
createUserName: createForm.createUserName.trim(),
|
|
246
|
+
fundOpeCent: createForm.fundOpeCent,
|
|
247
|
+
inAcctNo: createForm.inAcctNo.trim(),
|
|
248
|
+
outAcctNo: createForm.outAcctNo.trim(),
|
|
249
|
+
remark: createForm.remark.trim(),
|
|
250
|
+
status,
|
|
251
|
+
valueDate: createForm.valueDate,
|
|
252
|
+
zmqFlag: createForm.zmqFlag,
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
108
256
|
function cloneFilter(source: ForeignCurrencyFundAllocationFilter) {
|
|
109
257
|
return { ...source }
|
|
110
258
|
}
|
|
@@ -127,15 +275,50 @@ function formatDecimal(value: string) {
|
|
|
127
275
|
return `${grouped}.${decimal.padEnd(2, '0')}`
|
|
128
276
|
}
|
|
129
277
|
|
|
278
|
+
function statusCode(status: string) {
|
|
279
|
+
return String(status || '').trim().split('-')[0].toUpperCase()
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function statusLabel(status: string) {
|
|
283
|
+
const text = String(status || '').trim()
|
|
284
|
+
if (!text) return '—'
|
|
285
|
+
const labels: Record<string, string> = {
|
|
286
|
+
C: '草稿',
|
|
287
|
+
N: '审批未通过',
|
|
288
|
+
Y: '审批已通过',
|
|
289
|
+
'2': '待审批',
|
|
290
|
+
}
|
|
291
|
+
return labels[statusCode(text)] || text
|
|
292
|
+
}
|
|
293
|
+
|
|
130
294
|
function statusTagType(status: string): 'success' | 'warning' | 'danger' | 'info' {
|
|
131
|
-
|
|
132
|
-
if (
|
|
133
|
-
if (
|
|
295
|
+
const code = statusCode(status)
|
|
296
|
+
if (code === 'Y') return 'success'
|
|
297
|
+
if (code === '1' || code === '2') return 'warning'
|
|
298
|
+
if (code === 'N') return 'danger'
|
|
134
299
|
return 'info'
|
|
135
300
|
}
|
|
136
301
|
|
|
302
|
+
function statusTagClass(status: string) {
|
|
303
|
+
const classNames: Record<string, string> = {
|
|
304
|
+
C: 'status-tag--draft',
|
|
305
|
+
'2': 'status-tag--pending',
|
|
306
|
+
Y: 'status-tag--approved',
|
|
307
|
+
N: 'status-tag--rejected',
|
|
308
|
+
}
|
|
309
|
+
return ['status-tag', classNames[statusCode(status)] || 'status-tag--default']
|
|
310
|
+
}
|
|
311
|
+
|
|
137
312
|
function isPendingStatus(status: string) {
|
|
138
|
-
return status
|
|
313
|
+
return statusCode(status) === '2'
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function canEditStatus(status: string) {
|
|
317
|
+
return ['N', 'C'].includes(statusCode(status))
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function canDeleteStatus(status: string) {
|
|
321
|
+
return ['N', 'C'].includes(statusCode(status))
|
|
139
322
|
}
|
|
140
323
|
|
|
141
324
|
function isActionLoading(row: ForeignCurrencyFundAllocationRow, action: RowAction) {
|
|
@@ -149,6 +332,22 @@ function yesNoLabel(value: string) {
|
|
|
149
332
|
return value || '—'
|
|
150
333
|
}
|
|
151
334
|
|
|
335
|
+
function accountTypeLabel(value: string) {
|
|
336
|
+
return accountTypeOptions.find((option) => option.value === value)?.label || value || '—'
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function allocationTypeCode(value: string) {
|
|
340
|
+
const text = String(value || '').trim()
|
|
341
|
+
const code = text.split('-')[0]
|
|
342
|
+
if (code === '01' || code === '02') return code
|
|
343
|
+
return allocationTypeOptions.find((option) => option.label === text)?.value || ''
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
function allocationTypeLabel(value: string) {
|
|
347
|
+
const code = allocationTypeCode(value)
|
|
348
|
+
return allocationTypeOptions.find((option) => option.value === code)?.label || value || '—'
|
|
349
|
+
}
|
|
350
|
+
|
|
152
351
|
async function loadRows() {
|
|
153
352
|
activeQueryController?.abort()
|
|
154
353
|
const controller = new AbortController()
|
|
@@ -157,7 +356,7 @@ async function loadRows() {
|
|
|
157
356
|
|
|
158
357
|
try {
|
|
159
358
|
const response = await queryForeignCurrencyFundAllocations(
|
|
160
|
-
|
|
359
|
+
sharedQueryParams.value,
|
|
161
360
|
{
|
|
162
361
|
signal: controller.signal,
|
|
163
362
|
tamHead: {
|
|
@@ -212,11 +411,97 @@ function openDetail(row: ForeignCurrencyFundAllocationRow) {
|
|
|
212
411
|
detailVisible.value = true
|
|
213
412
|
}
|
|
214
413
|
|
|
414
|
+
function handleDetailEdit() {
|
|
415
|
+
const row = detailRecord.value
|
|
416
|
+
if (!row || !canEditStatus(row.status)) return
|
|
417
|
+
detailVisible.value = false
|
|
418
|
+
void nextTick(() => openEdit(row))
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function getAccountQuery(mode: AllocationFormMode) {
|
|
422
|
+
if (mode === 'create') {
|
|
423
|
+
return {
|
|
424
|
+
acctType: createForm.acctType,
|
|
425
|
+
ccy: createForm.ccy,
|
|
426
|
+
zmqFlag: createForm.zmqFlag,
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
acctType: editForm.acctTypeEdit,
|
|
431
|
+
ccy: editForm.ccyEdit,
|
|
432
|
+
zmqFlag: editForm.zmqFlagEdit,
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
async function loadAccountBankOptions(mode: AllocationFormMode) {
|
|
437
|
+
const params = getAccountQuery(mode)
|
|
438
|
+
if (!params.ccy) {
|
|
439
|
+
accountBankOptions.value = []
|
|
440
|
+
return
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
accountBankRequestController?.abort()
|
|
444
|
+
const controller = new AbortController()
|
|
445
|
+
accountBankRequestController = controller
|
|
446
|
+
accountBankLoading.value = true
|
|
447
|
+
|
|
448
|
+
try {
|
|
449
|
+
const result = await queryAccountBanks(params, { signal: controller.signal })
|
|
450
|
+
if (controller.signal.aborted || accountBankRequestController !== controller) return
|
|
451
|
+
accountBankOptions.value = result
|
|
452
|
+
} catch (error) {
|
|
453
|
+
if (controller.signal.aborted || isAbortError(error)) return
|
|
454
|
+
ElMessage.error(error instanceof Error ? error.message : '账户行查询失败')
|
|
455
|
+
} finally {
|
|
456
|
+
if (accountBankRequestController === controller) {
|
|
457
|
+
accountBankRequestController = null
|
|
458
|
+
accountBankLoading.value = false
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
function handleAccountDependencyChange(mode: AllocationFormMode) {
|
|
464
|
+
accountBankOptions.value = []
|
|
465
|
+
if (mode === 'create') {
|
|
466
|
+
createForm.outAcctNo = ''
|
|
467
|
+
createForm.inAcctNo = ''
|
|
468
|
+
} else {
|
|
469
|
+
editForm.outAcctNoEdit = ''
|
|
470
|
+
editForm.inAcctNoEdit = ''
|
|
471
|
+
}
|
|
472
|
+
void loadAccountBankOptions(mode)
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function handleAllocationTypeChange(mode: AllocationFormMode, value: string) {
|
|
476
|
+
if (value !== '01' && value !== '02') return
|
|
477
|
+
if (mode === 'create') {
|
|
478
|
+
createForm.acctType = value
|
|
479
|
+
} else {
|
|
480
|
+
editForm.acctTypeEdit = value
|
|
481
|
+
}
|
|
482
|
+
handleAccountDependencyChange(mode)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function handleAccountSelectVisibleChange(mode: AllocationFormMode, visible: boolean) {
|
|
486
|
+
if (!visible || accountBankLoading.value || accountBankOptions.value.length > 0) return
|
|
487
|
+
void loadAccountBankOptions(mode)
|
|
488
|
+
}
|
|
489
|
+
|
|
215
490
|
function openEdit(row: ForeignCurrencyFundAllocationRow) {
|
|
491
|
+
if (!canEditStatus(row.status)) {
|
|
492
|
+
ElMessage.warning('只有审批未通过或草稿状态的调拨记录才能修改')
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
accountBankRequestController?.abort()
|
|
496
|
+
accountBankOptions.value = []
|
|
497
|
+
editRejectReason.value = row.approveRjctReason
|
|
498
|
+
const rowAllocationType = allocationTypeCode(row.alocType)
|
|
216
499
|
Object.assign(editForm, {
|
|
217
|
-
acctTypeEdit: row.acctType
|
|
218
|
-
|
|
219
|
-
|
|
500
|
+
acctTypeEdit: row.acctType === '01' || row.acctType === '02'
|
|
501
|
+
? row.acctType
|
|
502
|
+
: rowAllocationType || injectedAccountType.value,
|
|
503
|
+
alocTypeEdit: rowAllocationType,
|
|
504
|
+
amtEdit: sanitizeAmountInput(row.amt),
|
|
220
505
|
ccyEdit: row.ccy,
|
|
221
506
|
flag: '1',
|
|
222
507
|
fundOpeCentStoreEdit: row.fundOpeCent || 'N',
|
|
@@ -226,121 +511,66 @@ function openEdit(row: ForeignCurrencyFundAllocationRow) {
|
|
|
226
511
|
refNoEdit: row.refNo,
|
|
227
512
|
remarkEdit: row.remark,
|
|
228
513
|
status: row.status,
|
|
229
|
-
updateUser:
|
|
514
|
+
updateUser: String(import.meta.env.VITE_TAM_USER_ID || 'HQ00601'),
|
|
230
515
|
valueDateEdit: formatDate(row.valueDate),
|
|
231
516
|
zmqFlagEdit: row.zmqFlag || 'N',
|
|
232
517
|
})
|
|
233
518
|
editVisible.value = true
|
|
519
|
+
void nextTick(() => {
|
|
520
|
+
editFormRef.value?.clearValidate()
|
|
521
|
+
void loadAccountBankOptions('edit')
|
|
522
|
+
})
|
|
234
523
|
}
|
|
235
524
|
|
|
236
525
|
function openCreate() {
|
|
526
|
+
accountBankRequestController?.abort()
|
|
527
|
+
accountBankOptions.value = []
|
|
528
|
+
accountBankLoading.value = false
|
|
529
|
+
createSubmittingAction.value = null
|
|
237
530
|
Object.assign(createForm, createDefaultAllocationForm())
|
|
238
531
|
createVisible.value = true
|
|
532
|
+
void nextTick(() => createFormRef.value?.clearValidate())
|
|
239
533
|
}
|
|
240
534
|
|
|
241
|
-
async function handleCreateSubmit() {
|
|
535
|
+
async function handleCreateSubmit(action: CreateAction) {
|
|
242
536
|
if (createSubmitting.value) return
|
|
537
|
+
const valid = await createFormRef.value?.validate().catch(() => false)
|
|
538
|
+
if (!valid) return
|
|
243
539
|
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return
|
|
248
|
-
}
|
|
249
|
-
if (!createForm.ccy) {
|
|
250
|
-
ElMessage.warning('请选择币种')
|
|
251
|
-
return
|
|
252
|
-
}
|
|
253
|
-
if (!/^\d+(?:\.\d+)?$/.test(amount)) {
|
|
254
|
-
ElMessage.warning('调拨金额必须是非负数')
|
|
255
|
-
return
|
|
256
|
-
}
|
|
257
|
-
if (!createForm.alocDate || !createForm.valueDate) {
|
|
258
|
-
ElMessage.warning('请选择调拨日期和起息日')
|
|
259
|
-
return
|
|
260
|
-
}
|
|
261
|
-
if (!createForm.outAcctNo.trim() || !createForm.inAcctNo.trim()) {
|
|
262
|
-
ElMessage.warning('请输入调出账户和调入账户')
|
|
263
|
-
return
|
|
264
|
-
}
|
|
265
|
-
|
|
540
|
+
const status = action === 'save' ? 'C' : '2'
|
|
541
|
+
const actionText = action === 'save' ? '保存' : '提交'
|
|
542
|
+
createForm.status = status
|
|
266
543
|
createSubmitting.value = true
|
|
544
|
+
createSubmittingAction.value = action
|
|
267
545
|
try {
|
|
268
|
-
const response = await createForeignCurrencyFundAllocation(
|
|
269
|
-
...createForm,
|
|
270
|
-
alocType: createForm.alocType.trim(),
|
|
271
|
-
amt: amount,
|
|
272
|
-
createDept: createForm.createDept.trim(),
|
|
273
|
-
createDeptNmae: createForm.createDeptNmae.trim(),
|
|
274
|
-
createUser: createForm.createUser.trim(),
|
|
275
|
-
createUserName: createForm.createUserName.trim(),
|
|
276
|
-
inAcctNo: createForm.inAcctNo.trim(),
|
|
277
|
-
outAcctNo: createForm.outAcctNo.trim(),
|
|
278
|
-
remark: createForm.remark.trim(),
|
|
279
|
-
})
|
|
546
|
+
const response = await createForeignCurrencyFundAllocation(createAllocationRequestBody(status))
|
|
280
547
|
createVisible.value = false
|
|
281
|
-
ElMessage.success(
|
|
548
|
+
ElMessage.success(`${actionText}成功,调拨单号:${response.body.transFerInstruct}`)
|
|
282
549
|
currentPage.value = 1
|
|
283
550
|
await loadRows()
|
|
284
551
|
} catch (error) {
|
|
285
552
|
ElMessage.error(error instanceof Error ? error.message : '外币资金调拨新增失败')
|
|
286
553
|
} finally {
|
|
287
554
|
createSubmitting.value = false
|
|
555
|
+
createSubmittingAction.value = null
|
|
288
556
|
}
|
|
289
557
|
}
|
|
290
558
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (totalCount.value === 0) {
|
|
294
|
-
ElMessage.warning('当前查询结果为空,无需导出')
|
|
295
|
-
return
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
exporting.value = true
|
|
299
|
-
try {
|
|
300
|
-
const response = await exportForeignCurrencyFundAllocations(appliedFilters.value)
|
|
301
|
-
const filePath = String(response.body.filePath || '')
|
|
302
|
-
if (!filePath) throw new Error('导出接口未返回文件路径')
|
|
303
|
-
|
|
304
|
-
const link = document.createElement('a')
|
|
305
|
-
link.href = filePath
|
|
306
|
-
link.download = `外币资金调拨_${localDateText().replaceAll('-', '')}.csv`
|
|
307
|
-
document.body.appendChild(link)
|
|
308
|
-
link.click()
|
|
309
|
-
link.remove()
|
|
310
|
-
ElMessage.success(response.head.retMsg || '导出成功')
|
|
311
|
-
} catch (error) {
|
|
312
|
-
ElMessage.error(error instanceof Error ? error.message : '外币资金调拨导出失败')
|
|
313
|
-
} finally {
|
|
314
|
-
exporting.value = false
|
|
315
|
-
}
|
|
559
|
+
function handleExport() {
|
|
560
|
+
console.log('外币资金调拨导出参数:', sharedQueryParams.value)
|
|
316
561
|
}
|
|
317
562
|
|
|
318
|
-
async function handleEditSubmit() {
|
|
563
|
+
async function handleEditSubmit(action: EditAction) {
|
|
319
564
|
if (editSubmitting.value) return
|
|
565
|
+
const valid = await editFormRef.value?.validate().catch(() => false)
|
|
566
|
+
if (!valid) return
|
|
320
567
|
|
|
321
568
|
const amount = editForm.amtEdit.trim().replaceAll(',', '')
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
return
|
|
325
|
-
}
|
|
326
|
-
if (!editForm.ccyEdit) {
|
|
327
|
-
ElMessage.warning('请选择币种')
|
|
328
|
-
return
|
|
329
|
-
}
|
|
330
|
-
if (!/^\d+(?:\.\d+)?$/.test(amount)) {
|
|
331
|
-
ElMessage.warning('调拨金额必须是非负数')
|
|
332
|
-
return
|
|
333
|
-
}
|
|
334
|
-
if (!editForm.valueDateEdit) {
|
|
335
|
-
ElMessage.warning('请选择起息日')
|
|
336
|
-
return
|
|
337
|
-
}
|
|
338
|
-
if (!editForm.outAcctNoEdit.trim() || !editForm.inAcctNoEdit.trim()) {
|
|
339
|
-
ElMessage.warning('请输入调出账号和调入账号')
|
|
340
|
-
return
|
|
341
|
-
}
|
|
569
|
+
const status = action === 'save' ? 'C' : '2'
|
|
570
|
+
const actionText = action === 'save' ? '保存' : '提交'
|
|
342
571
|
|
|
343
572
|
editSubmitting.value = true
|
|
573
|
+
editSubmittingAction.value = action
|
|
344
574
|
try {
|
|
345
575
|
const response = await updateForeignCurrencyFundAllocation({
|
|
346
576
|
...editForm,
|
|
@@ -350,19 +580,25 @@ async function handleEditSubmit() {
|
|
|
350
580
|
inAcctNoEdit: editForm.inAcctNoEdit.trim(),
|
|
351
581
|
outAcctNoEdit: editForm.outAcctNoEdit.trim(),
|
|
352
582
|
remarkEdit: editForm.remarkEdit.trim(),
|
|
583
|
+
status,
|
|
353
584
|
})
|
|
354
585
|
editVisible.value = false
|
|
355
|
-
ElMessage.success(response.head.retMsg ||
|
|
586
|
+
ElMessage.success(response.head.retMsg || `${actionText}成功`)
|
|
356
587
|
await loadRows()
|
|
357
588
|
} catch (error) {
|
|
358
589
|
ElMessage.error(error instanceof Error ? error.message : '外币资金调拨修改失败')
|
|
359
590
|
} finally {
|
|
360
591
|
editSubmitting.value = false
|
|
592
|
+
editSubmittingAction.value = null
|
|
361
593
|
}
|
|
362
594
|
}
|
|
363
595
|
|
|
364
596
|
async function handleDelete(row: ForeignCurrencyFundAllocationRow) {
|
|
365
597
|
if (activeRowAction.value) return
|
|
598
|
+
if (!canDeleteStatus(row.status)) {
|
|
599
|
+
ElMessage.warning('只有审批未通过或草稿状态的调拨记录才能删除')
|
|
600
|
+
return
|
|
601
|
+
}
|
|
366
602
|
|
|
367
603
|
try {
|
|
368
604
|
await ElMessageBox.confirm(
|
|
@@ -461,6 +697,7 @@ onMounted(() => {
|
|
|
461
697
|
|
|
462
698
|
onBeforeUnmount(() => {
|
|
463
699
|
activeQueryController?.abort()
|
|
700
|
+
accountBankRequestController?.abort()
|
|
464
701
|
})
|
|
465
702
|
</script>
|
|
466
703
|
|
|
@@ -601,7 +838,6 @@ onBeforeUnmount(() => {
|
|
|
601
838
|
plain
|
|
602
839
|
size="small"
|
|
603
840
|
:icon="Download"
|
|
604
|
-
:loading="exporting"
|
|
605
841
|
@click="handleExport"
|
|
606
842
|
>
|
|
607
843
|
导出
|
|
@@ -620,7 +856,9 @@ onBeforeUnmount(() => {
|
|
|
620
856
|
<el-table-column prop="alocDate" label="调拨日期" width="112">
|
|
621
857
|
<template #default="{ row }">{{ formatDate(row.alocDate) }}</template>
|
|
622
858
|
</el-table-column>
|
|
623
|
-
<el-table-column prop="alocType" label="调拨类型" width="164" show-overflow-tooltip
|
|
859
|
+
<el-table-column prop="alocType" label="调拨类型" width="164" show-overflow-tooltip>
|
|
860
|
+
<template #default="{ row }">{{ allocationTypeLabel(row.alocType) }}</template>
|
|
861
|
+
</el-table-column>
|
|
624
862
|
<el-table-column prop="ccy" label="币种" width="172" align="center">
|
|
625
863
|
<template #default="{ row }">
|
|
626
864
|
<component :is="columnComponentMap.ccy" :value="row.ccy" />
|
|
@@ -638,19 +876,16 @@ onBeforeUnmount(() => {
|
|
|
638
876
|
<el-table-column prop="inAcctNo" label="调入账户账号" width="156" show-overflow-tooltip />
|
|
639
877
|
<el-table-column prop="status" label="状态" width="136" align="center">
|
|
640
878
|
<template #default="{ row }">
|
|
641
|
-
<el-tag
|
|
642
|
-
|
|
879
|
+
<el-tag
|
|
880
|
+
:type="statusTagType(row.status)"
|
|
881
|
+
:class="statusTagClass(row.status)"
|
|
882
|
+
effect="light"
|
|
883
|
+
size="small"
|
|
884
|
+
>
|
|
885
|
+
{{ statusLabel(row.status) }}
|
|
643
886
|
</el-tag>
|
|
644
887
|
</template>
|
|
645
888
|
</el-table-column>
|
|
646
|
-
<el-table-column
|
|
647
|
-
prop="approveRjctReason"
|
|
648
|
-
label="拒绝原因"
|
|
649
|
-
width="180"
|
|
650
|
-
show-overflow-tooltip
|
|
651
|
-
>
|
|
652
|
-
<template #default="{ row }">{{ row.approveRjctReason || '—' }}</template>
|
|
653
|
-
</el-table-column>
|
|
654
889
|
<el-table-column prop="fundOpeCent" label="资金运营中心" width="112" align="center" :visible="false">
|
|
655
890
|
<template #default="{ row }">{{ yesNoLabel(row.fundOpeCent) }}</template>
|
|
656
891
|
</el-table-column>
|
|
@@ -687,7 +922,8 @@ onBeforeUnmount(() => {
|
|
|
687
922
|
type="primary"
|
|
688
923
|
size="small"
|
|
689
924
|
:icon="EditPen"
|
|
690
|
-
:disabled="activeRowAction !== null"
|
|
925
|
+
:disabled="!canEditStatus(row.status) || activeRowAction !== null"
|
|
926
|
+
title="仅审批未通过或草稿状态可修改"
|
|
691
927
|
@click.stop="openEdit(row)"
|
|
692
928
|
>
|
|
693
929
|
修改
|
|
@@ -698,7 +934,8 @@ onBeforeUnmount(() => {
|
|
|
698
934
|
size="small"
|
|
699
935
|
:icon="Delete"
|
|
700
936
|
:loading="isActionLoading(row, 'delete')"
|
|
701
|
-
:disabled="activeRowAction !== null && !isActionLoading(row, 'delete')"
|
|
937
|
+
:disabled="!canDeleteStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'delete'))"
|
|
938
|
+
title="仅审批未通过或草稿状态可删除"
|
|
702
939
|
@click.stop="handleDelete(row)"
|
|
703
940
|
>
|
|
704
941
|
删除
|
|
@@ -734,178 +971,461 @@ onBeforeUnmount(() => {
|
|
|
734
971
|
|
|
735
972
|
<el-dialog
|
|
736
973
|
v-model="createVisible"
|
|
737
|
-
|
|
738
|
-
width="min(760px, calc(100vw - 32px))"
|
|
974
|
+
width="min(920px, calc(100vw - 32px))"
|
|
739
975
|
:close-on-click-modal="false"
|
|
740
976
|
destroy-on-close
|
|
741
977
|
class="allocation-edit-dialog"
|
|
742
978
|
>
|
|
743
|
-
<
|
|
744
|
-
<div class="
|
|
745
|
-
<
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
<
|
|
766
|
-
</
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
979
|
+
<template #header>
|
|
980
|
+
<div class="dialog-heading">
|
|
981
|
+
<span class="dialog-heading__icon"><el-icon><Plus /></el-icon></span>
|
|
982
|
+
<div>
|
|
983
|
+
<small>FOREIGN CURRENCY TRANSFER</small>
|
|
984
|
+
<h2>新增外币资金调拨</h2>
|
|
985
|
+
</div>
|
|
986
|
+
</div>
|
|
987
|
+
</template>
|
|
988
|
+
|
|
989
|
+
<el-form
|
|
990
|
+
ref="createFormRef"
|
|
991
|
+
:model="createForm"
|
|
992
|
+
:rules="createFormRules"
|
|
993
|
+
label-position="top"
|
|
994
|
+
status-icon
|
|
995
|
+
class="edit-form"
|
|
996
|
+
>
|
|
997
|
+
<div class="edit-form__content">
|
|
998
|
+
<section class="edit-section">
|
|
999
|
+
<div class="edit-section__heading">
|
|
1000
|
+
<span>01</span>
|
|
1001
|
+
<div><h3>调拨信息</h3><p>填写调拨日期、类型及金额等核心信息</p></div>
|
|
1002
|
+
</div>
|
|
1003
|
+
<div class="edit-form__grid edit-form__grid--three">
|
|
1004
|
+
<el-form-item label="调拨日期" prop="alocDate">
|
|
1005
|
+
<el-date-picker
|
|
1006
|
+
v-model="createForm.alocDate"
|
|
1007
|
+
type="date"
|
|
1008
|
+
format="YYYY-MM-DD"
|
|
1009
|
+
value-format="YYYY-MM-DD"
|
|
1010
|
+
placeholder="请选择调拨日期"
|
|
1011
|
+
/>
|
|
1012
|
+
</el-form-item>
|
|
1013
|
+
<el-form-item label="起息日" prop="valueDate">
|
|
1014
|
+
<el-date-picker
|
|
1015
|
+
v-model="createForm.valueDate"
|
|
1016
|
+
type="date"
|
|
1017
|
+
format="YYYY-MM-DD"
|
|
1018
|
+
value-format="YYYY-MM-DD"
|
|
1019
|
+
placeholder="请选择起息日"
|
|
1020
|
+
/>
|
|
1021
|
+
</el-form-item>
|
|
1022
|
+
<el-form-item label="调拨类型" prop="alocType">
|
|
1023
|
+
<el-select
|
|
1024
|
+
v-model="createForm.alocType"
|
|
1025
|
+
placeholder="请选择调拨类型"
|
|
1026
|
+
@change="handleAllocationTypeChange('create', $event)"
|
|
1027
|
+
>
|
|
1028
|
+
<el-option
|
|
1029
|
+
v-for="option in allocationTypeOptions"
|
|
1030
|
+
:key="option.value"
|
|
1031
|
+
v-bind="option"
|
|
1032
|
+
/>
|
|
1033
|
+
</el-select>
|
|
1034
|
+
</el-form-item>
|
|
1035
|
+
<el-form-item label="账户类型" prop="acctType">
|
|
1036
|
+
<el-select v-model="createForm.acctType" disabled class="readonly-field">
|
|
1037
|
+
<el-option
|
|
1038
|
+
v-for="option in accountTypeOptions"
|
|
1039
|
+
:key="option.value"
|
|
1040
|
+
v-bind="option"
|
|
1041
|
+
/>
|
|
1042
|
+
</el-select>
|
|
1043
|
+
</el-form-item>
|
|
1044
|
+
<el-form-item label="调拨金额(元)" prop="amt">
|
|
1045
|
+
<el-input
|
|
1046
|
+
v-model="createAmountInput"
|
|
1047
|
+
inputmode="decimal"
|
|
1048
|
+
maxlength="40"
|
|
1049
|
+
placeholder="0.00"
|
|
1050
|
+
>
|
|
1051
|
+
<template #append>{{ createForm.ccy || '币种' }}</template>
|
|
1052
|
+
</el-input>
|
|
1053
|
+
</el-form-item>
|
|
1054
|
+
<el-form-item label="是否资金运营中心" prop="fundOpeCent">
|
|
1055
|
+
<el-radio-group v-model="createForm.fundOpeCent" class="choice-cards">
|
|
1056
|
+
<el-radio-button value="Y">是</el-radio-button>
|
|
1057
|
+
<el-radio-button value="N">否</el-radio-button>
|
|
1058
|
+
</el-radio-group>
|
|
1059
|
+
</el-form-item>
|
|
1060
|
+
</div>
|
|
1061
|
+
</section>
|
|
1062
|
+
|
|
1063
|
+
<section class="edit-section edit-section--route">
|
|
1064
|
+
<div class="edit-section__heading">
|
|
1065
|
+
<span>02</span>
|
|
1066
|
+
<div><h3>账户路径</h3><p>币种或自贸区变化后,需要重新选择调出和调入账户</p></div>
|
|
1067
|
+
</div>
|
|
1068
|
+
<div class="account-context-grid">
|
|
1069
|
+
<el-form-item label="币种" prop="ccy">
|
|
1070
|
+
<el-select
|
|
1071
|
+
v-model="createForm.ccy"
|
|
1072
|
+
placeholder="请选择币种"
|
|
1073
|
+
filterable
|
|
1074
|
+
@change="handleAccountDependencyChange('create')"
|
|
1075
|
+
>
|
|
1076
|
+
<el-option v-for="option in currencyOptions" :key="option.value" v-bind="option" />
|
|
1077
|
+
</el-select>
|
|
1078
|
+
</el-form-item>
|
|
1079
|
+
<el-form-item label="是否自贸区" prop="zmqFlag">
|
|
1080
|
+
<el-radio-group
|
|
1081
|
+
v-model="createForm.zmqFlag"
|
|
1082
|
+
class="choice-cards"
|
|
1083
|
+
@change="handleAccountDependencyChange('create')"
|
|
1084
|
+
>
|
|
1085
|
+
<el-radio-button value="Y">是</el-radio-button>
|
|
1086
|
+
<el-radio-button value="N">否</el-radio-button>
|
|
1087
|
+
</el-radio-group>
|
|
1088
|
+
</el-form-item>
|
|
1089
|
+
</div>
|
|
1090
|
+
<div class="account-editor-route">
|
|
1091
|
+
<div class="account-editor-node account-editor-node--out">
|
|
1092
|
+
<span class="account-editor-node__badge">OUT</span>
|
|
1093
|
+
<el-form-item label="调出账户" prop="outAcctNo">
|
|
1094
|
+
<el-select
|
|
1095
|
+
v-model="createForm.outAcctNo"
|
|
1096
|
+
:disabled="!createForm.ccy"
|
|
1097
|
+
:loading="accountBankLoading"
|
|
1098
|
+
filterable
|
|
1099
|
+
allow-create
|
|
1100
|
+
default-first-option
|
|
1101
|
+
clearable
|
|
1102
|
+
:placeholder="createForm.ccy ? '请选择或输入调出账户' : '请先选择币种'"
|
|
1103
|
+
@visible-change="handleAccountSelectVisibleChange('create', $event)"
|
|
1104
|
+
>
|
|
1105
|
+
<el-option
|
|
1106
|
+
v-for="option in accountBankOptions"
|
|
1107
|
+
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1108
|
+
:label="option.bankName"
|
|
1109
|
+
:value="option.bankAcct"
|
|
1110
|
+
>
|
|
1111
|
+
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1112
|
+
<small>{{ option.bankAcct }}</small>
|
|
1113
|
+
</el-option>
|
|
1114
|
+
</el-select>
|
|
1115
|
+
</el-form-item>
|
|
1116
|
+
</div>
|
|
1117
|
+
<span class="account-editor-route__arrow"><el-icon><ArrowRight /></el-icon></span>
|
|
1118
|
+
<div class="account-editor-node account-editor-node--in">
|
|
1119
|
+
<span class="account-editor-node__badge">IN</span>
|
|
1120
|
+
<el-form-item label="调入账户" prop="inAcctNo">
|
|
1121
|
+
<el-select
|
|
1122
|
+
v-model="createForm.inAcctNo"
|
|
1123
|
+
:disabled="!createForm.ccy"
|
|
1124
|
+
:loading="accountBankLoading"
|
|
1125
|
+
filterable
|
|
1126
|
+
allow-create
|
|
1127
|
+
default-first-option
|
|
1128
|
+
clearable
|
|
1129
|
+
:placeholder="createForm.ccy ? '请选择或输入调入账户' : '请先选择币种'"
|
|
1130
|
+
@visible-change="handleAccountSelectVisibleChange('create', $event)"
|
|
1131
|
+
>
|
|
1132
|
+
<el-option
|
|
1133
|
+
v-for="option in accountBankOptions"
|
|
1134
|
+
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1135
|
+
:label="option.bankName"
|
|
1136
|
+
:value="option.bankAcct"
|
|
1137
|
+
>
|
|
1138
|
+
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1139
|
+
<small>{{ option.bankAcct }}</small>
|
|
1140
|
+
</el-option>
|
|
1141
|
+
</el-select>
|
|
1142
|
+
</el-form-item>
|
|
1143
|
+
</div>
|
|
1144
|
+
</div>
|
|
1145
|
+
</section>
|
|
1146
|
+
|
|
1147
|
+
<section class="edit-section">
|
|
1148
|
+
<div class="edit-section__heading">
|
|
1149
|
+
<span>03</span>
|
|
1150
|
+
<div><h3>发起信息</h3><p>确认本次调拨的发起部门与经办人</p></div>
|
|
1151
|
+
</div>
|
|
1152
|
+
<div class="edit-form__grid">
|
|
1153
|
+
<el-form-item label="发起部门" prop="createDeptNmae">
|
|
1154
|
+
<el-input
|
|
1155
|
+
v-model="createForm.createDeptNmae"
|
|
1156
|
+
disabled
|
|
1157
|
+
class="readonly-input"
|
|
1158
|
+
placeholder="由登录上下文注入"
|
|
1159
|
+
/>
|
|
1160
|
+
</el-form-item>
|
|
1161
|
+
<el-form-item label="发起人" prop="createUserName">
|
|
1162
|
+
<el-input
|
|
1163
|
+
v-model="createForm.createUserName"
|
|
1164
|
+
disabled
|
|
1165
|
+
class="readonly-input"
|
|
1166
|
+
placeholder="由登录上下文注入"
|
|
1167
|
+
/>
|
|
1168
|
+
</el-form-item>
|
|
1169
|
+
<el-form-item label="备注" prop="remark" class="edit-form__full">
|
|
1170
|
+
<el-input
|
|
1171
|
+
v-model="createForm.remark"
|
|
1172
|
+
type="textarea"
|
|
1173
|
+
:rows="2"
|
|
1174
|
+
maxlength="200"
|
|
1175
|
+
show-word-limit
|
|
1176
|
+
placeholder="可填写调拨用途或其他补充说明"
|
|
1177
|
+
/>
|
|
1178
|
+
</el-form-item>
|
|
1179
|
+
</div>
|
|
1180
|
+
</section>
|
|
820
1181
|
</div>
|
|
821
1182
|
</el-form>
|
|
822
1183
|
<template #footer>
|
|
823
|
-
<
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1184
|
+
<div class="dialog-footer">
|
|
1185
|
+
<span>带 <i>*</i> 的项目为必填项</span>
|
|
1186
|
+
<div>
|
|
1187
|
+
<el-button :disabled="createSubmitting" @click="createVisible = false">取消</el-button>
|
|
1188
|
+
<el-button
|
|
1189
|
+
:loading="createSubmittingAction === 'save'"
|
|
1190
|
+
:disabled="createSubmitting && createSubmittingAction !== 'save'"
|
|
1191
|
+
@click="handleCreateSubmit('save')"
|
|
1192
|
+
>
|
|
1193
|
+
保存
|
|
1194
|
+
</el-button>
|
|
1195
|
+
<el-button
|
|
1196
|
+
type="primary"
|
|
1197
|
+
:loading="createSubmittingAction === 'submit'"
|
|
1198
|
+
:disabled="createSubmitting && createSubmittingAction !== 'submit'"
|
|
1199
|
+
@click="handleCreateSubmit('submit')"
|
|
1200
|
+
>
|
|
1201
|
+
提交
|
|
1202
|
+
</el-button>
|
|
1203
|
+
</div>
|
|
1204
|
+
</div>
|
|
827
1205
|
</template>
|
|
828
1206
|
</el-dialog>
|
|
829
1207
|
|
|
830
1208
|
<el-dialog
|
|
831
1209
|
v-model="editVisible"
|
|
832
|
-
|
|
833
|
-
width="min(720px, calc(100vw - 32px))"
|
|
1210
|
+
width="min(880px, calc(100vw - 32px))"
|
|
834
1211
|
:close-on-click-modal="false"
|
|
835
1212
|
destroy-on-close
|
|
836
1213
|
class="allocation-edit-dialog"
|
|
837
1214
|
>
|
|
838
|
-
<
|
|
839
|
-
<div class="
|
|
840
|
-
<
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
<el-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1215
|
+
<template #header>
|
|
1216
|
+
<div class="dialog-heading">
|
|
1217
|
+
<span class="dialog-heading__icon"><el-icon><EditPen /></el-icon></span>
|
|
1218
|
+
<div>
|
|
1219
|
+
<small>TRANSFER · {{ editForm.refNoEdit }}</small>
|
|
1220
|
+
<h2>修改外币资金调拨</h2>
|
|
1221
|
+
</div>
|
|
1222
|
+
<el-tag
|
|
1223
|
+
:type="statusTagType(editForm.status)"
|
|
1224
|
+
:class="statusTagClass(editForm.status)"
|
|
1225
|
+
effect="light"
|
|
1226
|
+
size="small"
|
|
1227
|
+
>
|
|
1228
|
+
{{ statusLabel(editForm.status) }}
|
|
1229
|
+
</el-tag>
|
|
1230
|
+
</div>
|
|
1231
|
+
</template>
|
|
1232
|
+
|
|
1233
|
+
<el-form
|
|
1234
|
+
ref="editFormRef"
|
|
1235
|
+
:model="editForm"
|
|
1236
|
+
:rules="editFormRules"
|
|
1237
|
+
label-position="top"
|
|
1238
|
+
status-icon
|
|
1239
|
+
class="edit-form"
|
|
1240
|
+
>
|
|
1241
|
+
<div class="edit-form__content">
|
|
1242
|
+
<el-alert
|
|
1243
|
+
v-if="statusCode(editForm.status) === 'N'"
|
|
1244
|
+
:title="`拒绝原因:${editRejectReason || '—'}`"
|
|
1245
|
+
type="error"
|
|
1246
|
+
show-icon
|
|
1247
|
+
:closable="false"
|
|
1248
|
+
/>
|
|
1249
|
+
<section class="edit-section">
|
|
1250
|
+
<div class="edit-section__heading">
|
|
1251
|
+
<span>01</span>
|
|
1252
|
+
<div><h3>调拨信息</h3><p>修改将保留原调拨单号,可保存草稿或提交审批</p></div>
|
|
1253
|
+
</div>
|
|
1254
|
+
<div class="edit-form__grid edit-form__grid--three">
|
|
1255
|
+
<el-form-item label="调拨类型" prop="alocTypeEdit">
|
|
1256
|
+
<el-select
|
|
1257
|
+
v-model="editForm.alocTypeEdit"
|
|
1258
|
+
placeholder="请选择调拨类型"
|
|
1259
|
+
@change="handleAllocationTypeChange('edit', $event)"
|
|
1260
|
+
>
|
|
1261
|
+
<el-option
|
|
1262
|
+
v-for="option in allocationTypeOptions"
|
|
1263
|
+
:key="option.value"
|
|
1264
|
+
v-bind="option"
|
|
1265
|
+
/>
|
|
1266
|
+
</el-select>
|
|
1267
|
+
</el-form-item>
|
|
1268
|
+
<el-form-item label="账户类型" prop="acctTypeEdit">
|
|
1269
|
+
<el-select v-model="editForm.acctTypeEdit" disabled class="readonly-field">
|
|
1270
|
+
<el-option
|
|
1271
|
+
v-for="option in accountTypeOptions"
|
|
1272
|
+
:key="option.value"
|
|
1273
|
+
v-bind="option"
|
|
1274
|
+
/>
|
|
1275
|
+
</el-select>
|
|
1276
|
+
</el-form-item>
|
|
1277
|
+
<el-form-item label="起息日" prop="valueDateEdit">
|
|
1278
|
+
<el-date-picker
|
|
1279
|
+
v-model="editForm.valueDateEdit"
|
|
1280
|
+
type="date"
|
|
1281
|
+
format="YYYY-MM-DD"
|
|
1282
|
+
value-format="YYYY-MM-DD"
|
|
1283
|
+
placeholder="请选择起息日"
|
|
1284
|
+
/>
|
|
1285
|
+
</el-form-item>
|
|
1286
|
+
<el-form-item label="调拨金额(元)" prop="amtEdit">
|
|
1287
|
+
<el-input
|
|
1288
|
+
v-model="editAmountInput"
|
|
1289
|
+
inputmode="decimal"
|
|
1290
|
+
maxlength="40"
|
|
1291
|
+
placeholder="0.00"
|
|
1292
|
+
>
|
|
1293
|
+
<template #append>{{ editForm.ccyEdit || '币种' }}</template>
|
|
1294
|
+
</el-input>
|
|
1295
|
+
</el-form-item>
|
|
1296
|
+
<el-form-item label="是否资金运营中心" prop="fundOpeCentStoreEdit">
|
|
1297
|
+
<el-radio-group v-model="editForm.fundOpeCentStoreEdit" class="choice-cards">
|
|
1298
|
+
<el-radio-button value="Y">是</el-radio-button>
|
|
1299
|
+
<el-radio-button value="N">否</el-radio-button>
|
|
1300
|
+
</el-radio-group>
|
|
1301
|
+
</el-form-item>
|
|
1302
|
+
</div>
|
|
1303
|
+
</section>
|
|
1304
|
+
|
|
1305
|
+
<section class="edit-section edit-section--route">
|
|
1306
|
+
<div class="edit-section__heading">
|
|
1307
|
+
<span>02</span>
|
|
1308
|
+
<div><h3>账户路径</h3><p>币种或自贸区变化后,需要重新选择调出和调入账户</p></div>
|
|
1309
|
+
</div>
|
|
1310
|
+
<div class="account-context-grid">
|
|
1311
|
+
<el-form-item label="币种" prop="ccyEdit">
|
|
1312
|
+
<el-select
|
|
1313
|
+
v-model="editForm.ccyEdit"
|
|
1314
|
+
placeholder="请选择币种"
|
|
1315
|
+
filterable
|
|
1316
|
+
@change="handleAccountDependencyChange('edit')"
|
|
1317
|
+
>
|
|
1318
|
+
<el-option v-for="option in currencyOptions" :key="option.value" v-bind="option" />
|
|
1319
|
+
</el-select>
|
|
1320
|
+
</el-form-item>
|
|
1321
|
+
<el-form-item label="是否自贸区" prop="zmqFlagEdit">
|
|
1322
|
+
<el-radio-group
|
|
1323
|
+
v-model="editForm.zmqFlagEdit"
|
|
1324
|
+
class="choice-cards"
|
|
1325
|
+
@change="handleAccountDependencyChange('edit')"
|
|
1326
|
+
>
|
|
1327
|
+
<el-radio-button value="Y">是</el-radio-button>
|
|
1328
|
+
<el-radio-button value="N">否</el-radio-button>
|
|
1329
|
+
</el-radio-group>
|
|
1330
|
+
</el-form-item>
|
|
1331
|
+
</div>
|
|
1332
|
+
<div class="account-editor-route">
|
|
1333
|
+
<div class="account-editor-node account-editor-node--out">
|
|
1334
|
+
<span class="account-editor-node__badge">OUT</span>
|
|
1335
|
+
<el-form-item label="调出账号" prop="outAcctNoEdit">
|
|
1336
|
+
<el-select
|
|
1337
|
+
v-model="editForm.outAcctNoEdit"
|
|
1338
|
+
:disabled="!editForm.ccyEdit"
|
|
1339
|
+
:loading="accountBankLoading"
|
|
1340
|
+
filterable
|
|
1341
|
+
allow-create
|
|
1342
|
+
default-first-option
|
|
1343
|
+
clearable
|
|
1344
|
+
placeholder="请选择或输入调出账号"
|
|
1345
|
+
@visible-change="handleAccountSelectVisibleChange('edit', $event)"
|
|
1346
|
+
>
|
|
1347
|
+
<el-option
|
|
1348
|
+
v-for="option in accountBankOptions"
|
|
1349
|
+
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1350
|
+
:label="option.bankName"
|
|
1351
|
+
:value="option.bankAcct"
|
|
1352
|
+
>
|
|
1353
|
+
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1354
|
+
<small>{{ option.bankAcct }}</small>
|
|
1355
|
+
</el-option>
|
|
1356
|
+
</el-select>
|
|
1357
|
+
</el-form-item>
|
|
1358
|
+
</div>
|
|
1359
|
+
<span class="account-editor-route__arrow"><el-icon><ArrowRight /></el-icon></span>
|
|
1360
|
+
<div class="account-editor-node account-editor-node--in">
|
|
1361
|
+
<span class="account-editor-node__badge">IN</span>
|
|
1362
|
+
<el-form-item label="调入账号" prop="inAcctNoEdit">
|
|
1363
|
+
<el-select
|
|
1364
|
+
v-model="editForm.inAcctNoEdit"
|
|
1365
|
+
:disabled="!editForm.ccyEdit"
|
|
1366
|
+
:loading="accountBankLoading"
|
|
1367
|
+
filterable
|
|
1368
|
+
allow-create
|
|
1369
|
+
default-first-option
|
|
1370
|
+
clearable
|
|
1371
|
+
placeholder="请选择或输入调入账号"
|
|
1372
|
+
@visible-change="handleAccountSelectVisibleChange('edit', $event)"
|
|
1373
|
+
>
|
|
1374
|
+
<el-option
|
|
1375
|
+
v-for="option in accountBankOptions"
|
|
1376
|
+
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1377
|
+
:label="option.bankName"
|
|
1378
|
+
:value="option.bankAcct"
|
|
1379
|
+
>
|
|
1380
|
+
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1381
|
+
<small>{{ option.bankAcct }}</small>
|
|
1382
|
+
</el-option>
|
|
1383
|
+
</el-select>
|
|
1384
|
+
</el-form-item>
|
|
1385
|
+
</div>
|
|
1386
|
+
</div>
|
|
1387
|
+
</section>
|
|
1388
|
+
|
|
1389
|
+
<section class="edit-section">
|
|
1390
|
+
<div class="edit-section__heading">
|
|
1391
|
+
<span>03</span>
|
|
1392
|
+
<div><h3>补充说明</h3><p>填写本次修改需要保留的业务备注</p></div>
|
|
1393
|
+
</div>
|
|
1394
|
+
<el-form-item label="备注" prop="remarkEdit" class="edit-form__full">
|
|
1395
|
+
<el-input
|
|
1396
|
+
v-model="editForm.remarkEdit"
|
|
1397
|
+
type="textarea"
|
|
1398
|
+
:rows="3"
|
|
1399
|
+
maxlength="200"
|
|
1400
|
+
show-word-limit
|
|
1401
|
+
placeholder="可填写调拨用途或修改说明"
|
|
1402
|
+
/>
|
|
1403
|
+
</el-form-item>
|
|
1404
|
+
</section>
|
|
902
1405
|
</div>
|
|
903
1406
|
</el-form>
|
|
904
1407
|
<template #footer>
|
|
905
|
-
<
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1408
|
+
<div class="dialog-footer">
|
|
1409
|
+
<span>保存为草稿,提交后进入待审批状态</span>
|
|
1410
|
+
<div>
|
|
1411
|
+
<el-button :disabled="editSubmitting" @click="editVisible = false">取消</el-button>
|
|
1412
|
+
<el-button
|
|
1413
|
+
:loading="editSubmittingAction === 'save'"
|
|
1414
|
+
:disabled="editSubmitting && editSubmittingAction !== 'save'"
|
|
1415
|
+
@click="handleEditSubmit('save')"
|
|
1416
|
+
>
|
|
1417
|
+
保存
|
|
1418
|
+
</el-button>
|
|
1419
|
+
<el-button
|
|
1420
|
+
type="primary"
|
|
1421
|
+
:loading="editSubmittingAction === 'submit'"
|
|
1422
|
+
:disabled="editSubmitting && editSubmittingAction !== 'submit'"
|
|
1423
|
+
@click="handleEditSubmit('submit')"
|
|
1424
|
+
>
|
|
1425
|
+
提交
|
|
1426
|
+
</el-button>
|
|
1427
|
+
</div>
|
|
1428
|
+
</div>
|
|
909
1429
|
</template>
|
|
910
1430
|
</el-dialog>
|
|
911
1431
|
|
|
@@ -922,15 +1442,29 @@ onBeforeUnmount(() => {
|
|
|
922
1442
|
<span>调拨单号</span>
|
|
923
1443
|
<strong>{{ detailRecord.refNo }}</strong>
|
|
924
1444
|
</div>
|
|
925
|
-
<el-tag
|
|
926
|
-
|
|
1445
|
+
<el-tag
|
|
1446
|
+
:type="statusTagType(detailRecord.status)"
|
|
1447
|
+
:class="statusTagClass(detailRecord.status)"
|
|
1448
|
+
effect="light"
|
|
1449
|
+
size="small"
|
|
1450
|
+
>
|
|
1451
|
+
{{ statusLabel(detailRecord.status) }}
|
|
927
1452
|
</el-tag>
|
|
928
1453
|
</div>
|
|
929
1454
|
|
|
1455
|
+
<el-alert
|
|
1456
|
+
v-if="statusCode(detailRecord.status) === 'N'"
|
|
1457
|
+
:title="`拒绝原因:${detailRecord.approveRjctReason || '—'}`"
|
|
1458
|
+
type="error"
|
|
1459
|
+
show-icon
|
|
1460
|
+
:closable="false"
|
|
1461
|
+
class="detail-reject-alert"
|
|
1462
|
+
/>
|
|
1463
|
+
|
|
930
1464
|
<section class="detail-section">
|
|
931
1465
|
<h3>调拨信息</h3>
|
|
932
1466
|
<el-descriptions :column="2" border size="small">
|
|
933
|
-
<el-descriptions-item label="调拨类型">{{ detailRecord.alocType
|
|
1467
|
+
<el-descriptions-item label="调拨类型">{{ allocationTypeLabel(detailRecord.alocType) }}</el-descriptions-item>
|
|
934
1468
|
<el-descriptions-item label="币种">
|
|
935
1469
|
<component :is="columnComponentMap.ccy" :value="detailRecord.ccy" />
|
|
936
1470
|
</el-descriptions-item>
|
|
@@ -940,9 +1474,6 @@ onBeforeUnmount(() => {
|
|
|
940
1474
|
<el-descriptions-item label="起息日">{{ formatDate(detailRecord.valueDate) }}</el-descriptions-item>
|
|
941
1475
|
<el-descriptions-item label="资金运营中心">{{ yesNoLabel(detailRecord.fundOpeCent) }}</el-descriptions-item>
|
|
942
1476
|
<el-descriptions-item label="自贸区">{{ yesNoLabel(detailRecord.zmqFlag) }}</el-descriptions-item>
|
|
943
|
-
<el-descriptions-item label="拒绝原因" :span="2">
|
|
944
|
-
{{ detailRecord.approveRjctReason || '—' }}
|
|
945
|
-
</el-descriptions-item>
|
|
946
1477
|
</el-descriptions>
|
|
947
1478
|
</section>
|
|
948
1479
|
|
|
@@ -967,36 +1498,58 @@ onBeforeUnmount(() => {
|
|
|
967
1498
|
<h3>发起信息</h3>
|
|
968
1499
|
<el-descriptions :column="2" border size="small">
|
|
969
1500
|
<el-descriptions-item label="发起人">{{ detailRecord.createUser || '—' }}</el-descriptions-item>
|
|
970
|
-
<el-descriptions-item label="发起人编码">{{ detailRecord.createUserCode || '—' }}</el-descriptions-item>
|
|
971
1501
|
<el-descriptions-item label="发起部门">{{ detailRecord.createDept || '—' }}</el-descriptions-item>
|
|
972
|
-
<el-descriptions-item label="
|
|
973
|
-
<el-descriptions-item label="账户类型">{{ detailRecord.acctType || '—' }}</el-descriptions-item>
|
|
1502
|
+
<el-descriptions-item label="账户类型">{{ accountTypeLabel(detailRecord.acctType) }}</el-descriptions-item>
|
|
974
1503
|
<el-descriptions-item label="备注">{{ detailRecord.remark || '—' }}</el-descriptions-item>
|
|
975
1504
|
</el-descriptions>
|
|
976
1505
|
</section>
|
|
977
1506
|
</template>
|
|
978
1507
|
|
|
979
|
-
<template
|
|
1508
|
+
<template
|
|
1509
|
+
v-if="detailRecord && (isPendingStatus(detailRecord.status) || canEditStatus(detailRecord.status))"
|
|
1510
|
+
#footer
|
|
1511
|
+
>
|
|
980
1512
|
<div class="drawer-review-actions">
|
|
981
1513
|
<el-button
|
|
1514
|
+
v-if="canEditStatus(detailRecord.status)"
|
|
982
1515
|
type="primary"
|
|
983
|
-
:icon="
|
|
984
|
-
|
|
985
|
-
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'approve')"
|
|
986
|
-
@click="handleReview(detailRecord, 'Y')"
|
|
1516
|
+
:icon="EditPen"
|
|
1517
|
+
@click="handleDetailEdit"
|
|
987
1518
|
>
|
|
988
|
-
|
|
1519
|
+
修改
|
|
989
1520
|
</el-button>
|
|
990
1521
|
<el-button
|
|
1522
|
+
v-if="canDeleteStatus(detailRecord.status)"
|
|
991
1523
|
type="danger"
|
|
992
1524
|
plain
|
|
993
|
-
:icon="
|
|
994
|
-
:loading="isActionLoading(detailRecord, '
|
|
995
|
-
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, '
|
|
996
|
-
@click="
|
|
1525
|
+
:icon="Delete"
|
|
1526
|
+
:loading="isActionLoading(detailRecord, 'delete')"
|
|
1527
|
+
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'delete')"
|
|
1528
|
+
@click="handleDelete(detailRecord)"
|
|
997
1529
|
>
|
|
998
|
-
|
|
1530
|
+
删除
|
|
999
1531
|
</el-button>
|
|
1532
|
+
<template v-if="isPendingStatus(detailRecord.status)">
|
|
1533
|
+
<el-button
|
|
1534
|
+
type="primary"
|
|
1535
|
+
:icon="CircleCheck"
|
|
1536
|
+
:loading="isActionLoading(detailRecord, 'approve')"
|
|
1537
|
+
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'approve')"
|
|
1538
|
+
@click="handleReview(detailRecord, 'Y')"
|
|
1539
|
+
>
|
|
1540
|
+
确认
|
|
1541
|
+
</el-button>
|
|
1542
|
+
<el-button
|
|
1543
|
+
type="danger"
|
|
1544
|
+
plain
|
|
1545
|
+
:icon="CircleClose"
|
|
1546
|
+
:loading="isActionLoading(detailRecord, 'reject')"
|
|
1547
|
+
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'reject')"
|
|
1548
|
+
@click="handleReview(detailRecord, 'N')"
|
|
1549
|
+
>
|
|
1550
|
+
拒绝
|
|
1551
|
+
</el-button>
|
|
1552
|
+
</template>
|
|
1000
1553
|
</div>
|
|
1001
1554
|
</template>
|
|
1002
1555
|
</el-drawer>
|
|
@@ -1077,23 +1630,212 @@ onBeforeUnmount(() => {
|
|
|
1077
1630
|
.allocation-table :deep(.el-table__cell) { padding: 6px 0; font-size: 12px; }
|
|
1078
1631
|
.allocation-table :deep(.el-table__row) { height: 42px; }
|
|
1079
1632
|
.money-cell { color: #27364f; font-weight: 650; font-variant-numeric: tabular-nums; }
|
|
1633
|
+
.status-tag {
|
|
1634
|
+
min-width: 72px;
|
|
1635
|
+
height: 24px;
|
|
1636
|
+
justify-content: center;
|
|
1637
|
+
border-radius: 999px;
|
|
1638
|
+
font-size: 11px;
|
|
1639
|
+
font-weight: 700;
|
|
1640
|
+
letter-spacing: .01em;
|
|
1641
|
+
}
|
|
1642
|
+
.status-tag.status-tag--draft {
|
|
1643
|
+
--el-tag-bg-color: #f2f4f7;
|
|
1644
|
+
--el-tag-border-color: #d0d5dd;
|
|
1645
|
+
--el-tag-text-color: #475467;
|
|
1646
|
+
}
|
|
1647
|
+
.status-tag.status-tag--pending {
|
|
1648
|
+
--el-tag-bg-color: #fffaeb;
|
|
1649
|
+
--el-tag-border-color: #fedf89;
|
|
1650
|
+
--el-tag-text-color: #b54708;
|
|
1651
|
+
}
|
|
1652
|
+
.status-tag.status-tag--approved {
|
|
1653
|
+
--el-tag-bg-color: #ecfdf3;
|
|
1654
|
+
--el-tag-border-color: #abefc6;
|
|
1655
|
+
--el-tag-text-color: #067647;
|
|
1656
|
+
}
|
|
1657
|
+
.status-tag.status-tag--rejected {
|
|
1658
|
+
--el-tag-bg-color: #fef3f2;
|
|
1659
|
+
--el-tag-border-color: #fecdca;
|
|
1660
|
+
--el-tag-text-color: #b42318;
|
|
1661
|
+
}
|
|
1662
|
+
.status-tag.status-tag--default {
|
|
1663
|
+
--el-tag-bg-color: #f5f7fa;
|
|
1664
|
+
--el-tag-border-color: #d8dee8;
|
|
1665
|
+
--el-tag-text-color: #667085;
|
|
1666
|
+
}
|
|
1080
1667
|
|
|
1081
1668
|
:deep(.allocation-edit-dialog .el-dialog__header) {
|
|
1082
1669
|
margin-right: 0;
|
|
1083
|
-
padding: 16px
|
|
1670
|
+
padding: 16px 22px;
|
|
1084
1671
|
border-bottom: 1px solid #e4eaf1;
|
|
1672
|
+
background: linear-gradient(110deg, #f7faff 0%, #fff 58%, #f5f9ff 100%);
|
|
1673
|
+
}
|
|
1674
|
+
:deep(.allocation-edit-dialog .el-dialog__headerbtn) { top: 17px; right: 18px; }
|
|
1675
|
+
:deep(.allocation-edit-dialog .el-dialog__body) {
|
|
1676
|
+
max-height: min(68vh, 720px);
|
|
1677
|
+
overflow-y: auto;
|
|
1678
|
+
padding: 0;
|
|
1679
|
+
background: #f6f8fb;
|
|
1085
1680
|
}
|
|
1086
|
-
:deep(.allocation-edit-dialog .el-dialog__body) { padding: 18px 20px 6px; }
|
|
1087
1681
|
:deep(.allocation-edit-dialog .el-dialog__footer) {
|
|
1088
|
-
padding:
|
|
1682
|
+
padding: 13px 22px;
|
|
1089
1683
|
border-top: 1px solid #e4eaf1;
|
|
1684
|
+
background: #fff;
|
|
1685
|
+
}
|
|
1686
|
+
.dialog-heading {
|
|
1687
|
+
display: flex;
|
|
1688
|
+
align-items: center;
|
|
1689
|
+
gap: 12px;
|
|
1690
|
+
padding-right: 42px;
|
|
1090
1691
|
}
|
|
1091
|
-
.
|
|
1692
|
+
.dialog-heading__icon {
|
|
1693
|
+
display: grid;
|
|
1694
|
+
width: 38px;
|
|
1695
|
+
height: 38px;
|
|
1696
|
+
flex: 0 0 38px;
|
|
1697
|
+
place-items: center;
|
|
1698
|
+
border: 1px solid #c8dcff;
|
|
1699
|
+
border-radius: 10px;
|
|
1700
|
+
color: #175cd3;
|
|
1701
|
+
background: #eaf2ff;
|
|
1702
|
+
box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .65);
|
|
1703
|
+
}
|
|
1704
|
+
.dialog-heading__icon .el-icon { font-size: 18px; }
|
|
1705
|
+
.dialog-heading > div { min-width: 0; }
|
|
1706
|
+
.dialog-heading small {
|
|
1707
|
+
display: block;
|
|
1708
|
+
margin-bottom: 1px;
|
|
1709
|
+
color: #7b8ca8;
|
|
1710
|
+
font-size: 9px;
|
|
1711
|
+
font-weight: 700;
|
|
1712
|
+
letter-spacing: .12em;
|
|
1713
|
+
line-height: 14px;
|
|
1714
|
+
}
|
|
1715
|
+
.dialog-heading h2 { margin: 0; color: #172b4d; font-size: 17px; line-height: 24px; }
|
|
1716
|
+
.dialog-heading .el-tag { margin-left: auto; margin-right: 2px; }
|
|
1717
|
+
.edit-form__content { display: grid; gap: 10px; padding: 14px; }
|
|
1718
|
+
.edit-section {
|
|
1719
|
+
min-width: 0;
|
|
1720
|
+
padding: 14px 16px 2px;
|
|
1721
|
+
border: 1px solid #e0e6ee;
|
|
1722
|
+
border-radius: 8px;
|
|
1723
|
+
background: #fff;
|
|
1724
|
+
box-shadow: 0 2px 7px rgba(25, 47, 89, .035);
|
|
1725
|
+
}
|
|
1726
|
+
.edit-section__heading {
|
|
1727
|
+
display: flex;
|
|
1728
|
+
align-items: flex-start;
|
|
1729
|
+
gap: 10px;
|
|
1730
|
+
margin-bottom: 12px;
|
|
1731
|
+
}
|
|
1732
|
+
.edit-section__heading > span {
|
|
1733
|
+
min-width: 27px;
|
|
1734
|
+
padding-top: 2px;
|
|
1735
|
+
color: #175cd3;
|
|
1736
|
+
font-size: 11px;
|
|
1737
|
+
font-weight: 800;
|
|
1738
|
+
letter-spacing: .06em;
|
|
1739
|
+
}
|
|
1740
|
+
.edit-section__heading h3 { margin: 0; color: #27364f; font-size: 14px; line-height: 20px; }
|
|
1741
|
+
.edit-section__heading p { margin: 1px 0 0; color: #8491a5; font-size: 11px; line-height: 17px; }
|
|
1742
|
+
.edit-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
|
|
1743
|
+
.edit-form__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1092
1744
|
.edit-form__full { grid-column: 1 / -1; }
|
|
1093
|
-
.edit-form :deep(.el-form-item) { min-width: 0; margin-bottom:
|
|
1745
|
+
.edit-form :deep(.el-form-item) { min-width: 0; margin-bottom: 14px; }
|
|
1746
|
+
.edit-form :deep(.el-form-item__label) {
|
|
1747
|
+
height: 24px;
|
|
1748
|
+
padding: 0;
|
|
1749
|
+
color: #475467;
|
|
1750
|
+
font-size: 12px;
|
|
1751
|
+
font-weight: 650;
|
|
1752
|
+
line-height: 24px;
|
|
1753
|
+
}
|
|
1094
1754
|
.edit-form :deep(.el-input),
|
|
1095
1755
|
.edit-form :deep(.el-select),
|
|
1096
1756
|
.edit-form :deep(.el-date-editor) { width: 100%; }
|
|
1757
|
+
.edit-form :deep(.el-input__wrapper),
|
|
1758
|
+
.edit-form :deep(.el-select__wrapper) { min-height: 34px; border-radius: 6px; }
|
|
1759
|
+
.readonly-field :deep(.el-select__wrapper.is-disabled) {
|
|
1760
|
+
cursor: default;
|
|
1761
|
+
background: #f3f6fa;
|
|
1762
|
+
box-shadow: 0 0 0 1px #dce3ec inset;
|
|
1763
|
+
}
|
|
1764
|
+
.readonly-field :deep(.el-select__selected-item) { color: #344054; font-weight: 600; }
|
|
1765
|
+
.readonly-input :deep(.el-input__wrapper.is-disabled) {
|
|
1766
|
+
cursor: default;
|
|
1767
|
+
background: #f3f6fa;
|
|
1768
|
+
box-shadow: 0 0 0 1px #dce3ec inset;
|
|
1769
|
+
}
|
|
1770
|
+
.readonly-input :deep(.el-input__inner) { color: #344054; font-weight: 600; }
|
|
1771
|
+
.edit-form :deep(.el-input-group__append) {
|
|
1772
|
+
min-width: 42px;
|
|
1773
|
+
padding: 0 10px;
|
|
1774
|
+
color: #475467;
|
|
1775
|
+
font-size: 11px;
|
|
1776
|
+
font-weight: 700;
|
|
1777
|
+
text-align: center;
|
|
1778
|
+
}
|
|
1779
|
+
.choice-cards { display: flex; width: 100%; }
|
|
1780
|
+
.choice-cards :deep(.el-radio-button) { flex: 1; }
|
|
1781
|
+
.choice-cards :deep(.el-radio-button__inner) { width: 100%; padding: 9px 15px; }
|
|
1782
|
+
.account-context-grid {
|
|
1783
|
+
display: grid;
|
|
1784
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1785
|
+
gap: 18px;
|
|
1786
|
+
margin-bottom: 12px;
|
|
1787
|
+
padding: 0 0 14px;
|
|
1788
|
+
border-bottom: 1px dashed #dfe6ef;
|
|
1789
|
+
}
|
|
1790
|
+
.account-context-grid :deep(.el-form-item) { margin-bottom: 0; }
|
|
1791
|
+
.account-editor-route {
|
|
1792
|
+
display: grid;
|
|
1793
|
+
grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
|
|
1794
|
+
align-items: stretch;
|
|
1795
|
+
padding-bottom: 14px;
|
|
1796
|
+
}
|
|
1797
|
+
.account-editor-node {
|
|
1798
|
+
position: relative;
|
|
1799
|
+
min-width: 0;
|
|
1800
|
+
padding: 12px 14px 0;
|
|
1801
|
+
overflow: hidden;
|
|
1802
|
+
border: 1px solid #dce4ee;
|
|
1803
|
+
border-radius: 8px;
|
|
1804
|
+
background: #fbfcfe;
|
|
1805
|
+
}
|
|
1806
|
+
.account-editor-node--out { border-left: 3px solid #d97706; }
|
|
1807
|
+
.account-editor-node--in { border-left: 3px solid #0e9384; }
|
|
1808
|
+
.account-editor-node__badge {
|
|
1809
|
+
position: absolute;
|
|
1810
|
+
top: 7px;
|
|
1811
|
+
right: 9px;
|
|
1812
|
+
color: #a3adbd;
|
|
1813
|
+
font-size: 9px;
|
|
1814
|
+
font-weight: 800;
|
|
1815
|
+
letter-spacing: .1em;
|
|
1816
|
+
}
|
|
1817
|
+
.account-editor-route__arrow { display: grid; place-items: center; color: #7593bd; }
|
|
1818
|
+
.account-editor-route__arrow .el-icon {
|
|
1819
|
+
width: 25px;
|
|
1820
|
+
height: 25px;
|
|
1821
|
+
border: 1px solid #d8e3f2;
|
|
1822
|
+
border-radius: 50%;
|
|
1823
|
+
background: #f4f8fd;
|
|
1824
|
+
}
|
|
1825
|
+
.account-editor-node :deep(.el-form-item) { margin-bottom: 12px; }
|
|
1826
|
+
.account-option__name {
|
|
1827
|
+
display: inline-block;
|
|
1828
|
+
max-width: calc(100% - 130px);
|
|
1829
|
+
overflow: hidden;
|
|
1830
|
+
text-overflow: ellipsis;
|
|
1831
|
+
vertical-align: middle;
|
|
1832
|
+
}
|
|
1833
|
+
.account-option__name + small { float: right; color: #98a2b3; font-size: 10px; }
|
|
1834
|
+
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
1835
|
+
.dialog-footer > span { color: #8491a5; font-size: 11px; }
|
|
1836
|
+
.dialog-footer > span i { color: #e5484d; font-style: normal; }
|
|
1837
|
+
.dialog-footer > div { display: flex; gap: 8px; }
|
|
1838
|
+
.dialog-footer .el-button { min-width: 88px; }
|
|
1097
1839
|
|
|
1098
1840
|
:deep(.allocation-detail-drawer .el-drawer__header) {
|
|
1099
1841
|
margin-bottom: 0;
|
|
@@ -1119,8 +1861,9 @@ onBeforeUnmount(() => {
|
|
|
1119
1861
|
border-radius: 7px;
|
|
1120
1862
|
background: #f3f7fc;
|
|
1121
1863
|
}
|
|
1122
|
-
.drawer-summary span { display: block; color: var(--allocation-muted); font-size: 11px; }
|
|
1864
|
+
.drawer-summary > div > span { display: block; color: var(--allocation-muted); font-size: 11px; }
|
|
1123
1865
|
.drawer-summary strong { color: #174ea6; font-size: 16px; font-variant-numeric: tabular-nums; }
|
|
1866
|
+
.detail-reject-alert { margin: -6px 0 18px; }
|
|
1124
1867
|
.detail-section { margin-bottom: 22px; }
|
|
1125
1868
|
.detail-section:last-child { margin-bottom: 0; }
|
|
1126
1869
|
.detail-section h3 { margin: 0 0 9px; font-size: 14px; }
|
|
@@ -1141,12 +1884,23 @@ onBeforeUnmount(() => {
|
|
|
1141
1884
|
|
|
1142
1885
|
@media (max-width: 900px) {
|
|
1143
1886
|
.query-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1887
|
+
.edit-form__grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1144
1888
|
}
|
|
1145
1889
|
|
|
1146
1890
|
@media (max-width: 560px) {
|
|
1147
1891
|
.query-grid { grid-template-columns: 1fr; }
|
|
1148
1892
|
.edit-form__grid { grid-template-columns: 1fr; }
|
|
1149
1893
|
.edit-form__full { grid-column: auto; }
|
|
1894
|
+
.dialog-heading small { display: none; }
|
|
1895
|
+
.dialog-heading .el-tag { display: none; }
|
|
1896
|
+
.edit-form__content { padding: 10px; }
|
|
1897
|
+
.edit-section { padding-right: 12px; padding-left: 12px; }
|
|
1898
|
+
.account-context-grid { grid-template-columns: 1fr; gap: 10px; }
|
|
1899
|
+
.account-editor-route { grid-template-columns: 1fr; gap: 8px; }
|
|
1900
|
+
.account-editor-route__arrow { transform: rotate(90deg); }
|
|
1901
|
+
.dialog-footer > span { display: none; }
|
|
1902
|
+
.dialog-footer > div { width: 100%; }
|
|
1903
|
+
.dialog-footer .el-button { flex: 1; }
|
|
1150
1904
|
.account-route { grid-template-columns: 1fr; gap: 8px; }
|
|
1151
1905
|
.account-route__arrow { transform: rotate(90deg); }
|
|
1152
1906
|
}
|