From e3ced12a9268f2479c113d0c69205e653e066846 Mon Sep 17 00:00:00 2001 From: "2090205686@qq.com" Date: Mon, 9 Jun 2025 18:49:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=BF=A1=E6=81=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=8A=9F=E8=83=BD=E9=A1=B9?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=90=8E=E5=8F=B0=EF=BC=8C=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=E5=BC=80?= =?UTF-8?q?=E5=8F=91=EF=BC=88=E6=96=B0=E5=A2=9E=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/goods/info.js | 41 +- src/components/tableComponent.vue | 6 +- src/views/goods/goodsCategory/index.vue | 270 +++++--- src/views/goods/goodsManage/addGoods.vue | 62 +- src/views/goods/goodsManage/areaList.js | 792 ++++++++++++++++++++++ src/views/goods/goodsManage/editGoods.vue | 47 +- src/views/goods/goodsManage/index.vue | 303 ++++++--- src/views/login.vue | 4 +- vite.config.js | 86 ++- 10 files changed, 1313 insertions(+), 300 deletions(-) create mode 100644 src/views/goods/goodsManage/areaList.js diff --git a/.env.development b/.env.development index 5bbd0a4..84a632c 100644 --- a/.env.development +++ b/.env.development @@ -5,5 +5,5 @@ VITE_APP_TITLE = 运营云后台管理系统 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.18.99:8080' +VITE_APP_BASE_API = 'http://192.168.18.151:8080' VITE_APP_PLATFORM = 'http://localhost:9000/platform' \ No newline at end of file diff --git a/src/api/goods/info.js b/src/api/goods/info.js index 46bbe52..62055e3 100644 --- a/src/api/goods/info.js +++ b/src/api/goods/info.js @@ -8,6 +8,14 @@ export function getGoodManageInfo(query) { params: query }) } +// 获取商品列表页顶部tab中的数据 +export function getGoodManageCount(query) { + return request({ + url: '/goods/goodInfoManage/getGoodManageCount', + method: 'get', + params: query + }) +} // 获取商品分类列表 export function getGoodType(query) { @@ -35,19 +43,18 @@ export function goodEdit(data) { }) } // 商品删除 -export function goodDelete(data) { +export function goodDelete(id) { return request({ - url: '/goods/business/category/remove', - method: 'post', - data: data + url: '/goods/goodInfoManage/deleteGoodInfo/id=' + id, + method: 'delete', }) } -// 商品上下架 +// 商品上架下架 export function goodUpAndDown(data) { return request({ - url: '/goods/goodInfoManage/goodEdit', - method: 'post', + url: '/goods/goodInfoManage/goodOnSale', + method: 'put', data: data }) } @@ -66,4 +73,22 @@ export function getActiveInfos() { url: '/goods/goodInfoManage/getActiveInfos', method: 'get' }) -} \ No newline at end of file +} + + +// 获取商品分类列表 +export function getGoodCategoryInfo(query) { + return request({ + url: '/goods/business/category/list', + method: 'get', + params: query + }) +} +// 新增商品分类 +export function categoryAdd(data) { + return request({ + url: '/goods/business/category/add', + method: 'post', + data: data + }) +} diff --git a/src/components/tableComponent.vue b/src/components/tableComponent.vue index c377ca1..fcfcba2 100644 --- a/src/components/tableComponent.vue +++ b/src/components/tableComponent.vue @@ -185,6 +185,10 @@ const props = defineProps({ type: Function, default: () => "", }, + rowkey: { + type: String, + default: "", + }, }); const emit = defineEmits([ @@ -227,7 +231,7 @@ const handleCurrentChange = (val) => { // 多选框变化 const handleSelectionChange = (selection) => { - const selectedIds = selection.map((row) => row.id); + const selectedIds = selection.map((row) => props.rowkey == "" ? row.id : row[props.rowkey]); emit("selection-change", selection, selectedIds); }; diff --git a/src/views/goods/goodsCategory/index.vue b/src/views/goods/goodsCategory/index.vue index f9cc0c1..154d827 100644 --- a/src/views/goods/goodsCategory/index.vue +++ b/src/views/goods/goodsCategory/index.vue @@ -12,16 +12,16 @@ class="demo-form-inline" :label-width="'auto'" > - + - + @@ -33,7 +33,7 @@ /> -
+
批量删除 - - 添加分类 - + 添加分类 -