luoyb
2021-04-27 1cab74c1a81df1160f11745b9a53142a21b99d73
src/views/yunpan/fujian.vue
@@ -13,18 +13,18 @@
          </el-col>
        </el-row>
        <el-form v-show="advancedQueryShow" ref="queryform" :model="queryform">
          <el-row>
            <el-col :span="3">员工编号:
              <el-input v-model="queryform.empNumb" size="small" maxlength="20" style="width:85px" />
          <el-row style="margin: 10px 0px;">
            <el-col :span="4">员工编号:
              <el-input v-model="queryform.empNumb" size="small" maxlength="20" style="width:140px" />
            </el-col>
            <el-col :span="3">姓名:
              <el-input v-model="queryform.empName" size="small" maxlength="10" style="width:110px" />
            <el-col :span="4">姓名:
              <el-input v-model="queryform.empName" size="small" maxlength="10" style="width:140px" />
            </el-col>
            <el-col :span="4">身份证号:
              <el-input v-model="queryform.certificateNumb" size="small" maxlength="18" style="width:140px" />
            </el-col>
            <el-col :span="3">护卫点:
              <el-input v-model="queryform.deptName" size="small" maxlength="20" style="width:100px" />
            <el-col :span="4">护卫点:
              <el-input v-model="queryform.deptName" size="small" maxlength="20" style="width:140px" />
            </el-col>
            <el-col :span="8">入职日期:
              <el-date-picker
@@ -40,7 +40,13 @@
                :picker-options="pickerOptions"
              />
            </el-col>
            <el-col :span="3">
          </el-row>
          <el-row>
            <el-col :span="20">
              文件名:
              <el-input v-model="queryform.fileName" size="small" maxlength="20" style="width:140px" />
            </el-col>
            <el-col :span="4">
              <el-button size="mini" class="hr-but-all" type="primary" @click="findEmpAccessoryAll()">查询</el-button>
              <el-button size="mini" class="hr-but" type="danger" @click="resetQueryform()">重置</el-button>
            </el-col>
@@ -97,7 +103,7 @@
                  <td class="td">年龄:</td>
                  <td class="td-group">
                    <el-checkbox-group v-model="queryform.age" class="fj-checkbox">
                      <el-checkbox label="" @change="selectAllage">全部</el-checkbox>
                      <el-checkbox label="" @change="selectAllAgeStr">全部</el-checkbox>
                      <el-checkbox
                        v-for="data in ageStrOptions"
                        :key="data.dicItemName"
@@ -124,7 +130,7 @@
                  </td>
                </tr>
                <tr>
                  <td class="td">保险类型:</td>
                  <td class="td">社保档位:</td>
                  <td class="td-group">
                    <el-checkbox-group v-model="queryform.insuranceType" class="fj-checkbox">
                      <el-checkbox label="" @change="selectAllInsuranceType">全部</el-checkbox>
@@ -202,6 +208,21 @@
                      <el-checkbox :label="4">新入职</el-checkbox>
                      <el-checkbox :label="5">最新入职</el-checkbox>
                      <el-checkbox :label="6">返聘入职</el-checkbox>
                    </el-checkbox-group>
                  </td>
                </tr>
                <tr>
                  <td class="td">相关证件:</td>
                  <td class="td-group">
                    <el-checkbox-group v-model="queryform.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>
@@ -321,8 +342,8 @@
          </el-col>
        </el-row>
        <el-dialog title="附件管理" :visible.sync="dialogShowUploadfj" height="100vh" fullscreen="true" class="fjgl-class" @close="closeDialog()">
          <uploadfj v-if="dialogShowUploadfj" :rowitem="rowitem" />
        <el-dialog title="附件管理" :visible.sync="dialogShowUploadfj" height="100vh" fullscreen class="fjgl-class" @close="closeDialog()">
          <uploadfj v-if="dialogShowUploadfj" :rowitem="rowitem" :tableindex="tableindex" />
        </el-dialog>
        <el-row>
          <el-col :span="21" style="line-height: 50px;">
@@ -334,9 +355,10 @@
          :data="tableData"
          stripe
          border
          :cell-style="{padding:'7px 0','text-align':'center'}"
          :cell-style="{padding:'4.8px 0','text-align':'center'}"
          :header-cell-style="{'height':'5.3vh','background-color':'#e6e6e6','text-align':'center'}"
          style="width: 100%;color: #000;"
          @sort-change="changeSort"
        >
          <el-table-column
            type="selection"
@@ -344,35 +366,28 @@
          />
          <el-table-column label="操作" width="80">
            <template slot-scope="scope">
              <!--              <el-button-->
              <!--                type="text"-->
              <!--                size="small"-->
              <!--                @click.native.prevent="dialogShow(scope.$index, scope.row)"-->
              <!--              >-->
              <!--                上传-->
              <!--              </el-button>-->
              <span
                style="color: #a00515;display: inline-block;width: 50%;cursor: pointer"
                @click="dialogShow(scope.$index, scope.row)"
              >上传</span>
            </template>
          </el-table-column>
          <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="80px" />
          <el-table-column show-overflow-tooltip prop="deptName" label="护卫点(部门)" width="120px" />
          <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="70px" />
          <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="70px" />
          <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号" width="120px" />
          <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="90px" sortable="custom" :sort-orders="['ascending', 'descending']" />
          <el-table-column show-overflow-tooltip prop="deptName" label="护卫点(部门)" width="140px" sortable="custom" :sort-orders="['ascending', 'descending']" />
          <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="90px" sortable="custom" :sort-orders="['ascending', 'descending']" />
          <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="180px" sortable="custom" :sort-orders="['ascending', 'descending']" />
          <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="90px" sortable="custom" :sort-orders="['ascending', 'descending']" />
          <template v-for="(col) in labelData">
            <el-table-column :key="col.labelid" show-overflow-tooltip :prop="col.labelcode" :label="col.labelname">
              <template slot-scope="scope">
                <el-link type="primary"> {{ scope.row[col.labelcode] }}</el-link>
                <el-link type="primary" :class="{ number: scope.row[col.labelcode] !== 0}" @click.native="dialogShow(scope.$index, scope.row, scope.column.property)"> {{ scope.row[col.labelcode] }}</el-link>
              </template>
            </el-table-column>
          </template>
        </el-table>
        <pagination
          v-show="total>0"
          style="text-align: right;width: 98%;"
          :total="total"
          :page.sync="pagination.num"
          :limit.sync="pagination.size"
@@ -392,6 +407,7 @@
  },
  data() {
    return {
      sort: {}, // 排序
      queryCheckAll: {
        sexcheckAll: false,
        sexisIndeterminate: true
@@ -440,7 +456,8 @@
        empCardStatus: [],
        handbookStatus: [],
        empType: [],
        entryType: []
        entryType: [],
        certificateList: []
      },
      total: 0, // 总数量
      pagination: { // 分页参数
@@ -487,6 +504,7 @@
        children: 'children',
        label: 'label'
      },
      tableindex: 0,
      rowitem: {},
      sexOptions: [],
      insuranceTypeOptions: [],
@@ -529,8 +547,16 @@
    this.getDicts('INSURANCETYPE').then(response => {
      this.insuranceTypeOptions = response.data
    })
    this.getDicts('certificateList').then(response => {
      this.certificateListOptions = response.data
    })
  },
  methods: {
    changeSort(val) {
      this.sort.field = val.prop
      this.sort.order = val.order
      this.search()
    },
    closeDialog() {
      this.search()
    },
@@ -610,8 +636,15 @@
        }
      })
    },
    dialogShow(index, tableData) {
      this.rowitem = tableData
    dialogShow(index, tableData, property) {
      var this_ = this
      this_.rowitem = tableData
      this_.labelData.forEach((j) => {
        if (j.labelcode === property) {
          this_.tableindex = this_.labelData.indexOf(j)
        }
      })
      this.dialogShowUploadfj = true
    },
    skipuploadfj() {
@@ -625,6 +658,7 @@
        certificateNumb: '',
        deptName: '',
        entryDate: '',
        fileName: '',
        sex: [],
        education: [],
        politics: [],
@@ -648,12 +682,14 @@
    search() {
      if (this.basic === '') {
        this.fetch({
          ...this.queryform
          ...this.queryform,
          ...this.sort
        })
      } else {
        var params = { basic: this.basic }
        this.fetch({
          ...params
          ...params,
          ...this.sort
        })
      }
    },
@@ -685,77 +721,95 @@
        this.advancedQueryShow = true
      }
    },
    showEmpInfo() {
      this.dialogTableVisible = true
    },
    selectAllSex(val) {
      if (val) {
        this.queryParams.sex = this.dicListToArr(this.sexOptions)
        this.queryform.sex = this.dicListToArr(this.sexOptions)
      } else {
        this.queryParams.sex = []
        this.queryform.sex = []
      }
    },
    selectAllEducation(val) {
      if (val) {
        this.queryParams.education = this.dicListToArr(this.educationOptions)
        this.queryform.education = this.dicListToArr(this.educationOptions)
      } else {
        this.queryParams.education = []
        this.queryform.education = []
      }
    },
    selectAllPolitics(val) {
      if (val) {
        this.queryParams.politics = this.dicListToArr(this.statusOptions)
        this.queryform.politics = this.dicListToArr(this.statusOptions)
      } else {
        this.queryParams.politics = []
        this.queryform.politics = []
      }
    },
    selectAllAgeStr(val) {
      if (val) {
        this.queryParams.ageStr = this.dicListToArr(this.ageStrOptions)
        this.queryform.ageStr = this.dicListToArr(this.ageStrOptions)
      } else {
        this.queryParams.ageStr = []
        this.queryform.ageStr = []
      }
    },
    selectAllArchivesStatus(val) {
      if (val) {
        this.queryParams.archivesStatus = this.dicListToArr(this.archivesStatusOptions)
        this.queryform.archivesStatus = this.dicListToArr(this.archivesStatusOptions)
      } else {
        this.queryParams.archivesStatus = []
        this.queryform.archivesStatus = []
      }
    },
    selectAllInsuranceType(val) {
      if (val) {
        this.queryParams.insuranceType = this.dicListToArr(this.insuranceTypeOptions)
        this.queryform.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 = []
        this.queryform.insuranceType = []
      }
    },
    selectAllEmpType(val) {
      if (val) {
        this.queryParams.empType = this.dicListToArr(this.empTypeOptions)
        this.queryform.empType = this.dicListToArr(this.empTypeOptions)
      } else {
        this.queryParams.empType = []
        this.queryform.empType = []
      }
    },
    selectAllHandbookStatus(val) {
      if (val) {
        this.queryform.handbookStatus = this.dicListToArr(this.handbookStatusOptions)
      } else {
        this.queryform.handbookStatus = []
      }
    },
    selectAllEmpStatus(val) {
      if (val) {
        this.queryform.empStatus = ['0', '1', '2', '3']
      } else {
        this.queryform.empStatus = []
      }
    },
    selectAllEntryType(val) {
      if (val) {
        this.queryParams.entryType = [4, 5, 6]
        this.queryParams.entryType = [20, 21, 22]
      } else {
        this.queryParams.entryType = []
      }
    },
    selectAllEmpCardStatus(val) {
      if (val) {
        this.queryform.empCardStatus = this.dicListToArr(this.empCardStatusOptions)
      } else {
        this.queryform.empCardStatus = []
      }
    },
    selectAllDimissionType(val) {
      if (val) {
        this.queryform.inOutType = this.dicListToArr(this.dimissionTypeOptions)
      } else {
        this.queryform.inOutType = []
      }
    },
    selectAllCertificateList(val) {
      if (val) {
        this.queryform.certificateList = this.dicListToArr(this.certificateListOptions)
      } else {
        this.queryform.certificateList = []
      }
    },
    // dic列表转为数组
@@ -771,6 +825,11 @@
}
</script>
<style lang="scss" scoped>
.number{
  color: #5CB87A;
  font-size: 16px;
  font-weight: 600;
}
.el-main {
   margin-top: 10px;
}
@@ -798,6 +857,9 @@
</style>
<style lang="scss">
.el-image-viewer__btn{
 color: #a00515;
}
.fj-checkbox{
  .el-checkbox__input.is-checked .el-checkbox__inner {
      border-color: #a32c30;;