From 2402f7902663a20fe1b66f4305abb5ba05d7016f Mon Sep 17 00:00:00 2001
From: 孔祥富 <kongxf@daryun.com>
Date: 星期四, 18 三月 2021 16:02:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/user/search.vue |   92 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 65 insertions(+), 27 deletions(-)

diff --git a/src/views/user/search.vue b/src/views/user/search.vue
index c5048d1..e4bf861 100644
--- a/src/views/user/search.vue
+++ b/src/views/user/search.vue
@@ -275,22 +275,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>
@@ -468,6 +471,20 @@
                   <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>
@@ -946,7 +963,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']" />
@@ -1467,7 +1484,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 +1666,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="备注" />
 
@@ -1955,7 +1971,7 @@
   },
   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', 'certificateList', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb'],
       dialogShowDcyg: false,
       isIndeterminate: false,
       checkedCities: [],
@@ -2421,6 +2437,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 +2477,6 @@
     resetSearch() {
       this.queryParams = {
         delFlag: 0,
-        vague: '',
         sex: [],
         education: [],
         politics: [],
@@ -2461,11 +2484,13 @@
         archivesStatus: [],
         insuranceType: [],
         empStatus: [],
+        empType: [],
         baseKey: '',
         empNumb: '',
         empName: '',
         certificateNumb: '',
-        jobContent: ''
+        jobContent: '',
+        inOutType: []
       }
       this.search()
     },
@@ -2616,53 +2641,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 +2708,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 = []
       }
@@ -2809,6 +2843,10 @@
           return '调休假'
       }
     },
+    transDimissionDate(val) {
+      var dimissDate = new Date(val)
+      return dimissDate.getFullYear() === 1900 ? '' : val
+    },
     transPhysicalExamType(physicalExamType) {
       switch (physicalExamType) {
         case '1':

--
Gitblit v1.8.0