孔祥富
2021-03-07 ba6437c466d2580f72e23fb1e5d23b4a776d11cd
提交 档案导出pdf
2个文件已修改
45 ■■■■ 已修改文件
src/views/user/archivesEdit.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/inemployees.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/archivesEdit.vue
@@ -8,6 +8,7 @@
      :close-on-click-modal="false"
      :visible.sync="isVisible"
    >
      <div class="conDetails">
        <div class="menu dadetails">
          <div style="height: 22vh;">
@@ -189,22 +190,29 @@
            <div class="jbxxTitle">
              基本信息
              <el-button
                style="position:absolute;right: 40px"
                style="position:absolute;right: 120px"
                class="filter-item"
                type="primary"
                @click.native="gzupdate"
              >
                编辑
              </el-button>
              <el-button
                v-if="this.readon"
                style="position:absolute;right: 40px"
                style="position:absolute;right: 120px"
                class="filter-item"
                type="primary"
                @click.native="gzupdate1"
              >
                保存
              </el-button>
              <el-button
                style="position:absolute;right: 40px"
                class="filter-item"
                type="primary"
                @click="ExportSavePdf"
              >
                导出
              </el-button>
            </div>
@@ -848,7 +856,7 @@
                <el-table-column show-overflow-tooltip="true" type="index" label="序号" align="center" width="55">
                  <template slot-scope="scope">
                    <span v-text="getIndex(scope.$index)" />
                  </template>
                  </template>EmpLeaveInfo
                </el-table-column>
                <el-table-column show-overflow-tooltip="true" prop="entryDate" label="入职日期" />
                <el-table-column show-overflow-tooltip="true" prop="dimissionDate" label="离职日期" />
@@ -1091,7 +1099,6 @@
                  </template>
                </el-table-column>
                <el-table-column v-if="fsnumShow" show-overflow-tooltip="true" prop="arbitrationId" label="" />
                <el-table-column show-overflow-tooltip="true" prop="arbitrationDate" label="仲裁日期" width="100" />
                <el-table-column show-overflow-tooltip="true" prop="arbitrationDate" label="仲裁日期" width="100" />
                <el-table-column show-overflow-tooltip="true" prop="arbitrationType" label="仲裁类型" :formatter="arbitrationTypeFormat" />
                <el-table-column show-overflow-tooltip="true" prop="arbitrationReason" label="仲裁事由" />
@@ -1372,6 +1379,7 @@
          </div>
        </div>
      </div>
      <el-dialog title="工作经历" append-to-body :visible.sync="dialogshowArr[1].show" width="50%">
        <el-form
          ref="workExperienceForm"
@@ -2687,6 +2695,8 @@
  },
  data() {
    return {
      htmlTitle: 'xx',
      nowTime: '',
      mvrules: {
        labelid: [{ required: true, message: '请选择标签', trigger: 'change' }]
      },
@@ -4139,6 +4149,15 @@
        })
      })
    },
    ExportSavePdf(params = {}) {
      params.pageSize = this.pagination.size
      params.pageNum = this.pagination.num
      params.empNumb = this.empBaseInfoForm.empNumb
      this.$download('hr/pdf/contract', {
        ...params
      }, `${this.empBaseInfoForm.empName}.pdf`)
    },
    initleaveInfoData(params = {}) {
      params.pageSize = this.pagination.size
      params.pageNum = this.pagination.num
src/views/user/inemployees.vue
@@ -1792,14 +1792,22 @@
      }
    },
    doDcda() {
      this.$confirm('是否确定要导出档案?', '提示', {
      this.$confirm('是否确定要导出档案,请耐心等待?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '导出成功!'
        var params = this.queryParams
        this.$post('hr/pdf/exportWithField', {
          ...params
        }).then((r) => {
          debugger
          const data = r.data.data
          for (let i = 0; i < data.length; i++) {
            this.$download('hr/pdf/contract', {
              empNumb: data[i].empNumb
            }, `${data[i].empName}.pdf`)
          }
        })
      }).catch(() => {
        this.$message({