From 293a46e85cff3af59633cff50a2514cdbd7e8c0b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 20 八月 2026 15:04:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_阳光印刷' into dev_天津_阳光印刷
---
src/views/personnelManagement/contractManagement/components/formDia.vue | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/src/views/personnelManagement/contractManagement/components/formDia.vue b/src/views/personnelManagement/contractManagement/components/formDia.vue
index 54b2ef9..24b44ff 100644
--- a/src/views/personnelManagement/contractManagement/components/formDia.vue
+++ b/src/views/personnelManagement/contractManagement/components/formDia.vue
@@ -6,12 +6,24 @@
width="70%"
@close="closeDia"
>
+ <el-descriptions title="鍩烘湰淇℃伅" :column="3" border style="margin-bottom: 16px;">
+ <el-descriptions-item label="濮撳悕">{{ currentRow.staffName }}</el-descriptions-item>
+ <el-descriptions-item label="鍛樺伐缂栧彿">{{ currentRow.staffNo }}</el-descriptions-item>
+ <el-descriptions-item label="鎬у埆">{{ currentRow.sex }}</el-descriptions-item>
+ <el-descriptions-item label="骞撮緞">{{ currentRow.age }}</el-descriptions-item>
+ <el-descriptions-item label="鑱旂郴鐢佃瘽">{{ currentRow.phone }}</el-descriptions-item>
+ <el-descriptions-item label="鐘舵��">{{ formatStaffState(currentRow.staffState) }}</el-descriptions-item>
+ <el-descriptions-item label="鎴风睄浣忓潃" :span="2">{{ currentRow.nativePlace }}</el-descriptions-item>
+ <el-descriptions-item label="绱ф�ヨ仈绯讳汉">{{ currentRow.emergencyContact }}</el-descriptions-item>
+ <el-descriptions-item label="绱ф�ヨ仈绯讳汉鐢佃瘽">{{ currentRow.emergencyContactPhone }}</el-descriptions-item>
+ <el-descriptions-item label="鍚堝悓缁撴潫鏃ユ湡">{{ currentRow.contractExpireTime }}</el-descriptions-item>
+ </el-descriptions>
<PIMTable
rowKey="id"
:column="tableColumn"
:tableData="tableData"
:tableLoading="tableLoading"
- height="600"
+ height="360"
></PIMTable>
<template #footer>
<div class="dialog-footer">
@@ -32,6 +44,7 @@
const filesDia = ref()
const dialogFormVisible = ref(false);
const operationType = ref('')
+const currentRow = ref({})
const tableColumn = ref([
{
label: "鍚堝悓骞撮檺",
@@ -65,13 +78,30 @@
const tableData = ref([]);
const tableLoading = ref(false);
+// 鐘舵�佹牸寮忓寲
+const formatStaffState = (state) => {
+ if (state == 0) return "绂昏亴";
+ if (state == 1) return "鍦ㄨ亴";
+ return "-";
+};
+
// 鎵撳紑寮规
const openDialog = (type, row) => {
operationType.value = type;
+ currentRow.value = row || {};
dialogFormVisible.value = true;
if (operationType.value === 'edit') {
findStaffContractListPage({staffOnJobId: row.id}).then(res => {
- tableData.value = res.data.records
+ tableData.value = res.data.records.map(item => {
+ if (item.contractStartTime && item.contractEndTime) {
+ const startDate = new Date(item.contractStartTime);
+ const endDate = new Date(item.contractEndTime);
+ if (!isNaN(startDate.getTime()) && !isNaN(endDate.getTime())) {
+ item.contractTerm = endDate.getFullYear() - startDate.getFullYear()+"骞�";
+ }
+ }
+ return item;
+ })
})
}
}
--
Gitblit v1.9.3