From 47951ab5ea0c8ce2de66045a367439e32126c0a0 Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 13 Nov 2025 23:55:31 +0800 Subject: [PATCH] 1 --- src/views/system/erpProduct/index.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/system/erpProduct/index.vue b/src/views/system/erpProduct/index.vue index f9ef0d3..7b96f34 100644 --- a/src/views/system/erpProduct/index.vue +++ b/src/views/system/erpProduct/index.vue @@ -476,12 +476,24 @@ export default { }, /** 提交拉取 */ submitPull() { + if (!this.pullForm.appid) { + this.$modal.msgWarning("请选择ERP账号"); + return; + } this.pulling = true; pullProductList(this.pullForm).then(response => { - this.$modal.msgSuccess(response.msg || "拉取成功"); + if (response.code === 200) { + // 使用msg信息,可能是成功或提示信息 + this.$modal.msgSuccess(response.msg || "拉取成功"); + // 如果拉取成功,刷新列表 + if (response.msg && response.msg.includes("成功拉取并保存") && response.msg.match(/\d+/)) { + this.getList(); + } + } else { + this.$modal.msgError(response.msg || "拉取失败"); + } this.pullDialogVisible = false; this.pulling = false; - this.getList(); }).catch(() => { this.pulling = false; });