From a035a9d6ad804bb41f371965e2263c73403b5dfc Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Thu, 30 Jul 2026 14:02:11 +0800 Subject: [PATCH] fix(web-admin): show receive account details below the form select. Co-authored-by: Cursor --- .../oa-approval/OaReceiveAccountSelect.vue | 302 +++++++++++++----- 1 file changed, 228 insertions(+), 74 deletions(-) diff --git a/web-admin/src/components/oa-approval/OaReceiveAccountSelect.vue b/web-admin/src/components/oa-approval/OaReceiveAccountSelect.vue index 70363430..17e24775 100644 --- a/web-admin/src/components/oa-approval/OaReceiveAccountSelect.vue +++ b/web-admin/src/components/oa-approval/OaReceiveAccountSelect.vue @@ -2,79 +2,166 @@ @@ -84,7 +171,7 @@ import { ElMessage } from 'element-plus' import { fetchOaReceiveAccountOptions } from '@/api/oaApproval' import { - formatReceiveAccountDisplay, + ACCOUNT_TYPE_LABEL, normalizeReceiveAccountModelValue, optionLabelFromRow, snapshotFromRow, @@ -116,10 +203,18 @@ const normalized = computed(() => normalizeReceiveAccountModelValue(props.modelValue)) - const displayText = computed(() => formatReceiveAccountDisplay(normalized.value)) - const selectModel = computed(() => normalized.value.map((x) => x.id)) + const selectSummary = computed(() => { + const n = normalized.value.length + if (!n) return '' + if (n === 1) { + const x = normalized.value[0] + return optionLabelFromRow(x) + } + return `已选 ${n} 个账户` + }) + const filteredOptions = computed(() => { const q = keyword.value.trim().toLowerCase() if (!q) return accountOptions.value @@ -128,6 +223,13 @@ ) }) + function regionText(item: ReceiveAccountSnapshot) { + const p = item.bankProvince.trim() + const c = item.bankCity.trim() + if (p && c) return `${p} / ${c}` + return p || c || '—' + } + function emitFromIds(ids: string[]) { const items: ReceiveAccountSnapshot[] = [] const seen = new Set() @@ -256,7 +358,6 @@ color: var(--mint-text, #0f172a); font-size: 14px; line-height: 1.5; - white-space: pre-line; word-break: break-all; } @@ -267,7 +368,6 @@ .oa-receive-account-select__trigger-text { min-width: 0; color: var(--mint-text, #0f172a); - white-space: pre-line; word-break: break-all; } @@ -307,10 +407,64 @@ text-align: center; } + .oa-receive-account-select__detail { + display: flex; + flex-direction: column; + gap: 8px; + margin-top: 10px; + } + + .oa-receive-account-select__card { + padding: 10px 12px; + border: 1px solid var(--mint-border, #d9e8e2); + border-radius: 8px; + background: var(--mint-row-alt, #fafafa); + } + + .oa-receive-account-select__card-title { + margin-bottom: 8px; + color: var(--mint-primary-dark, #059669); + font-size: 13px; + font-weight: 600; + } + + .oa-receive-account-select__card-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 8px 16px; + } + + .oa-receive-account-select__field { + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; + } + + .oa-receive-account-select__field--full { + grid-column: 1 / -1; + } + + .oa-receive-account-select__field .k { + color: var(--mint-text-muted, #64748b); + font-size: 12px; + } + + .oa-receive-account-select__field .v { + color: var(--mint-text, #1e293b); + font-size: 13px; + line-height: 1.5; + word-break: break-all; + } + @media (max-width: 767px) { .oa-receive-account-select__select :deep(.el-select__wrapper), .oa-receive-account-select__trigger { min-height: 44px; } + + .oa-receive-account-select__card-grid { + grid-template-columns: 1fr; + } }