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/probation.vue |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/src/views/remind/probation.vue b/src/views/remind/probation.vue
index c3e495d..edde02d 100644
--- a/src/views/remind/probation.vue
+++ b/src/views/remind/probation.vue
@@ -117,16 +117,24 @@
         <el-button @click="dialogIsShow()">取 消</el-button>
       </div>
     </el-dialog>
+    <!-- 通用导出对话框 -->
+    <export-dialog
+      :visible.sync="exportDialogVisible"
+      :selected-fields="exportConfig.selectedFields"
+      @confirm="handleExportConfirm"
+    />
   </div>
 </template>
 <script>
 import Pagination from '@/components/Pagination'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { dateDifference } from '@/utils/myUtil'
+import ExportDialog from '@/components/ExportEmpBase.vue'
 
 export default {
   components: {
-    Pagination
+    Pagination,
+    ExportDialog
   },
   data() {
     return {
@@ -175,6 +183,24 @@
       contractRules: {
         empName: [{ required: true, message: '请选择员工', trigger: 'change' }],
         probationDate: [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
+      exportDialogVisible: false,
+      exportConfig: {
+        selectedFields: [
+          'empNumb', // 员工编号
+          'allDeptName', // 部门 (护卫点)
+          'jobName', // 岗位
+          'empName', // 姓名
+          'certificateNumb', // 身份证号码
+          'birthdate', // 出生日期
+          'insuranceTypeName', // 社保档位
+          'socialNumb', // 社保电脑号
+          'entryDate', // 入职日期
+          'probationDate', // 转正日期
+          'probationStatusName' // 转正状态
+        ],
+        exportUrl: 'hr/empBaseInfo/export/probation', // 需要后端提供接口
+        fileName: '员工转正提醒.xls'
       }
     }
   },
@@ -340,6 +366,27 @@
           })
         }
       })
+    },
+    // 显示导出对话框
+    showDcyg() {
+      this.exportDialogVisible = true
+    },
+    // 确认导出
+    handleExportConfirm(selectedFields) {
+      const params = { ...this.queryParams }
+      params.empStatus = '0'
+      params.exportField = selectedFields.join(',')
+
+      this.$download(
+        this.exportConfig.exportUrl,
+        { ...params },
+        this.exportConfig.fileName
+      ).then(() => {
+        this.$message({
+          message: '下载成功!',
+          type: 'success'
+        })
+      })
     }
   }
 }

--
Gitblit v1.8.0