提交 4b4ba7e8 authored 作者: lidongxu's avatar lidongxu

fix(promotion): 修改活动日期少 8 小时显示年月日问题

同上
上级 a19ebb32
......@@ -176,7 +176,6 @@
<el-date-picker v-model="addOrEditPlanForm.date"
:clearable="false"
start-placeholder="活动日期"
value-format="YYYY-MM-DDTHH:mm:ss"
:disabled-date="disabledDateFn" />
</el-form-item>
</el-col>
......@@ -407,6 +406,8 @@ const uploadChangeFile = async (file) => {
}
// 单条
const editFn = (row) => {
proxy.resetForm("addOrEditPlanRef");
console.log(new Date(row.date))
addOrEditPlanForm.value = {
...row,
inTime: parseTime(row.clockInTime, "{h}:{i}:{s}"),
......@@ -547,7 +548,7 @@ const disabledDateFn = (time) => {
} else {
// 职能角色能添加当月今天往后和下个月一整个月
const now = new Date();
const thisMonthStart = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const thisMonthStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
const nextMonthEnd = new Date(now.getFullYear(), now.getMonth() + 2, 0);
return time.getTime() < thisMonthStart.getTime() || time.getTime() > nextMonthEnd.getTime();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论