luoyb
2021-03-02 017fc69cc280304c0ab30db500ff2808c727b4ff
fix(bug修复): 信息录入

https://www.teambition.com/task/6030acc203e3bd00451d120e
3个文件已修改
262 ■■■■■ 已修改文件
src/views/user/inemployees.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/outemployess.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/selectuser.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/inemployees.vue
@@ -1106,7 +1106,10 @@
      this.fetch({
        empNumb: this.queryParams.vague,
        empName: this.queryParams.vague,
        deptName: this.queryParams.vague
        deptName: this.queryParams.vague,
        certificateNumb: this.queryParams.vague,
        nativePlaceName: this.queryParams.vague,
        censusAddress: this.queryParams.vague
      })
    },
    transEmpStatus(empStatus) {
src/views/user/outemployess.vue
@@ -191,8 +191,14 @@
              <!--              <el-button type="text" size="small" @click="editEmpBase(scope.row)">编辑-->
              <!--              </el-button>-->
              <span style="color: #a00515;display: inline-block;width: 50%;cursor: pointer" @click="editArchives(scope.row)">档案</span>
              <span style="color: #a00515;display: inline-block;width: 50%;cursor: pointer" @click="editEmpBase(scope.row)">编辑</span>
              <span
                style="color: #a00515;display: inline-block;width: 50%;cursor: pointer"
                @click="editArchives(scope.row)"
              >档案</span>
              <span
                style="color: #a00515;display: inline-block;width: 50%;cursor: pointer"
                @click="editEmpBase(scope.row)"
              >编辑</span>
            </template>
          </el-table-column>
          <el-table-column show-overflow-tooltip="true" prop="empNumb" label="员工编号" width="100" />
@@ -906,13 +912,19 @@
    </el-dialog>
    <el-dialog title="打开档案" :visible.sync="dialogShowDkda" width="50%">
      <el-form :model="baseicInformationForm" label-position="right" label-width="120px">
      <el-form
        ref="baseicInformationForm"
        :model="baseicInformationForm"
        rules="openArchivesRules"
        label-position="right"
        label-width="120px"
      >
        <el-row>
          <el-col span="24">
            <el-form-item label="打开类型" prop="region">
              <el-radio-group v-model="baseicInformationForm.openType">
                <el-radio :label="1">重新入职</el-radio>
                <el-radio :label="2">返聘</el-radio>
                <el-radio :label="2">重新入职</el-radio>
                <el-radio :label="3">返聘</el-radio>
              </el-radio-group>
              (主要对已退休员工返聘)
            </el-form-item>
@@ -931,8 +943,8 @@
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="showDkda(1)">取 消</el-button>
        <el-button type="primary" @click="showDkda(2)">确 定</el-button>
        <el-button @click="showDkda(1, '')">取 消</el-button>
        <el-button type="primary" @click="showDkda(2, 'baseicInformationForm')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog title="选择员工" :visible.sync="dialogShowXzyg">
@@ -953,6 +965,7 @@
<script>
import Pagination from '@/components/Pagination'
import ArchivesChange from './archivesChange'
export default {
  components: {
    ArchivesChange,
@@ -988,6 +1001,11 @@
      dialogShowDkda: false,
      dialogShowXzyg: false,
      dialogShowXzbm: false,
      openArchivesRules: {
        openType: [{ required: true, message: '请选择打开类型', trigger: 'change' }],
        openDate: [{ required: true, message: '请选择打开日期', trigger: 'change' }],
        remark: [{ max: 500, message: '长度不超过500个字符', trigger: 'blur' }]
      },
      tableData: [],
      baseicInformationForm: {
        openDate: new Date()
@@ -1004,6 +1022,8 @@
    resetSearch() {
      this.queryParams = {
        empNumb: '',
        empName: '',
        deptName: '',
        vague: '',
        sex: [],
        education: [],
@@ -1011,6 +1031,9 @@
        ageStr: [],
        archivesStatus: [],
        insuranceType: [],
        certificateNumb: '',
        nativePlaceName: '',
        censusAddress: '',
        empStatus: []
      }
      this.search()
@@ -1042,7 +1065,10 @@
      this.fetch({
        empNumb: this.queryParams.vague,
        empName: this.queryParams.vague,
        deptName: this.queryParams.vague
        deptName: this.queryParams.vague,
        certificateNumb: this.queryParams.vague,
        nativePlaceName: this.queryParams.vague,
        censusAddress: this.queryParams.vague
      })
    },
    transEmpStatus(empStatus) {
@@ -1114,21 +1140,52 @@
    showEmpInfo() {
      this.dialogTableVisible = true
    },
    showDkda(operate) {
    showDkda(operate, formName) {
      switch (operate) {
        case 0:
          this.dialogShowDkda = true
          var selection = this.$refs.multipleTable.store.states.selection
          if (selection.length === 1) {
            var id = selection[0].empId
            var name = selection[0].empName
            var number = selection[0].certificateNumb
            const nowDate = new Date()
            const year = nowDate.getFullYear()
            const month = nowDate.getMonth() + 1
            const day = nowDate.getDate()
            this.baseicInformationForm = {
              empId: id,
              empName: name,
              certificateNumb: number,
              openType: 2,
              openDate: year + '-' + month + '-' + day,
              remark: ''
            }
            this.dialogShowDkda = true
          } else {
            this.$message({
              message: '请选中一个要打开档案的人员',
              type: 'error'
            })
          }
          break
        case 1:
          this.dialogShowDkda = false
          break
        case 2:
          this.$post('hr/empBaseInfo', { ...this.baseicInformationForm }).then(() => {
            this.dialogShowDkda = false
            this.$message({
              message: this.$t('tips.createSuccess'),
              type: 'success'
            })
          this.$refs[formName].validate((valid) => {
            if (valid) {
              this.$post('hr/empOpenArchives', { ...this.baseicInformationForm }).then(() => {
                this.dialogShowDkda = false
                this.$message({
                  message: this.$t('员工档案打开成功'),
                  type: 'success'
                })
                this.fetch({
                  ...this.queryParams,
                  ...this.sort
                })
              })
            }
          })
          break
      }
@@ -1235,115 +1292,122 @@
</script>
<style lang="scss">
.fj-checkbox{
.fj-checkbox {
  .el-checkbox__input.is-checked .el-checkbox__inner {
      border-color: #a32c30;;
      background: #a32c30;;
    border-color: #a32c30;;
    background: #a32c30;;
  }
  .el-checkbox__label {
    color: #000 !important;
  }
}
</style>
<style lang="scss" scoped>
  .el-main {
    height: 600px;
  }
  .el-aside {
    padding: 20px;
    background: #f3f5f8;
    height: 600px;
.el-main {
  height: 600px;
}
  }
.el-aside {
  padding: 20px;
  background: #f3f5f8;
  height: 600px;
}
.searchTable {
    margin-top: 10px;
    border-collapse: collapse;
    width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  width: 100%;
  tr {
    border-bottom: 1px dashed #d9dadb;
  }
  .td {
    width: 90px;
    text-align: right;
  }
  .td-group {
    padding-left: 20px;
  }
}
.searchTable td,
.searchTable th {
    color: #000;
    height: 50px;
    background-color: #fff;
  color: #000;
  height: 50px;
  background-color: #fff;
}
  #ygxq table {
    border-collapse: collapse;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    margin-top: 20px;
  }
#ygxq table {
  border-collapse: collapse;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  margin-top: 20px;
}
  #ygxq table td,
  #ygxq table th {
    border: 1px solid #DDDCDC;
    color: #666;
    height: 30px;
  }
#ygxq table td,
#ygxq table th {
  border: 1px solid #DDDCDC;
  color: #666;
  height: 30px;
}
  #ygxq table thead th {
    background-color: #CCE8EB;
    width: 100px;
  }
#ygxq table thead th {
  background-color: #CCE8EB;
  width: 100px;
}
  #ygxq table tr:nth-child(odd) {
    background: #fff;
  }
#ygxq table tr:nth-child(odd) {
  background: #fff;
}
  #ygxq table tr:nth-child(even) {
    background: #F5FAFA;
  }
#ygxq table tr:nth-child(even) {
  background: #F5FAFA;
}
  .tdTitle {
    font-size: 14px;
    font-weight: 700;
    text-align: left;
  }
.tdTitle {
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
  .link_button {
    color: #169BD5;
  }
.link_button {
  color: #169BD5;
}
  .del_button {
    color: #D9001B;
  }
.del_button {
  color: #D9001B;
}
  .search-btn {
    display: inline-block;
    width: 3.64vw;
    height: 3.2vh;
    line-height: 3.2vh;
    text-align: center;
    background-color: #a00515;
    color: #fff;
    margin-left: 1vw;
    box-sizing: border-box;
    cursor: pointer;
    vertical-align: middle;
  }
  .sup-search-btn {
    display: inline-block;
    width: 5.2vw;
    height: 3.2vh;
    line-height: 3.2vh;
    text-align: center;
    margin-left: 1vw;
    color: #a00515;
    border: 1px solid #a00515;
    box-sizing: border-box;
    cursor: pointer;
    vertical-align: middle;
  }
.search-btn {
  display: inline-block;
  width: 3.64vw;
  height: 3.2vh;
  line-height: 3.2vh;
  text-align: center;
  background-color: #a00515;
  color: #fff;
  margin-left: 1vw;
  box-sizing: border-box;
  cursor: pointer;
  vertical-align: middle;
}
.sup-search-btn {
  display: inline-block;
  width: 5.2vw;
  height: 3.2vh;
  line-height: 3.2vh;
  text-align: center;
  margin-left: 1vw;
  color: #a00515;
  border: 1px solid #a00515;
  box-sizing: border-box;
  cursor: pointer;
  vertical-align: middle;
}
</style>
src/views/user/selectuser.vue
@@ -116,6 +116,8 @@
        empName: this.queryParams.empNumb,
        deptName: this.queryParams.empNumb,
        certificateNumb: this.queryParams.empNumb,
        nativePlaceName: this.queryParams.empNumb,
        censusAddress: this.queryParams.empNumb,
        empStatus: this.queryParams.empStatus
      })
    },
@@ -124,7 +126,10 @@
        empNumb: '',
        empName: '',
        deptName: '',
        certificateNumb: ''
        certificateNumb: '',
        nativePlaceName: '',
        censusAddress: '',
        empStatus: []
      }
      this.search()
    },