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 | 65 +++++++++++++++++++++++++++++---
1 files changed, 59 insertions(+), 6 deletions(-)
diff --git a/src/views/personnelManagement/contractManagement/components/formDia.vue b/src/views/personnelManagement/contractManagement/components/formDia.vue
index 71675a3..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">
@@ -19,17 +31,20 @@
</div>
</template>
</el-dialog>
+ <Files ref="filesDia"></Files>
</div>
</template>
<script setup>
import {ref} from "vue";
-import {staffOnJobInfo} from "@/api/personnelManagement/employeeRecord.js";
+import {findStaffContractListPage} from "@/api/personnelManagement/staffContract.js";
+const Files = defineAsyncComponent(() => import( "@/views/personnelManagement/contractManagement/filesDia.vue"));
const { proxy } = getCurrentInstance()
-const emit = defineEmits(['confirm'])
-
+const emit = defineEmits(['close'])
+const filesDia = ref()
const dialogFormVisible = ref(false);
const operationType = ref('')
+const currentRow = ref({})
const tableColumn = ref([
{
label: "鍚堝悓骞撮檺",
@@ -43,21 +58,59 @@
label: "鍚堝悓缁撴潫鏃ユ湡",
prop: "contractEndTime",
},
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ align: "center",
+ fixed: 'right',
+ width: 120,
+ operation: [
+ {
+ name: "涓婁紶闄勪欢",
+ type: "text",
+ clickFun: (row) => {
+ filesDia.value.openDialog( row,'鍚堝悓')
+ },
+ }
+ ],
+ },
]);
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') {
- staffOnJobInfo({staffNo: row.staffNo}).then(res => {
- tableData.value = res.data
+ findStaffContractListPage({staffOnJobId: row.id}).then(res => {
+ 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;
+ })
})
}
}
+const openUploadFile = (row) => {
+ filesDia.value.open = true
+ filesDia.value.row = row
+}
+
// 鍏抽棴寮规
const closeDia = () => {
dialogFormVisible.value = false;
--
Gitblit v1.9.3