|
@@ -31,8 +31,8 @@ const weeklyEntryTime = ref(null);
|
|
|
// const weeklySalesTime = ref(null);
|
|
|
const weeklyAdTime = ref(null);
|
|
|
|
|
|
-const entryStartDate = ref(dayjs().locale('en').startOf('week').format('YYYY-MM-DD'));
|
|
|
-const entryEndDate = ref(dayjs().locale('en').endOf('week').format('YYYY-MM-DD'));
|
|
|
+const entryStartDate = ref('');
|
|
|
+const entryEndDate = ref('');
|
|
|
const adStartDate = ref('');
|
|
|
const adEndDate = ref('');
|
|
|
|
|
@@ -78,7 +78,10 @@ const handleWeekChange = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-watch(weeklyEntryTime, handleWeekChange);
|
|
|
+watch(() => weeklyEntryTime.value, () => {
|
|
|
+ handleWeekChange();
|
|
|
+ fetchCurrentTaskData();
|
|
|
+});
|
|
|
|
|
|
const handleMonthChange = (value) => {
|
|
|
if (value) {
|
|
@@ -88,7 +91,7 @@ const handleMonthChange = (value) => {
|
|
|
const lastDay = new Date(year, month, 0).getDate();
|
|
|
startDate.value = `${year}-${String(month).padStart(2, '0')}-01`;
|
|
|
endDate.value = `${year}-${String(month).padStart(2, '0')}-${lastDay}`;
|
|
|
- // console.log('start', startDate.value, 'end', endDate.value);
|
|
|
+ fetchCurrentTaskData();
|
|
|
} else {
|
|
|
startDate.value = null;
|
|
|
endDate.value = null;
|