luoyb
2021-05-31 c04855f1bc20795816a0341e7b61ca5d160b69bd
src/views/user/search.vue
@@ -193,7 +193,7 @@
                </td>
              </tr>
              <tr>
                <td class="td">保险类型:</td>
                <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>
@@ -248,6 +248,21 @@
                  </el-checkbox-group>
                </td>
              </tr>
              <tr>
                <td class="td">相关证件:</td>
                <td class="td-group">
                  <el-checkbox-group v-model="queryParams.certificateList" class="fj-checkbox">
                    <el-checkbox label="" @change="selectAllCertificateList">全部</el-checkbox>
                    <el-checkbox
                      v-for="data in certificateListOptions"
                      :key="data.dicItemName"
                      :label="data.dicItemCode"
                    >
                      {{ data.dicItemName }}
                    </el-checkbox>
                  </el-checkbox-group>
                </td>
              </tr>
            </table>
          </div>
          <el-row>
@@ -275,21 +290,25 @@
            <el-table-column show-overflow-tooltip prop="allDeptName" label="(部门)护卫点" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="100" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="180" />
            <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="180" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="sex" label="性别" width="60" :formatter="sexFormat" />
            <el-table-column show-overflow-tooltip prop="age" label="年龄" width="60" />
            <el-table-column show-overflow-tooltip prop="education" label="学历" width="80" :formatter="educationFormat" />
            <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="100" :formatter="educationFormat" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="nativePlace" label="籍贯" width="80" :formatter="nativePlaceFormat" />
            <el-table-column show-overflow-tooltip prop="empType" label="员工类型" width="100" :formatter="empTypeFormat" />
            <el-table-column show-overflow-tooltip prop="telePhone" label="电话" width="120" />
            <el-table-column show-overflow-tooltip prop="empStatus" label="员工状态" width="100">
            <el-table-column show-overflow-tooltip prop="empStatus" label="员工状态" width="120" sortable="custom" :sort-orders="['ascending', 'descending']">
              <template slot-scope="{row}">
                {{ transEmpStatus(row.empStatus) }}
              </template>
            </el-table-column>
            <el-table-column show-overflow-tooltip prop="dimissionTypeName" label="入离职类型" width="100" :formatter="dimissionTypFormat" />
            <el-table-column show-overflow-tooltip prop="dimissionType" label="入离职类型" width="120" :formatter="dimissionTypFormat" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="entryDate" label="入职日期" width="120" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="dimissionDate" label="离职日期" width="120" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="dimissionDate" label="离职日期" width="120" sortable="custom" :sort-orders="['ascending', 'descending']">
              <template slot-scope="{row}">
                {{ transDimissionDate(row.dimissionDate) }}
              </template>
            </el-table-column>
          </el-table>
          <el-dialog title="导出员工" :visible.sync="dialogShowDcyg" width="40%" style="font-weight: 700;">
            <div style="font-size: 16px;font-weight: 400;height: 35px;margin-top: -30px;color: #409EFF;">请勾选需要导出的字段</div>
@@ -432,7 +451,7 @@
                  <td>
                    <el-checkbox label="entryDate"><span /></el-checkbox>
                  </td>
                  <td>保险类型</td>
                  <td>社保档位</td>
                  <td>
                    <el-checkbox label="InsuranceTypeName"><span /></el-checkbox>
                  </td>
@@ -458,7 +477,7 @@
                <tr>
                  <td>相关证件</td>
                  <td>
                    <el-checkbox label="certificateList"><span /></el-checkbox>
                    <el-checkbox label="certificateListName"><span /></el-checkbox>
                  </td>
                  <td>紧急联系电话</td>
                  <td>
@@ -477,6 +496,10 @@
                  <td>离职类型</td>
                  <td>
                    <el-checkbox label="dimissionTypeName"><span /></el-checkbox>
                  </td>
                  <td>编号</td>
                  <td>
                    <el-checkbox label="empNumb"><span /></el-checkbox>
                  </td>
                </tr>
              </el-checkbox-group>
@@ -542,7 +565,7 @@
            <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="100" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="160" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="220" />
            <el-table-column show-overflow-tooltip prop="sex" label="性别" width="80" :formatter="sexFormat" />
            <el-table-column show-overflow-tooltip prop="sex" label="性别" width="80" />
            <el-table-column show-overflow-tooltip prop="workUnit" label="工作单位" width="220" />
            <el-table-column show-overflow-tooltip prop="beginDate" label="开始日期" width="150" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="endDate" label="结束日期" width="150" />
@@ -708,10 +731,16 @@
            <el-col :span="9">合同状态:
              <el-select v-model="queryParams.contractStatus" style="width:200px">
                <el-option value="" label="全部" />
                <el-option :value="1" label="有效" />
                <el-option :value="2" label="到期" />
                <el-option :value="3" label="续签" />
                <el-option :value="4" label="存档" />
                <!--                <el-option :value="1" label="有效" />-->
                <!--                <el-option :value="2" label="到期" />-->
                <!--                <el-option :value="3" label="续签" />-->
                <!--                <el-option :value="4" label="存档" />-->
                <el-option
                  v-for="dict in contractStatusOptions"
                  :key="dict.dicItemCode"
                  :label="dict.dicItemName"
                  :value="dict.dicItemCode"
                />
              </el-select>
            </el-col>
            <el-col :span="6">
@@ -761,6 +790,7 @@
            <el-table-column show-overflow-tooltip prop="contractPeriod" label="合同期限(年)" width="120" />
            <el-table-column show-overflow-tooltip prop="contractStatus" label="合同状态" width="120" :formatter="contractStatusFormat" />
            <el-table-column show-overflow-tooltip prop="transactor" label="合同办理人" width="180" />
            <el-table-column show-overflow-tooltip prop="remark" label="备注" width="180" />
          </el-table>
        </div>
@@ -1169,12 +1199,12 @@
          <el-row>
            <el-col :span="4">社保档位:
              <el-select v-model="queryParams.insuranceGaers" style="width:100px">
                <el-option value="" label="全部" />
                <el-option value="1" label="深户(五险一档)" />
                <el-option value="2" label="非深户(五险一档)" />
                <el-option value="3" label="非深户(五险二档)" />
                <el-option value="4" label="非深户(五险三档)" />
                <el-option value="5" label="非深户(四险三档)" />
                <el-option
                  v-for="dict in insuranceTypeOptions"
                  :key="dict.dicItemCode"
                  :label="dict.dicItemName"
                  :value="dict.dicItemCode"
                />
              </el-select>
            </el-col>
            <el-col :span="6">
@@ -1658,12 +1688,12 @@
            @sort-change="changeSort"
          >
            <el-table-column type="index" label="序号" width="50" align="center" />
            <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="100" />
            <el-table-column show-overflow-tooltip prop="allDeptName" label="(部门)护卫点" width="300" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="140" />
            <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="180" />
            <el-table-column show-overflow-tooltip prop="badDate" label="不良记录日期" width="140" />
            <el-table-column show-overflow-tooltip prop="badContent" label="不良记录描述" />
            <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="120" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="allDeptName" label="(部门)护卫点" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="160" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="200" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="badDate" label="不良记录日期" width="160" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="badContent" label="不良记录描述" width="300" />
            <el-table-column show-overflow-tooltip prop="reporter" label="汇报人" width="100" />
            <el-table-column show-overflow-tooltip prop="remark" label="备注" />
@@ -1681,7 +1711,7 @@
              <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-input v-model="queryParams.allDeptName" size="small" maxlength="20" style="width:100px" />
            </el-col>
            <el-col :span="9">备注日期:
              <el-date-picker
@@ -1933,7 +1963,7 @@
          >
            <el-table-column type="selection" width="55" />
            <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="120" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="newDeptName" label="(部门)护卫点" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="allDeptName" label="(部门)护卫点" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="newJobName" label="岗位" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="180" sortable="custom" :sort-orders="['ascending', 'descending']" />
            <el-table-column show-overflow-tooltip prop="entryDate" label="入职日期" width="140" sortable="custom" :sort-orders="['ascending', 'descending']" />
@@ -1963,13 +1993,14 @@
  },
  data() {
    return {
      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'],
      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'],
      dialogShowDcyg: false,
      isIndeterminate: false,
      checkedCities: [],
      checkAll: false,
      total: 0, // 总数量
      queryParams: {
        allDeptName: '',
        vague: '',
        sex: [],
        education: [],
@@ -1984,7 +2015,9 @@
        empName: '',
        certificateNumb: '',
        jobContent: '',
        inOutType: []
        inOutType: [],
        certificateList: [],
        deptName: ''
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
@@ -2340,7 +2373,7 @@
    this.getDicts('LEAVETYPE').then(response => {
      this.leaveTypeOptions = response.data
    })
    this.getDicts('insuranceGaers').then(response => {
    this.getDicts('INSURANCETYPE').then(response => {
      this.insuranceGaersOptions = response.data
    })
    this.getDicts('applayStatus').then(response => {
@@ -2480,9 +2513,11 @@
        baseKey: '',
        empNumb: '',
        empName: '',
        deptName: '',
        certificateNumb: '',
        jobContent: '',
        inOutType: []
        inOutType: [],
        certificateList: []
      }
      this.search()
    },
@@ -2835,6 +2870,10 @@
          return '调休假'
      }
    },
    transDimissionDate(val) {
      var dimissDate = new Date(val)
      return dimissDate.getFullYear() === 1900 ? '' : val
    },
    transPhysicalExamType(physicalExamType) {
      switch (physicalExamType) {
        case '1':
@@ -2936,6 +2975,13 @@
          return '调动'
      }
    },
    selectAllCertificateList(val) {
      if (val) {
        this.queryParams.certificateList = this.dicListToArr(this.certificateListOptions)
      } else {
        this.queryParams.certificateList = []
      }
    },
    changeSort(val) {
      this.sort.field = val.prop
      this.sort.order = val.order