From 612122d08626f73a4af9cf75b670f428f211eece Mon Sep 17 00:00:00 2001 From: xjs <1294405880@qq.com> Date: Mon, 21 Mar 2022 02:01:28 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81spu=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/mall/product/spu-info.js | 10 + .../views/mall/product/maintain/manager.vue | 197 ++++++++++++++++++ .../src/views/mall/product/maintain/spu.vue | 27 ++- .../views/mall/product/maintain/spuinfo.vue | 52 ++--- .../product/controller/SpuInfoController.java | 3 +- .../mall/product/service/SpuInfoService.java | 8 +- .../service/impl/SpuInfoServiceImpl.java | 37 +++- 7 files changed, 288 insertions(+), 46 deletions(-) create mode 100644 ruoyi-ui/src/views/mall/product/maintain/manager.vue diff --git a/ruoyi-ui/src/api/mall/product/spu-info.js b/ruoyi-ui/src/api/mall/product/spu-info.js index fd32c650..8dd9e35f 100644 --- a/ruoyi-ui/src/api/mall/product/spu-info.js +++ b/ruoyi-ui/src/api/mall/product/spu-info.js @@ -8,3 +8,13 @@ export function saveSpuInfo(data) { data: data }) } + +// 获取spu列表分页数据 +export function getSpuList(data) { + return request({ + url: '/mall-product/product/spuinfo/list', + method: 'get', + params: data + }) +} + diff --git a/ruoyi-ui/src/views/mall/product/maintain/manager.vue b/ruoyi-ui/src/views/mall/product/maintain/manager.vue new file mode 100644 index 00000000..982967ff --- /dev/null +++ b/ruoyi-ui/src/views/mall/product/maintain/manager.vue @@ -0,0 +1,197 @@ + + + diff --git a/ruoyi-ui/src/views/mall/product/maintain/spu.vue b/ruoyi-ui/src/views/mall/product/maintain/spu.vue index ad770590..dcdb8767 100644 --- a/ruoyi-ui/src/views/mall/product/maintain/spu.vue +++ b/ruoyi-ui/src/views/mall/product/maintain/spu.vue @@ -17,10 +17,13 @@ - + - 查询 + + 查询 + 重置 + @@ -37,7 +40,6 @@ import BrandSelect from "../../../components/mall/brand-select"; import Spuinfo from "./spuinfo"; export default { - //import引入的组件需要注入到对象中才能使用 components: {CategoryCascader, Spuinfo, BrandSelect}, props: {}, name: "SpuList", @@ -49,11 +51,11 @@ export default { dataForm: { status: "", key: "", - brandId: 0, - catelogId: 0 + brandId: null, + catelogId: null }, catPathSub: null, - brandIdSub: null + brandIdSub: null, }; }, @@ -63,9 +65,18 @@ export default { //方法集合 methods: { searchSpuInfo() { - console.log("搜索条件", this.dataForm); this.PubSub.publish("dataForm", this.dataForm); - } + }, + + /** 重置按钮操作 */ + resetQuery() { + this.dataForm={} + // this.catelogPath= [] + this.$bus.$emit('clearCategoryCascader',[]) + this.$bus.$emit('clearBrandSelect',[]) + }, + + }, created() { }, diff --git a/ruoyi-ui/src/views/mall/product/maintain/spuinfo.vue b/ruoyi-ui/src/views/mall/product/maintain/spuinfo.vue index 8c623477..078e0a02 100644 --- a/ruoyi-ui/src/views/mall/product/maintain/spuinfo.vue +++ b/ruoyi-ui/src/views/mall/product/maintain/spuinfo.vue @@ -8,21 +8,21 @@ style="width: 100%;" > - - - - - - + + + + + + - - - + + +