1
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user