From a4f4241f24d171c49b52f81eae364bf79a7d7005 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 29 四月 2026 11:06:23 +0800
Subject: [PATCH] fix: 甘肃祁连牧场企业合同中缺失转正和调岗这两个功能

---
 src/views/personnelManagement/employeeRecord/index.vue |   88 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 72 insertions(+), 16 deletions(-)

diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index af2dca8..3717f04 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/index.vue
@@ -11,6 +11,15 @@
             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" />
+        <!-- <span style="margin-left: 10px" class="search_title">鐘舵�侊細</span>
+        <el-select v-model="searchForm.staffState" clearable placeholder="璇烽�夋嫨鐘舵��" style="width: 140px">
+          <el-option label="绂昏亴" :value="0" />
+          <el-option label="鍦ㄨ亴" :value="1" />
+          <el-option label="璇曠敤" :value="2" />
+        </el-select> -->
         <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
         >鎼滅储</el-button
         >
@@ -31,10 +40,12 @@
           @selection-change="handleSelectionChange"
           :tableLoading="tableLoading"
           @pagination="pagination"
-          :total="total"
+          :total="page.total"
       ></PIMTable>
     </div>
     <form-dia ref="formDia" @close="handleQuery"></form-dia>
+    <regularize-dia ref="regularizeDiaRef" @success="getList" />
+    <transfer-dia ref="transferDiaRef" @success="getList" />
   </div>
 </template>
 
@@ -42,12 +53,19 @@
 import { Search } from "@element-plus/icons-vue";
 import {onMounted, ref} from "vue";
 import FormDia from "@/views/personnelManagement/employeeRecord/components/formDia.vue";
+import RegularizeDia from "@/views/personnelManagement/employeeRecord/components/regularizeDia.vue";
+import TransferDia from "@/views/personnelManagement/employeeRecord/components/transferDia.vue";
 import {ElMessageBox} from "element-plus";
 import {staffOnJobListPage} from "@/api/personnelManagement/employeeRecord.js";
+import dayjs from "dayjs";
 
 const data = reactive({
   searchForm: {
     staffName: "",
+    staffState: 1,
+    entryDate: undefined, // 褰曞叆鏃ユ湡
+    entryDateStart: undefined,
+    entryDateEnd: undefined,
   },
 });
 const { searchForm } = toRefs(data);
@@ -61,6 +79,8 @@
         return "绂昏亴";
       } else if (params == 1) {
         return "鍦ㄨ亴";
+      } else if (params == 2) {
+        return "璇曠敤";
       } else {
         return null;
       }
@@ -70,6 +90,8 @@
         return "danger";
       } else if (params == 1) {
         return "primary";
+      } else if (params == 2) {
+        return "warning";
       } else {
         return null;
       }
@@ -88,7 +110,7 @@
     prop: "sex",
   },
   {
-    label: "绫嶈疮",
+    label: "鎴风睄浣忓潃",
     prop: "nativePlace",
   },
   {
@@ -96,8 +118,9 @@
     prop: "postJob",
   },
   {
-    label: "瀹跺涵浣忓潃",
+    label: "鐜颁綇鍧�",
     prop: "adress",
+    width:200
   },
   {
     label: "绗竴瀛﹀巻",
@@ -106,10 +129,7 @@
   {
     label: "涓撲笟",
     prop: "profession",
-  },
-  {
-    label: "韬唤璇佸彿",
-    prop: "identityCard",
+    width:100
   },
   {
     label: "骞撮緞",
@@ -118,6 +138,7 @@
   {
     label: "鑱旂郴鐢佃瘽",
     prop: "phone",
+    width:150
   },
   {
     label: "绱ф�ヨ仈绯讳汉",
@@ -125,13 +146,14 @@
     width: 120
   },
   {
-    label: "鑱旂郴鐢佃瘽",
+    label: "绱ф�ヨ仈绯讳汉鐢佃瘽",
     prop: "emergencyContactPhone",
+    width:150
   },
-  {
-    label: "鍚堝悓骞撮檺",
-    prop: "contractTerm",
-  },
+  // {
+  //   label: "鍚堝悓骞撮檺",
+  //   prop: "contractTerm",
+  // },
   // {
   //   label: "鍚堝悓寮�濮嬫棩鏈�",
   //   prop: "contractStartTime",
@@ -147,12 +169,27 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: 'right',
+    width: 150,
     operation: [
       {
         name: "璇︽儏",
         type: "text",
         clickFun: (row) => {
           openForm("edit", row);
+        },
+      },
+      {
+        name: "杞",
+        type: "text",
+        clickFun: (row) => {
+          openRegularizeDialog(row);
+        },
+      },
+      {
+        name: "璋冨矖",
+        type: "text",
+        clickFun: (row) => {
+          openTransferDialog(row);
         },
       },
     ],
@@ -164,11 +201,22 @@
 const page = reactive({
   current: 1,
   size: 100,
+  total: 0
 });
-const total = ref(0);
 const formDia = ref()
+const regularizeDiaRef = ref()
+const transferDiaRef = 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,10 +230,12 @@
 };
 const getList = () => {
   tableLoading.value = true;
-  staffOnJobListPage({...page, ...searchForm.value, staffState: 1}).then(res => {
+  const params = { ...searchForm.value, ...page };
+  params.entryDate = undefined
+  staffOnJobListPage({...params}).then(res => {
     tableLoading.value = false;
     tableData.value = res.data.records
-    total.value = res.data.total;
+    page.total = res.data.total;
   }).catch(err => {
     tableLoading.value = false;
   })
@@ -201,6 +251,12 @@
     formDia.value?.openDialog(type, row)
   })
 };
+const openRegularizeDialog = (row) => {
+  regularizeDiaRef.value?.openDialog(row)
+}
+const openTransferDialog = (row) => {
+  transferDiaRef.value?.openDialog(row)
+}
 // 瀵煎嚭
 const handleOut = () => {
   ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -209,7 +265,7 @@
     type: "warning",
   })
       .then(() => {
-        proxy.download("/staff/staffOnJob/export", {staffState: 1}, "鍦ㄨ亴鍛樺伐鍙拌处.xlsx");
+        proxy.download("/staff/staffOnJob/export", { ...searchForm.value }, "鍛樺伐鍙拌处.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");

--
Gitblit v1.9.3