components/machine.vue
@@ -176,16 +176,22 @@ }).then(res => { if (res && res.data && res.data.tbBillList) { this.$showMessage("呼叫成功"); // 局部刷新:重新拉取当前工单状态并更新当前组件数据 this.findByOrderId(); // 如果需要在保存后关闭对话框或返回上一级,可在这里处理 // 方案2:完全刷新当前页面 // 延迟一下让用户看到成功提示 setTimeout(() => { // 方法1:使用 uni.reLaunch 重新加载(推荐) uni.reLaunch({ url: '/' + getCurrentPages()[0].route }); }, 1500); } else { this.$showMessage("呼叫失败"); this.cancel(); } return res; }).catch(err => { // 保持友好的错误提示并将错误抛出以便外部链式处理 console.error('保存失败:', err); this.$showMessage("保存时发生错误"); throw err;