Sfoglia il codice sorgente

🎨 feat<报表管理>:数据录入月日期修改

xinyan 9 mesi fa
parent
commit
994db232dd

+ 2 - 2
src/views/reportManage/dataCenter/normalDisplay/components/TableDataEntry.vue

@@ -122,8 +122,8 @@ function setDefaultDate() {
       break;
     case 'month':
       monthlyEntryTime.value = new Date();
-      startDate.value = dayjs(monthlyEntryTime.value).startOf('month').format('YYYY-MM-DD');
-      endDate.value = dayjs(monthlyEntryTime.value).endOf('month').format('YYYY-MM-DD');
+      startDate.value = dayjs(monthlyEntryTime.value).subtract(1, 'month').startOf('month').format('YYYY-MM-DD');
+      endDate.value = dayjs(monthlyEntryTime.value).subtract(1, 'month').endOf('month').format('YYYY-MM-DD');
   }
 }