From 7cc816a43a4093c55a8a761d3192b90328e1b12e Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 20 Apr 2024 15:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=B9=E9=87=8F=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/productList/index.vue | 46 ++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/views/product/productList/index.vue b/src/views/product/productList/index.vue index e009e76..a05893d 100644 --- a/src/views/product/productList/index.vue +++ b/src/views/product/productList/index.vue @@ -83,7 +83,9 @@ @click="batchOff">批量下架 批量上架 - 加入云商品 + 批量加入回收站 + 批量恢复 + 批量删除 { + ids.push(item.product_id) + }) + } else { + ids = this.checkedIds + } + let data = { status: 1, ids: ids } + console.log(data); + }, + // 批量恢复 + batchRecover() { + if (this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品') + let ids = [] + if (this.allCheck) { + this.tableData.data.map((item) => { + ids.push(item.product_id) + }) + } else { + ids = this.checkedIds + } + let data = { status: 1, ids: ids } + console.log(data); + }, + // 批量删除 + batchDelete() { + if (this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品') + let ids = [] + if (this.allCheck) { + this.tableData.data.map((item) => { + ids.push(item.product_id) + }) + } else { + ids = this.checkedIds + } + let data = { status: 1, ids: ids } + console.log(data); + }, // 批量设置标签 batchLabel() { this.labelForm = {