From 6e62895adb18407c4cf0a497830e733f81329245 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 10 Jan 2024 14:58:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E5=8D=95=E4=BD=8D,?= =?UTF-8?q?=E8=A7=84=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shop.js | 123 ++++++++++- src/components/uploadImg/index.vue | 70 ++++++ src/views/product/add_shop.vue | 12 +- src/views/product/category.vue | 126 +++++++++++ src/views/product/components/addClassify.vue | 126 +++++++++++ .../product/components/addSpecification.vue | 203 ++++++++++++++++++ src/views/product/components/addUnit.vue | 86 ++++++++ src/views/product/index.vue | 15 +- src/views/product/specification.vue | 105 +++++++++ src/views/product/unit.vue | 112 ++++++++++ src/views/shop/shop_configuration.vue | 4 +- 11 files changed, 968 insertions(+), 14 deletions(-) create mode 100644 src/components/uploadImg/index.vue create mode 100644 src/views/product/category.vue create mode 100644 src/views/product/components/addClassify.vue create mode 100644 src/views/product/components/addSpecification.vue create mode 100644 src/views/product/components/addUnit.vue create mode 100644 src/views/product/specification.vue create mode 100644 src/views/product/unit.vue diff --git a/src/api/shop.js b/src/api/shop.js index 4387f4f..8d76487 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -45,4 +45,125 @@ export function tbShopCurrencyPut(data) { method: 'put', data }) -} \ No newline at end of file +} + +/** + * 新增单位 + * @returns + */ +export function tbShopUnitPost(data) { + return request({ + url: `/api/tbShopUnit`, + method: 'post', + data + }) +} + +/** + * 更改单位 + * @returns + */ +export function tbShopUnitPut(data) { + return request({ + url: `/api/tbShopUnit`, + method: 'put', + data + }) +} + +/** + * 删除单位 + * @returns + */ +export function tbShopUnitDelete(data) { + return request({ + url: `/api/tbShopUnit`, + method: 'delete', + data + }) +} + +/** + * 店铺基本配置 + * @returns + */ +export function tbShopCurrencyGet(params) { + return request({ + url: `/api/tbShopUnit`, + method: 'get', + params + }) +} + +/** + * 商品分类列表 + * @returns + */ +export function tbShopCategoryGet(params) { + return request({ + url: `/api/tbShopCategory`, + method: 'get', + params + }) +} + +/** + * 新增分类/新增子分类 + * @returns + */ +export function tbShopCategoryPost(data) { + return request({ + url: `/api/tbShopCategory`, + method: 'post', + data + }) +} + +/** + * 删除商品分类 + * @returns + */ +export function tbShopCategoryDelete(data) { + return request({ + url: `/api/tbShopCategory`, + method: 'delete', + data + }) +} + +/** + * 规格增加 + * @returns + */ +export function tbProductSpecPost(data) { + return request({ + url: `/api/tbProductSpec`, + method: 'post', + data + }) +} + +/** + * 规格列表 + * @returns + */ +export function tbProductSpecGet(params) { + return request({ + url: `/api/tbProductSpec`, + method: 'get', + params + }) +} + +/** + * 规格更改 + * @returns + */ +export function tbProductSpecPut(data) { + return request({ + url: `/api/tbProductSpec`, + method: 'put', + data + }) +} + diff --git a/src/components/uploadImg/index.vue b/src/components/uploadImg/index.vue new file mode 100644 index 0000000..303c60e --- /dev/null +++ b/src/components/uploadImg/index.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 80285c4..d78e1ae 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -20,13 +20,15 @@ - 添加单位 + 添加单位 + - 添加分类 + 添加分类 + @@ -34,7 +36,13 @@ \ No newline at end of file diff --git a/src/views/product/components/addClassify.vue b/src/views/product/components/addClassify.vue new file mode 100644 index 0000000..e0553b1 --- /dev/null +++ b/src/views/product/components/addClassify.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/src/views/product/components/addSpecification.vue b/src/views/product/components/addSpecification.vue new file mode 100644 index 0000000..166e084 --- /dev/null +++ b/src/views/product/components/addSpecification.vue @@ -0,0 +1,203 @@ + + + + + \ No newline at end of file diff --git a/src/views/product/components/addUnit.vue b/src/views/product/components/addUnit.vue new file mode 100644 index 0000000..1c411d3 --- /dev/null +++ b/src/views/product/components/addUnit.vue @@ -0,0 +1,86 @@ + + + \ No newline at end of file diff --git a/src/views/product/index.vue b/src/views/product/index.vue index a69d112..41bf348 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -4,7 +4,7 @@ + class="filter-item" @keyup.enter.native="getTableData" /> @@ -19,7 +19,7 @@ - 查询 + 查询 重置 @@ -94,26 +94,23 @@ export default { } }, mounted() { - this.tbProduct() + this.getTableData() }, methods: { - // 查询 - toQuery() { - - }, // 重置查询 resetHandle() { this.query.blurry = '' this.query.class = '' this.query.sku = '' + this.getTableData() }, // 分页回调 paginationChange(e) { this.tableData.page = e - this.tbProduct() + this.getTableData() }, // 获取商品列表 - async tbProduct() { + async getTableData() { this.tableData.loading = true try { const res = await tbProduct({ diff --git a/src/views/product/specification.vue b/src/views/product/specification.vue new file mode 100644 index 0000000..84bace3 --- /dev/null +++ b/src/views/product/specification.vue @@ -0,0 +1,105 @@ + + + \ No newline at end of file diff --git a/src/views/product/unit.vue b/src/views/product/unit.vue new file mode 100644 index 0000000..d76a1e3 --- /dev/null +++ b/src/views/product/unit.vue @@ -0,0 +1,112 @@ + + + \ No newline at end of file diff --git a/src/views/shop/shop_configuration.vue b/src/views/shop/shop_configuration.vue index ea77fde..1fba74a 100644 --- a/src/views/shop/shop_configuration.vue +++ b/src/views/shop/shop_configuration.vue @@ -10,8 +10,8 @@