| | |
| | | show-overflow-tooltip |
| | | prop="empNumb" |
| | | label="编号" |
| | | width="80" |
| | | width="120" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | |
| | | show-overflow-tooltip |
| | | prop="allDeptName" |
| | | label="部门(护卫点)" |
| | | width="320" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | |
| | | show-overflow-tooltip |
| | | prop="nativePlace" |
| | | label="籍贯" |
| | | width="70" |
| | | width="150" |
| | | :formatter="nativePlaceFormat" |
| | | /> |
| | | <el-table-column show-overflow-tooltip prop="telePhone" label="联系电话" width="110" /> |
| | |
| | | prop="insuranceType" |
| | | label="社保档位" |
| | | width="240" |
| | | :formatter="insuranceTypeFormat" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | :formatter="insuranceTypeFormat" |
| | | /> |
| | | </el-table> |
| | | <pagination |
| | |
| | | /> |
| | | </el-main> |
| | | </el-container> |
| | | <el-dialog title="导出员工" :visible.sync="dialogShowDcyg" width="40%"> |
| | | <div style="font-size: 16px;font-weight: 400;height: 35px;margin-top: -30px;color: #409EFF;"> |
| | | 请勾选需要导出的字段 |
| | | </div> |
| | | <table id="dcygTable" width="100%"> |
| | | <tr> |
| | | <td colspan="6" style="text-align: left;"> |
| | | <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange" /> |
| | | 全部字段 |
| | | </td> |
| | | </tr> |
| | | <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange"> |
| | | <tr> |
| | | <td>档案号</td> |
| | | <td> |
| | | <el-checkbox label="archivesNumb"><span /></el-checkbox> |
| | | </td> |
| | | <td>姓名</td> |
| | | <td> |
| | | <el-checkbox label="empName"><span /></el-checkbox> |
| | | </td> |
| | | <td>性别</td> |
| | | <td> |
| | | <el-checkbox label="sexName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>部门(护卫点)</td> |
| | | <td> |
| | | <el-checkbox label="allDeptName"><span /></el-checkbox> |
| | | </td> |
| | | <td>所属岗位</td> |
| | | <td> |
| | | <el-checkbox label="jobName"><span /></el-checkbox> |
| | | </td> |
| | | <td>员工类别</td> |
| | | <td> |
| | | <el-checkbox label="empTypeName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>民族</td> |
| | | <td> |
| | | <el-checkbox label="nationName"><span /></el-checkbox> |
| | | </td> |
| | | <td>身份证号码</td> |
| | | <td> |
| | | <el-checkbox label="certificateNumb"><span /></el-checkbox> |
| | | </td> |
| | | <td>年龄</td> |
| | | <td> |
| | | <el-checkbox label="age"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>婚姻状况</td> |
| | | <td> |
| | | <el-checkbox label="marriageName"><span /></el-checkbox> |
| | | </td> |
| | | <td>身份证有效期</td> |
| | | <td> |
| | | <el-checkbox label="certificateValidity"><span /></el-checkbox> |
| | | </td> |
| | | <td>身高</td> |
| | | <td> |
| | | <el-checkbox label="stature"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>政治面貌</td> |
| | | <td> |
| | | <el-checkbox label="politicsName"><span /></el-checkbox> |
| | | </td> |
| | | <td>出生日期</td> |
| | | <td> |
| | | <el-checkbox label="birthdate"><span /></el-checkbox> |
| | | </td> |
| | | <td>学历</td> |
| | | <td> |
| | | <el-checkbox label="educationName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>籍贯</td> |
| | | <td> |
| | | <el-checkbox label="nativePlaceName"><span /></el-checkbox> |
| | | </td> |
| | | <td>户籍地址</td> |
| | | <td> |
| | | <el-checkbox label="censusAddress"><span /></el-checkbox> |
| | | </td> |
| | | <td>现住址</td> |
| | | <td> |
| | | <el-checkbox label="currentAddress"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>保安员证号</td> |
| | | <td> |
| | | <el-checkbox label="guardNumb"><span /></el-checkbox> |
| | | </td> |
| | | <td>保安员回执</td> |
| | | <td> |
| | | <el-checkbox label="returnReceipt"><span /></el-checkbox> |
| | | </td> |
| | | <td>档案情况</td> |
| | | <td> |
| | | <el-checkbox label="archivesStatusName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>银行名称</td> |
| | | <td> |
| | | <el-checkbox label="bankName"><span /></el-checkbox> |
| | | </td> |
| | | <td>银行账号</td> |
| | | <td> |
| | | <el-checkbox label="bankNumb"><span /></el-checkbox> |
| | | </td> |
| | | <td>电话号码</td> |
| | | <td> |
| | | <el-checkbox label="telePhone"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>家庭成员及关系1</td> |
| | | <td> |
| | | <el-checkbox label="family"><span /></el-checkbox> |
| | | </td> |
| | | <td>员工状态</td> |
| | | <td> |
| | | <el-checkbox label="empStatusName"><span /></el-checkbox> |
| | | </td> |
| | | <td>离职日期</td> |
| | | <td> |
| | | <el-checkbox label="dimissionDate"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>入职日期</td> |
| | | <td> |
| | | <el-checkbox label="entryDate"><span /></el-checkbox> |
| | | </td> |
| | | <td>社保档位</td> |
| | | <td> |
| | | <el-checkbox label="insuranceTypeName"><span /></el-checkbox> |
| | | </td> |
| | | <td>社保电脑号</td> |
| | | <td> |
| | | <el-checkbox label="socialNumb"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>招聘介绍人</td> |
| | | <td> |
| | | <el-checkbox label="introducer"><span /></el-checkbox> |
| | | </td> |
| | | <td>入司工龄</td> |
| | | <td> |
| | | <el-checkbox label="seniority"><span /></el-checkbox> |
| | | </td> |
| | | <td>工作证</td> |
| | | <td> |
| | | <el-checkbox label="empCardStatusName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>相关证件</td> |
| | | <td> |
| | | <el-checkbox label="certificateListName"><span /></el-checkbox> |
| | | </td> |
| | | <td>家庭成员及关系2</td> |
| | | <td> |
| | | <el-checkbox label="urgencyPhone"><span /></el-checkbox> |
| | | </td> |
| | | <td>员工手册</td> |
| | | <td> |
| | | <el-checkbox label="handbookStatusName"><span /></el-checkbox> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>入职类型</td> |
| | | <td> |
| | | <el-checkbox label="entryTypeName"><span /></el-checkbox> |
| | | </td> |
| | | <td>离职类型</td> |
| | | <td> |
| | | <el-checkbox label="dimissionTypeName"><span /></el-checkbox> |
| | | </td> |
| | | <td>编号</td> |
| | | <td> |
| | | <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"> |
| | | <el-button @click="showDcyg(1)">取 消</el-button> |
| | | <el-button type="primary" @click="showDcyg(2)">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 通用导出对话框 --> |
| | | <export-dialog |
| | | :visible.sync="exportDialogVisible" |
| | | :selected-fields="exportConfig.selectedFields" |
| | | @confirm="handleExportConfirm" |
| | | /> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
| | | import { calculateSeniority, toCardGetUserInfo } from '@/utils/myUtil' |
| | | import ExportDialog from '@/components/ExportEmpBase.vue' |
| | | import dictMixin from '../../utils/dictMixin' |
| | | |
| | | export default { |
| | | components: { |
| | | Pagination |
| | | Pagination, |
| | | ExportDialog |
| | | }, |
| | | mixins: [dictMixin], |
| | | data() { |
| | | return { |
| | | dialog: { |
| | |
| | | }, |
| | | headerHeight: '30px', |
| | | dialogTableVisible: false, |
| | | dialogShowDcyg: false, |
| | | exportDialogVisible: false, |
| | | exportUrl: '', |
| | | checkAll: false, |
| | | isIndeterminate: false, |
| | | 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: [], |
| | | // 导出配置 |
| | | exportConfig: { |
| | | selectedFields: [ |
| | | 'empNumb', // 编号 |
| | | 'allDeptName', // 部门(护卫点) |
| | | 'jobName', // 岗位 |
| | | 'empName', // 姓名 |
| | | 'certificateNumb', // 身份证号码 |
| | | 'sexName', // 性别 |
| | | 'age', // 年龄 |
| | | 'educationName', // 学历 |
| | | 'nativePlaceName', // 籍贯 |
| | | 'telePhone', // 联系电话 |
| | | 'empTypeName', // 员工类型 |
| | | 'insuranceTypeName' // 社保档位 |
| | | ], |
| | | exportUrl: 'hr/empBaseInfo/export/insurance', |
| | | fileName: '社保四险员工列表.xls' |
| | | }, |
| | | tableData: [], |
| | | sexOptions: [], |
| | | empStatusOptions: [], |
| | | insuranceTypeOptions: [], |
| | | // sexOptions: [], |
| | | // empStatusOptions: [], |
| | | // insuranceTypeOptions: [], |
| | | searchInsuranceOptions: [{ |
| | | 'dicItemName': '(非深户)四险一档', |
| | | 'dicItemCode': '7' |
| | | }, { |
| | | 'dicItemName': '(非深户)四险二档', |
| | | 'dicItemCode': '6' |
| | | }, { |
| | | 'dicItemName': '外参', |
| | | 'dicItemCode': '10' |
| | | }, { |
| | | 'dicItemName': '临时工意外险', |
| | | 'dicItemCode': '13' |
| | | }, { |
| | | 'dicItemName': '甲方购买', |
| | | 'dicItemCode': '14' |
| | | }] |
| | | } |
| | | }, |
| | | computed: { |
| | | // 字典选项计算属性 |
| | | sexOptions() { return this.getDictOptions('sex') }, |
| | | empStatusOptions() { return this.getDictOptions('empStatus') }, |
| | | empTypeOptions() { return this.getDictOptions('EMPTYPE') }, |
| | | educationOptions() { return this.getDictOptions('EDUCATION') }, |
| | | nativePlaceOptions() { return this.getDictOptions('NATIVEPLACE') }, |
| | | insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') } |
| | | }, |
| | | mounted() { |
| | | this.fetch() |
| | | this.initDept() |
| | | this.getDicts('ageStr').then(response => { |
| | | this.ageStrOptions = response.data |
| | | }) |
| | | this.getDicts('PLITICAL').then(response => { |
| | | this.statusOptions = response.data |
| | | }) |
| | | this.getDicts('sex').then(response => { |
| | | this.sexOptions = response.data |
| | | }) |
| | | this.getDicts('empStatus').then(response => { |
| | | this.empStatusOptions = response.data |
| | | }) |
| | | this.getDicts('empType').then(response => { |
| | | this.empTypeOptions = response.data |
| | | }) |
| | | this.getDicts('NATION').then(response => { |
| | | this.nationOptions = response.data |
| | | }) |
| | | this.getDicts('MARRIAGE').then(response => { |
| | | this.marriageOptions = response.data |
| | | }) |
| | | this.getDicts('EDUCATION').then(response => { |
| | | this.educationOptions = response.data |
| | | }) |
| | | this.getDicts('NATIVEPLACE').then(response => { |
| | | this.nativePlaceOptions = response.data |
| | | }) |
| | | this.getDicts('archivesStatus').then(response => { |
| | | this.archivesStatusOptions = response.data |
| | | }) |
| | | this.getDicts('INSURANCETYPE').then(response => { |
| | | this.insuranceTypeOptions = response.data |
| | | }) |
| | | this.getDicts('empCardStatus').then(response => { |
| | | this.empCardStatusOptions = response.data |
| | | }) |
| | | this.getDicts('handbookStatus').then(response => { |
| | | this.handbookStatusOptions = response.data |
| | | }) |
| | | this.getDicts('certificateList').then(response => { |
| | | this.certificateListOptions = response.data |
| | | }) |
| | | this.getDicts('PHYSICALEXAMTYPE').then(response => { |
| | | this.physicalExamTypeOptions = response.data |
| | | }) |
| | | this.getDicts('ECG').then(response => { |
| | | this.ecgOptions = response.data |
| | | }) |
| | | this.getDicts('CONTRACTSTATUS').then(response => { |
| | | this.contractStatusOptions = response.data |
| | | }) |
| | | this.getDicts('LEAVETYPE').then(response => { |
| | | this.leaveTypeOptions = response.data |
| | | }) |
| | | this.getDicts('applayStatus').then(response => { |
| | | this.applayStatusOptions = response.data |
| | | }) |
| | | this.getDicts('reportStatus').then(response => { |
| | | this.reportStatusOptions = response.data |
| | | }) |
| | | this.getDicts('hospitalizatioFlag').then(response => { |
| | | this.hospitalizatioFlagOptions = response.data |
| | | }) |
| | | this.getDicts('settleStatus').then(response => { |
| | | this.settleStatusOptions = response.data |
| | | }) |
| | | this.getDicts('ZCTYPE').then(response => { |
| | | this.arbitrationTypeOptions = response.data |
| | | }) |
| | | this.getDicts('changeType').then(response => { |
| | | this.changeTypeOptions = response.data |
| | | }) |
| | | this.getDicts('LZTYPE').then(response => { |
| | | this.dimissionTypeOptions = response.data |
| | | }) |
| | | this.initDictTypes([ |
| | | 'sex', 'empStatus', 'EMPTYPE', |
| | | 'EDUCATION', 'NATIVEPLACE', |
| | | 'INSURANCETYPE' |
| | | ]) |
| | | // this.initJob() |
| | | }, |
| | | methods: { |
| | |
| | | return this.selectDictLabel(this.physicalExamTypeOptions, row.physicalExamType) |
| | | }, |
| | | empTypeFormat(row, column) { |
| | | console.log(this.empTypeOptions) |
| | | return this.selectDictLabel(this.empTypeOptions, row.empType) |
| | | }, |
| | | sexFormat(row, column) { |
| | |
| | | reader.readAsDataURL(blob) |
| | | }) |
| | | reader.onload = function(e) { |
| | | // 获取bolb里面数据时,生成预览 |
| | | // 获取 bolb 里面数据时,生成预览 |
| | | var img = document.createElement('img') |
| | | img.src = e.target.result |
| | | this_.empBaseInfoForm.imagePath = e.target.result |
| | | } |
| | | }, |
| | | // 图片预览 |
| | | handlePictureCardPreview(file) { |
| | | this.empBaseInfoImageUrl = URL.createObjectURL(file.raw) // 获取URL |
| | | // 判断图片大小 |
| | | if (file.size < 4400000) { |
| | | // 判断图片格式是否为jpg,png,jepg,gif |
| | | var fileName = file.name |
| | | // var suffixIndex=fileName.lastIndexOf(".") |
| | | // var suffix=fileName.substring(suffixIndex+1).toUpperCase() |
| | | var suffix = fileName.substring(fileName.lastIndexOf('.') + 1).toUpperCase() |
| | | if (suffix === 'JPG' || suffix === 'PNG') { |
| | | this.preView(this.empBaseInfoImageUrl) |
| | | } else { |
| | | this.$message.error('只能上传jpg/png文件,且不超过4MB,请重新上传!') |
| | | } |
| | | } else { |
| | | this.$message.error('图片大小超过4M,请重新上传') |
| | | } |
| | | }, |
| | | handleCheckAllChange(val) { |
| | | this.checkedCities = val ? this.cityOptions : [] |
| | | this.isIndeterminate = false |
| | | }, |
| | | handleCheckedCitiesChange(value) { |
| | | const checkedCount = value.length |
| | | this.checkAll = checkedCount === this.cityOptions.length |
| | | this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length |
| | | }, |
| | | // 显示导出对话框 |
| | | showDcyg(operate) { |
| | | switch (operate) { |
| | | case 0: |
| | | this.dialogShowDcyg = true |
| | | break |
| | | case 1: |
| | | this.dialogShowDcyg = false |
| | | break |
| | | case 2: |
| | | var params = this.queryParams |
| | | params.empStatus = '0' |
| | | params.exportField = this.checkedCities.join(',') |
| | | this.$download('hr/empBaseInfo/export/insurance', { ...params }, '社保四险员工列表.xls').then(() => { |
| | | this.$message({ |
| | | message: '下载成功!', |
| | | type: 'success' |
| | | }) |
| | | }) |
| | | this.exportDialogVisible = true |
| | | break |
| | | } |
| | | }, |
| | | // 确认导出 |
| | | handleExportConfirm(selectedFields) { |
| | | const params = { ...this.queryParams } |
| | | params.empStatus = '0' |
| | | params.exportField = selectedFields.join(',') |
| | | |
| | | this.$download( |
| | | this.exportConfig.exportUrl, |
| | | { ...params }, |
| | | this.exportConfig.fileName |
| | | ).then(() => { |
| | | this.$message({ |
| | | message: '下载成功!', |
| | | type: 'success' |
| | | }) |
| | | }) |
| | | }, |
| | | editSuccess() { |
| | | this.search() |
| | | }, |