fix: 移动端编辑表单自动补充客户到选项列表,避免显示UUID

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 20:34:34 +08:00
parent 6c76b34d1b
commit 7b91cb4230
3 changed files with 9 additions and 0 deletions
@@ -33,6 +33,9 @@ onMounted(async () => {
try {
const res = await api.get(`/work-plans/${route.params.id}`)
const d = res.data
if (d.customer_id && d.customer_name && !customers.value.find((c: any) => c.id === d.customer_id)) {
customers.value.unshift({ id: d.customer_id, name: d.customer_name })
}
form.value = { customer_id: d.customer_id, plan_content: d.plan_content || '', plan_date: d.plan_date, status: d.status, manager_id: d.manager_id || auth.userId || '' }
} catch (_) {}
}