From 42bc028585380de36f5eeb72a4d6436698520df9 Mon Sep 17 00:00:00 2001 From: TianyangZhang Date: Wed, 4 Mar 2026 16:36:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:gx-hrm=20=E4=BA=BA=E5=91=98=E8=BD=AC?= =?UTF-8?q?=E6=AD=A3=E7=AD=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/hrm.js | 81 +++++++- src/views/hrm/contract.vue | 66 +++++++ src/views/hrm/contract_form.vue | 311 +++++++++++++++++++++++++++++++ src/views/hrm/employee.vue | 65 +++++++ src/views/hrm/leave.vue | 2 +- src/views/hrm/probation.vue | 119 ++++++++++++ src/views/hrm/probation_form.vue | 239 ++++++++++++++++++++++++ src/views/hrm/transfer_form.vue | 4 +- src/views/ofm/archive.vue | 13 +- 9 files changed, 887 insertions(+), 13 deletions(-) create mode 100644 src/views/hrm/contract.vue create mode 100644 src/views/hrm/contract_form.vue create mode 100644 src/views/hrm/probation.vue create mode 100644 src/views/hrm/probation_form.vue diff --git a/src/api/model/hrm.js b/src/api/model/hrm.js index c1cd53a9..04617bae 100644 --- a/src/api/model/hrm.js +++ b/src/api/model/hrm.js @@ -58,8 +58,15 @@ export default { name: "导出", req: async function(data){ return await http.get( - `${config.API_URL}/hrm/employee/export_excel/`, - data + `${config.API_URL}/hrm/employee/export_excel/`, data + ); + } + }, + import_excel: { + name: "导入", + req: async function(data){ + return await http.post( + `${config.API_URL}/hrm/employee/import_excel/`, data ); } } @@ -266,6 +273,41 @@ export default { } }, }, + empperson: { + list: { + name: "人员入职信息", + req: async function(data){ + return await http.get( + `${config.API_URL}/hrm/empperson/`, + data + ); + } + }, + item: { + name: "人员申请", + req: async function(id){ + return await http.get( + `${config.API_URL}/hrm/empperson/${id}/`, + ); + } + }, + create: { + name: "人员新增", + req: async function(data){ + return await http.post( + `${config.API_URL}/hrm/empperson/`, + data); + } + }, + delete: { + name: "人员删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/hrm/empperson/${id}/` + ); + } + }, + }, leave: { list: { name: "人员请假", @@ -336,4 +378,39 @@ export default { } }, }, + probation: { + list: { + name: "人员转正", + req: async function(data){ + return await http.get( + `${config.API_URL}/hrm/probation/`, + data + ); + } + }, + item: { + name: "人员转正申请", + req: async function(id){ + return await http.get( + `${config.API_URL}/hrm/probation/${id}/`, + ); + } + }, + create: { + name: "人员转正新增", + req: async function(data){ + return await http.post( + `${config.API_URL}/hrm/probation/`, + data); + } + }, + delete: { + name: "人员转正删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/hrm/probation/${id}/` + ); + } + }, + }, } diff --git a/src/views/hrm/contract.vue b/src/views/hrm/contract.vue new file mode 100644 index 00000000..f3d921d5 --- /dev/null +++ b/src/views/hrm/contract.vue @@ -0,0 +1,66 @@ + + \ No newline at end of file diff --git a/src/views/hrm/contract_form.vue b/src/views/hrm/contract_form.vue new file mode 100644 index 00000000..9d1ea8df --- /dev/null +++ b/src/views/hrm/contract_form.vue @@ -0,0 +1,311 @@ + + + \ No newline at end of file diff --git a/src/views/hrm/employee.vue b/src/views/hrm/employee.vue index ce0ed742..763f2b46 100644 --- a/src/views/hrm/employee.vue +++ b/src/views/hrm/employee.vue @@ -73,6 +73,43 @@ icon="el-icon-download" @click="exportExcel" >导出 + 导入 + + + + 选择文件 + + + + + @@ -278,8 +315,14 @@ export default { save: false, permission: false, }, + importFilePath:'', deptData: [], apiObj: this.$API.hrm.employee.list, + importApiObj: { + post: (formData) => { + return this.$API.hrm.employee.import_excel.req(formData) + } + }, query: {}, tdevice: [], selection: [], @@ -288,6 +331,8 @@ export default { }, dis: false, showBindBlt: false, + importVisible: false, + cLoading: false, bltList: [], bindName: "", bindType: 10, @@ -338,6 +383,25 @@ export default { }); this.deptData = genTree(res); }, + submitImport() { + if (!this.importFilePath) { + this.$message.warning('请先选择并上传文件') + return + } + this.cLoading = true + this.$API.hrm.employee.import_excel.req({ + file_path: this.importFilePath + }) + .then(() => { + this.$message.success('导入成功') + this.importVisible = false + this.$refs.table.refresh() + this.importFilePath = '' // 可选:清空 + }) + .finally(() => { + this.cLoading = false + }) + }, //人员证书添加 // Addcertificate(row) { // this.$router.push({ @@ -480,6 +544,7 @@ export default { console.log(that.bltList); }); }, + handleBindBlt(type, row) { // this.dis = false; debugger; diff --git a/src/views/hrm/leave.vue b/src/views/hrm/leave.vue index 4670e5d4..b1dd758f 100644 --- a/src/views/hrm/leave.vue +++ b/src/views/hrm/leave.vue @@ -45,7 +45,7 @@ :query="query" @row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}" > - + diff --git a/src/views/hrm/probation.vue b/src/views/hrm/probation.vue new file mode 100644 index 00000000..babf9b03 --- /dev/null +++ b/src/views/hrm/probation.vue @@ -0,0 +1,119 @@ + + \ No newline at end of file diff --git a/src/views/hrm/probation_form.vue b/src/views/hrm/probation_form.vue new file mode 100644 index 00000000..e780677d --- /dev/null +++ b/src/views/hrm/probation_form.vue @@ -0,0 +1,239 @@ + + + \ No newline at end of file diff --git a/src/views/hrm/transfer_form.vue b/src/views/hrm/transfer_form.vue index 93905a33..9d1ea8df 100644 --- a/src/views/hrm/transfer_form.vue +++ b/src/views/hrm/transfer_form.vue @@ -13,7 +13,6 @@ - @@ -230,7 +229,7 @@ export default { }, watch: { formData: { - handler(val){ + handle(val){ Object.assign(this.ticket_data,{ original_slary: val.original_slary, new_slary: val.new_slary, @@ -307,7 +306,6 @@ export default { this.formData.start_date = obj.start_date; } }, - } } \ No newline at end of file diff --git a/src/views/ofm/archive.vue b/src/views/ofm/archive.vue index 11d03faf..dbf50b70 100644 --- a/src/views/ofm/archive.vue +++ b/src/views/ofm/archive.vue @@ -108,27 +108,26 @@ - + - + - + - + - + - +