diff --git a/frontend/src/views/desktop/ManagerWorkspace.vue b/frontend/src/views/desktop/ManagerWorkspace.vue index 11eaf1a..4ec9b3f 100644 --- a/frontend/src/views/desktop/ManagerWorkspace.vue +++ b/frontend/src/views/desktop/ManagerWorkspace.vue @@ -13,8 +13,9 @@ const activeTab = ref('visits') const loading = ref(false) const allManagers = ref([]) -// Period filter -const period = ref('month') +// Date range filter +const dateFrom = ref('') +const dateTo = ref('') const searchText = ref('') const pageSize = ref(25) @@ -29,17 +30,7 @@ const page = ref>({ visits: 1, notes: 1, plans: 1, mini: const total = ref>({ visits: 0, notes: 0, plans: 0, mini: 0, key: 0 }) function getDateRange() { - const now = new Date() - const today = now.toISOString().slice(0, 10) - if (period.value === 'week') { - const d = new Date(now); d.setDate(d.getDate() - d.getDay() + 1) - return { from: d.toISOString().slice(0, 10), to: today } - } else if (period.value === 'month') { - return { from: `${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-01`, to: today } - } else if (period.value === 'year') { - return { from: `${now.getFullYear()}-01-01`, to: today } - } - return { from: '', to: '' } + return { from: dateFrom.value, to: dateTo.value } } const customers = ref([]) const allUsers = ref([]) @@ -165,7 +156,7 @@ async function loadAll() { } function onTabChange(tab: string) { activeTab.value = tab; loadAll() } -function onPeriodChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } +function onFilterChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } function onPageChange(tabKey: string, p: number) { page.value[tabKey] = p; loadAll() } function onSizeChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } @@ -360,15 +351,12 @@ const notesByDate = computed(() => {
- - 本周 - 本月 - 本年 - 全部 - - - - + + + + 清除 + + + 新建
@@ -376,8 +364,7 @@ const notesByDate = computed(() => { -
+ 新建拜访
-
+

@@ -409,7 +396,6 @@ const notesByDate = computed(() => { -
+ 新建纪要

@@ -435,7 +421,6 @@ const notesByDate = computed(() => { -
+ 新建计划
@@ -467,7 +452,6 @@ const notesByDate = computed(() => { -
+ 新建商机
@@ -501,7 +485,6 @@ const notesByDate = computed(() => { -
+ 新建要客拜访