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() {