diff --git a/src/views/scheduling/maintain.vue b/src/views/scheduling/maintain.vue index 4ebe63a..0538989 100644 --- a/src/views/scheduling/maintain.vue +++ b/src/views/scheduling/maintain.vue @@ -71,6 +71,56 @@ + + + + + + { + // 获取当前日期 + const currentDate = new Date(); + + currentDate.setDate(currentDate.getDate() - 1); + + // 禁止选择今天的前一天及之前的日期(不包含今天) + if (date < currentDate) { + return true; + } + + // 禁止选择特定的未来日期,例如节假日 + const disabledDates = [new Date(2023, 9, 1), new Date(2023, 10, 1)]; + return disabledDates.some((disabledDate) => { + return ( + date.getFullYear() === disabledDate.getFullYear() && + date.getMonth() === disabledDate.getMonth() && + date.getDate() === disabledDate.getDate() + ); + }); +}; + + const initData = () => { + // 获取当前日期 + isDate.value = new Date(); tableData.value = columnData.value; // orderLists(queryData.value).then((res) => { diff --git a/src/views/scheduling/reconnaissance.vue b/src/views/scheduling/reconnaissance.vue index be2401e..48295a3 100644 --- a/src/views/scheduling/reconnaissance.vue +++ b/src/views/scheduling/reconnaissance.vue @@ -8,7 +8,7 @@ 创建排班 - n +
@@ -75,56 +75,46 @@ @@ -205,24 +195,23 @@