From 61602c3adb240f198fb2feb848c98ebd4f84f73d Mon Sep 17 00:00:00 2001
From: fy <>
Date: Thu, 22 Jan 2026 14:50:26 +0800
Subject: [PATCH] =?UTF-8?q?=E5=93=81=E7=89=8C=E5=88=97=E8=A1=A8=EF=BC=8C?=
=?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/product.js | 60 +-
config.js | 1 +
pages.json | 12 +
pages/addBrand/addBrand.vue | 961 ++++++++++++++++++
.../batchDeleteProduct/batchDeleteProduct.vue | 380 +++++++
pages/product/product.vue | 85 +-
utils/request.js | 1 +
7 files changed, 1483 insertions(+), 17 deletions(-)
create mode 100644 pages/addBrand/addBrand.vue
create mode 100644 pages/batchDeleteProduct/batchDeleteProduct.vue
diff --git a/api/product.js b/api/product.js
index 07769d9..77fee46 100644
--- a/api/product.js
+++ b/api/product.js
@@ -250,8 +250,66 @@ export function importProductData(filePath, formData) {
// 获取导入记录
export function getImportRecord() {
return request8081({
- baseUrl: 'http://192.168.0.7:8081',
+ baseUrl: 'http://193.112.94.36:8081',
url: '/mall/product/importRecord',
method: 'get'
});
+}
+
+// 批量删除商品
+export function batchDeleteProduct(ids) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: '/mall/product/batchDelete',
+ method: 'delete',
+ data: { ids: ids }
+ })
+}
+
+// 添加品牌
+export function addBrand(data) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: '/mall/brand/add',
+ method: 'post',
+ data: data
+ })
+}
+
+// 获取品牌列表
+export function getBrandList(params) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: '/mall/brand/list',
+ method: 'get',
+ params: params
+ })
+}
+
+// 获取品牌树状结构
+export function getBrandTree(storeId) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: `/mall/brand/getTree/${storeId}`,
+ method: 'get'
+ })
+}
+
+// 删除品牌
+export function deleteBrand(brandId) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: `/mall/brand/delete/${brandId}`,
+ method: 'delete'
+ })
+}
+
+// 修改品牌名称
+export function updateBrand(data) {
+ return request8081({
+ baseUrl: 'http://193.112.94.36:8081',
+ url: '/mall/brand/update',
+ method: 'post',
+ data: data
+ })
}
\ No newline at end of file
diff --git a/config.js b/config.js
index 3bbb724..ff72a7b 100644
--- a/config.js
+++ b/config.js
@@ -3,6 +3,7 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
baseUrl:'http://193.112.94.36:8080',
+ // baseUrl = 'https://api.ruoyi.com'
// prodApi: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://localhost:8080',
// 应用信息
diff --git a/pages.json b/pages.json
index 394eafb..49e33d9 100644
--- a/pages.json
+++ b/pages.json
@@ -155,6 +155,18 @@
"style": {
"navigationBarTitleText": ""
}
+ },
+ {
+ "path": "pages/batchDeleteProduct/batchDeleteProduct",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/addBrand/addBrand",
+ "style": {
+ "navigationBarTitleText": ""
+ }
}
],
"tabBar": {
diff --git a/pages/addBrand/addBrand.vue b/pages/addBrand/addBrand.vue
new file mode 100644
index 0000000..8a6627a
--- /dev/null
+++ b/pages/addBrand/addBrand.vue
@@ -0,0 +1,961 @@
+
+
+
+
+
+ ←
+
+ 品牌管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ subBrand.name }}
+
+ ✎
+ 编辑
+
+
+
+
+
+ +
+ 添加子品牌
+
+
+
+
+
+
+
+ +
+ 添加品牌
+
+
+
+
+
+ 修改品牌名称
+
+
+
+
+ ×
+
+
+
+
+ 🗑️
+ 删除品牌
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+ {{ isAddingSubBrand ? '添加子品牌' : '添加品牌' }}
+
+
+
+
+ ×
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+ 确认删除
+ 确定要删除这个品牌吗?
+
+ 取消
+ 删除
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/batchDeleteProduct/batchDeleteProduct.vue b/pages/batchDeleteProduct/batchDeleteProduct.vue
new file mode 100644
index 0000000..b6bce9d
--- /dev/null
+++ b/pages/batchDeleteProduct/batchDeleteProduct.vue
@@ -0,0 +1,380 @@
+
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 筛选
+
+
+
+
+
+
+
+ 暂无商品数据
+
+
+
+
+
+ ✓
+
+
+
+
+
+ {{ item.productName || '未命名商品' }}
+ {{ item.productBarCode || '无条码' }}
+ ¥{{ item.storePrice ? Number(item.storePrice).toFixed(2) : '0.00' }}
+
+
+
+
+
+
+
+
+
+ ✓
+
+ 全选 (已选{{ selectedIds.length }})
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/product.vue b/pages/product/product.vue
index 39d3fad..93434df 100644
--- a/pages/product/product.vue
+++ b/pages/product/product.vue
@@ -104,8 +104,8 @@
-
- 更多
+
+ 更多