添加跟进记录页面添加默认值

This commit is contained in:
WindowBird 2025-11-11 17:18:43 +08:00
parent 0e2b3864a8
commit 2702236ff0

View File

@ -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;