diff --git a/src/api/hard/hard-spu.ts b/src/api/hard/hard-spu.ts index c5f0769..5f7e267 100644 --- a/src/api/hard/hard-spu.ts +++ b/src/api/hard/hard-spu.ts @@ -13,6 +13,14 @@ export function getByCabinetNo(query?: { hardId: any; cabinetNo: any }) { }) } +export function asyncAll(query?: Object) { + return request({ + url: "/hard/hard-spu/async-all", + method: "get", + params: query, + }) +} + export function select(query?: Object) { return request({ url: "/hard/hard-spu/select", diff --git a/src/views/hard/hard-spu/index.vue b/src/views/hard/hard-spu/index.vue index c06f852..fbe3282 100644 --- a/src/views/hard/hard-spu/index.vue +++ b/src/views/hard/hard-spu/index.vue @@ -17,6 +17,7 @@
+ 拉取商品 新 增 @@ -159,6 +160,16 @@ const selectionChangHandle = (objs: { id: string }[]) => { multiple.value = !objs.length } +// 同步全部 +const syncAll = async () => { + try { + await useMessageBox().confirm("是否同步全部商品") + } catch { + return + } + hardSpu.asyncAll() +} + // 删除操作 const handleDelete = async (ids: string[]) => { try {