From 2702236ff0c89cff3fc84ffdc810938c162c02d9 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Tue, 11 Nov 2025 17:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=9F=E8=BF=9B=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/customer/follow/add/index.vue | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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;