Lijy 3 bulan lalu
induk
melakukan
cf9bcf7b9d

+ 8 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/biReport/cusTotalAnalysis/api.ts

@@ -75,16 +75,14 @@ export const dateCollections = [
       .format("YYYY-MM-DD HH:mm:ss"),
   },
   {
-    name: "上季度",
+    name: '上季度',
     start_time: dayjs()
-      .subtract(1, "quarter")
-      .month(Math.floor(dayjs().subtract(1, "quarter").month() / 3) * 3)
-      .startOf("month")
-      .format("YYYY-MM-DD HH:mm:ss"),
+      .month(Math.floor(dayjs().month() / 3) * 3 - 3) // 上季度的起始月份
+      .startOf('month')
+      .format('YYYY-MM-DD HH:mm:ss'),
     end_time: dayjs()
-      .subtract(1, "quarter")
-      .month(Math.floor(dayjs().subtract(1, "quarter").month() / 3) * 3 + 2)
-      .endOf("month")
-      .format("YYYY-MM-DD HH:mm:ss"),
-  },
+      .month(Math.floor(dayjs().month() / 3) * 3 - 1) // 上季度的结束月份
+      .endOf('month')
+      .format('YYYY-MM-DD HH:mm:ss')
+  }
 ];