新增了按照任务类型划分可填写阶段
This commit is contained in:
parent
255719bb20
commit
b9c1d0684a
@ -106,7 +106,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="formData.type_value != 'town_task_type_5'"
|
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||||
label="二阶段天数"
|
label="二阶段天数"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
@ -119,7 +119,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="formData.type_value != 'town_task_type_5'"
|
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||||
label="二阶段金额"
|
label="二阶段金额"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
@ -131,7 +131,10 @@
|
|||||||
<template #append>元</template>
|
<template #append>元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段天数">
|
<el-form-item
|
||||||
|
v-if="showThree && noThreefilter(formData.type_value)"
|
||||||
|
label="三阶段天数"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.stage_day_three"
|
v-model="formData.stage_day_three"
|
||||||
clearable
|
clearable
|
||||||
@ -141,7 +144,10 @@
|
|||||||
<template #append>天</template>
|
<template #append>天</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段金额">
|
<el-form-item
|
||||||
|
v-if="showThree && noThreefilter(formData.type_value)"
|
||||||
|
label="三阶段金额"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.new_money_three"
|
v-model="formData.new_money_three"
|
||||||
clearable
|
clearable
|
||||||
@ -231,9 +237,13 @@ const popupTitle = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 没有三阶段的任务类型ID, 使用以下方法过滤
|
// 没有三阶段的任务类型ID, 使用以下方法过滤
|
||||||
const noThreeList = reactive([45, 48, 49]);
|
const noThreeList = reactive([
|
||||||
const noThreefilter = (id: number) => {
|
"town_task_type_2",
|
||||||
if (noThreeList.includes(id)) return false;
|
"town_task_type_5",
|
||||||
|
"town_task_type_6",
|
||||||
|
]);
|
||||||
|
const noThreefilter = (type: string) => {
|
||||||
|
if (noThreeList.includes(type)) return false;
|
||||||
else return true;
|
else return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -287,6 +297,36 @@ const showTarget = computed(() => {
|
|||||||
return flag;
|
return flag;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 不显示第二阶段的任务类型
|
||||||
|
const noShowTowTypeList = [
|
||||||
|
"town_task_type_marketing_director_9",
|
||||||
|
"town_task_type_marketing_director_8",
|
||||||
|
"town_task_type_marketing_director_6",
|
||||||
|
"town_task_type_marketing_director_2",
|
||||||
|
"town_task_type_marketing_director_1",
|
||||||
|
];
|
||||||
|
const showTow = computed(() => {
|
||||||
|
let flag = true;
|
||||||
|
if (noShowTowTypeList.includes(formData.type_value)) flag = false;
|
||||||
|
return flag;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 不显示第三阶段的任务类型
|
||||||
|
const noShowThreeTypeList = [
|
||||||
|
"town_task_type_marketing_director_9",
|
||||||
|
"town_task_type_marketing_director_8",
|
||||||
|
"town_task_type_marketing_director_7",
|
||||||
|
"town_task_type_marketing_director_6",
|
||||||
|
"town_task_type_marketing_director_3",
|
||||||
|
"town_task_type_marketing_director_2",
|
||||||
|
"town_task_type_marketing_director_1",
|
||||||
|
];
|
||||||
|
const showThree = computed(() => {
|
||||||
|
let flag = true;
|
||||||
|
if (noShowThreeTypeList.includes(formData.type_value)) flag = false;
|
||||||
|
return flag;
|
||||||
|
});
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
title: [
|
title: [
|
||||||
@ -382,6 +422,7 @@ const changeTaskType = async (e: any) => {
|
|||||||
if (item.id == e) {
|
if (item.id == e) {
|
||||||
formData.title = item.name;
|
formData.title = item.name;
|
||||||
formData.type_value = item.value;
|
formData.type_value = item.value;
|
||||||
|
console.log(item.id, formData.type_value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user