From 6448ec15bfe0b65fb822a662105bceddc23b58d8 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期一, 06 四月 2026 21:34:44 +0800
Subject: [PATCH] feat(user): 新增员工档案管理视图组件
---
src/views/user/outemployess.vue | 147 +++++++++++++++++++++++++++++++++---------------
1 files changed, 101 insertions(+), 46 deletions(-)
diff --git a/src/views/user/outemployess.vue b/src/views/user/outemployess.vue
index 766a6b1..9d402c6 100644
--- a/src/views/user/outemployess.vue
+++ b/src/views/user/outemployess.vue
@@ -183,13 +183,22 @@
<el-checkbox :label="1">合同期满</el-checkbox>
<el-checkbox :label="3">公司辞退</el-checkbox>
<el-checkbox :label="5">试用期内</el-checkbox>
- <!-- <el-checkbox-->
- <!-- v-for="data in dimissionTypeOptions"-->
- <!-- :key="data.dicItemName"-->
- <!-- :label="data.dicItemCode"-->
- <!-- >-->
- <!-- {{ data.dicItemName }}-->
- <!-- </el-checkbox>-->
+ <el-checkbox :label="7">到龄退休</el-checkbox>
+ </el-checkbox-group>
+ </td>
+ </tr>
+ <tr>
+ <td class="td">相关证件:</td>
+ <td class="td-group">
+ <el-checkbox-group v-model="queryParams.certificateList" class="fj-checkbox">
+ <el-checkbox label="" @change="selectAllCertificateList">全部</el-checkbox>
+ <el-checkbox
+ v-for="data in certificateListOptions"
+ :key="data.dicItemName"
+ :label="data.dicItemCode"
+ >
+ {{ data.dicItemName }}
+ </el-checkbox>
</el-checkbox-group>
</td>
</tr>
@@ -254,7 +263,7 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" />
- <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" width="280" sortable="custom" :sort-orders="['ascending', 'descending']" />
+ <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" sortable="custom" :sort-orders="['ascending', 'descending']" />
<el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="80" />
<el-table-column show-overflow-tooltip prop="empName" label="姓名" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" />
<el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="160" sortable="custom" :sort-orders="['ascending', 'descending']" />
@@ -290,6 +299,7 @@
{{ transEntryType(row.dimissionType) }}
</template>
</el-table-column>
+ <el-table-column show-overflow-tooltip prop="annualLeave" label="年假天数" width="110" />
</el-table>
<pagination
v-show="total>0"
@@ -430,9 +440,9 @@
<td>已发</td>
</tr>
<tr>
- <td>家庭成员及关系</td>
+ <td>家庭成员及关系1</td>
<td />
- <td>紧急联系电话</td>
+ <td>家庭成员及关系2</td>
<td />
<td>员工手册</td>
<td>已发</td>
@@ -895,8 +905,8 @@
</table>
<table>
<tr>
- <td colspan="8" class="tdTitle">劳资案件</td>
- <td class="link_button">新增劳资案件</td>
+ <td colspan="8" class="tdTitle">仲裁案件</td>
+ <td class="link_button">新增仲裁案件</td>
<td class="del_button">删除</td>
</tr>
<tr>
@@ -1002,6 +1012,17 @@
value-format="yyyy-MM-dd"
type="date"
placeholder="选择打开日期"
+ />
+ </el-form-item>
+ <el-form-item label="部门(护卫点)" required message="请选择部门(护卫点)" prop="allDeptName">
+ <treeselect
+ v-model="baseicInformationForm.deptId"
+ :multiple="false"
+ :options="depts"
+ :clear-value-text="$t('common.clear')"
+ placeholder="请选择部门(护卫点)"
+ style="width:100%"
+ @select="DeptNameSelect"
/>
</el-form-item>
<el-form-item label="备注说明">
@@ -1144,7 +1165,7 @@
</td>
</tr>
<tr>
- <td>家庭成员及关系</td>
+ <td>家庭成员及关系1</td>
<td>
<el-checkbox label="family"><span /></el-checkbox>
</td>
@@ -1190,7 +1211,7 @@
<td>
<el-checkbox label="certificateListName"><span /></el-checkbox>
</td>
- <td>紧急联系电话</td>
+ <td>家庭成员及关系2</td>
<td>
<el-checkbox label="urgencyPhone"><span /></el-checkbox>
</td>
@@ -1213,6 +1234,16 @@
<el-checkbox label="empNumb"><span /></el-checkbox>
</td>
</tr>
+ <tr>
+ <td>年假天数</td>
+ <td>
+ <el-checkbox label="annualLeave"><span /></el-checkbox>
+ </td>
+ <td />
+ <td />
+ <td />
+ <td />
+ </tr>
</el-checkbox-group>
</table>
<div slot="footer" class="dialog-footer">
@@ -1232,12 +1263,16 @@
<script>
import Pagination from '@/components/Pagination'
import ArchivesChange from './archivesChange'
+import Treeselect from '@riophae/vue-treeselect'
+import dictMixin from '../../utils/dictMixin'
export default {
components: {
+ Treeselect,
ArchivesChange,
Pagination
},
+ mixins: [dictMixin],
data() {
return {
dialog: {
@@ -1258,13 +1293,15 @@
insuranceType: [],
empStatus: [],
dimissionType: [],
- empType: []
+ empType: [],
+ certificateList: []
}, // 查询参数
sort: {}, // 排序
pagination: { // 分页参数
size: 15,
num: 1
},
+ depts: [],
headerHeight: '30px',
advancedQueryShow: false,
dialogTableVisible: false,
@@ -1281,42 +1318,45 @@
baseicInformationForm: {
openDate: new Date()
},
- educationOptions: [],
- statusOptions: [],
- ageStrOptions: [],
- insuranceTypeOptions: [],
- archivesStatusOptions: [],
- sexOptions: [],
- empTypeOptions: [],
- cityOptions: ['archivesNumb', 'allDeptName', 'jobName', 'empName', 'certificateNumb', 'certificateValidity', 'sexName', 'nationName', 'age', 'marriageName', 'stature', 'birthdate', 'politicsName', 'empTypeName', 'educationName', 'nativePlaceName', 'censusAddress', 'currentAddress', 'guardNumb', 'returnReceipt', 'archivesStatusName', 'bankName', 'bankNumb', 'telePhone', 'entryDate', 'insuranceTypeName', 'socialNumb', 'introducer', 'seniority', 'empCardStatusName', 'certificateListName', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb'],
+ cityOptions: ['archivesNumb', 'allDeptName', 'jobName', 'empName', 'certificateNumb', 'certificateValidity', 'sexName', 'nationName', 'age', 'marriageName', 'stature', 'birthdate', 'politicsName', 'empTypeName', 'educationName', 'nativePlaceName', 'censusAddress', 'currentAddress', 'guardNumb', 'returnReceipt', 'archivesStatusName', 'bankName', 'bankNumb', 'telePhone', 'entryDate', 'insuranceTypeName', 'socialNumb', 'introducer', 'seniority', 'empCardStatusName', 'certificateListName', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb', 'annualLeave'],
checkedCities: []
}
},
+ computed: {
+ // 字典选项计算属性
+ educationOptions() { return this.getDictOptions('EDUCATION') },
+ statusOptions() { return this.getDictOptions('PLITICAL') },
+ ageStrOptions() { return this.getDictOptions('ageStr') },
+ insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') },
+ archivesStatusOptions() { return this.getDictOptions('archivesStatus') },
+ sexOptions() { return this.getDictOptions('sex') },
+ empTypeOptions() { return this.getDictOptions('EMPTYPE') },
+ certificateListOptions() { return this.getDictOptions('certificateList') }
+ },
mounted() {
this.fetch()
- this.getDicts('INSURANCETYPE').then(response => {
- this.insuranceTypeOptions = response.data
- })
- this.getDicts('archivesStatus').then(response => {
- this.archivesStatusOptions = response.data
- })
- this.getDicts('EDUCATION').then(response => {
- this.educationOptions = response.data
- })
- this.getDicts('sex').then(response => {
- this.sexOptions = response.data
- })
- this.getDicts('PLITICAL').then(response => {
- this.statusOptions = response.data
- })
- this.getDicts('ageStr').then(response => {
- this.ageStrOptions = response.data
- })
- this.getDicts('EMPTYPE').then(response => {
- this.empTypeOptions = response.data
- })
+ // 字典数据已在登录时预加载,直接从 Vuex 获取
+ this.initDictTypes(['INSURANCETYPE', 'archivesStatus', 'EDUCATION', 'sex', 'PLITICAL', 'ageStr', 'EMPTYPE', 'certificateList'])
+ this.initDept()
},
methods: {
+ initDept() {
+ this.$get('system/dept').then((r) => {
+ this.depts = r.data.data.rows
+ this.deptTree = this.depts
+ }).catch((error) => {
+ console.error(error)
+ this.$message({
+ message: this.$t('tips.getDataFail'),
+ type: 'error'
+ })
+ })
+ },
+ DeptNameSelect(val) {
+ this.baseicInformationForm.deptId = val.deptId
+ this.baseicInformationForm.deptName = val.label
+ this.baseicInformationForm.allDeptName = val.allDeptName
+ },
exportExcel() {
this.queryParams.baseKey = this.queryParams.vague
var params = this.queryParams
@@ -1430,6 +1470,8 @@
return '试用期内'
case '6':
return '正常离职'
+ case '7':
+ return '到龄退休'
}
},
transDimissionType(dimissionType) {
@@ -1499,6 +1541,9 @@
var id = selection[0].empId
var name = selection[0].empName
var number = selection[0].certificateNumb
+ var deptName = selection[0].deptName
+ var deptId = selection[0].deptId
+ var allDeptName = selection[0].allDeptName
const nowDate = new Date()
const year = nowDate.getFullYear()
const month = nowDate.getMonth() + 1
@@ -1507,9 +1552,12 @@
empId: id,
empName: name,
certificateNumb: number,
- openType: 5,
+ openType: 21,
openDate: year + '-' + month + '-' + day,
- remark: ''
+ remark: '',
+ deptId: deptId,
+ deptName: deptName,
+ allDeptName: allDeptName
}
this.dialogShowDkda = true
} else {
@@ -1645,6 +1693,13 @@
this.checkedCities = val ? this.cityOptions : []
this.isIndeterminate = false
},
+ selectAllCertificateList(val) {
+ if (val) {
+ this.queryParams.certificateList = this.dicListToArr(this.certificateListOptions)
+ } else {
+ this.queryParams.certificateList = []
+ }
+ },
showDcyg(operate) {
switch (operate) {
case 0:
--
Gitblit v1.8.0