| | |
| | | <el-col :span="9" style="margin-top: 15px;"> |
| | | <el-input v-model="queryParams.baseKey" placeholder="请输入内容" style="width:300px" /> |
| | | <span class="search-btn" @click="vagueSearch">查询</span> |
| | | <span class="sup-search-btn" @click="advancedQueryShowMethods">高级查询</span> |
| | | <span class="sup-search-btn" @click="advancedQueryShow = !advancedQueryShow">高级查询</span> |
| | | </el-col> |
| | | </el-row> |
| | | <div v-show="advancedQueryShow"> |
| | | <el-row> |
| | | <el-col :span="3">员工编号: |
| | | <el-input v-model="queryParams.empNumb" size="small" maxlength="20" style="width:85px" /> |
| | | </el-col> |
| | | <el-col :span="3">姓名: |
| | | <el-input v-model="queryParams.empName" size="small" maxlength="10" style="width:110px" /> |
| | | </el-col> |
| | | <el-col :span="4">身份证号: |
| | | <el-input v-model="queryParams.certificateNumb" size="small" maxlength="18" style="width:140px" /> |
| | | </el-col> |
| | | <el-col :span="4">部门(护卫点): |
| | | <el-input v-model="queryParams.deptName" size="small" maxlength="20" style="width:100px" /> |
| | | </el-col> |
| | | <el-col :span="7">入职日期: |
| | | <el-date-picker |
| | | v-model="queryParams.entryDateStr" |
| | | size="small" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | range-separator="~" |
| | | value-format="yyyy-MM-dd" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | style="width: 300px;" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-button size="mini" class="hr-but-all" type="primary" @click="search">查询</el-button> |
| | | <el-button size="mini" class="hr-but" type="danger" @click="resetSearch">重置</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <table class="searchTable"> |
| | | <tr> |
| | | <td class="td">性别:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.sex" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllSex">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in sexOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">学历:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.education" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllEducation">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in educationOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">政治面貌:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.politics" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllPolitics">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in statusOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">年龄:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.ageStr" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllAgeStr">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in ageStrOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">档案情况:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.archivesStatus" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllArchivesStatus">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in archivesStatusOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">保险类型:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.insuranceType" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllInsuranceType">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in insuranceTypeOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">工作证:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.empCardStatus" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllEmpCardStatus">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in empCardStatusOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">员工手册:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.handbookStatus" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllHandbookStatus">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in handbookStatusOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">员工类型:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.empType" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllEmpType">全部</el-checkbox> |
| | | <el-checkbox |
| | | v-for="data in empTypeOptions" |
| | | :key="data.dicItemName" |
| | | :label="data.dicItemCode" |
| | | > |
| | | {{ data.dicItemName }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td">入职类型:</td> |
| | | <td class="td-group"> |
| | | <el-checkbox-group v-model="queryParams.entryType" class="fj-checkbox"> |
| | | <el-checkbox label="" @change="selectAllEntryType">全部</el-checkbox> |
| | | <el-checkbox :label="20">新入职</el-checkbox> |
| | | <el-checkbox :label="21">重新新入职</el-checkbox> |
| | | <el-checkbox :label="22">返聘入职</el-checkbox> |
| | | <!-- <el-checkbox--> |
| | | <!-- v-for="data in dimissionTypeOptions"--> |
| | | <!-- :key="data.dicItemName"--> |
| | | <!-- :label="data.dicItemCode"--> |
| | | <!-- >--> |
| | | <!-- {{ data.dicItemName }}--> |
| | | <!-- </el-checkbox>--> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <advanced-query |
| | | v-show="advancedQueryShow" |
| | | :query-params.sync="queryParams" |
| | | @search="search" |
| | | @reset="resetSearch" |
| | | /> |
| | | </el-header> |
| | | <el-main style="height: 85%;"> |
| | | <el-row style="margin: 10px 0 10px 0;"> |
| | |
| | | <el-button type="primary" style="background-color: #409EFF" @click="delEmp">删除员工</el-button> |
| | | <el-button type="danger" class="hr-but-all" @click="showYgdg(0)">员工调岗</el-button> |
| | | <!-- <el-button type="danger" class="hr-but-all" @click="showDryg(0)">导入员工</el-button> --> |
| | | <el-button type="danger" class="hr-but-all" @click="showDcyg(0)">导出EXCEL</el-button> |
| | | <el-button type="danger" class="hr-but-all" @click="dialogShowDcyg = true">导出EXCEL</el-button> |
| | | <el-button type="primary" style="background-color: #409EFF" @click="showGbda(0)">关闭档案</el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column label="操作" width="130"> |
| | | <template slot-scope="scope"> |
| | | <!-- <el-button--> |
| | | <!-- type="text"--> |
| | | <!-- size="small"--> |
| | | <!-- @click="editArchives(scope.row)"--> |
| | | <!-- >--> |
| | | <!-- 档案</el-button>--> |
| | | <!-- <el-button type="text" size="small" @click="editEmpBase(scope.row)">编辑</el-button>--> |
| | | |
| | | <span |
| | | style="color: #a00515;display: inline-block;width: 40%;cursor: pointer" |
| | | @click="editArchives(scope.row)" |
| | |
| | | >编辑</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" prop="empNumb" label="编号" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="allDeptName" label="部门(护卫点)" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="jobName" label="岗位" width="80" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="empName" label="姓名" width="100" sortable="custom" :sort-orders="['ascending', 'descending']" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="certificateNumb" label="身份证号码" width="160" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="sex" label="性别" width="60" :formatter="sexFormat" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="age" label="年龄" width="60" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="education" label="学历" width="60" :formatter="educationFormat" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="nativePlace" label="籍贯" width="70" :formatter="nativePlaceFormat" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="telePhone" label="联系电话" width="110" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="empTypeName" label="员工类型" width="80" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="entryDate" label="入职日期" width="110" sortable="custom" :sort-orders="['ascending', 'descending']" /> |
| | | <el-table-column show-overflow-tooltip="true" prop="empStatus" label="员工状态" width="80"> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="empNumb" |
| | | label="编号" |
| | | width="100" |
| | | 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="120" /> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="empName" |
| | | label="姓名" |
| | | width="100" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | | <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="160" /> |
| | | <el-table-column show-overflow-tooltip prop="sex" label="性别" width="60" :formatter="sexFormat" /> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="age" |
| | | label="年龄" |
| | | width="80" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="education" |
| | | label="学历" |
| | | width="80" |
| | | :formatter="educationFormat" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="nativePlace" |
| | | label="籍贯" |
| | | width="70" |
| | | :formatter="nativePlaceFormat" |
| | | /> |
| | | <el-table-column show-overflow-tooltip prop="telePhone" label="联系电话" width="110" /> |
| | | <el-table-column show-overflow-tooltip prop="empTypeName" label="员工类型" width="80" /> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="entryDate" |
| | | label="入职日期" |
| | | width="110" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | /> |
| | | <el-table-column show-overflow-tooltip prop="empStatus" label="员工状态" width="80"> |
| | | <template slot-scope="{row}"> |
| | | {{ transEmpStatus(row.empStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="entryTypeName" label="入职类型" width="80" /> |
| | | <el-table-column |
| | | prop="entryType" |
| | | label="入职类型" |
| | | width="120" |
| | | sortable="custom" |
| | | :sort-orders="['ascending', 'descending']" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ transEntryType(row.entryType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip prop="annualLeave" label="年假天数" width="110" /> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total>0" |
| | |
| | | /> |
| | | </el-main> |
| | | </el-container> |
| | | <el-dialog title="基本信息" :visible.sync="dialogShowXzyg" width="50%" class="baseinfo"> |
| | | <el-container> |
| | | <el-aside width="200px"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="#" |
| | | :show-file-list="false" |
| | | :on-change="handlePictureCardPreview" |
| | | :auto-upload="false" |
| | | > |
| | | <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过4MB</div> |
| | | <img v-if="empBaseInfoImageUrl" :src="empBaseInfoImageUrl" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon" /> |
| | | </el-upload> |
| | | </el-aside> |
| | | <el-main> |
| | | <el-form |
| | | ref="empBaseInfoForm" |
| | | :model="empBaseInfoForm" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="120px" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="档案号" prop="archivesNumb"> |
| | | <el-input v-model="empBaseInfoForm.archivesNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="员工编号" prop="empNumb"> |
| | | <el-input v-model="empBaseInfoForm.empNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="身份证号码" prop="certificateNumb"> |
| | | <el-input |
| | | v-model="empBaseInfoForm.certificateNumb" |
| | | @input="generateUserInfo(0,empBaseInfoForm.certificateNumb)" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="员工类别" prop="empType"> |
| | | <el-select v-model="empBaseInfoForm.empType" placeholder="请选择员工类型"> |
| | | <el-option |
| | | v-for="dict in empTypeOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="民族" prop="nation"> |
| | | <el-select v-model="empBaseInfoForm.nation" filterable placeholder="请选择民族"> |
| | | <el-option |
| | | v-for="dict in nationOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="婚姻状态" prop="marriage"> |
| | | <el-select v-model="empBaseInfoForm.marriage" placeholder="请选择婚姻状态"> |
| | | <el-option |
| | | v-for="dict in marriageOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="身高(cm)" prop="stature"> |
| | | <el-input v-model="empBaseInfoForm.stature" /> |
| | | </el-form-item> |
| | | <el-form-item label="政治面貌" prop="politics"> |
| | | <el-select v-model="empBaseInfoForm.politics" placeholder="请选择政治面貌"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="学历" prop="education"> |
| | | <el-select v-model="empBaseInfoForm.education" placeholder="请选择学历"> |
| | | <el-option |
| | | v-for="dict in educationOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="籍贯" prop="nativePlaceName"> |
| | | <el-autocomplete |
| | | v-model="empBaseInfoForm.nativePlaceName" |
| | | class="inline-input" |
| | | :fetch-suggestions="querySearch" |
| | | placeholder="请输入籍贯" |
| | | @select="placeNameSelect" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="现住址" prop="currentAddress"> |
| | | <el-input v-model="empBaseInfoForm.currentAddress" /> |
| | | </el-form-item> |
| | | <el-form-item label="电话号码" prop="telePhone"> |
| | | <el-input v-model="empBaseInfoForm.telePhone" /> |
| | | </el-form-item> |
| | | <el-form-item label="招聘介绍人" prop="introducer"> |
| | | <el-input v-model="empBaseInfoForm.introducer" /> |
| | | </el-form-item> |
| | | <el-form-item label="银行名称" prop="bankName"> |
| | | <el-input v-model="empBaseInfoForm.bankName" /> |
| | | </el-form-item> |
| | | <el-form-item label="保险类型" prop="insuranceType"> |
| | | <el-select v-model="empBaseInfoForm.insuranceType" placeholder="请选择保险类型"> |
| | | <el-option |
| | | v-for="dict in insuranceTypeOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="家庭成员及关系" prop="family"> |
| | | <el-input v-model="empBaseInfoForm.family" /> |
| | | </el-form-item> |
| | | <el-form-item label="紧急联系电话" prop="urgencyPhone"> |
| | | <el-input v-model="empBaseInfoForm.urgencyPhone" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="姓名" prop="empName"> |
| | | <el-input v-model="empBaseInfoForm.empName" /> |
| | | </el-form-item> |
| | | <el-form-item label="部门(护卫点)" required message="请选择护卫点" prop="deptId"> |
| | | <treeselect |
| | | v-model="empBaseInfoForm.deptId" |
| | | :multiple="false" |
| | | :options="depts" |
| | | :clear-value-text="$t('common.clear')" |
| | | placeholder="请选择部门(护卫点)" |
| | | style="width:100%" |
| | | @select="empDeptNameSelect" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="岗位" prop="jobName"> |
| | | <el-autocomplete |
| | | v-model="empBaseInfoForm.jobName" |
| | | class="inline-input" |
| | | :fetch-suggestions="querySearchJob" |
| | | placeholder="请输入岗位" |
| | | @select="jobNameSelect" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="empBaseInfoForm.sex" placeholder="请选择性别"> |
| | | <el-option |
| | | v-for="dict in sexOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="身份证有效期" prop="certificateValidity"> |
| | | <el-date-picker |
| | | v-model="empBaseInfoForm.certificateValidity" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="年龄" prop="age"> |
| | | <el-input v-model="empBaseInfoForm.age" /> |
| | | </el-form-item> |
| | | <el-form-item label="出生日期" prop="birthdate"> |
| | | <el-date-picker |
| | | v-model="empBaseInfoForm.birthdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="入职日期" prop="entryDate"> |
| | | <el-date-picker |
| | | v-model="empBaseInfoForm.entryDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | @input="calculateSeniority" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="入司工龄" prop="seniority"> |
| | | <el-input v-model="empBaseInfoForm.seniority" /> |
| | | </el-form-item> |
| | | <el-form-item label="户籍地址" prop="censusAddress"> |
| | | <el-input v-model="empBaseInfoForm.censusAddress" /> |
| | | </el-form-item> |
| | | <el-form-item label="保安员证号" prop="guardNumb"> |
| | | <el-input v-model="empBaseInfoForm.guardNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="保安员回执" prop="returnReceipt"> |
| | | <el-input v-model="empBaseInfoForm.returnReceipt" /> |
| | | </el-form-item> |
| | | <el-form-item label="档案情况" prop="archivesStatus"> |
| | | <el-select v-model="empBaseInfoForm.archivesStatus" placeholder="请选择档案情况"> |
| | | <el-option |
| | | v-for="dict in archivesStatusOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="银行账号" prop="bankNumb"> |
| | | <el-input v-model="empBaseInfoForm.bankNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="社保电脑号" prop="socialNumb"> |
| | | <el-input v-model="empBaseInfoForm.socialNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="员工手册" prop="handbookStatus"> |
| | | <el-select v-model="empBaseInfoForm.handbookStatus" placeholder="请选择员工手册"> |
| | | <el-option |
| | | v-for="dict in handbookStatusOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工作证" prop="empCardStatus"> |
| | | <el-select v-model="empBaseInfoForm.empCardStatus" placeholder="请选择工作证"> |
| | | <el-option |
| | | v-for="dict in empCardStatusOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="相关证件" prop="certificateList"> |
| | | <el-select v-model="empBaseInfoForm.certificateList" multiple placeholder="请选择相关证件"> |
| | | <el-option |
| | | v-for="dict in certificateListOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-main> |
| | | </el-container> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="putEmpBase('empBaseInfoForm')">保 存</el-button> |
| | | <el-button type="primary" @click="putEmpBaseContinue('empBaseInfoForm')">保存并继续新增</el-button> |
| | | <el-button @click="showXzyg()">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="员工调岗" :visible.sync="dialogShowYgdg" width="50%"> |
| | | <el-form ref="ygdgForm" :model="ygdgForm" :rules="ygdgRules" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col span="24"> |
| | | <el-form-item label="调岗人员"> |
| | | <input v-model="ygdgForm.empIds" type="hidden"> |
| | | <el-input v-model="ygdgForm.empNames" type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="现部门(护卫点)" required message="请选择护卫点" prop="deptId"> |
| | | <treeselect |
| | | v-model="ygdgForm.deptId" |
| | | :multiple="false" |
| | | :options="depts" |
| | | :clear-value-text="$t('common.clear')" |
| | | placeholder="请选择部门(护卫点)" |
| | | style="width:100%" |
| | | @select="deptNameSelect" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="现岗位" prop="jobId"> |
| | | <el-autocomplete |
| | | v-model="ygdgForm.newJobName" |
| | | class="inline-input" |
| | | :fetch-suggestions="querySearchJob" |
| | | placeholder="请输入岗位" |
| | | @select="jobNameSelect" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="调岗类型" prop="changeType"> |
| | | <el-select v-model="ygdgForm.changeType" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in changeTypeOptions" |
| | | :key="dict.dicItemCode" |
| | | :label="dict.dicItemName" |
| | | :value="dict.dicItemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="调岗日期" prop="changeDate"> |
| | | <el-date-picker |
| | | v-model="ygdgForm.changeDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="理由描述" prop="changeReason"> |
| | | <el-input v-model="ygdgForm.changeReason" type="textarea" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="showYgdg(1,'')">取 消</el-button> |
| | | <el-button type="primary" @click="showYgdg(2,'ygdgForm')">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <emp-base-edit |
| | | ref="empBaseEdit" |
| | | :dialog-visible="dialogShowXzyg" |
| | | :is-add="isAdd" |
| | | :employee-data="currentEmployeeData" |
| | | :depts="depts" |
| | | @success="handleEmpSaveSuccess" |
| | | @close="dialogShowXzyg = false" |
| | | @employee-exists="handleEmployeeExists" |
| | | @need-open-archives="handleNeedOpenArchives" |
| | | /> |
| | | <job-change-dialog |
| | | :visible.sync="dialogShowYgdg" |
| | | :employees="selectedEmployees" |
| | | :depts="depts" |
| | | :change-type-options="changeTypeOptions" |
| | | @success="handleJobChangeSuccess" |
| | | @close="handleJobChangeClose" |
| | | /> |
| | | <el-dialog title="导入员工信息" :visible.sync="dialogShowDryg" width="50%"> |
| | | <el-form :model="baseicInformationForm" label-position="right" label-width="120px"> |
| | | <el-row> |
| | |
| | | <el-upload |
| | | ref="upload" |
| | | class="upload-demo" |
| | | action="http://120.24.23.155:8301/hr/empBaseInfo/importEmp" |
| | | action="http://127.0.0.1:8301/hr/empBaseInfo/importEmp" |
| | | accept=".xls, .xlsx, .excel" |
| | | :headers="headers()" |
| | | :file-list="fileList" |
| | |
| | | <el-button type="primary" @click="showDryg(2)">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="关闭档案" :visible.sync="dialogShowGbda" width="50%"> |
| | | <el-form ref="gbdaForm" :model="gbdaForm" :rules="gbdaRules" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col span="24"> |
| | | <el-form-item label="离职类型" prop="dimissionType"> |
| | | <el-radio-group v-model="gbdaForm.dimissionType" @change="changeDimissionType"> |
| | | <el-radio :label="1">合同期满</el-radio> |
| | | <el-radio :label="2">公司劝退</el-radio> |
| | | <el-radio :label="3">公司辞退</el-radio> |
| | | <el-radio :label="4">自动离职</el-radio> |
| | | <el-radio :label="5">试用期内</el-radio> |
| | | <el-radio :label="6">正常离职</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="selectDimissionType === 2" span="12"> |
| | | <el-form-item label="自离天数" prop="selfLeaveDay"> |
| | | <el-input v-model="gbdaForm.selfLeaveDay" onkeyup="value=value.replace(/[^0-9.]/g,'')" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="selectDimissionType === 2" span="12"> |
| | | <el-form-item label="报告人" prop="reporter"> |
| | | <el-input v-model="gbdaForm.reporter" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="24"> |
| | | <el-form-item label="离职操作" prop="afterOperation"> |
| | | <el-checkbox-group v-model="gbdaForm.afterOperation"> |
| | | <el-checkbox label="1">解除劳动合同</el-checkbox> |
| | | <el-checkbox label="2">禁用登录账号</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="24"> |
| | | <el-form-item label="关闭日期" prop="dimissionDate"> |
| | | <el-date-picker |
| | | v-model="gbdaForm.dimissionDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="备注说明" prop="remark"> |
| | | <el-input v-model="gbdaForm.remark" type="textarea" :rows="4" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="showGbda(1,'')">取 消</el-button> |
| | | <el-button type="primary" @click="showGbda(2,'gbdaForm')">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <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>家庭成员及关系</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="certificateList"><span /></el-checkbox> |
| | | </td> |
| | | <td>紧急联系电话</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> |
| | | </tr> |
| | | <!-- <tr>--> |
| | | <!-- <td>家庭成员及关系</td>--> |
| | | <!-- <td>--> |
| | | <!-- <el-checkbox label="family"><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> |
| | | <close-archives-dialog |
| | | :visible.sync="dialogShowGbda" |
| | | :employees="selectedCloseEmployees" |
| | | :dimission-type-options="dimissionTypeOptions" |
| | | @success="handleCloseArchivesSuccess" |
| | | @close="handleCloseArchivesClose" |
| | | /> |
| | | <export-dialog |
| | | :visible.sync="dialogShowDcyg" |
| | | @confirm="handleExportConfirm" |
| | | /> |
| | | <archives-edit |
| | | ref="article" |
| | | :dialog-visible="dialog.isVisible" |
| | | :title="dialog.title" |
| | | :type="dialog.type" |
| | | @success="editSuccess" |
| | | @close="editClose" |
| | | /> |
| | | <el-dialog title="打开档案" :visible.sync="dialogShowDkda" width="50%"> |
| | |
| | | <el-col span="24"> |
| | | <el-form-item label="打开类型" prop="region"> |
| | | <el-radio-group v-model="openArchivesForm.openType"> |
| | | <el-radio :label="20">重新入职</el-radio> |
| | | <el-radio :label="21">返聘</el-radio> |
| | | <el-radio :label="21">重新入职</el-radio> |
| | | <el-radio :label="22">返聘</el-radio> |
| | | </el-radio-group> |
| | | (主要对已退休员工返聘) |
| | | </el-form-item> |
| | |
| | | <el-button type="primary" @click="showDkda(2, 'openArchivesForm')">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 上传方式选择弹窗 --> |
| | | <el-dialog |
| | | title="选择上传方式" |
| | | :visible.sync="uploadChoiceDialogVisible" |
| | | width="400px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div class="upload-choice-container"> |
| | | <div class="upload-choice-item" @click="choiceCamera"> |
| | | <i class="el-icon-camera" /> |
| | | <span>拍照上传</span> |
| | | </div> |
| | | <div class="upload-choice-item" @click="choiceFile"> |
| | | <i class="el-icon-folder-opened" /> |
| | | <span>文件上传</span> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 摄像头拍照弹窗 --> |
| | | <el-dialog |
| | | title="拍照上传" |
| | | :visible.sync="cameraDialogVisible" |
| | | width="640px" |
| | | :close-on-click-modal="false" |
| | | @close="closeCamera" |
| | | > |
| | | <div class="camera-container"> |
| | | <!-- 视频预览 --> |
| | | <video |
| | | v-show="!capturedImage" |
| | | ref="video" |
| | | class="camera-video" |
| | | autoplay |
| | | playsinline |
| | | /> |
| | | <!-- 画布(用于拍照) --> |
| | | <canvas ref="canvas" style="display: none;" /> |
| | | |
| | | <!-- 拍照结果预览 --> |
| | | <img |
| | | v-if="capturedImage" |
| | | :src="capturedImage" |
| | | class="captured-image" |
| | | > |
| | | </div> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeCamera">取消</el-button> |
| | | <el-button |
| | | v-if="!capturedImage" |
| | | type="primary" |
| | | @click="takePhoto" |
| | | > |
| | | 拍照 |
| | | </el-button> |
| | | <el-button |
| | | v-if="capturedImage" |
| | | @click="retakePhoto" |
| | | > |
| | | 重拍 |
| | | </el-button> |
| | | <el-button |
| | | v-if="capturedImage" |
| | | type="primary" |
| | | @click="confirmPhoto" |
| | | > |
| | | 确认使用 |
| | | </el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import Treeselect from '@riophae/vue-treeselect' |
| | | import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
| | | import { calculateSeniority, toCardGetUserInfo, dateToString } from '@/utils/myUtil' |
| | | import { dateToString } from '@/utils/myUtil' |
| | | import ArchivesEdit from './archivesEdit' |
| | | import { pages } from '@/settings' |
| | | import EmpBaseEdit from './components/EmpBaseEdit' |
| | | import JobChangeDialog from './components/JobChangeDialog.vue' |
| | | import CloseArchivesDialog from './components/CloseArchivesDialog.vue' |
| | | import AdvancedQuery from './components/AdvancedQuery.vue' |
| | | import ExportDialog from '@/components/ExportEmpBase.vue' |
| | | import dictMixin from '../../utils/dictMixin' |
| | | |
| | | export default { |
| | | components: { |
| | | EmpBaseEdit, |
| | | ArchivesEdit, |
| | | Pagination, Treeselect |
| | | Pagination, |
| | | Treeselect, |
| | | JobChangeDialog, |
| | | CloseArchivesDialog, |
| | | AdvancedQuery, |
| | | ExportDialog |
| | | }, |
| | | mixins: [dictMixin], |
| | | data() { |
| | | return { |
| | | dialog: { |
| | |
| | | empCardStatus: [], |
| | | handbookStatus: [], |
| | | entryType: [], |
| | | empType: [] |
| | | empType: [], |
| | | certificateList: [] |
| | | }, // 查询参数 |
| | | sort: {}, // 排序 |
| | | pagination: { // 分页参数 |
| | |
| | | num: 1 |
| | | }, |
| | | baseicInformationForm: {}, |
| | | empBaseInfoImageUrl: '', |
| | | empBaseInfoForm: { |
| | | imagePath: '', |
| | | empId: '', |
| | | customerId: '', |
| | | archivesNumb: '', |
| | | deptId: null, |
| | | deptName: '', |
| | | empNumb: '', |
| | | allDeptName: '', |
| | | empName: '', |
| | | sex: '1', |
| | | JobId: '', |
| | | jobName: '', |
| | | empType: '01', |
| | | certificateType: '', |
| | | certificateNumb: '', |
| | | nation: '01', |
| | | certificateValidity: '', |
| | | marriage: '1', |
| | | age: '', |
| | | stature: '', |
| | | birthdate: '', |
| | | politics: '13', |
| | | entryDate: '', |
| | | education: '17', |
| | | seniority: '', |
| | | nativePlace: '', |
| | | nativePlaceName: '', |
| | | censusAddress: '', |
| | | currentAddress: '', |
| | | guardNumb: '', |
| | | telePhone: '', |
| | | returnReceipt: '', |
| | | introducer: '', |
| | | archivesStatus: '0', |
| | | bankName: '', |
| | | bankNumb: '', |
| | | insuranceType: '', |
| | | socialNumb: '', |
| | | family: '', |
| | | handbookStatus: '0', |
| | | urgencyPhone: '', |
| | | empCardStatus: '0', |
| | | certificateList: '', |
| | | createTime: '', |
| | | creator: '', |
| | | modifyTime: '', |
| | | modifier: '', |
| | | delFlag: '0', |
| | | empStatus: 0, |
| | | version: '', |
| | | entryType: '20' |
| | | }, |
| | | ygdgForm: { |
| | | empIds: [], |
| | | empNames: [], |
| | | oldDeptNames: [], |
| | | oldJobNames: [], |
| | | changeType: '', |
| | | changeDate: '', |
| | | changeReason: '', |
| | | jobId: '', |
| | | newJobName: '', |
| | | deptId: '', |
| | | newDeptName: '', |
| | | allDeptName: '' |
| | | }, |
| | | gbdaForm: { |
| | | dgryIds: '', |
| | | dimissionType: 1, |
| | | dimissionDate: new Date(), |
| | | remark: '', |
| | | afterOperation: [] |
| | | }, |
| | | isAdd: false, |
| | | currentEmployeeData: {}, |
| | | selectedEmployees: [], |
| | | selectedCloseEmployees: [], |
| | | depts: [], |
| | | fileList: [], |
| | | rules: { |
| | | archivesNumb: [{ required: true, message: '请输入档案号', trigger: 'blur' }, { |
| | | max: 20, |
| | | message: this.$t('rules.noMoreThan20'), |
| | | trigger: 'blur' |
| | | }], |
| | | empName: [{ required: true, message: '请输入姓名', trigger: 'blur' }, |
| | | { min: 2, max: 50, message: this.$t('rules.noMoreThan50'), trigger: 'blur' }], |
| | | empNumb: [{ required: true, message: '请输入员工编号', trigger: 'blur' }, |
| | | { min: 2, max: 20, message: this.$t('rules.noMoreThan20'), trigger: 'blur' }], |
| | | deptName: [ |
| | | { required: true, message: '请选择护卫点', trigger: 'input' } |
| | | ], |
| | | certificateNumb: [{ required: true, message: '请输入身份证号', trigger: 'blur' }], |
| | | jobName: [{ required: true, message: '请选择岗位', trigger: 'change' }], |
| | | nativePlaceName: [{ required: true, message: '请选择籍贯', trigger: 'change' }], |
| | | bankName: [{ required: true, message: '请输入银行名称', trigger: 'blur' }, { |
| | | max: 36, |
| | | message: '长度不超过36个字符', |
| | | trigger: 'blur' |
| | | }], |
| | | insuranceType: [{ required: true, message: '请选择保险类型', trigger: 'change' }], |
| | | entryDate: [{ required: true, message: '请选择入职日期', trigger: 'change' }], |
| | | seniority: [{ required: true, message: '请输入入司工龄', trigger: 'blur' }], |
| | | archivesStatus: [{ required: true, message: '请选择档案情况', trigger: 'change' }], |
| | | bankNumb: [{ required: true, message: '请输入银行账号', trigger: 'blur' }, { |
| | | max: 32, |
| | | message: '长度不超过32个字符', |
| | | trigger: 'blur' |
| | | }], |
| | | empType: [{ required: true, message: '请选择员工类型', trigger: 'change' }], |
| | | censusAddress: [{ max: 128, message: '长度不超过128个字符', trigger: 'blur' }], |
| | | currentAddress: [{ max: 128, message: '长度不超过128个字符', trigger: 'blur' }], |
| | | guardNumb: [{ max: 40, message: '长度不超过40个字符', trigger: 'blur' }], |
| | | telePhone: [{ max: 30, message: '长度不超过30个字符', trigger: 'blur' }], |
| | | returnReceipt: [{ max: 40, message: '长度不超过40个字符', trigger: 'blur' }], |
| | | introducer: [{ max: 32, message: '长度不超过32个字符', trigger: 'blur' }], |
| | | socialNumb: [{ max: 40, message: '长度不超过40个字符', trigger: 'blur' }], |
| | | family: [{ max: 128, message: '长度不超过128个字符', trigger: 'blur' }], |
| | | certificateValidity: [{ required: true, message: '请选择身份证有效期', trigger: 'change' }], |
| | | urgencyPhone: [{ max: 30, message: '长度不超过30个字符', trigger: 'blur' }] |
| | | }, |
| | | gbdaRules: { |
| | | dimissionType: [{ required: true, message: '请选择离职类型', trigger: 'change' }], |
| | | dimissionDate: [{ required: true, message: '请选择关闭日期', trigger: 'change' }], |
| | | selfLeaveDay: [{ required: true, validator: this.validSelfLeaveDay }], |
| | | reporter: [{ required: true, validator: this.validReporter }], |
| | | remark: [{ max: 500, message: '长度不超过500个字符', trigger: 'blur' }] |
| | | }, |
| | | ygdgRules: { |
| | | changeType: [{ required: true, message: '请选择调岗类型', trigger: 'change' }], |
| | | changeDate: [{ required: true, message: '请选择调岗日期', trigger: 'change' }], |
| | | jobId: [{ required: true, message: '请选择现岗位', trigger: 'change' }], |
| | | deptId: [{ required: true, message: '请选择现部门', trigger: 'change' }], |
| | | changeReason: [{ max: 500, message: '长度不超过500个字符', trigger: 'blur' }] |
| | | }, |
| | | restaurants: [{ value: '北京市', code: '110000' }, |
| | | { value: '天津市', code: '120000' }, |
| | | { value: '河北省', code: '130000' }, |
| | | { value: '山西省', code: '140000' }, |
| | | { value: '内蒙古自治区', code: '150000' }, |
| | | { value: '辽宁省', code: '210000' }, |
| | | { value: '吉林省', code: '220000' }, |
| | | { value: '黑龙江省', code: '230000' }, |
| | | { value: '上海市', code: '310000' }, |
| | | { value: '江苏省', code: '320000' }, |
| | | { value: '浙江省', code: '330000' }, |
| | | { value: '安徽省', code: '340000' }, |
| | | { value: '福建省', code: '350000' }, |
| | | { value: '江西省', code: '360000' }, |
| | | { value: '山东省', code: '370000' }, |
| | | { value: '河南省', code: '410000' }, |
| | | { value: '湖北省', code: '420000' }, |
| | | { value: '湖南省', code: '430000' }, |
| | | { value: '广东省', code: '440000' }, |
| | | { value: '广西壮族自治区', code: '450000' }, |
| | | { value: '海南省', code: '460000' }, |
| | | { value: '重庆市', code: '500000' }, |
| | | { value: '四川省', code: '510000' }, |
| | | { value: '贵州省', code: '520000' }, |
| | | { value: '云南省', code: '530000' }, |
| | | { value: '西藏自治区', code: '540000' }, |
| | | { value: '陕西省', code: '610000' }, |
| | | { value: '甘肃省', code: '620000' }, |
| | | { value: '青海省', code: '630000' }, |
| | | { value: '宁夏回族自治区', code: '640000' }, |
| | | { value: '新疆维吾尔自治区', code: '650000' }, |
| | | { value: '台湾省', code: '710000' }, |
| | | { value: '香港特别行政区', code: '810000' }, |
| | | { value: '澳门特别行政区', code: '820000' }], |
| | | restaurJob: [{ value: '总经理', code: '2942725270000031' }, |
| | | { value: '总秘', code: '2942725270000032' }, |
| | | { value: '总助', code: '2942725270000033' }, |
| | | { value: '经理', code: '2942725270000022' }, |
| | | { value: '副经理', code: '2942725270000015' }, |
| | | { value: '助理', code: '2942725270000030' }, |
| | | { value: '项目经理', code: '2942725270000027' }, |
| | | { value: '大队长', code: '2942725270000006' }, |
| | | { value: '大队长兼内勤', code: '2942725270000007' }, |
| | | { value: '中队长', code: '2942725270000029' }, |
| | | { value: '队长', code: '2942725270000011' }, |
| | | { value: '分队长', code: '2942725270000013' }, |
| | | { value: '副队长', code: '2942725270000014' }, |
| | | { value: '班长', code: '2942725270000002' }, |
| | | { value: '保安员', code: '2942725270000003' }, |
| | | { value: '内勤', code: '2942725270000024' }, |
| | | { value: '保洁', code: '2942725270000004' }, |
| | | { value: '电工', code: '2942725270000010' }, |
| | | { value: '绿化工', code: '2942725270000023' }, |
| | | { value: '出纳', code: '2942725270000005' }, |
| | | { value: '人事专员', code: '2942725270000025' }, |
| | | { value: '司机', code: '2942725270000026' }, |
| | | { value: '购买保险', code: '2942725270000016' }, |
| | | { value: '广州燃气中队长', code: '2942725270000018' }, |
| | | { value: '管理员', code: '2942725270000017' }, |
| | | { value: '监控员', code: '2942725270000021' }, |
| | | { value: '员工', code: '2942725270000028' }], |
| | | restaurJob: [], |
| | | headerHeight: '30px', |
| | | advancedQueryShow: false, |
| | | dialogTableVisible: false, |
| | |
| | | dialogShowDryg: false, |
| | | dialogShowGbda: false, |
| | | dialogShowDkda: 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', 'certificateList', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName'], |
| | | checkedCities: [], |
| | | tableData: [], |
| | | selectDimissionType: 1, |
| | | statusOptions: [], |
| | | empTypeOptions: [], |
| | | inTypeOptions: [], |
| | | nationOptions: [], |
| | | marriageOptions: [], |
| | | educationOptions: [], |
| | | nativePlaceOptions: [], |
| | | archivesStatusOptions: [], |
| | | insuranceTypeOptions: [], |
| | | empCardStatusOptions: [], |
| | | handbookStatusOptions: [], |
| | | ecgOptions: [], |
| | | certificateListOptions: [], |
| | | physicalExamTypeOptions: [], |
| | | contractStatusOptions: [], |
| | | leaveTypeOptions: [], |
| | | insuranceGaersOptions: [], |
| | | applayStatusOptions: [], |
| | | reportStatusOptions: [], |
| | | hospitalizatioFlagOptions: [], |
| | | settleStatusOptions: [], |
| | | arbitrationTypeOptions: [], |
| | | changeTypeOptions: [], |
| | | dimissionTypeOptions: [], |
| | | ageStrOptions: [], |
| | | sexOptions: [], |
| | | openArchivesForm: { } |
| | | openArchivesForm: {} |
| | | } |
| | | }, |
| | | computed: { |
| | | // 字典选项计算属性 |
| | | statusOptions() { |
| | | return this.getDictOptions('PLITICAL') |
| | | }, |
| | | |
| | | nationOptions() { |
| | | return this.getDictOptions('NATION') |
| | | }, |
| | | marriageOptions() { |
| | | return this.getDictOptions('MARRIAGE') |
| | | }, |
| | | educationOptions() { |
| | | return this.getDictOptions('EDUCATION') |
| | | }, |
| | | nativePlaceOptions() { |
| | | return this.getDictOptions('NATIVEPLACE') |
| | | }, |
| | | |
| | | insuranceTypeOptions() { |
| | | return this.getDictOptions('INSURANCETYPE') |
| | | }, |
| | | |
| | | physicalExamTypeOptions() { |
| | | return this.getDictOptions('PHYSICALEXAMTYPE') |
| | | }, |
| | | ecgOptions() { |
| | | return this.getDictOptions('ECG') |
| | | }, |
| | | contractStatusOptions() { |
| | | return this.getDictOptions('CONTRACTSTATUS') |
| | | }, |
| | | leaveTypeOptions() { |
| | | return this.getDictOptions('LEAVETYPE') |
| | | }, |
| | | insuranceGaersOptions() { |
| | | return this.getDictOptions('INSURANCETYPE') |
| | | }, |
| | | applayStatusOptions() { |
| | | return this.getDictOptions('applayStatus') |
| | | }, |
| | | reportStatusOptions() { |
| | | return this.getDictOptions('reportStatus') |
| | | }, |
| | | hospitalizatioFlagOptions() { |
| | | return this.getDictOptions('hospitalizatioFlag') |
| | | }, |
| | | settleStatusOptions() { |
| | | return this.getDictOptions('settleStatus') |
| | | }, |
| | | arbitrationTypeOptions() { |
| | | return this.getDictOptions('ZCTYPE') |
| | | }, |
| | | changeTypeOptions() { |
| | | return this.getDictOptions('changeType') |
| | | }, |
| | | dimissionTypeOptions() { |
| | | return this.getDictOptions('LZTYPE') |
| | | }, |
| | | sexOptions() { |
| | | return this.getDictOptions('sex') |
| | | } |
| | | }, |
| | | watch: { |
| | | advancedQueryShow(val) { |
| | | this.headerHeight = val ? 'auto' : '30px' |
| | | } |
| | | }, |
| | | 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('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('insuranceGaers').then(response => { |
| | | this.insuranceGaersOptions = 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 |
| | | }) |
| | | // 字典数据已在登录时预加载,直接从 Vuex 获取 |
| | | this.initDictTypes(['PLITICAL', 'sex', 'NATION', 'MARRIAGE', 'EDUCATION', 'NATIVEPLACE', 'INSURANCETYPE', 'PHYSICALEXAMTYPE', 'ECG', 'CONTRACTSTATUS', 'LEAVETYPE', 'applayStatus', 'reportStatus', 'hospitalizatioFlag', 'settleStatus', 'ZCTYPE', 'changeType', 'LZTYPE']) |
| | | this.initJob() |
| | | }, |
| | | methods: { |
| | |
| | | handbookStatus: [], |
| | | baseKey: '', |
| | | empType: [], |
| | | entryType: [] |
| | | entryType: [], |
| | | certificateList: [] |
| | | } |
| | | this.search() |
| | | }, |
| | |
| | | return '离职' |
| | | case '2': |
| | | return '退休' |
| | | } |
| | | }, |
| | | transEntryType(entryType) { |
| | | switch (entryType) { |
| | | case '20': |
| | | return '新入职' |
| | | case '21': |
| | | return '重新入职' |
| | | case '22': |
| | | return '返聘入职' |
| | | } |
| | | }, |
| | | typeFormat(row, column) { |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | advancedQueryShowMethods() { |
| | | if (this.advancedQueryShow) { |
| | | this.headerHeight = '30px' |
| | | this.advancedQueryShow = false |
| | | } else { |
| | | this.headerHeight = 'auto' |
| | | this.advancedQueryShow = true |
| | | } |
| | | }, |
| | | calculateSeniority(val) { |
| | | this.empBaseInfoForm.seniority = calculateSeniority(val) |
| | | }, |
| | | // 获取图片的Blob值 |
| | | getImageBlob(url, cb) { |
| | | var xhr = new XMLHttpRequest() |
| | | xhr.open('get', url, true) |
| | | xhr.responseType = 'blob' |
| | | xhr.onload = function() { |
| | | if (this.status === 200) { |
| | | if (cb) cb(this.response) |
| | | } |
| | | } |
| | | xhr.send() |
| | | }, |
| | | preView(url) { |
| | | var this_ = this |
| | | const reader = new FileReader() |
| | | this.getImageBlob(url, function(blob) { |
| | | reader.readAsDataURL(blob) |
| | | }) |
| | | reader.onload = function(e) { |
| | | // 获取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,请重新上传') |
| | | } |
| | | }, |
| | | cleanEmpBase() { |
| | | this.empBaseInfoForm.empId = '' |
| | | this.empBaseInfoForm.customerId = '' |
| | | this.empBaseInfoForm.archivesNumb = '' |
| | | this.empBaseInfoForm.deptId = '' |
| | | this.empBaseInfoForm.deptName = '' |
| | | this.empBaseInfoForm.empNumb = '' |
| | | this.empBaseInfoForm.empName = '' |
| | | this.empBaseInfoForm.sex = '' |
| | | this.empBaseInfoForm.JobId = '' |
| | | this.empBaseInfoForm.jobName = '' |
| | | this.empBaseInfoForm.empType = '' |
| | | this.empBaseInfoForm.certificateType = '' |
| | | this.empBaseInfoForm.certificateNumb = '' |
| | | this.empBaseInfoForm.nation = '' |
| | | this.empBaseInfoForm.certificateValidity = '' |
| | | this.empBaseInfoForm.marriage = '' |
| | | this.empBaseInfoForm.age = '' |
| | | this.empBaseInfoForm.stature = '' |
| | | this.empBaseInfoForm.birthdate = '' |
| | | this.empBaseInfoForm.politics = '' |
| | | this.empBaseInfoForm.entryDate = '' |
| | | this.empBaseInfoForm.education = '' |
| | | this.empBaseInfoForm.seniority = '' |
| | | this.empBaseInfoForm.nativePlace = '' |
| | | this.empBaseInfoForm.nativePlaceName = '' |
| | | this.empBaseInfoForm.censusAddress = '' |
| | | this.empBaseInfoForm.currentAddress = '' |
| | | this.empBaseInfoForm.guardNumb = '' |
| | | this.empBaseInfoForm.telePhone = '' |
| | | this.empBaseInfoForm.returnReceipt = '' |
| | | this.empBaseInfoForm.introducer = '' |
| | | this.empBaseInfoForm.archivesStatus = '' |
| | | this.empBaseInfoForm.bankName = '' |
| | | this.empBaseInfoForm.bankNumb = '' |
| | | this.empBaseInfoForm.insuranceType = '' |
| | | this.empBaseInfoForm.socialNumb = '' |
| | | this.empBaseInfoForm.family = '' |
| | | this.empBaseInfoForm.handbookStatus = '' |
| | | this.empBaseInfoForm.urgencyPhone = '' |
| | | this.empBaseInfoForm.empCardStatus = '' |
| | | this.empBaseInfoForm.certificateList = '' |
| | | this.empBaseInfoForm.createTime = '' |
| | | this.empBaseInfoForm.creator = '' |
| | | this.empBaseInfoForm.modifyTime = '' |
| | | this.empBaseInfoForm.modifier = '' |
| | | this.empBaseInfoForm.delFlag = '' |
| | | this.empBaseInfoForm.version = '' |
| | | this.empBaseInfoForm.imagePath = '' |
| | | this.empBaseInfoImageUrl = '' |
| | | }, |
| | | |
| | | editEmpBase(row) { |
| | | console.log(row) |
| | | this.isAdd = false |
| | | this.empBaseInfoForm.empId = row.empId |
| | | this.empBaseInfoForm.customerId = row.customerId |
| | | this.empBaseInfoForm.archivesNumb = row.archivesNumb |
| | | this.empBaseInfoForm.deptId = row.deptId |
| | | this.empBaseInfoForm.deptName = row.deptName |
| | | this.empBaseInfoForm.empNumb = row.empNumb |
| | | this.empBaseInfoForm.empName = row.empName |
| | | this.empBaseInfoForm.sex = row.sex |
| | | this.empBaseInfoForm.JobId = row.JobId |
| | | this.empBaseInfoForm.jobName = row.jobName |
| | | this.empBaseInfoForm.empType = row.empType |
| | | this.empBaseInfoForm.certificateType = row.certificateType |
| | | this.empBaseInfoForm.certificateNumb = row.certificateNumb |
| | | this.empBaseInfoForm.nation = row.nation |
| | | this.empBaseInfoForm.certificateValidity = row.certificateValidity |
| | | this.empBaseInfoForm.marriage = row.marriage |
| | | this.empBaseInfoForm.age = row.age |
| | | this.empBaseInfoForm.stature = row.stature |
| | | this.empBaseInfoForm.birthdate = row.birthdate |
| | | this.empBaseInfoForm.politics = row.politics |
| | | this.empBaseInfoForm.entryDate = row.entryDate |
| | | this.empBaseInfoForm.education = row.education |
| | | this.empBaseInfoForm.seniority = row.seniority |
| | | this.empBaseInfoForm.nativePlace = row.nativePlace |
| | | this.empBaseInfoForm.nativePlaceName = row.nativePlaceName |
| | | this.empBaseInfoForm.censusAddress = row.censusAddress |
| | | this.empBaseInfoForm.currentAddress = row.currentAddress |
| | | this.empBaseInfoForm.guardNumb = row.guardNumb |
| | | this.empBaseInfoForm.telePhone = row.telePhone |
| | | this.empBaseInfoForm.returnReceipt = row.returnReceipt |
| | | this.empBaseInfoForm.introducer = row.introducer |
| | | this.empBaseInfoForm.archivesStatus = row.archivesStatus |
| | | this.empBaseInfoForm.bankName = row.bankName |
| | | this.empBaseInfoForm.bankNumb = row.bankNumb |
| | | this.empBaseInfoForm.insuranceType = row.insuranceType |
| | | this.empBaseInfoForm.insuranceTypeName = row.insuranceTypeName |
| | | this.empBaseInfoForm.socialNumb = row.socialNumb |
| | | this.empBaseInfoForm.family = row.family |
| | | this.empBaseInfoForm.handbookStatus = row.handbookStatus |
| | | this.empBaseInfoForm.urgencyPhone = row.urgencyPhone |
| | | this.empBaseInfoForm.empCardStatus = row.empCardStatus |
| | | let certificateList = [] |
| | | if (row.certificateList && typeof row.certificateList === 'string') { |
| | | certificateList = row.certificateList.split(',') |
| | | row.certificateList = certificateList |
| | | } |
| | | this.empBaseInfoForm.certificateList = row.certificateList |
| | | this.empBaseInfoForm.createTime = row.createTime |
| | | this.empBaseInfoForm.creator = row.creator |
| | | this.empBaseInfoForm.modifyTime = row.modifyTime |
| | | this.empBaseInfoForm.modifier = row.modifier |
| | | this.empBaseInfoForm.delFlag = row.delFlag |
| | | this.empBaseInfoForm.version = row.version |
| | | // this.empBaseInfoImageUrl = '' |
| | | this.empBaseInfoImageUrl = pages.getEmpBaseInfoImage + row.empId + '?t=' + parseInt(100 * Math.random()) |
| | | this.showXzyg(1) |
| | | }, |
| | | putEmpBase(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.submitEmpInfo() |
| | | this.fetch({ |
| | | ...this.queryParams, |
| | | ...this.sort |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.showXzyg() |
| | | } |
| | | }) |
| | | }, |
| | | putEmpBaseContinue(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.submitEmpInfo() |
| | | this.cleanEmpBase() |
| | | this.fetch({ |
| | | ...this.queryParams, |
| | | ...this.sort |
| | | }) |
| | | } |
| | | }) |
| | | this.currentEmployeeData = { ...row } |
| | | this.dialogShowXzyg = true |
| | | }, |
| | | delEmp() { |
| | | var selection = this.$refs.multipleTable.store.states.selection |
| | |
| | | }, |
| | | showXzyg(val) { |
| | | if (val === 0) { |
| | | // this.cleanEmpBase() |
| | | this.isAdd = true |
| | | this.currentEmployeeData = {} |
| | | } |
| | | if (!this.dialogShowXzyg) { |
| | | // this.isAdd = true |
| | | this.dialogShowXzyg = true |
| | | } else { |
| | | // this.isAdd = false |
| | | this.dialogShowXzyg = false |
| | | } |
| | | this.fetch({ |
| | |
| | | ...this.sort |
| | | }) |
| | | }, |
| | | handleCheckAllChange(val) { |
| | | this.checkedCities = val ? this.cityOptions : [] |
| | | this.isIndeterminate = false |
| | | handleEmpSaveSuccess() { |
| | | this.search() |
| | | }, |
| | | handleCheckedCitiesChange(value) { |
| | | const checkedCount = value.length |
| | | this.checkAll = checkedCount === this.cityOptions.length |
| | | this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length |
| | | handleEmployeeExists(data) { |
| | | this.$confirm('该员工已存在,是否修改?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.editEmpBase(data) |
| | | }) |
| | | }, |
| | | 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/exportWithField', { ...params }, '在职员工列表.xls').then(() => { |
| | | this.$message({ |
| | | message: '下载成功!', |
| | | type: 'success' |
| | | }) |
| | | handleNeedOpenArchives(data) { |
| | | const tempName = this.selectDictLabel(this.dimissionTypeOptions, data.dimissionType) |
| | | var msg = '该员工已存在,' + tempName + '状态!\n\r' |
| | | msg += data.remark + '\n\r' |
| | | msg += '由于' + data.empName + '已离职,是否重新打开档案?' |
| | | this.$confirm(msg, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.openArchivesForm = { |
| | | empId: data.empId, |
| | | empName: data.empName, |
| | | certificateNumb: data.certificateNumb, |
| | | openType: 21, |
| | | openDate: this.getDateString(), |
| | | remark: '' |
| | | } |
| | | this.dialogShowDkda = true |
| | | }) |
| | | }, |
| | | handleExportConfirm(selectedFields) { |
| | | var params = { ...this.queryParams } |
| | | params.empStatus = '0' |
| | | params.exportField = selectedFields.join(',') |
| | | this.$download('hr/empBaseInfo/exportWithField', { ...params }, '在职员工列表.xls').then(() => { |
| | | this.$message({ |
| | | message: '下载成功!', |
| | | type: 'success' |
| | | }) |
| | | }) |
| | | }, |
| | | editSuccess() { |
| | | this.search() |
| | | }, |
| | | showYgdg(operate) { |
| | | if (operate === 0) { |
| | | const selection = this.$refs.multipleTable.store.states.selection |
| | | if (selection.length === 0) { |
| | | this.$message({ |
| | | message: '请先选中需要调岗的人员', |
| | | type: 'error' |
| | | }) |
| | | break |
| | | } else { |
| | | this.selectedEmployees = selection |
| | | this.dialogShowYgdg = true |
| | | } |
| | | } |
| | | }, |
| | | showYgdg(operate, formName) { |
| | | switch (operate) { |
| | | case 0: |
| | | var selection = this.$refs.multipleTable.store.states.selection |
| | | if (selection.length === 0) { |
| | | this.$message({ |
| | | message: '请先选中需要调岗的人员', |
| | | type: 'error' |
| | | }) |
| | | } else { |
| | | var ids = [] |
| | | var names = [] |
| | | var deptNames = [] |
| | | var jobNames = [] |
| | | for (var i = 0; i < selection.length; i++) { |
| | | var data = selection[i] |
| | | ids.push(data.empId) |
| | | names.push(data.empName) |
| | | deptNames.push(data.allDeptName) |
| | | jobNames.push(data.jobName) |
| | | } |
| | | this.ygdgForm = { |
| | | empIds: ids.join(','), |
| | | empNames: names.join(','), |
| | | oldDeptNames: deptNames.join(','), |
| | | oldJobNames: jobNames.join(',') |
| | | } |
| | | this.dialogShowYgdg = true |
| | | } |
| | | break |
| | | case 1: |
| | | this.dialogShowYgdg = false |
| | | break |
| | | case 2: |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.$post('hr/empBaseInfo/jobChange', { ...this.ygdgForm }).then(() => { |
| | | this.dialogShowYgdg = false |
| | | this.$message({ |
| | | message: this.$t('员工调岗成功'), |
| | | type: 'success' |
| | | }) |
| | | this.fetch({ |
| | | ...this.queryParams, |
| | | ...this.sort |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | handleJobChangeSuccess() { |
| | | this.search() |
| | | }, |
| | | querySearch(queryString, cb) { |
| | | var restaurants = this.restaurants |
| | | var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants |
| | | // 调用 callback 返回建议列表的数据 |
| | | cb(results) |
| | | }, |
| | | createFilter(queryString) { |
| | | return (restaurant) => { |
| | | return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0) |
| | | } |
| | | }, |
| | | placeNameSelect(item) { |
| | | this.empBaseInfoForm.nativePlaceName = item.value |
| | | this.empBaseInfoForm.nativePlace = item.code |
| | | }, |
| | | deptNameSelect(node) { |
| | | this.ygdgForm.deptId = node.deptId |
| | | this.ygdgForm.newDeptName = node.label |
| | | this.ygdgForm.allDeptName = node.allDeptName |
| | | }, |
| | | querySearchJob(queryString, cb) { |
| | | const restaurants = this.restaurJob |
| | | const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants |
| | | // 调用 callback 返回建议列表的数据 |
| | | cb(results) |
| | | }, |
| | | jobNameSelect(item) { |
| | | this.empBaseInfoForm.jobName = item.value |
| | | this.empBaseInfoForm.JobId = item.code |
| | | |
| | | this.ygdgForm.newJobName = item.value |
| | | this.ygdgForm.jobId = item.code |
| | | }, empDeptNameSelect(val) { |
| | | this.empBaseInfoForm.deptId = val.id |
| | | this.empBaseInfoForm.deptName = val.label |
| | | this.empBaseInfoForm.allDeptName = val.allDeptName |
| | | }, |
| | | generateUserInfo(index, val) { |
| | | var userinfo = toCardGetUserInfo(val) |
| | | if (userinfo === null) { |
| | | return |
| | | } |
| | | this.empBaseInfoForm.age = userinfo.age |
| | | this.empBaseInfoForm.birthdate = userinfo.birth |
| | | this.empBaseInfoForm.sex = userinfo.sex |
| | | handleJobChangeClose() { |
| | | this.selectedEmployees = [] |
| | | }, |
| | | showDryg(operate) { |
| | | switch (operate) { |
| | |
| | | break |
| | | } |
| | | }, |
| | | changeDimissionType(value) { |
| | | this.selectDimissionType = value |
| | | console.log('值:' + value) |
| | | }, |
| | | validSelfLeaveDay(rule, value, callback) { |
| | | const type = this.gbdaForm.dimissionType |
| | | if (type === 2) { |
| | | if (!value) { |
| | | callback(new Error('自动离职时自离天数不能为空!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | validReporter(rule, value, callback) { |
| | | const type = this.gbdaForm.dimissionType |
| | | if (type === 2) { |
| | | if (!value) { |
| | | callback(new Error('自动离职时报告人不能为空!')) |
| | | } else { |
| | | if (value.length > 32) { |
| | | callback(new Error('自动离职时报告人最多32个字符!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | showGbda(operate, formName) { |
| | | switch (operate) { |
| | | case 0: |
| | | var selection = this.$refs.multipleTable.store.states.selection |
| | | if (selection.length === 0) { |
| | | this.$message({ |
| | | message: '请先选中需要关闭档案的人员', |
| | | type: 'error' |
| | | }) |
| | | } else { |
| | | var ids = [] |
| | | var names = [] |
| | | var dates = [] |
| | | var numbers = [] |
| | | for (var i = 0; i < selection.length; i++) { |
| | | var data = selection[i] |
| | | ids.push(data.empId) |
| | | names.push(data.empName) |
| | | dates.push(data.entryDate) |
| | | numbers.push(data.certificateNumb) |
| | | } |
| | | const nowDate = new Date() |
| | | const year = nowDate.getFullYear() |
| | | const month = nowDate.getMonth() + 1 |
| | | const day = nowDate.getDate() |
| | | this.gbdaForm = { |
| | | empIds: ids.join(','), |
| | | dgryNames: names.join(','), |
| | | entryDates: dates.join(','), |
| | | dimissionType: 1, |
| | | dimissionDate: year + '-' + month + '-' + day, |
| | | remark: '', |
| | | afterOperation: ['1'], |
| | | certificateNumb: numbers.join(',') |
| | | } |
| | | this.dialogShowGbda = true |
| | | } |
| | | break |
| | | case 1: |
| | | this.dialogShowGbda = false |
| | | break |
| | | case 2: |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.$post('hr/empBaseInfo/dimission', { ...this.gbdaForm }).then(() => { |
| | | this.dialogShowGbda = false |
| | | this.$message({ |
| | | message: this.$t('员工档案关闭成功'), |
| | | type: 'success' |
| | | }) |
| | | this.fetch({ |
| | | ...this.queryParams, |
| | | ...this.sort |
| | | }) |
| | | }) |
| | | } |
| | | showGbda(operate) { |
| | | if (operate === 0) { |
| | | const selection = this.$refs.multipleTable.store.states.selection |
| | | if (selection.length === 0) { |
| | | this.$message({ |
| | | message: '请先选中需要关闭档案的人员', |
| | | type: 'error' |
| | | }) |
| | | break |
| | | } else { |
| | | this.selectedCloseEmployees = selection |
| | | this.dialogShowGbda = true |
| | | } |
| | | } |
| | | }, |
| | | handleCloseArchivesSuccess() { |
| | | this.search() |
| | | }, |
| | | handleCloseArchivesClose() { |
| | | this.selectedCloseEmployees = [] |
| | | }, |
| | | doDcda() { |
| | | this.$confirm('是否确定要导出档案,请耐心等待?', '提示', { |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | // dic列表转为数组 |
| | | dicListToArr(dicList) { |
| | | var arr = [] |
| | | for (var i = 0; i < dicList.length; i++) { |
| | | var dic = dicList[i] |
| | | arr.push(dic.dicItemCode) |
| | | } |
| | | return arr |
| | | }, |
| | | selectAllSex(val) { |
| | | if (val) { |
| | | this.queryParams.sex = this.dicListToArr(this.sexOptions) |
| | | } else { |
| | | this.queryParams.sex = [] |
| | | } |
| | | }, |
| | | selectAllEducation(val) { |
| | | if (val) { |
| | | this.queryParams.education = this.dicListToArr(this.educationOptions) |
| | | } else { |
| | | this.queryParams.education = [] |
| | | } |
| | | }, |
| | | selectAllPolitics(val) { |
| | | if (val) { |
| | | this.queryParams.politics = this.dicListToArr(this.statusOptions) |
| | | } else { |
| | | this.queryParams.politics = [] |
| | | } |
| | | }, |
| | | selectAllAgeStr(val) { |
| | | if (val) { |
| | | this.queryParams.ageStr = this.dicListToArr(this.ageStrOptions) |
| | | } else { |
| | | this.queryParams.ageStr = [] |
| | | } |
| | | }, |
| | | selectAllArchivesStatus(val) { |
| | | if (val) { |
| | | this.queryParams.archivesStatus = this.dicListToArr(this.archivesStatusOptions) |
| | | } else { |
| | | this.queryParams.archivesStatus = [] |
| | | } |
| | | }, |
| | | selectAllInsuranceType(val) { |
| | | if (val) { |
| | | this.queryParams.insuranceType = this.dicListToArr(this.insuranceTypeOptions) |
| | | } else { |
| | | this.queryParams.insuranceType = [] |
| | | } |
| | | }, |
| | | selectAllEmpCardStatus(val) { |
| | | if (val) { |
| | | this.queryParams.empCardStatus = this.dicListToArr(this.empCardStatusOptions) |
| | | } else { |
| | | this.queryParams.empCardStatus = [] |
| | | } |
| | | }, |
| | | selectAllHandbookStatus(val) { |
| | | if (val) { |
| | | this.queryParams.handbookStatus = this.dicListToArr(this.handbookStatusOptions) |
| | | } else { |
| | | this.queryParams.handbookStatus = [] |
| | | } |
| | | }, |
| | | selectAllEmpType(val) { |
| | | if (val) { |
| | | this.queryParams.empType = this.dicListToArr(this.empTypeOptions) |
| | | } else { |
| | | this.queryParams.empType = [] |
| | | } |
| | | }, |
| | | selectAllEntryType(val) { |
| | | if (val) { |
| | | this.queryParams.entryType = [20, 21, 22] |
| | | } else { |
| | | this.queryParams.entryType = [] |
| | | } |
| | | }, |
| | | |
| | | headers() { |
| | | const token = getToken() |
| | | if (token) { |
| | |
| | | }, |
| | | getDateString() { |
| | | return dateToString(new Date()) |
| | | }, |
| | | submitEmpInfo() { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empBaseInfo/addInEmp', { ...this.empBaseInfoForm }).then((r) => { |
| | | if (r.data != null) { |
| | | if (r.data.data.empStatus === '0') { |
| | | this.$confirm('该员工已存在,是否修改?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.editEmpBase(r.data.data) |
| | | }) |
| | | } else { |
| | | let tempName |
| | | switch (r.data.data.dimissionType) { |
| | | case '1': |
| | | tempName = '合同期满' |
| | | break |
| | | case '2': |
| | | tempName = '公司劝退' |
| | | break |
| | | case '3': |
| | | tempName = '公司辞退' |
| | | break |
| | | case '4': |
| | | tempName = '自动离职' |
| | | break |
| | | case '5': |
| | | tempName = '试用期内' |
| | | break |
| | | case '6': |
| | | tempName = '正常离职' |
| | | break |
| | | } |
| | | var msg = '该员工已存在,' + tempName + '状态!\n\r' |
| | | msg += r.data.data.remark + '\n\r' |
| | | msg += '由于' + r.data.data.empName + '已离职,是否重新打开档案?' |
| | | this.$confirm(msg, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.openArchivesForm = { |
| | | empId: r.data.data.empId, |
| | | empName: r.data.data.empName, |
| | | certificateNumb: r.data.data.certificateNumb, |
| | | openType: 20, |
| | | openDate: this.getDateString(), |
| | | remark: '' |
| | | } |
| | | this.dialogShowDkda = true |
| | | // this.$post('hr/empOpenArchives', { ...this.openArchivesForm }).then(() => { |
| | | // this.$message({ |
| | | // message: this.$t('员工档案打开成功'), |
| | | // type: 'success' |
| | | // }) |
| | | // }) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.updateSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.$emit('success') |
| | | this.cleanEmpBase() |
| | | }) |
| | | } |
| | | }, |
| | | changeSort(val) { |
| | | this.sort.field = val.prop |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | .zzyg-table { |
| | | .el-table th, .el-table td { |
| | | padding: 7px 0; |
| | | } |
| | | } |
| | | |
| | | .fj-checkbox { |
| | | .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: #a32c30;; |
| | | background: #a32c30;; |
| | | } |
| | | |
| | | .el-checkbox__label { |
| | | color: #000 !important; |
| | | } |
| | | } |
| | | @import '@/styles/inemployees-global.scss'; |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .baseinfo .el-container { |
| | | .el-aside { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .el-main { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | } |
| | | |
| | | .el-main { |
| | | height: 600px; |
| | | } |
| | | |
| | | .el-autocomplete { |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-select { |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-aside { |
| | | padding: 20px; |
| | | background: #f3f5f8; |
| | | height: 600px; |
| | | |
| | | .el-tree { |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .searchTable { |
| | | margin-top: 10px; |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | |
| | | tr { |
| | | border-bottom: 1px dashed #d9dadb; |
| | | } |
| | | |
| | | .td { |
| | | width: 90px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .td-group { |
| | | padding-left: 20px; |
| | | } |
| | | } |
| | | |
| | | .searchTable td, |
| | | .searchTable th { |
| | | color: #000; |
| | | height: 50px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | #ygxq table { |
| | | border-collapse: collapse; |
| | | margin: 0 auto; |
| | | text-align: center; |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | #ygxq table td, |
| | | #ygxq table th { |
| | | border: 1px solid #DDDCDC; |
| | | color: #666; |
| | | height: 30px; |
| | | } |
| | | |
| | | #ygxq table thead th { |
| | | background-color: #CCE8EB; |
| | | width: 100px; |
| | | } |
| | | |
| | | #ygxq table tr:nth-child(odd) { |
| | | background: #fff; |
| | | } |
| | | |
| | | #ygxq table tr:nth-child(even) { |
| | | background: #F5FAFA; |
| | | } |
| | | |
| | | .tdTitle { |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | text-align: left; |
| | | } |
| | | |
| | | .link_button { |
| | | color: #169BD5; |
| | | } |
| | | |
| | | .del_button { |
| | | color: #D9001B; |
| | | } |
| | | |
| | | #dcygTable { |
| | | border-collapse: collapse; |
| | | tr { |
| | | width: 100%; |
| | | border-bottom: 1px dashed #ccc; |
| | | >td:nth-child(even) { |
| | | width: 100px; |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | #dcygTable td { |
| | | width: 160px; |
| | | text-align: center; |
| | | height: 35px; |
| | | line-height: 35px; |
| | | font-size: 15px; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .search-btn { |
| | | display: inline-block; |
| | | width: 3.64vw; |
| | | height: 3.2vh; |
| | | line-height: 3.2vh; |
| | | text-align: center; |
| | | background-color: #a00515; |
| | | color: #fff; |
| | | margin-left: 1vw; |
| | | box-sizing: border-box; |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .sup-search-btn { |
| | | display: inline-block; |
| | | width: 5.2vw; |
| | | height: 3.2vh; |
| | | line-height: 3.2vh; |
| | | text-align: center; |
| | | margin-left: 1vw; |
| | | color: #a00515; |
| | | border: 1px solid #a00515; |
| | | box-sizing: border-box; |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | } |
| | | @import '@/styles/inemployees-scoped.scss'; |
| | | </style> |