From 77bfd14207277a943029998ce944b956e88787d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E5=90=8C=E5=AD=A6?= <2495967527@qq.com> Date: Mon, 30 Dec 2024 11:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/mer_admin.js | 4 + src/router/full-routers.js | 267 +++--- src/router/index.js | 2 + .../banner/index.vue | 0 .../banner/popup/add-or-update.vue | 0 .../banner/popup/set-sorting.vue | 0 .../commodity/index.vue | 30 +- .../commodity/popup/add-attribute.vue | 0 .../commodity/popup/add-discount.vue | 0 .../commodity/popup/add-or-update.vue | 0 .../commodity/popup/add-price.vue | 0 .../commodity/popup/add-specifications.vue | 0 .../commodity/popup/add-stock.vue | 0 .../distributor/index.vue | 0 .../operation-management/notice/index.vue | 831 ++++++++++++++++++ .../notice/popup/add-or-update.vue | 0 .../notice/popup/set-sorting.vue | 0 .../order/index.vue | 0 .../order/popup/content.vue | 0 .../order/popup/view-details.vue | 0 .../shop-list/index.vue | 0 src/views/modules/product/notice/index.vue | 354 -------- 22 files changed, 988 insertions(+), 500 deletions(-) rename src/views/modules/{product => operation-management}/banner/index.vue (100%) rename src/views/modules/{product => operation-management}/banner/popup/add-or-update.vue (100%) rename src/views/modules/{product => operation-management}/banner/popup/set-sorting.vue (100%) rename src/views/modules/{product => operation-management}/commodity/index.vue (94%) rename src/views/modules/{product => operation-management}/commodity/popup/add-attribute.vue (100%) rename src/views/modules/{product => operation-management}/commodity/popup/add-discount.vue (100%) rename src/views/modules/{product => operation-management}/commodity/popup/add-or-update.vue (100%) rename src/views/modules/{product => operation-management}/commodity/popup/add-price.vue (100%) rename src/views/modules/{product => operation-management}/commodity/popup/add-specifications.vue (100%) rename src/views/modules/{product => operation-management}/commodity/popup/add-stock.vue (100%) rename src/views/modules/{agent => operation-management}/distributor/index.vue (100%) create mode 100644 src/views/modules/operation-management/notice/index.vue rename src/views/modules/{product => operation-management}/notice/popup/add-or-update.vue (100%) rename src/views/modules/{product => operation-management}/notice/popup/set-sorting.vue (100%) rename src/views/modules/{product => operation-management}/order/index.vue (100%) rename src/views/modules/{product => operation-management}/order/popup/content.vue (100%) rename src/views/modules/{product => operation-management}/order/popup/view-details.vue (100%) rename src/views/modules/{agent => operation-management}/shop-list/index.vue (100%) delete mode 100644 src/views/modules/product/notice/index.vue diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 4fe0cbc..82abafa 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -48,6 +48,10 @@ export const mer_admin = { getProductPage: (data) => { return $http.post(`/merchant-api/product/page`, data); }, + //商品概况 + getProductOverview: (data) => { + return $http.post(`/merchant-api/product/overview`, data); + }, //商户商品分类 getProductCategory: (data) => { return $http.request({ diff --git a/src/router/full-routers.js b/src/router/full-routers.js index 8c203a3..c80e994 100644 --- a/src/router/full-routers.js +++ b/src/router/full-routers.js @@ -30,20 +30,46 @@ export default { menuId: getUUID(), parentId: 0, parentName: null, - name: "商品", - url: "local-course/resources", + name: "运营管理", + url: "operation-management", perms: "", type: 0, - elIcon: "el-icon-menu", + elIcon: "el-icon-s-help", orderNum: 0, open: null, list: [ { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "店铺列表", + url: "operation-management/shop-list/index", + perms: "", + type: 1, + elIcon: "el-icon-shopping-cart-full", + orderNum: 0, + open: null, + list: [], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "分销商列表", + url: "operation-management/distributor/index", + perms: "", + type: 1, + elIcon: "el-icon-shopping-cart-full", + orderNum: 0, + open: null, + list: [], + }, + { menuId: getUUID(), parentId: 0, parentName: null, name: "商品管理", - url: "product/commodity/index", + url: "operation-management/commodity/index", perms: "", type: 1, elIcon: "el-icon-menu", @@ -56,7 +82,7 @@ export default { parentId: 0, parentName: null, name: "订单管理", - url: "product/order/index", + url: "operation-management/order/index", perms: "", type: 1, elIcon: "el-icon-menu", @@ -69,7 +95,7 @@ export default { parentId: 0, parentName: null, name: "轮播图管理", - url: "product/banner/index", + url: "operation-management/banner/index", perms: "", type: 1, elIcon: "el-icon-menu", @@ -82,7 +108,7 @@ export default { parentId: 0, parentName: null, name: "公告管理", - url: "product/notice/index", + url: "operation-management/notice/index", perms: "", type: 1, elIcon: "el-icon-menu", @@ -92,106 +118,12 @@ export default { }, ], }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "银行卡管理", - url: "bank-card/index", - perms: "", - type: 0, - elIcon: "el-icon-picture-outline", - orderNum: 0, - open: null, - list: [], - hideInMenu: true, - }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "品牌管理", - url: "", - perms: "", - type: 0, - elIcon: "el-icon-money", - orderNum: 0, - open: null, - list: [ - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "品牌管理", - url: "brand/config/index", - perms: "", - type: 1, - elIcon: "el-icon-postcard", - orderNum: 0, - open: null, - list: [], - }, - ], - }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "优惠卷管理", - url: "coupon/index", - perms: "", - type: 0, - elIcon: "el-icon-document-remove", - orderNum: 0, - open: null, - list: [], - }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "预售管理", - url: "", - perms: "", - type: 0, - elIcon: "el-icon-data-analysis", - orderNum: 0, - open: null, - list: [ - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "预售商品", - url: "presale/products/index", - perms: "", - type: 1, - elIcon: "el-icon-postcard", - orderNum: 0, - open: null, - list: [], - }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "预售订单", - url: "presale/order/index", - perms: "", - type: 1, - elIcon: "el-icon-postcard", - orderNum: 0, - open: null, - list: [], - }, - ], - }, { menuId: getUUID(), parentId: 0, parentName: null, name: "数据中心", - url: "", + url: "datacenter", perms: "", type: 0, elIcon: "el-icon-tickets", @@ -243,8 +175,102 @@ export default { menuId: getUUID(), parentId: 0, parentName: null, - name: "营销管理", - url: "", + name: "银行卡管理", + url: "bank-card/index", + perms: "", + type: 0, + elIcon: "el-icon-picture-outline", + orderNum: 0, + open: null, + list: [], + hideInMenu: true, + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "品牌管理", + url: "brand", + perms: "", + type: 0, + elIcon: "el-icon-money", + orderNum: 0, + open: null, + list: [ + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "品牌管理", + url: "brand/config/index", + perms: "", + type: 1, + elIcon: "el-icon-postcard", + orderNum: 0, + open: null, + list: [], + }, + ], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "优惠卷营销工具管理", + url: "coupon/index", + perms: "", + type: 0, + elIcon: "el-icon-document-remove", + orderNum: 0, + open: null, + list: [], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "预售营销工具管理", + url: "presale", + perms: "", + type: 0, + elIcon: "el-icon-data-analysis", + orderNum: 0, + open: null, + list: [ + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "预售商品", + url: "presale/products/index", + perms: "", + type: 1, + elIcon: "el-icon-postcard", + orderNum: 0, + open: null, + list: [], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "预售订单", + url: "presale/order/index", + perms: "", + type: 1, + elIcon: "el-icon-postcard", + orderNum: 0, + open: null, + list: [], + }, + ], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "会员营销工具管理", + url: "marketing", perms: "", type: 0, elIcon: "el-icon-tickets", @@ -323,7 +349,7 @@ export default { parentId: 0, parentName: null, name: "代理商", - url: "", + url: "agent", perms: "", type: 0, elIcon: "el-icon-tickets", @@ -382,32 +408,6 @@ export default { open: null, list: [], }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "店铺列表", - url: "agent/shop-list/index", - perms: "", - type: 1, - elIcon: "el-icon-shopping-cart-full", - orderNum: 0, - open: null, - list: [], - }, - { - menuId: getUUID(), - parentId: 0, - parentName: null, - name: "分销商列表", - url: "agent/distributor/index", - perms: "", - type: 1, - elIcon: "el-icon-shopping-cart-full", - orderNum: 0, - open: null, - list: [], - }, { menuId: getUUID(), parentId: 0, @@ -422,6 +422,7 @@ export default { list: [], }, ], + hideInMenu: true, }, { menuId: getUUID(), @@ -429,7 +430,7 @@ export default { parentName: null, name: "钱包管理", url: "local-course/resources", - perms: "", + perms: "wallet", type: 0, elIcon: "el-icon-menu", orderNum: 0, @@ -455,7 +456,7 @@ export default { parentId: 0, parentName: null, name: "运费管理", - url: "", + url: "ogistics-fare", perms: "", type: 0, elIcon: "el-icon-money", diff --git a/src/router/index.js b/src/router/index.js index 96c877a..87756a4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -104,6 +104,8 @@ router.beforeEach((to, from, next) => { .getUserInfo() .then(({ data }) => { const filterTreeData = (data, permissions) => { + console.log(data); + return data; //临时性返回所有菜单方便调试 // return data.reduce((filtered, node) => { // // 如果节点的权限在权限数组中 diff --git a/src/views/modules/product/banner/index.vue b/src/views/modules/operation-management/banner/index.vue similarity index 100% rename from src/views/modules/product/banner/index.vue rename to src/views/modules/operation-management/banner/index.vue diff --git a/src/views/modules/product/banner/popup/add-or-update.vue b/src/views/modules/operation-management/banner/popup/add-or-update.vue similarity index 100% rename from src/views/modules/product/banner/popup/add-or-update.vue rename to src/views/modules/operation-management/banner/popup/add-or-update.vue diff --git a/src/views/modules/product/banner/popup/set-sorting.vue b/src/views/modules/operation-management/banner/popup/set-sorting.vue similarity index 100% rename from src/views/modules/product/banner/popup/set-sorting.vue rename to src/views/modules/operation-management/banner/popup/set-sorting.vue diff --git a/src/views/modules/product/commodity/index.vue b/src/views/modules/operation-management/commodity/index.vue similarity index 94% rename from src/views/modules/product/commodity/index.vue rename to src/views/modules/operation-management/commodity/index.vue index 0b3c554..f92adaa 100644 --- a/src/views/modules/product/commodity/index.vue +++ b/src/views/modules/operation-management/commodity/index.vue @@ -68,7 +68,7 @@
总商品数量(个)
- 99999 + {{overview.productCount}}
@@ -77,7 +77,7 @@
上架中商品数量(个)
- 234 + {{overview.productOnSaleCount}}
@@ -86,7 +86,7 @@
折扣商品数量(个)
- 99999 + {{overview.productDiscountCount}}
@@ -95,7 +95,7 @@
仓库中商品数量(个)
- 234 + {{overview.productWarehouseCount}}
@@ -166,6 +166,7 @@ export default { }, productFilterType: "SALE", selectList: [], + overview:{} }; }, created() { @@ -181,14 +182,14 @@ export default { methods: { //如果有多个菜市场调用 getData() { - this.$api.mer_admin - .storeList({ marketId: this.formInline.marketId }) - .then((res) => { - this.formInline.shopId = res.data.data[0].shopId; - this.$nextTick(() => { - this.$refs.oTable.reload(); - }); - }); + // this.$api.mer_admin + // .storeList({ marketId: this.formInline.marketId }) + // .then((res) => { + // this.formInline.shopId = res.data.data[0].shopId; + // this.$nextTick(() => { + // this.$refs.oTable.reload(); + // }); + // }); }, addProduct() { this.$refs.addOrUpdate.toggle().add(this.formInline.shopId); @@ -218,7 +219,6 @@ export default { }, queryList(pageNo, pageSize) { console.log(this.formInline); - this.$api.mer_admin .getProductPage({ p: { @@ -240,6 +240,10 @@ export default { .catch((err) => { this.$refs.oTable.complete(false); }); + this.$api.mer_admin.getProductOverview(this.formInline).then((res) => { + console.log(res,'概况'); + this.overview = res.data.data; + }); }, Reset() { this.formInline = { diff --git a/src/views/modules/product/commodity/popup/add-attribute.vue b/src/views/modules/operation-management/commodity/popup/add-attribute.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-attribute.vue rename to src/views/modules/operation-management/commodity/popup/add-attribute.vue diff --git a/src/views/modules/product/commodity/popup/add-discount.vue b/src/views/modules/operation-management/commodity/popup/add-discount.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-discount.vue rename to src/views/modules/operation-management/commodity/popup/add-discount.vue diff --git a/src/views/modules/product/commodity/popup/add-or-update.vue b/src/views/modules/operation-management/commodity/popup/add-or-update.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-or-update.vue rename to src/views/modules/operation-management/commodity/popup/add-or-update.vue diff --git a/src/views/modules/product/commodity/popup/add-price.vue b/src/views/modules/operation-management/commodity/popup/add-price.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-price.vue rename to src/views/modules/operation-management/commodity/popup/add-price.vue diff --git a/src/views/modules/product/commodity/popup/add-specifications.vue b/src/views/modules/operation-management/commodity/popup/add-specifications.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-specifications.vue rename to src/views/modules/operation-management/commodity/popup/add-specifications.vue diff --git a/src/views/modules/product/commodity/popup/add-stock.vue b/src/views/modules/operation-management/commodity/popup/add-stock.vue similarity index 100% rename from src/views/modules/product/commodity/popup/add-stock.vue rename to src/views/modules/operation-management/commodity/popup/add-stock.vue diff --git a/src/views/modules/agent/distributor/index.vue b/src/views/modules/operation-management/distributor/index.vue similarity index 100% rename from src/views/modules/agent/distributor/index.vue rename to src/views/modules/operation-management/distributor/index.vue diff --git a/src/views/modules/operation-management/notice/index.vue b/src/views/modules/operation-management/notice/index.vue new file mode 100644 index 0000000..f642a44 --- /dev/null +++ b/src/views/modules/operation-management/notice/index.vue @@ -0,0 +1,831 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/product/notice/popup/add-or-update.vue b/src/views/modules/operation-management/notice/popup/add-or-update.vue similarity index 100% rename from src/views/modules/product/notice/popup/add-or-update.vue rename to src/views/modules/operation-management/notice/popup/add-or-update.vue diff --git a/src/views/modules/product/notice/popup/set-sorting.vue b/src/views/modules/operation-management/notice/popup/set-sorting.vue similarity index 100% rename from src/views/modules/product/notice/popup/set-sorting.vue rename to src/views/modules/operation-management/notice/popup/set-sorting.vue diff --git a/src/views/modules/product/order/index.vue b/src/views/modules/operation-management/order/index.vue similarity index 100% rename from src/views/modules/product/order/index.vue rename to src/views/modules/operation-management/order/index.vue diff --git a/src/views/modules/product/order/popup/content.vue b/src/views/modules/operation-management/order/popup/content.vue similarity index 100% rename from src/views/modules/product/order/popup/content.vue rename to src/views/modules/operation-management/order/popup/content.vue diff --git a/src/views/modules/product/order/popup/view-details.vue b/src/views/modules/operation-management/order/popup/view-details.vue similarity index 100% rename from src/views/modules/product/order/popup/view-details.vue rename to src/views/modules/operation-management/order/popup/view-details.vue diff --git a/src/views/modules/agent/shop-list/index.vue b/src/views/modules/operation-management/shop-list/index.vue similarity index 100% rename from src/views/modules/agent/shop-list/index.vue rename to src/views/modules/operation-management/shop-list/index.vue diff --git a/src/views/modules/product/notice/index.vue b/src/views/modules/product/notice/index.vue deleted file mode 100644 index ee02a54..0000000 --- a/src/views/modules/product/notice/index.vue +++ /dev/null @@ -1,354 +0,0 @@ - - - - - \ No newline at end of file