From 1ab015896fcf64ba99c5271837169a342109adae Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 28 十一月 2025 11:07:53 +0800
Subject: [PATCH] 海川开心-查询条件添加默认日期

---
 src/views/procurementManagement/procurementReport/index.vue |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index 33a0e91..d421c67 100644
--- a/src/views/procurementManagement/procurementReport/index.vue
+++ b/src/views/procurementManagement/procurementReport/index.vue
@@ -280,6 +280,7 @@
 import { ref, reactive, onMounted } from 'vue'
 import { ElMessage } from 'element-plus'
 import { Document, List, TrendCharts, Shop, Search, Refresh, Download } from '@element-plus/icons-vue'
+import dayjs from "dayjs";
 
 // 鍝嶅簲寮忔暟鎹�
 const loading = ref(false)
@@ -690,14 +691,10 @@
 }
 
 onMounted(() => {
-  // 璁剧疆榛樿鏃堕棿鑼冨洿涓烘渶杩�30澶�
-  const endDate = new Date()
-  const startDate = new Date()
-  startDate.setDate(startDate.getDate() - 30)
-  
+  // 璁剧疆榛樿鏃堕棿鑼冨洿涓哄綋澶�
   searchForm.dateRange = [
-    startDate.toISOString().split('T')[0],
-    endDate.toISOString().split('T')[0]
+    dayjs().startOf('day').format('YYYY-MM-DD'),
+    dayjs().endOf('day').format('YYYY-MM-DD')
   ]
 })
 </script>

--
Gitblit v1.9.3