luoyb
2024-04-22 a7977aac3851fa49a83f0a389221e6b3825dcb0b
src/views/user/search.vue
@@ -43,7 +43,7 @@
            <span :class="thisShowIndex===10?'selectedTimeline':''">工伤案件</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[11].show, 11)">
            <span :class="thisShowIndex===11?'selectedTimeline':''">劳资案件</span>
            <span :class="thisShowIndex===11?'selectedTimeline':''">仲裁案件</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[12].show, 12)">
            <span :class="thisShowIndex===12?'selectedTimeline':''">不良记录</span>
@@ -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,22 +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" />
            <el-table-column show-overflow-tooltip prop="entryTypeName" label="入职日期" width="120" />
            <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>
@@ -415,7 +433,7 @@
                  </td>
                </tr>
                <tr>
                  <td>家庭成员及关系</td>
                  <td>家庭成员及关系1</td>
                  <td>
                    <el-checkbox label="family"><span /></el-checkbox>
                  </td>
@@ -433,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>
@@ -459,15 +477,29 @@
                <tr>
                  <td>相关证件</td>
                  <td>
                    <el-checkbox label="certificateList"><span /></el-checkbox>
                    <el-checkbox label="certificateListName"><span /></el-checkbox>
                  </td>
                  <td>紧急联系电话</td>
                  <td>家庭成员及关系2</td>
                  <td>
                    <el-checkbox label="urgencyPhone"><span /></el-checkbox>
                  </td>
                  <td>员工手册</td>
                  <td>
                    <el-checkbox label="handbookStatusName"><span /></el-checkbox>
                  </td>
                </tr>
                <tr>
                  <td>入职类型</td>
                  <td>
                    <el-checkbox label="entryTypeName"><span /></el-checkbox>
                  </td>
                  <td>离职类型</td>
                  <td>
                    <el-checkbox label="dimissionTypeName"><span /></el-checkbox>
                  </td>
                  <td>编号</td>
                  <td>
                    <el-checkbox label="empNumb"><span /></el-checkbox>
                  </td>
                </tr>
              </el-checkbox-group>
@@ -533,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" />
@@ -699,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">
@@ -752,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>
@@ -891,21 +930,28 @@
            </el-col>
            <el-col :span="4">请假类型:
              <el-select v-model="queryParams.leaveType" style="width:100px">
                <!--                <el-option value="" label="全部" />-->
                <!--                <el-option value="05" label="事假" />-->
                <!--                <el-option value="06" label="病假" />-->
                <!--                <el-option value="07" label="公假" />-->
                <!--                <el-option value="08" label="婚假" />-->
                <!--                <el-option value="09" label="孕假" />-->
                <!--                <el-option value="10" label="产假" />-->
                <!--                <el-option value="11" label="陪产假" />-->
                <!--                <el-option value="12" label="探亲假" />-->
                <!--                <el-option value="13" label="探配偶假" />-->
                <!--                <el-option value="14" label="丧假" />-->
                <!--                <el-option value="15" label="工伤假" />-->
                <!--                <el-option value="16" label="节育假" />-->
                <!--                <el-option value="17" label="年休假" />-->
                <!--                <el-option value="18" label="其它假" />-->
                <el-option value="" label="全部" />
                <el-option value="05" label="事假" />
                <el-option value="06" label="病假" />
                <el-option value="07" label="公假" />
                <el-option value="08" label="婚假" />
                <el-option value="09" label="孕假" />
                <el-option value="10" label="产假" />
                <el-option value="11" label="陪产假" />
                <el-option value="12" label="探亲假" />
                <el-option value="13" label="探配偶假" />
                <el-option value="14" label="丧假" />
                <el-option value="15" label="工伤假" />
                <el-option value="16" label="节育假" />
                <el-option value="17" label="年休假" />
                <el-option value="18" label="其它假" />
                <el-option
                  v-for="dict in leaveTypeOptions"
                  :key="dict.dicItemCode"
                  :label="dict.dicItemName"
                  :value="dict.dicItemCode"
                />
              </el-select>
            </el-col>
            <el-col :span="6">
@@ -946,7 +992,7 @@
            @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="empNumb" label="编号" width="100" 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="jobName" label="岗位" width="100" />
            <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="120" sortable="custom" :sort-orders="['ascending', 'descending']" />
@@ -1160,12 +1206,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">
@@ -1467,7 +1513,6 @@
            <el-table-column show-overflow-tooltip prop="submitTime" label="递交资料时间" width="120" />
            <el-table-column show-overflow-tooltip prop="sbumitBy" label="递交人" width="80" />
            <el-table-column show-overflow-tooltip prop="expensesFee" label="医疗总费用" width="100" />
            <el-table-column show-overflow-tooltip prop="innsureFee" label="保险赔付费用" width="120" />
            <el-table-column show-overflow-tooltip prop="hrDoDate" label="人事处理时间" width="120" />
            <el-table-column show-overflow-tooltip prop="settleStatus" label="状态" width="80" :formatter="settleStatusFormat" />
            <el-table-column show-overflow-tooltip prop="settleDate" label="结案时间" width="100" />
@@ -1650,12 +1695,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="备注" />
@@ -1673,7 +1718,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
@@ -1877,7 +1922,7 @@
                style="width: 350px;"
              />
            </el-col>
            <el-col :span="4">离职类型:
            <el-col :span="4">入离职类型:
              <el-select v-model="queryParams.dimissionType" style="width:150px">
                <el-option
                  v-for="dict in dimissionTypeOptions"
@@ -1925,7 +1970,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']" />
@@ -1955,13 +2000,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'],
      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: [],
@@ -1976,7 +2022,9 @@
        empName: '',
        certificateNumb: '',
        jobContent: '',
        inOutType: []
        inOutType: [],
        certificateList: [],
        deptName: ''
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
@@ -2332,7 +2380,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 => {
@@ -2421,6 +2469,14 @@
    arbitrationStatusFormat(row, column) {
      return this.selectDictLabel(this.settleStatusOptions, row.arbitrationStatus)
    },
    dimissionTypFormat(row, column) {
      switch (row.empStatus) {
        case '0':
          return row.entryTypeName
        case '1':
          return row.dimissionTypeName
      }
    },
    handleCheckedCitiesChange(value) {
      const checkedCount = value.length
      this.checkAll = checkedCount === this.cityOptions.length
@@ -2453,7 +2509,6 @@
    resetSearch() {
      this.queryParams = {
        delFlag: 0,
        vague: '',
        sex: [],
        education: [],
        politics: [],
@@ -2461,11 +2516,15 @@
        archivesStatus: [],
        insuranceType: [],
        empStatus: [],
        empType: [],
        baseKey: '',
        empNumb: '',
        empName: '',
        deptName: '',
        certificateNumb: '',
        jobContent: ''
        jobContent: '',
        inOutType: [],
        certificateList: []
      }
      this.search()
    },
@@ -2616,53 +2675,62 @@
          break
      }
    },
    // 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 = ['1', '2']
        this.queryParams.sex = this.dicListToArr(this.sexOptions)
      } else {
        this.queryParams.sex = []
      }
    },
    selectAllEducation(val) {
      if (val) {
        this.queryParams.education = ['91', '81', '71', '61', '42', '41', '31', '21', '11', '10']
        this.queryParams.education = this.dicListToArr(this.educationOptions)
      } else {
        this.queryParams.education = []
      }
    },
    selectAllPolitics(val) {
      if (val) {
        this.queryParams.politics = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13']
        this.queryParams.politics = this.dicListToArr(this.statusOptions)
      } else {
        this.queryParams.politics = []
      }
    },
    selectAllAgeStr(val) {
      if (val) {
        this.queryParams.ageStr = ['18-29', '30-39', '40-49', '50-59', '60-69', '69-999']
        this.queryParams.ageStr = this.dicListToArr(this.ageStrOptions)
      } else {
        this.queryParams.ageStr = []
      }
    },
    selectAllArchivesStatus(val) {
      if (val) {
        this.queryParams.archivesStatus = ['0', '1']
        this.queryParams.archivesStatus = this.dicListToArr(this.archivesStatusOptions)
      } else {
        this.queryParams.archivesStatus = []
      }
    },
    selectAllInsuranceType(val) {
      if (val) {
        this.queryParams.insuranceType = ['1', '2', '3', '4', '5']
        this.queryParams.insuranceType = this.dicListToArr(this.insuranceTypeOptions)
      } else {
        this.queryParams.insuranceType = []
      }
    },
    selectAllEmpType(val) {
      if (val) {
        this.queryParams.insuranceType = ['1', '2']
        this.queryParams.empType = this.dicListToArr(this.empTypeOptions)
      } else {
        this.queryParams.insuranceType = []
        this.queryParams.empType = []
      }
    },
    selectAllEmpStatus(val) {
@@ -2674,7 +2742,7 @@
    },
    selectAllDimissionType(val) {
      if (val) {
        this.queryParams.inOutType = ['1', '2', '3', '4', '5', '6']
        this.queryParams.inOutType = this.dicListToArr(this.dimissionTypeOptions)
      } else {
        this.queryParams.inOutType = []
      }
@@ -2761,7 +2829,7 @@
      params.pageNum = this.pagination.num
      this.$download('hr/empLaborTrouble/export', {
        ...params, ...this.queryParams
      }, `劳资案件_${new Date().getTime()}.xlsx`)
      }, `仲裁案件_${new Date().getTime()}.xlsx`)
    },
    blexportExcel(params = {}) {
      params.pageSize = this.pagination.size
@@ -2808,6 +2876,10 @@
        case '3':
          return '调休假'
      }
    },
    transDimissionDate(val) {
      var dimissDate = new Date(val)
      return dimissDate.getFullYear() === 1900 ? '' : val
    },
    transPhysicalExamType(physicalExamType) {
      switch (physicalExamType) {
@@ -2910,6 +2982,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