fix: 移动端编辑表单自动补充客户到选项列表,避免显示UUID
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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 (_) {}
|
||||
}
|
||||
|
||||
@@ -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 (_) {}
|
||||
}
|
||||
|
||||
@@ -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 (_) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user