fix: 支局长/领导新建记录时客户经理栏显示UUID
manager_id 初始值: director/leader 设为空让用户选择,manager 仍用自身ID 编辑模式保留原记录的 manager_id Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ const form = ref({
|
|||||||
category: '其他',
|
category: '其他',
|
||||||
content: '',
|
content: '',
|
||||||
time_range: '',
|
time_range: '',
|
||||||
manager_id: auth.userId || '',
|
manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''),
|
||||||
})
|
})
|
||||||
|
|
||||||
function onTimeRangeChange(val: [string, string] | null) {
|
function onTimeRangeChange(val: [string, string] | null) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const form = ref({
|
|||||||
planned_date: '',
|
planned_date: '',
|
||||||
planned_visitor: '',
|
planned_visitor: '',
|
||||||
visit_target: '',
|
visit_target: '',
|
||||||
manager_id: auth.userId || '',
|
manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''),
|
||||||
})
|
})
|
||||||
|
|
||||||
function onVisitorsChange(val: string[]) {
|
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)) {
|
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 })
|
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 (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const form = ref({
|
|||||||
follow_up_detail: '',
|
follow_up_detail: '',
|
||||||
status: '跟进中',
|
status: '跟进中',
|
||||||
expected_revenue_date: '',
|
expected_revenue_date: '',
|
||||||
manager_id: auth.userId || '',
|
manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''),
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
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)) {
|
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 })
|
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 (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const form = ref({
|
|||||||
customer_demand: '',
|
customer_demand: '',
|
||||||
companions: [] as string[],
|
companions: [] as string[],
|
||||||
photos: [] as string[],
|
photos: [] as string[],
|
||||||
manager_id: auth.userId || '',
|
manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''),
|
||||||
})
|
})
|
||||||
|
|
||||||
const timeRangeValue = ref<any>(null)
|
const timeRangeValue = ref<any>(null)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const form = ref({
|
|||||||
plan_content: '',
|
plan_content: '',
|
||||||
plan_date: todayStr(),
|
plan_date: todayStr(),
|
||||||
status: '计划中',
|
status: '计划中',
|
||||||
manager_id: auth.userId || '',
|
manager_id: (auth.isDirector || auth.isLeader) ? '' : (auth.userId || ''),
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
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)) {
|
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 })
|
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 (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user