From 70ecfcddb4a414e58cdde6dcb8246b7b80ed9ed8 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 23 七月 2025 14:14:09 +0800
Subject: [PATCH] yys  人事,质量,设备增加时间筛选

---
 src/views/qualityManagement/finalInspection/index.vue |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 5af2fbb..e8dcee6 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -11,6 +11,9 @@
             clearable
             :prefix-icon="Search"
         />
+        <span  style="margin-left: 10px" class="search_title">妫�娴嬫棩鏈燂細</span>
+        <el-date-picker  v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+                         placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
         <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
         >鎼滅储</el-button
         >
@@ -48,10 +51,17 @@
 import {ElMessageBox} from "element-plus";
 import {qualityInspectDel, qualityInspectListPage} from "@/api/qualityManagement/rawMaterialInspection.js";
 import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue";
+import dayjs from "dayjs";
 
 const data = reactive({
   searchForm: {
     productName: "",
+    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"),
   },
 });
 const { searchForm } = toRefs(data);
@@ -145,6 +155,15 @@
 const inspectionFormDia = ref()
 const { proxy } = getCurrentInstance()
 
+const changeDaterange = (value) => {
+  searchForm.value.entryDateStart = undefined;
+  searchForm.value.entryDateEnd = undefined;
+  if (value) {
+    searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
+    searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
+  }
+  getList();
+};
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
@@ -158,7 +177,9 @@
 };
 const getList = () => {
   tableLoading.value = true;
-  qualityInspectListPage({...page, ...searchForm.value, inspectType: 2}).then(res => {
+  const params = { ...searchForm.value, ...page };
+  params.entryDate = undefined
+  qualityInspectListPage({...params, inspectType: 2}).then(res => {
     tableLoading.value = false;
     tableData.value = res.data.records
     page.total = res.data.total;
@@ -222,7 +243,7 @@
     type: "warning",
   })
       .then(() => {
-        proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "杩囩▼妫�楠�.xlsx");
+        proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "鍑哄巶妫�楠�.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");

--
Gitblit v1.9.3