From 3dadba22d0435b314db5b06f64d326518acec407 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 30 一月 2026 14:24:09 +0800
Subject: [PATCH] 生成核算增加日期搜索

---
 src/views/productionManagement/productionCosting/index.vue |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index b4faa17..67167c7 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -172,13 +172,10 @@
 		schedulingUserName: "",
 		salesContractNo: "",
     dateType: "day",
-    dateRange: undefined,
-		entryDate: [
-			dayjs().format("YYYY-MM-DD"),
-			dayjs().add(1, "day").format("YYYY-MM-DD"),
-		], // 褰曞叆鏃ユ湡
-		entryDateStart: dayjs().format("YYYY-MM-DD"),
-		entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+    dateRange: dayjs().format("YYYY-MM-DD"),
+		entryDate: dayjs().format("YYYY-MM-DD"),
+		entryDateStart: undefined,
+		entryDateEnd: undefined,
 	},
 });
 const { searchForm } = toRefs(data);
@@ -263,12 +260,17 @@
 };
 
 // 宸︿晶鏃�/鏈堝垏鎹�
-const handleDateTypeChange = () => {
+const handleDateTypeChange = (value) => {
 	// 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
-  searchForm.value.dateRange = undefined;
-  searchForm.value.entryDate = undefined;
-  searchForm.value.entryDateStart = undefined;
-  searchForm.value.entryDateEnd = undefined;
+  if (value === "day") {
+    searchForm.value.entryDate = dayjs().format("YYYY-MM-DD");
+    searchForm.value.dateRange = searchForm.value.entryDate
+  } else {
+    searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD");
+    searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD");
+    searchForm.value.dateRange = [searchForm.value.entryDateStart, searchForm.value.entryDateEnd]
+  }
+
   reloadData()
 };
 

--
Gitblit v1.9.3