From 757c9e97c980118cabb5a2a08c4fd35bbbcaa062 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期二, 10 三月 2026 21:23:26 +0800
Subject: [PATCH] feat(remind): 优化合同和保险提醒页面的导出功能
---
src/views/remind/contract.vue | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/views/remind/contract.vue b/src/views/remind/contract.vue
index c05541b..f6c487a 100644
--- a/src/views/remind/contract.vue
+++ b/src/views/remind/contract.vue
@@ -11,7 +11,7 @@
<el-main style="height: 85%;">
<el-row style="margin: 10px 0 10px 0;">
<el-col :span="24">
- <el-button type="primary" class="hr-but-all" @click="showDcyg(0)">导出EXCEL</el-button>
+ <el-button type="primary" class="hr-but-all" @click="handleExport">导出 EXCEL</el-button>
</el-col>
</el-row>
<el-table
@@ -36,10 +36,10 @@
>不续签</span>
</template>
</el-table-column>
- <el-table-column show-overflow-tooltip prop="empNumb" label="员工编号" />
- <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" width="300" />
- <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="80" />
- <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="100" />
+ <el-table-column show-overflow-tooltip prop="empNumb" label="员工编号" width="120" />
+ <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" width="320" />
+ <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="120" />
+ <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="120" />
<el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="160" />
<el-table-column show-overflow-tooltip prop="signingDate" label="合同签订日期" width="110" />
<el-table-column show-overflow-tooltip prop="endDate" label="合同结束日期" width="110" />
@@ -51,7 +51,7 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="transactor" label="合同办理人" width="100" />
- <el-table-column show-overflow-tooltip prop="remark" label="备注" width="160" />
+ <el-table-column show-overflow-tooltip prop="remark" label="备注" />
</el-table>
<pagination
v-show="total>0"
@@ -226,6 +226,23 @@
beginDate: [{ required: true, message: '请选择合同开始日期', trigger: 'change' }],
endDate: [{ required: true, validator: this.endDate }],
remark: [{ max: 512, message: '长度不超过512个字符', trigger: 'blur' }]
+ },
+ exportConfig: {
+ selectedFields: [
+ 'empNumb', // 从 table 列提取
+ 'allDeptName',
+ 'jobName',
+ 'empName',
+ 'certificateNumb',
+ 'signingDate',
+ 'endDate',
+ 'contractPeriod',
+ 'diffDay',
+ 'transactor',
+ 'remark'
+ ],
+ exportUrl: 'hr/empContractInfo/export',
+ fileName: '合同到期提醒.xls'
}
}
},
@@ -374,6 +391,24 @@
})
}
})
+ },
+ // 导出合同信息
+ handleExport() {
+ const params = { ...this.queryParams }
+ params.delFlag = 0
+ params.empStatus = 0
+ params.exportField = this.exportConfig.selectedFields.join(',')
+
+ this.$download(
+ 'hr/empContractInfo/export',
+ params,
+ '合同到期提醒.xls'
+ ).then(() => {
+ this.$message({
+ message: '下载成功!',
+ type: 'success'
+ })
+ })
}
}
}
--
Gitblit v1.8.0