From e8bc98d91bea024bbb21aaf9b4a4df75d4483dae Mon Sep 17 00:00:00 2001
From: hufflzp <1395188856@qq.com>
Date: Wed, 14 Jan 2026 18:18:56 +0800
Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E5=9B=BE=E5=BA=93=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/goodsTool.js | 11 +++++++++
src/views/product/goodsImg/goodsImgs.vue | 30 +++++++++++++++++++++++-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/src/api/goodsTool.js b/src/api/goodsTool.js
index f8075af..317ddc3 100644
--- a/src/api/goodsTool.js
+++ b/src/api/goodsTool.js
@@ -207,6 +207,17 @@ export async function saveBatchBarcode(data) {
}
})
}
+
+// 删除图库
+export async function deleteBatchPhoto(id) {
+ return request({
+ url:'/admin/shop/libraryProduct/delByLibraryProductId',
+ method:'delete',
+ params:{
+ libraryProductId:id
+ }
+ })
+}
export default {
getProductMapperList,
getShopList,
diff --git a/src/views/product/goodsImg/goodsImgs.vue b/src/views/product/goodsImg/goodsImgs.vue
index 6990231..c783910 100644
--- a/src/views/product/goodsImg/goodsImgs.vue
+++ b/src/views/product/goodsImg/goodsImgs.vue
@@ -51,7 +51,7 @@
@selection-change="handleSelectionChange"
>
-
+
保存条码
+
+ 删除
+
@@ -165,6 +173,7 @@ import GoodsToolApi from '@/api/goodsTool'
import batchEditBarcode from './batchEditBarcode.vue'
import imgEdit from './imgEdit.vue'
import imgAdd from './imgAdd.vue'
+import { deleteBatchPhoto } from "@/api/goodsTool";
export default {
components: {
@@ -330,6 +339,25 @@ export default {
handleAdd() {
this.$refs.imgAddRef.init();
},
+
+ handleDel(row){
+ console.log(row)
+ this.$confirm(`确定将${row.barcode}删除?`, {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ .then(() => {
+ return deleteBatchPhoto(row.id)
+ })
+ .then(() => {
+ this.handleEditSuccess();
+ this.$message({
+ type: 'success',
+ message: '操作成功!',
+ })
+ })
+ }
},
}