提交 cfc60b00 authored 作者: lidongxu's avatar lidongxu

refactor(promotion): 促销计划_移动端_修改变更日期只能是明天开始

同上
上级 4b4ba7e8
......@@ -269,7 +269,12 @@ const planMinDate = computed(() => {
date.setDate(1)
return date
} else {
return new Date()
// 如果是变更计划,则选择明天以后的日期
const date = new Date()
if (planId) {
date.setDate(date.getDate() + 1)
}
return date
}
})
......
......@@ -548,7 +548,8 @@ const disabledDateFn = (time) => {
} else {
// 职能角色能添加当月今天往后和下个月一整个月
const now = new Date();
const thisMonthStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
// 变更计划时,只能选择明天以后的
const thisMonthStart = new Date(now.getFullYear(), now.getMonth(), addOrEditPlanForm.value.id ? now.getDate() + 1 : now.getDate());
const nextMonthEnd = new Date(now.getFullYear(), now.getMonth() + 2, 0);
return time.getTime() < thisMonthStart.getTime() || time.getTime() > nextMonthEnd.getTime();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论