diff --git a/pages/customer/follow/add/index.vue b/pages/customer/follow/add/index.vue index 2c58508..829ed11 100644 --- a/pages/customer/follow/add/index.vue +++ b/pages/customer/follow/add/index.vue @@ -333,13 +333,33 @@ const loadDictData = async () => { ]); if (statusRes ) { statusOptions.value = statusRes|| []; - + // 默认客户状态:意向(按 dictLabel 匹配,写入 dictValue) + if (!formData.value.customerStatus) { + const statusDefault = statusOptions.value.find(item => item.dictLabel === '意向'); + if (statusDefault) { + formData.value.customerStatus = statusDefault.dictValue; + } + } } if (intentLevelRes ) { intentLevelOptions.value = intentLevelRes || []; + // 默认意向强度:中(按 dictLabel 匹配,写入 dictValue) + if (!formData.value.customerIntentLevel) { + const intentLevelDefault = intentLevelOptions.value.find(item => item.dictLabel === '中'); + if (intentLevelDefault) { + formData.value.customerIntentLevel = intentLevelDefault.dictValue; + } + } } if (followTypeRes ) { followTypeOptions.value = followTypeRes || []; + // 默认跟进方式:抖音(按 dictLabel 匹配,写入 dictValue) + if (!formData.value.type) { + const followTypeDefault = followTypeOptions.value.find(item => item.dictLabel === '抖音'); + if (followTypeDefault) { + formData.value.type = followTypeDefault.dictValue; + } + } } } catch (err) { console.error('加载字典数据失败:', err); @@ -350,6 +370,8 @@ const loadDictData = async () => { } }; + + // 打开状态选择器 const openStatusPicker = () => { showStatusPicker.value = true;