From 5fda0a03cb56b52a1ef695a260ba1afc3d7e0114 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Sat, 12 Oct 2024 16:08:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/engineer.js | 30 ++++++++++++++++++++++++++++++ src/api/modules/order.js | 12 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/api/modules/engineer.js create mode 100644 src/api/modules/order.js 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, + }); +} From 98417ecbab44c884e70967178d980a88b422bed8 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Mon, 14 Oct 2024 10:35:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=8C=E4=B8=8D=E6=88=90=E6=8E=92?= =?UTF-8?q?=E7=8F=AD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/scheduling/maintain.vue | 172 +++++++++++++++++ src/views/scheduling/reconnaissance.vue | 234 +++++++++++++++++------- 2 files changed, 344 insertions(+), 62 deletions(-) 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 @@ From 78233fa7d9328b6fc97640b4fc9b9ad731a0f8ee Mon Sep 17 00:00:00 2001 From: monanxiao Date: Mon, 14 Oct 2024 10:44:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E5=B8=88=E6=8E=92=E7=8F=AD=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/scheduling/maintain.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/scheduling/maintain.vue b/src/views/scheduling/maintain.vue index 0538989..457b7d0 100644 --- a/src/views/scheduling/maintain.vue +++ b/src/views/scheduling/maintain.vue @@ -123,7 +123,7 @@