From 101b3dae54c1ca6829cc10748649550823241ac3 Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 14 Nov 2025 00:02:45 +0800 Subject: [PATCH] 1 --- src/api/system/erpProduct.js | 11 ++- src/views/system/erpProduct/index.vue | 102 +++++++++++++------------- 2 files changed, 63 insertions(+), 50 deletions(-) diff --git a/src/api/system/erpProduct.js b/src/api/system/erpProduct.js index 1f38d28..2bf40e8 100644 --- a/src/api/system/erpProduct.js +++ b/src/api/system/erpProduct.js @@ -43,7 +43,7 @@ export function delErpProduct(ids) { }) } -// 拉取商品列表 +// 拉取商品列表(单页,兼容) export function pullProductList(data) { return request({ url: '/jarvis/erpProduct/pull', @@ -52,6 +52,15 @@ export function pullProductList(data) { }) } +// 全量同步商品(自动遍历所有页码) +export function syncAllProducts(data) { + return request({ + url: '/jarvis/erpProduct/syncAll', + method: 'post', + params: data + }) +} + // 批量上架 export function batchPublish(data) { return request({ diff --git a/src/views/system/erpProduct/index.vue b/src/views/system/erpProduct/index.vue index 7b96f34..ccc0512 100644 --- a/src/views/system/erpProduct/index.vue +++ b/src/views/system/erpProduct/index.vue @@ -54,11 +54,11 @@ 拉取商品 + >全量同步 - - - + + + - + - + + @@ -230,19 +231,15 @@
- 提示:留空表示拉取全部状态的商品 +
• 留空表示同步全部状态的商品
+
• 系统将自动遍历所有页码,同步所有商品
+
• 会自动更新本地已有商品,删除远程已不存在的商品
- - - - - -
@@ -336,7 +333,7 @@