verce-vue-test 0.0.95 → 0.0.97

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