This commit is contained in:
Leo
2025-11-13 23:55:31 +08:00
parent a07452ea8b
commit 47951ab5ea

View File

@@ -476,12 +476,24 @@ export default {
},
/** 提交拉取 */
submitPull() {
if (!this.pullForm.appid) {
this.$modal.msgWarning("请选择ERP账号");
return;
}
this.pulling = true;
pullProductList(this.pullForm).then(response => {
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;
});