diff --git a/src/api/modules/engineer.js b/src/api/modules/engineer.js new file mode 100644 index 0000000..75eda3a --- /dev/null +++ b/src/api/modules/engineer.js @@ -0,0 +1,30 @@ +import service from "../request.js"; + +const API_BASE_URL = '/application'; + +// 待审核列表 +export function getApplicationList(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/list`, + data: query, + }); +} + +// 通过 +export function approveApplication(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/approve`, + data: query, + }); +} + +// 拒绝 +export function rejectApplication(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/reject`, + data: query, + }); +} \ No newline at end of file diff --git a/src/api/modules/order.js b/src/api/modules/order.js new file mode 100644 index 0000000..1a9b1b9 --- /dev/null +++ b/src/api/modules/order.js @@ -0,0 +1,12 @@ +import service from "../request.js"; + +const API_BASE_URL = '/order'; + +// 订单列表 +export function getOrderList(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/all/list`, + data: query, + }); +} diff --git a/src/views/scheduling/maintain.vue b/src/views/scheduling/maintain.vue index 4ebe63a..457b7d0 100644 --- a/src/views/scheduling/maintain.vue +++ b/src/views/scheduling/maintain.vue @@ -71,9 +71,59 @@ + + + + + + { + // 获取当前日期 + 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 @@