From 3a3d8c7bab3af55e3fae3db7807c808551c4b4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Wed, 19 Feb 2025 13:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E7=BB=A9=E6=95=88?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=90=9C=E7=B4=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../groupManagement/achievement/index.vue | 67 ++++++- .../deliverySchedule/index.vue | 176 +++++++++++++----- .../orderPurchase/index.vue | 63 ++++++- 3 files changed, 242 insertions(+), 64 deletions(-) diff --git a/src/views/groupManagement/achievement/index.vue b/src/views/groupManagement/achievement/index.vue index b8c4da5..eb13f35 100644 --- a/src/views/groupManagement/achievement/index.vue +++ b/src/views/groupManagement/achievement/index.vue @@ -7,8 +7,7 @@ @@ -22,8 +21,8 @@ - 当日白班 - 当日晚班 + 切换白班 + 切换晚班 @@ -68,7 +67,65 @@ const tableData = ref([]) // 工序号选项 const processOptions = ['物料领用', '机械加工', '中间检查', '手工研磨', '机研磨', '精研磨', '入库检查', '出货'] - +// 日期选择器快捷选项 +const shortcuts = [ + { + text: '今天白班', + value: () => { + return [dayjs().startOf('day').hour(8).minute(0).second(0), dayjs().startOf('day').hour(20).minute(0).second(0)] + }, + }, + { + text: '今天晚班', + value: () => { + return [dayjs().startOf('day').hour(20).minute(0).second(0), dayjs().add(1, 'day').startOf('day').hour(8).minute(0).second(0)] + }, + }, + { + text: '昨天白班', + value: () => { + return [dayjs().subtract(1, 'day').startOf('day').hour(8).minute(0).second(0), dayjs().subtract(1, 'day').startOf('day').hour(20).minute(0).second(0)] + }, + }, + { + text: '昨天晚班', + value: () => { + return [dayjs().subtract(1, 'day').startOf('day').hour(20).minute(0).second(0), dayjs().startOf('day').hour(8).minute(0).second(0)] + }, + }, + { + text: '本周', + value: () => { + const startOfWeek = dayjs().startOf('week'); + const endOfWeek = dayjs().endOf('week'); + return [startOfWeek, endOfWeek]; + }, + }, + { + text: '上周', + value: () => { + const startOfLastWeek = dayjs().subtract(1, 'week').startOf('week'); + const endOfLastWeek = dayjs().subtract(1, 'week').endOf('week'); + return [startOfLastWeek, endOfLastWeek]; + }, + }, + { + text: '本月', + value: () => { + const startOfLastMonth = dayjs().startOf('month'); + const endOfLastMonth = dayjs().endOf('month'); + return [startOfLastMonth, endOfLastMonth]; + }, + }, + { + text: '上月', + value: () => { + const startOfLastMonth = dayjs().subtract(1, 'month').startOf('month'); + const endOfLastMonth = dayjs().subtract(1, 'month').endOf('month'); + return [startOfLastMonth, endOfLastMonth]; + }, + }, +]; // 搜索条件 const searchForm = ref({ worker: '', diff --git a/src/views/orderPurchaseManagement/deliverySchedule/index.vue b/src/views/orderPurchaseManagement/deliverySchedule/index.vue index 2d20d2d..3c44d15 100644 --- a/src/views/orderPurchaseManagement/deliverySchedule/index.vue +++ b/src/views/orderPurchaseManagement/deliverySchedule/index.vue @@ -1,5 +1,9 @@