Commit 1c889b19 by 李伟康

fix: 修正多处判断空值的逻辑运算符错误

修改了src/views/earlyWarningManager/strategyCentre/storeSignboard/components/StrategyDetail/contant.js和taskDetail/index.vue中的逻辑判断,将||替换为&&来正确校验目标值非空
1 parent 5497bdf6
......@@ -40,7 +40,7 @@ const LEARNING_TARGET = {
let prevText = bizs == 2 ? "平均客单价" : "转化率";
let unit = bizs == 2 ? "" : "%";
let targetValue = val.strategyExtension?.targetValue || "";
return (targetValue !== "" || targetValue !== null || targetValue !== undefined) ? `${prevText}=${targetValue}${unit}` : "-";
return (targetValue !== "" && targetValue !== null && targetValue !== undefined) ? `${prevText}=${targetValue}${unit}` : "-";
},
};
const STRATEGY_FORM_01 = [
......
......@@ -140,7 +140,7 @@ export default {
detailData.push({ subtitle: "问题人员", value: problemStaffs || "-", fullRow: true });
}
if (strategyType === 12) {
detailData.push({ subtitle: "目标触客率", value: (targetValue != "" || targetValue != null || targetValue != undefined) ? `${targetValue}%` : "-", fullRow: true });
detailData.push({ subtitle: "目标触客率", value: (targetValue != "" && targetValue != null && targetValue != undefined) ? `${targetValue}%` : "-", fullRow: true });
}
// 剩余基础字段
detailData.push(
......@@ -175,7 +175,7 @@ export default {
detailData.push(
{ subtitle: "需带教人员", value: persontoBeMentored, fullRow: true },
{ subtitle: "指定带教督导", value: supervisor, fullRow: true },
{ subtitle: "带教目标", value: (targetValue != "" || targetValue != null || targetValue != undefined) ? `${prevText}=${targetValue}${unit}` : "-", fullRow: true },
{ subtitle: "带教目标", value: (targetValue != "" && targetValue != null && targetValue != undefined) ? `${prevText}=${targetValue}${unit}` : "-", fullRow: true },
{ subtitle: "任务状态", value: taskStatusName, fullRow: true },
{ subtitle: "带教场景", value: {
1: "线上",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!