luoyb
2021-03-08 559f237a6158fb26dcf36915ba535f5cf7635157
fix(bug修复): 查询条件修改

1.高级查询与关键词查询分开
2.高级查询增加了员工类型和入离职类型
3个文件已修改
132 ■■■■ 已修改文件
src/views/febs/system/dict/dicEdit.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/inemployees.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/outemployess.vue 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/febs/system/dict/dicEdit.vue
@@ -127,7 +127,6 @@
          } else {
            // update
            this.$put('system/dic', { ...this.dic }).then(() => {
              debugger
              this.buttonLoading = false
              this.isVisible = false
              this.$message({
src/views/user/inemployees.vue
@@ -170,11 +170,36 @@
                </tr>
                <tr>
                  <td class="td">员工类型:</td>
                  <td class="td-group" />
                  <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" />
                  <td class="td-group">
                    <el-checkbox-group v-model="queryParams.entryType" class="fj-checkbox">
                      <el-checkbox label="" @change="selectAllEntryType">全部</el-checkbox>
                      <el-checkbox :label="4">新入职</el-checkbox>
                      <el-checkbox :label="5">最新入职</el-checkbox>
                      <el-checkbox :label="6">返聘入职</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>
@@ -862,6 +887,7 @@
      },
      total: 0, // 总数量
      queryParams: {
        baseKey: '',
        empNumb: '',
        vague: '',
        sex: [],
@@ -872,7 +898,9 @@
        insuranceType: [],
        empStatus: [],
        empCardStatus: [],
        handbookStatus: []
        handbookStatus: [],
        entryType: [],
        empType: []
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
@@ -1076,6 +1104,7 @@
      selectDimissionType: 1,
      statusOptions: [],
      empTypeOptions: [],
      inTypeOptions: [],
      nationOptions: [],
      marriageOptions: [],
      educationOptions: [],
@@ -1211,12 +1240,16 @@
        insuranceType: [],
        empStatus: [],
        empCardStatus: [],
        handbookStatus: []
        handbookStatus: [],
        baseKey: '',
        empType: [],
        entryType: []
      }
      this.search()
    },
    // 翻页方法
    search() {
      this.queryParams.vague = ''
      this.fetch({
        ...this.queryParams,
        ...this.sort
@@ -1238,12 +1271,7 @@
    },
    vagueSearch() {
      this.fetch({
        empNumb: this.queryParams.vague,
        empName: this.queryParams.vague,
        deptName: this.queryParams.vague,
        certificateNumb: this.queryParams.vague,
        nativePlaceName: this.queryParams.vague,
        censusAddress: this.queryParams.vague
        baseKey: this.queryParams.vague
      })
    },
    transEmpStatus(empStatus) {
@@ -1913,6 +1941,20 @@
        this.queryParams.handbookStatus = []
      }
    },
    selectAllEmpType(val) {
      if (val) {
        this.queryParams.empType = ['01', '02']
      } else {
        this.queryParams.empType = []
      }
    },
    selectAllEntryType(val) {
      if (val) {
        this.queryParams.entryType = [4, 5, 6]
      } else {
        this.queryParams.entryType = []
      }
    },
    headers() {
      const token = getToken()
      if (token) {
src/views/user/outemployess.vue
@@ -159,11 +159,36 @@
                  </tr>
                  <tr>
                    <td class="td">员工类型:</td>
                    <td class="td-group" />
                    <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" />
                    <td class="td-group">
                      <el-checkbox-group v-model="queryParams.dimissionType" class="fj-checkbox">
                        <el-checkbox label="" @change="selectAllDimissionType">全部</el-checkbox>
                        <el-checkbox :label="1">正常离职</el-checkbox>
                        <el-checkbox :label="2">自动离职</el-checkbox>
                        <el-checkbox :label="3">公司辞退</el-checkbox>
                        <!--                        <el-checkbox-->
                        <!--                          v-for="data in dimissionTypeOptions"-->
                        <!--                          :key="data.dicItemName"-->
                        <!--                          :label="data.dicItemCode"-->
                        <!--                        >-->
                        <!--                          {{ data.dicItemName }}-->
                        <!--                        </el-checkbox>-->
                      </el-checkbox-group>
                    </td>
                  </tr>
                  <!-- <tr>
                    <td class="td">员工状态:</td>
@@ -238,11 +263,7 @@
              {{ transEmpStatus(row.empStatus) }}
            </template>
          </el-table-column>
          <el-table-column prop="dimissionType" label="离职类型" width="80">
            <template slot-scope="{row}">
              {{ transDimissionType(row.dimissionType) }}
            </template>
          </el-table-column>
          <el-table-column prop="dimissionTypeName" label="离职类型" width="80" />
        </el-table>
        <pagination
          v-show="total>0"
@@ -1000,6 +1021,7 @@
      },
      total: 0, // 总数量
      queryParams: {
        baseKey: '',
        empNumb: '',
        vague: '',
        sex: [],
@@ -1008,7 +1030,9 @@
        ageStr: [],
        archivesStatus: [],
        insuranceType: [],
        empStatus: []
        empStatus: [],
        dimissionType: [],
        empType: []
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
@@ -1059,7 +1083,7 @@
    this.getDicts('ageStr').then(response => {
      this.ageStrOptions = response.data
    })
    this.getDicts('empType').then(response => {
    this.getDicts('EMPTYPE').then(response => {
      this.empTypeOptions = response.data
    })
  },
@@ -1091,12 +1115,16 @@
        certificateNumb: '',
        nativePlaceName: '',
        censusAddress: '',
        empStatus: []
        empStatus: [],
        baseKey: '',
        empType: [],
        dimissionType: []
      }
      this.search()
    },
    // 翻页方法
    search() {
      this.queryParams.vague = ''
      this.fetch({
        ...this.queryParams,
        ...this.sort
@@ -1118,12 +1146,7 @@
    },
    vagueSearch() {
      this.fetch({
        empNumb: this.queryParams.vague,
        empName: this.queryParams.vague,
        deptName: this.queryParams.vague,
        certificateNumb: this.queryParams.vague,
        nativePlaceName: this.queryParams.vague,
        censusAddress: this.queryParams.vague
        baseKey: this.queryParams.vague
      })
    },
    transEmpStatus(empStatus) {
@@ -1324,6 +1347,20 @@
        this.queryParams.empStatus = []
      }
    },
    selectAllEmpType(val) {
      if (val) {
        this.queryParams.empType = ['01', '02']
      } else {
        this.queryParams.empType = []
      }
    },
    selectAllDimissionType(val) {
      if (val) {
        this.queryParams.dimissionType = [1, 2, 3]
      } else {
        this.queryParams.dimissionType = []
      }
    },
    doDcbb() {
      this.$confirm('是否确定要导出报表?', '提示', {
        confirmButtonText: '确定',