From 0af58ec5acb61a3ac6dbf1af46fe44c485fee341 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 十一月 2025 16:05:11 +0800
Subject: [PATCH] 新增离职-数据展示修改
---
src/views/personnelManagement/onboarding/index.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/src/views/personnelManagement/onboarding/index.vue b/src/views/personnelManagement/onboarding/index.vue
index a2f33b8..6106002 100644
--- a/src/views/personnelManagement/onboarding/index.vue
+++ b/src/views/personnelManagement/onboarding/index.vue
@@ -11,6 +11,22 @@
clearable
:prefix-icon="Search"
/>
+ <span style="margin-left: 10px;" class="search_title">鍚堝悓寮�濮嬫棩鏈燂細</span>
+ <el-date-picker
+ v-model="searchForm.entryDateStart"
+ type="date"
+ placeholder="璇烽�夋嫨鍚堝悓寮�濮嬫棩鏈�"
+ size="default"
+ @change="(date) => handleDateChange(date,1)"
+ />
+ <span style="margin-left: 10px;" class="search_title">鍚堝悓缁撴潫鏃ユ湡锛�</span>
+ <el-date-picker
+ v-model="searchForm.entryDateEnd"
+ type="date"
+ placeholder="璇烽�夋嫨鍚堝悓缁撴潫鏃ユ湡"
+ size="default"
+ @change="(date) => handleDateChange(date,2)"
+ />
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
@@ -31,7 +47,7 @@
@selection-change="handleSelectionChange"
:tableLoading="tableLoading"
@pagination="pagination"
- :total="total"
+ :total="page.total"
></PIMTable>
</div>
<form-dia ref="formDia" @close="handleQuery"></form-dia>
@@ -42,8 +58,10 @@
import { Search } from "@element-plus/icons-vue";
import {onMounted, ref} from "vue";
import FormDia from "@/views/personnelManagement/onboarding/components/formDia.vue";
+// import FormDia from "@/views/personnelManagement/onboarding/components/formDiaXJHT.vue"; // 鏂扮枂椋熷搧鍏徃鐢ㄧ殑琛ㄥ崟
import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
import {ElMessageBox} from "element-plus";
+import dayjs from "dayjs";
const data = reactive({
searchForm: {
@@ -60,7 +78,7 @@
if (params == 0) {
return "绂昏亴";
} else if (params == 1) {
- return "鍦ㄨ亴";
+ return "鍏ヨ亴";
} else {
return null;
}
@@ -88,7 +106,7 @@
prop: "sex",
},
{
- label: "绫嶈疮",
+ label: "鎴风睄浣忓潃",
prop: "nativePlace",
},
{
@@ -96,8 +114,9 @@
prop: "postJob",
},
{
- label: "瀹跺涵浣忓潃",
+ label: "鐜颁綇鍧�",
prop: "adress",
+ width:200
},
{
label: "绗竴瀛﹀巻",
@@ -106,10 +125,12 @@
{
label: "涓撲笟",
prop: "profession",
+ width:100
},
{
label: "韬唤璇佸彿",
prop: "identityCard",
+ width:200
},
{
label: "骞撮緞",
@@ -118,26 +139,31 @@
{
label: "鑱旂郴鐢佃瘽",
prop: "phone",
+ width:150
},
{
label: "绱ф�ヨ仈绯讳汉",
prop: "emergencyContact",
+ width: 120
},
{
label: "鑱旂郴鐢佃瘽",
prop: "emergencyContactPhone",
+ width:150
},
- {
- label: "鍚堝悓骞撮檺",
- prop: "contractTerm",
- },
+ // {
+ // label: "鍚堝悓骞撮檺",
+ // prop: "contractTerm",
+ // },
{
label: "鍚堝悓寮�濮嬫棩鏈�",
prop: "contractStartTime",
+ width: 120
},
{
label: "鍚堝悓缁撴潫鏃ユ湡",
prop: "contractEndTime",
+ width: 120
},
{
dataType: "action",
@@ -161,11 +187,25 @@
const page = reactive({
current: 1,
size: 100,
+ total: 0,
});
-const total = ref(0);
const formDia = ref()
const { proxy } = getCurrentInstance()
+const handleDateChange = (value,type) => {
+ searchForm.value.entryDateEnd = null
+ searchForm.value.entryDateStart = null
+ if(type === 1){
+ if (value) {
+ searchForm.value.entryDateStart = dayjs(value).format("YYYY-MM-DD");
+ }
+ }else{
+ if (value) {
+ searchForm.value.entryDateEnd = dayjs(value).format("YYYY-MM-DD");
+ }
+ }
+ getList();
+};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
@@ -182,7 +222,7 @@
staffJoinListPage({...page, ...searchForm.value, staffState: 1}).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;
})
--
Gitblit v1.9.3