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 @@