From fade9e62e24e60bcbff931f042571c2a51607b93 Mon Sep 17 00:00:00 2001 From: v6ole Date: Sun, 12 Jul 2026 20:38:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E5=B1=80=E9=95=BF/=E9=A2=86?= =?UTF-8?q?=E5=AF=BC=E6=96=B0=E5=BB=BA=E8=AE=B0=E5=BD=95=E6=97=B6=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=BB=8F=E7=90=86=E6=A0=8F=E6=98=BE=E7=A4=BAUUID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit manager_id 初始值: director/leader 设为空让用户选择,manager 仍用自身ID 编辑模式保留原记录的 manager_id Co-Authored-By: Claude --- frontend/src/views/mobile/DailyNoteForm.vue | 2 +- frontend/src/views/mobile/KeyVisitForm.vue | 4 ++-- frontend/src/views/mobile/MiniBusinessForm.vue | 4 ++-- frontend/src/views/mobile/VisitForm.vue | 2 +- frontend/src/views/mobile/WorkPlanForm.vue | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/mobile/DailyNoteForm.vue b/frontend/src/views/mobile/DailyNoteForm.vue index d9ca697..5645d29 100644 --- a/frontend/src/views/mobile/DailyNoteForm.vue +++ b/frontend/src/views/mobile/DailyNoteForm.vue @@ -27,7 +27,7 @@ const form = ref({ category: '其他', content: '', time_range: '', - manager_id: auth.userId || '', + manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''), }) function onTimeRangeChange(val: [string, string] | null) { diff --git a/frontend/src/views/mobile/KeyVisitForm.vue b/frontend/src/views/mobile/KeyVisitForm.vue index 586868f..71a1fa0 100644 --- a/frontend/src/views/mobile/KeyVisitForm.vue +++ b/frontend/src/views/mobile/KeyVisitForm.vue @@ -30,7 +30,7 @@ const form = ref({ planned_date: '', planned_visitor: '', visit_target: '', - manager_id: auth.userId || '', + manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''), }) function onVisitorsChange(val: string[]) { @@ -49,7 +49,7 @@ onMounted(async () => { 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 || '' } + 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 } } catch (_) {} } }) diff --git a/frontend/src/views/mobile/MiniBusinessForm.vue b/frontend/src/views/mobile/MiniBusinessForm.vue index 261a843..0264fb2 100644 --- a/frontend/src/views/mobile/MiniBusinessForm.vue +++ b/frontend/src/views/mobile/MiniBusinessForm.vue @@ -22,7 +22,7 @@ const form = ref({ follow_up_detail: '', status: '跟进中', expected_revenue_date: '', - manager_id: auth.userId || '', + manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''), }) onMounted(async () => { @@ -37,7 +37,7 @@ onMounted(async () => { 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 || '' } + 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 } } catch (_) {} } }) diff --git a/frontend/src/views/mobile/VisitForm.vue b/frontend/src/views/mobile/VisitForm.vue index 11b3ddc..a94821b 100644 --- a/frontend/src/views/mobile/VisitForm.vue +++ b/frontend/src/views/mobile/VisitForm.vue @@ -30,7 +30,7 @@ const form = ref({ customer_demand: '', companions: [] as string[], photos: [] as string[], - manager_id: auth.userId || '', + manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''), }) const timeRangeValue = ref(null) diff --git a/frontend/src/views/mobile/WorkPlanForm.vue b/frontend/src/views/mobile/WorkPlanForm.vue index 647a2bb..6b27595 100644 --- a/frontend/src/views/mobile/WorkPlanForm.vue +++ b/frontend/src/views/mobile/WorkPlanForm.vue @@ -21,7 +21,7 @@ const form = ref({ plan_content: '', plan_date: todayStr(), status: '计划中', - manager_id: auth.userId || '', + manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''), }) onMounted(async () => { @@ -36,7 +36,7 @@ onMounted(async () => { 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 || '' } + 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 } } catch (_) {} } })