添加跟进记录页面添加默认值
This commit is contained in:
parent
0e2b3864a8
commit
2702236ff0
|
|
@ -333,13 +333,33 @@ const loadDictData = async () => {
|
||||||
]);
|
]);
|
||||||
if (statusRes ) {
|
if (statusRes ) {
|
||||||
statusOptions.value = 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 ) {
|
if (intentLevelRes ) {
|
||||||
intentLevelOptions.value = 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 ) {
|
if (followTypeRes ) {
|
||||||
followTypeOptions.value = 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) {
|
} catch (err) {
|
||||||
console.error('加载字典数据失败:', err);
|
console.error('加载字典数据失败:', err);
|
||||||
|
|
@ -350,6 +370,8 @@ const loadDictData = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 打开状态选择器
|
// 打开状态选择器
|
||||||
const openStatusPicker = () => {
|
const openStatusPicker = () => {
|
||||||
showStatusPicker.value = true;
|
showStatusPicker.value = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user