From 2fc58fbb10745abd97168b8da21d4142e11d7f2e Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期四, 18 十二月 2025 13:36:43 +0800
Subject: [PATCH] 新增设备维修保养过程描述,上传对应附件
---
src/views/personnelManagement/dimission/components/formDia.vue | 83 +++++++++++++++++++++++++----------------
1 files changed, 51 insertions(+), 32 deletions(-)
diff --git a/src/views/personnelManagement/dimission/components/formDia.vue b/src/views/personnelManagement/dimission/components/formDia.vue
index 3dd4c8c..9c6e77d 100644
--- a/src/views/personnelManagement/dimission/components/formDia.vue
+++ b/src/views/personnelManagement/dimission/components/formDia.vue
@@ -13,7 +13,9 @@
<el-col :span="12">
<div class="info-item">
<span class="info-label">濮撳悕锛�</span>
- <el-select v-model="form.staffName" placeholder="璇烽�夋嫨浜哄憳" style="width: 100%" @change="handleSelect">
+ <el-select v-model="form.staffName" filterable
+ default-first-option
+ :reserve-keyword="false" placeholder="璇烽�夋嫨浜哄憳" style="width: 100%" @change="handleSelect">
<el-option
v-for="item in personList"
:key="item.id"
@@ -75,12 +77,6 @@
<el-row :gutter="30">
<el-col :span="12">
<div class="info-item">
- <span class="info-label">韬唤璇佸彿锛�</span>
- <span class="info-value">{{ form.identityCard || '-' }}</span>
- </div>
- </el-col>
- <el-col :span="12">
- <div class="info-item">
<span class="info-label">骞撮緞锛�</span>
<span class="info-value">{{ form.age || '-' }}</span>
</div>
@@ -125,7 +121,7 @@
</div>
<!-- 绂昏亴淇℃伅濉啓鍖哄煙 -->
- <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef" style="margin-top: 20px">
+ <!-- <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef" style="margin-top: 20px">
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="绂昏亴鏃ユ湡锛�" prop="dimissionDate">
@@ -153,7 +149,7 @@
</el-form-item>
</el-col>
</el-row>
- </el-form>
+ </el-form> -->
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">纭</el-button>
@@ -166,7 +162,8 @@
<script setup>
import {ref, reactive, toRefs, getCurrentInstance} from "vue";
-import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate,getStaffOnJob} from "@/api/personnelManagement/onboarding.js";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import { staffOnJobListPage } from "@/api/personnelManagement/employeeRecord.js";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -182,7 +179,6 @@
adress: "",
firstStudy: "",
profession: "",
- identityCard: "",
age: 0,
phone: "",
emergencyContact: "",
@@ -215,26 +211,47 @@
}
// 鎻愪氦浜у搧琛ㄥ崟
const submitForm = () => {
- proxy.$refs.formRef.validate(valid => {
- if (valid) {
- form.value.staffState = 0
- if (operationType.value === "add") {
- staffJoinAdd(form.value).then(res => {
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- closeDia();
- })
- } else {
- staffJoinUpdate(form.value).then(res => {
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- closeDia();
- })
- }
- }
- })
+ // 琛ㄥ崟宸叉敞閲婏紝鐩存帴鎻愪氦锛屼笉杩涜楠岃瘉
+ if (!form.value.staffName) {
+ proxy.$modal.msgError("璇烽�夋嫨浜哄憳");
+ return;
+ }
+ form.value.staffState = 0
+ if (operationType.value === "add") {
+ staffJoinAdd(form.value).then(res => {
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ closeDia();
+ })
+ } else {
+ staffJoinUpdate(form.value).then(res => {
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ closeDia();
+ })
+ }
}
// 鍏抽棴寮规
const closeDia = () => {
- proxy.resetForm("formRef");
+ // 琛ㄥ崟宸叉敞閲婏紝鎵嬪姩閲嶇疆琛ㄥ崟鏁版嵁
+ form.value = {
+ staffNo: "",
+ staffName: "",
+ sex: "",
+ nativePlace: "",
+ postJob: "",
+ adress: "",
+ firstStudy: "",
+ profession: "",
+ age: 0,
+ phone: "",
+ emergencyContact: "",
+ emergencyContactPhone: "",
+ contractTerm: 0,
+ contractStartTime: "",
+ contractEndTime: "",
+ dimissionDate: "",
+ dimissionReason: "",
+ staffState: "",
+ };
dialogFormVisible.value = false;
emit('close')
};
@@ -245,8 +262,12 @@
* 鑾峰彇褰撳墠鍦ㄨ亴浜哄憳鍒楄〃
*/
const getList = () => {
- getStaffOnJob().then(res => {
- personList.value = res.data
+ staffOnJobListPage({
+ current: -1,
+ size: -1,
+ staffState: 1
+ }).then(res => {
+ personList.value = res.data.records || []
})
};
@@ -262,7 +283,6 @@
adress,
firstStudy,
profession,
- identityCard,
age,
emergencyContact,
emergencyContactPhone,
@@ -282,7 +302,6 @@
adress,
firstStudy,
profession,
- identityCard,
age,
emergencyContact,
emergencyContactPhone,
--
Gitblit v1.9.3