From 0e138cfdff8eadc29dc6b80162dd24961edf8408 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 4 Jul 2025 16:45:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E6=A3=80=E9=A3=9F=E5=A0=82=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pointsDistribution/bulkSubsidy.vue | 2 +- src/views/canteen/transfer/index.vue | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/views/canteen/pointsDistribution/bulkSubsidy.vue b/src/views/canteen/pointsDistribution/bulkSubsidy.vue index 2ea5575c..cfcf8236 100644 --- a/src/views/canteen/pointsDistribution/bulkSubsidy.vue +++ b/src/views/canteen/pointsDistribution/bulkSubsidy.vue @@ -20,7 +20,7 @@ diff --git a/src/views/canteen/transfer/index.vue b/src/views/canteen/transfer/index.vue index 38ec4ab4..7f89683f 100644 --- a/src/views/canteen/transfer/index.vue +++ b/src/views/canteen/transfer/index.vue @@ -445,14 +445,22 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm(`是否确认删除${row.userName}该条食堂客户调岗记录`).then(function () { - return delTransfer(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => { - }); + this.$modal.confirm(`是否确认删除${row.userName}的调岗记录?删除后原先调岗将会还原!`) + .then(() => delTransfer(row)) // 箭头函数保持 this + .then(async () => { + await this.initDeptUserTree(); // 先更新人员树 + await this.getList(); // 再刷新列表数据 + this.$modal.msgSuccess("删除成功"); + }) + .then(() => { + this.$modal.msgSuccess("删除成功"); + }) + .catch((error) => { + if (error !== 'cancel') { // 避免用户取消报错 + console.error("删除失败:", error); + this.$modal.msgError(`删除失败: ${error.message || '未知错误'}`); + } + }); }, /** 导出按钮操作 */ handleExport() {