From 03a05815d7ea5612206b6cfe5d6537b4d4cedc0a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 15 九月 2026 11:41:32 +0800
Subject: [PATCH] 天津潜宇塑胶app 1.添加采购需求、库存盘点、计件单价配置、产量统计、材料消耗核算、成本核算分析页面
---
src/utils/common.ts | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/utils/common.ts b/src/utils/common.ts
index 25d4147..737af34 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -1,3 +1,5 @@
+import dayjs from 'dayjs'
+
/**
* 鏄剧ず娑堟伅鎻愮ず妗�
* @param content 鎻愮ず鐨勬爣棰�
@@ -10,6 +12,19 @@
}
/**
+* 鏈懆鏃ユ湡鍖洪棿锛堝懆涓� ~ 浠婂ぉ锛�
+* dayjs 鏈厤缃� locale 鏃朵竴鍛ㄤ粠鍛ㄦ棩绠楄捣锛岃繖閲屾樉寮忔寜鍛ㄤ竴璧风畻
+*/
+export function getWeekRange() {
+ const today = dayjs()
+ const offset = (today.day() + 6) % 7
+ return {
+ startDate: today.subtract(offset, 'day').format('YYYY-MM-DD'),
+ endDate: today.format('YYYY-MM-DD')
+ }
+}
+
+/**
* 鏄剧ず妯℃�佸脊绐�
* @param content 鎻愮ず鐨勬爣棰�
*/
--
Gitblit v1.9.3