From 1d9f871bd6d29e5b9eaeac739f92fcb74ea76abd Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期五, 20 三月 2026 09:50:33 +0800
Subject: [PATCH] 员工台账列表中加上部门、入职日期、合同结束日期这些字段 销售台账发货后的产品状态

---
 src/views/personnelManagement/employeeRecord/index.vue |  120 +++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 71 insertions(+), 49 deletions(-)

diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index 581fdca..db0d4d6 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/index.vue
@@ -11,6 +11,15 @@
             clearable
             :prefix-icon="Search"
         />
+        <span class="search_title">閮ㄩ棬锛�</span>
+          <el-tree-select
+            v-model="searchForm.sysDeptId"
+            :data="deptOptions"
+            check-strictly
+            :render-after-expand="false"
+            style="width: 240px"
+            placeholder="璇烽�夋嫨"
+          />
         <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" />
@@ -21,7 +30,7 @@
       <div>
         <el-button type="primary" @click="openFormNewOrEditFormDia('add')">鏂板鍏ヨ亴</el-button>
         <el-button @click="handleOut">瀵煎嚭</el-button>
-        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+        <!-- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button> -->
       </div>
     </div>
     <div class="table_list">
@@ -39,6 +48,12 @@
     </div>
     <show-form-dia ref="formDia" @close="handleQuery"></show-form-dia>
     <new-or-edit-form-dia ref="formDiaNewOrEditFormDia" @close="handleQuery"></new-or-edit-form-dia>
+    <renew-contract
+        v-if="isShowRenewContractModal"
+        v-model:visible="isShowRenewContractModal"
+        :id="id"
+        @completed="handleQuery"
+    />
   </div>
 </template>
 
@@ -46,11 +61,13 @@
 import { Search } from "@element-plus/icons-vue";
 import {onMounted, ref} from "vue";
 import {ElMessageBox} from "element-plus";
+import { deptTreeSelect } from "@/api/system/user.js";
 import {batchDeleteStaffOnJobs, staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js";
 import dayjs from "dayjs";
 
 const NewOrEditFormDia = defineAsyncComponent(() => import("@/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue"));
 const ShowFormDia = defineAsyncComponent(() => import( "@/views/personnelManagement/employeeRecord/components/Show.vue"));
+const RenewContract = defineAsyncComponent(() => import( "@/views/personnelManagement/employeeRecord/components/RenewContract.vue"));
 
 const data = reactive({
   searchForm: {
@@ -59,8 +76,11 @@
     entryDateStart: undefined,
     entryDateEnd: undefined,
   },
+  deptOptions: { type: Array, default: () => [] },
 });
-const { searchForm } = toRefs(data);
+const { searchForm, deptOptions } = toRefs(data);
+const isShowRenewContractModal = ref(false);
+const id = ref(0);
 const tableColumn = ref([
   {
     label: "鐘舵��",
@@ -94,67 +114,40 @@
     prop: "staffName",
   },
   {
+    label: "鍒悕",
+    prop: "alias",
+  },
+  {
+    label: "鎵嬫満",
+    prop: "phone",
+    width: 150,
+  },
+  {
     label: "鎬у埆",
     prop: "sex",
   },
   {
-    label: "鎴风睄浣忓潃",
-    prop: "nativePlace",
-  },
-  {
-    label: "閮ㄩ棬",
-    prop: "deptName",
-  },
-  {
-    label: "宀椾綅",
-    prop: "postJob",
-  },
-  {
-    label: "鐜颁綇鍧�",
-    prop: "adress",
-    width:200
-  },
-  {
-    label: "绗竴瀛﹀巻",
-    prop: "firstStudy",
-  },
-  {
-    label: "涓撲笟",
-    prop: "profession",
-    width:100
+    label: "鍑虹敓鏃ユ湡",
+    prop: "birthDate",
+    width: 120,
   },
   {
     label: "骞撮緞",
     prop: "age",
   },
   {
-    label: "鑱旂郴鐢佃瘽",
-    prop: "phone",
-    width:150
+    label: "绫嶈疮",
+    prop: "nativePlace",
   },
   {
-    label: "绱ф�ヨ仈绯讳汉",
-    prop: "emergencyContact",
-    width: 120
+    label: "姘戞棌",
+    prop: "nation",
+    width: 100,
   },
   {
-    label: "绱ф�ヨ仈绯讳汉鐢佃瘽",
-    prop: "emergencyContactPhone",
-    width:150
-  },
-  // {
-  //   label: "鍚堝悓骞撮檺",
-  //   prop: "contractTerm",
-  // },
-  // {
-  //   label: "鍚堝悓寮�濮嬫棩鏈�",
-  //   prop: "contractStartTime",
-  //   width: 120
-  // },
-  {
-    label: "鍚堝悓缁撴潫鏃ユ湡",
-    prop: "contractExpireTime",
-    width: 120
+    label: "濠氬Щ鐘跺喌",
+    prop: "maritalStatus",
+    width: 100,
   },
   {
     dataType: "action",
@@ -168,6 +161,15 @@
         type: "text",
         clickFun: (row) => {
           openFormNewOrEditFormDia("edit", row);
+        },
+      },
+      {
+        name: "缁鍚堝悓",
+        type: "text",
+        showHide: row => row.staffState === 1,
+        clickFun: (row) => {
+          isShowRenewContractModal.value = true;
+          id.value = row.id;
         },
       },
       // {
@@ -192,6 +194,25 @@
 const formDiaNewOrEditFormDia = ref()
 const { proxy } = getCurrentInstance()
 
+const fetchDeptOptions = () => {
+    deptTreeSelect().then(response => {
+      console.log(response.data)
+      deptOptions.value = filterDisabledDept(
+        JSON.parse(JSON.stringify(response.data))
+      );
+    });
+  };
+const filterDisabledDept = deptList => {
+    return deptList.filter(dept => {
+      if (dept.disabled) {
+        return false;
+      }
+      if (dept.children && dept.children.length) {
+        dept.children = filterDisabledDept(dept.children);
+      }
+      return true;
+    });
+  };
 const changeDaterange = (value) => {
   searchForm.value.entryDateStart = undefined;
   searchForm.value.entryDateEnd = undefined;
@@ -213,6 +234,7 @@
   getList();
 };
 const getList = () => {
+  fetchDeptOptions();
   tableLoading.value = true;
   const params = { ...searchForm.value, ...page };
   params.entryDate = undefined

--
Gitblit v1.9.3