diff --git a/frontend/src/views/mobile/KeyVisitForm.vue b/frontend/src/views/mobile/KeyVisitForm.vue index 251db30..586868f 100644 --- a/frontend/src/views/mobile/KeyVisitForm.vue +++ b/frontend/src/views/mobile/KeyVisitForm.vue @@ -46,6 +46,9 @@ onMounted(async () => { try { const res = await api.get(`/key-visits/${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, urgency_level: d.urgency_level, description: d.description || '', progress_status: d.progress_status, planned_date: d.planned_date, planned_visitor: d.planned_visitor, visit_target: d.visit_target, manager_id: d.manager_id || auth.userId || '' } } catch (_) {} } diff --git a/frontend/src/views/mobile/MiniBusinessForm.vue b/frontend/src/views/mobile/MiniBusinessForm.vue index 7d508ec..261a843 100644 --- a/frontend/src/views/mobile/MiniBusinessForm.vue +++ b/frontend/src/views/mobile/MiniBusinessForm.vue @@ -34,6 +34,9 @@ onMounted(async () => { try { const res = await api.get(`/mini-business/${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, product_type: d.product_type, amount: d.amount, follow_up_detail: d.follow_up_detail || '', status: d.status, expected_revenue_date: d.expected_revenue_date, manager_id: d.manager_id || auth.userId || '' } } catch (_) {} } diff --git a/frontend/src/views/mobile/WorkPlanForm.vue b/frontend/src/views/mobile/WorkPlanForm.vue index 2792c83..647a2bb 100644 --- a/frontend/src/views/mobile/WorkPlanForm.vue +++ b/frontend/src/views/mobile/WorkPlanForm.vue @@ -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 (_) {} }