From 544c5f2b4390a56eae59376ecbd4955aa1e78a39 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 24 Nov 2025 14:26:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20resignation=E6=94=B9=E6=88=90ticketmixi?= =?UTF-8?q?n=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/hrm/resignation_form.vue | 27 +++++++++++++-------------- src/views/pum/supplieraudit_form.vue | 3 ++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/views/hrm/resignation_form.vue b/src/views/hrm/resignation_form.vue index 96710249..2f022b1b 100644 --- a/src/views/hrm/resignation_form.vue +++ b/src/views/hrm/resignation_form.vue @@ -30,16 +30,22 @@ v-if="localMode=='edit'" style="margin-right: 4px;" @click="handleDel" + :loading="saveLoading" >删除 + 提交审批 @@ -74,12 +80,7 @@ export default { employee_name: "" }, localMode: this.mode, - ticketTitle: "离职申请" - } - }, - watch: { - mode(newVal) { - this.localMode = newVal; + saveLoading: false } }, mounted() { @@ -124,20 +125,18 @@ export default { }) }) }, - async submit_b_func() { + async handleSave() { if (this.localMode == "add") { try { let res = await this.$API.hrm.resignation.create.req(this.formData); - this.ticketTitle = this.formData.employee_name + "的离职申请"; - this.formData.id = res.id; - return res.id; + this.$message.success("提交成功"); + this.$emit('success', this.localMode); } catch (error) { console.error('提交离职申请失败:', error); throw error; } } else if (this.localMode == "edit") { this.$message.error("不支持编辑"); - throw new Error("不支持编辑"); } } } diff --git a/src/views/pum/supplieraudit_form.vue b/src/views/pum/supplieraudit_form.vue index 8c37d64e..cd1d3809 100644 --- a/src/views/pum/supplieraudit_form.vue +++ b/src/views/pum/supplieraudit_form.vue @@ -63,6 +63,7 @@ type="primary" style="margin-right: 4px;" @click="handleSave" + :loading="saveLoading" >提交审批 @@ -137,10 +138,10 @@ export default { this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{ this.saveLoading = true; this.$message.success("提交成功"); + this.$emit('success', this.localMode); }).catch(e=>{ this.saveLoading = false; }) - this.$emit('success', this.localMode); } else if (this.localMode == "edit") { this.$message.error("不支持编辑!") }