From e6237590c0ae1cfb0ec55b20f1ace40e4f9590da Mon Sep 17 00:00:00 2001 From: v6ole Date: Sun, 12 Jul 2026 13:43:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=8B=9C=E8=AE=BF=E8=AE=B0=E5=BD=95=E6=97=B6=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BAUUID=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编辑模式下,el-select 的 customers 列表可能不包含当前记录对应的客户, 导致无法匹配选项而直接显示原始 UUID 值。 修复:从 GET 响应中获取 customer_name,补充到 customers 列表。 Co-Authored-By: Claude --- frontend/src/views/mobile/VisitForm.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/views/mobile/VisitForm.vue b/frontend/src/views/mobile/VisitForm.vue index 8f680a9..d93f0b6 100644 --- a/frontend/src/views/mobile/VisitForm.vue +++ b/frontend/src/views/mobile/VisitForm.vue @@ -52,6 +52,10 @@ onMounted(async () => { try { const res = await visitsApi.get(route.params.id as string) const v = res.data + // 确保当前客户在 select 选项列表中,避免显示 UUID + if (v.customer_id && v.customer_name && !customers.value.find(c => c.id === v.customer_id)) { + customers.value.unshift({ id: v.customer_id, name: v.customer_name }) + } form.value = { customer_id: v.customer_id, visit_date: v.visit_date,