diff --git a/src/components/EventRecordCalendar.vue b/src/components/EventRecordCalendar.vue
index b913e39..6228996 100644
--- a/src/components/EventRecordCalendar.vue
+++ b/src/components/EventRecordCalendar.vue
@@ -1,18 +1,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
正在加载登记日历
@@ -103,19 +73,15 @@
+
diff --git a/src/components/monthCalendar/monthCalendar.ts b/src/components/monthCalendar/monthCalendar.ts
new file mode 100644
index 0000000..ac34c36
--- /dev/null
+++ b/src/components/monthCalendar/monthCalendar.ts
@@ -0,0 +1,29 @@
+export interface MonthCalendarDay {
+ key: string;
+ day: string;
+ dateText: string;
+ inMonth: boolean;
+ isToday: boolean;
+ isRestDay?: boolean;
+ marked?: boolean;
+ disabled?: boolean;
+}
+
+/** 返回包含相邻月份的六周日期。 */
+export function buildMonthCalendarDays(month: Date): MonthCalendarDay[] {
+ const first = new Date(month.getFullYear(), month.getMonth(), 1);
+ first.setDate(1 - first.getDay());
+ const format = (date: Date): string => `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
+ const today = format(new Date());
+ return Array.from({ length: 42 }, (_, index) => {
+ const date = new Date(first.getFullYear(), first.getMonth(), first.getDate() + index);
+ const dateText = format(date);
+ return {
+ key: dateText,
+ day: String(date.getDate()),
+ dateText,
+ inMonth: date.getMonth() === month.getMonth(),
+ isToday: dateText === today
+ };
+ });
+}
diff --git a/src/pages/product/component/ProductChartsPanel.vue b/src/pages/product/component/ProductChartsPanel.vue
index 9289148..7724112 100644
--- a/src/pages/product/component/ProductChartsPanel.vue
+++ b/src/pages/product/component/ProductChartsPanel.vue
@@ -25,6 +25,13 @@
+
+
-
([]);
const stockHealthList = ref([]);
const skuHealthList = ref([]);
const isLoading = ref(false);
+const calendarVersion = ref(0);
let requestId = 0;
const storeId = computed(() => currentStoreStore.currentStoreId || getCurrentStoreId());
@@ -160,6 +163,7 @@ onMounted(async () => {
async function reload(): Promise {
clearStoreChartCache();
+ calendarVersion.value++;
await loadCharts();
}
@@ -335,7 +339,7 @@ defineExpose({
.two-columns {
gap: 1rem;
display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
// 分栏窄容器:双列图表一律改单列
diff --git a/src/pages/product/component/ProductStockCalendar.vue b/src/pages/product/component/ProductStockCalendar.vue
new file mode 100644
index 0000000..c8b3f79
--- /dev/null
+++ b/src/pages/product/component/ProductStockCalendar.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+ 清除
+
+
+
+
+
+
+
+
+
+
+
+
+ 入库
+ 出库
+
+
+
+
+
+
加载更多
+
+
+
+
+
+
+
+
+
+