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: '操作成功!',
+ })
+ })
+ }
},
}