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/personnelManagement/employeeRecord/index.vue |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index f1e04db..6965e96 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/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
         >
@@ -44,10 +47,17 @@
 import FormDia from "@/views/personnelManagement/employeeRecord/components/formDia.vue";
 import {ElMessageBox} from "element-plus";
 import {staffOnJobListPage} from "@/api/personnelManagement/employeeRecord.js";
+import dayjs from "dayjs";
 
 const data = reactive({
   searchForm: {
     staffName: "",
+    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);
@@ -98,6 +108,7 @@
   {
     label: "瀹跺涵浣忓潃",
     prop: "adress",
+    width:200
   },
   {
     label: "绗竴瀛﹀巻",
@@ -106,10 +117,12 @@
   {
     label: "涓撲笟",
     prop: "profession",
+    width:100
   },
   {
     label: "韬唤璇佸彿",
     prop: "identityCard",
+    width:200
   },
   {
     label: "骞撮緞",
@@ -118,6 +131,7 @@
   {
     label: "鑱旂郴鐢佃瘽",
     prop: "phone",
+    width:150
   },
   {
     label: "绱ф�ヨ仈绯讳汉",
@@ -125,8 +139,9 @@
     width: 120
   },
   {
-    label: "鑱旂郴鐢佃瘽",
+    label: "绱ф�ヨ仈绯讳汉鐢佃瘽",
     prop: "emergencyContactPhone",
+    width:150
   },
   {
     label: "鍚堝悓骞撮檺",
@@ -169,6 +184,15 @@
 const formDia = 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 = () => {
@@ -182,7 +206,9 @@
 };
 const getList = () => {
   tableLoading.value = true;
-  staffOnJobListPage({...page, ...searchForm.value, staffState: 1}).then(res => {
+  const params = { ...searchForm.value, ...page };
+  params.entryDate = undefined
+  staffOnJobListPage({...params, staffState: 1}).then(res => {
     tableLoading.value = false;
     tableData.value = res.data.records
     page.total = res.data.total;

--
Gitblit v1.9.3