From d70ee43c295e0fbe600fc0228aaaa4ed8fe53526 Mon Sep 17 00:00:00 2001 From: dzq Date: Fri, 18 Apr 2025 17:13:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9F=9C=E4=BD=93?= =?UTF-8?q?=E5=95=86=E5=93=81=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增柜体商品配置功能,包括商品库存配置、单元格商品信息展示等。新增接口和页面组件,支持商品与单元格的关联配置,并优化了相关数据展示和操作流程。 --- src/api/cabinet/cabinet-cell.ts | 7 + src/api/cabinet/smart-cabinet.ts | 4 + src/api/shop/goods.ts | 1 + .../cabinet-goods-config-modal.vue | 140 ++++++++++ src/views/shop/cabinet-goods/index.vue | 245 ++++++++++++++++++ 5 files changed, 397 insertions(+) create mode 100644 src/views/shop/cabinet-goods/cabinet-goods-config-modal.vue create mode 100644 src/views/shop/cabinet-goods/index.vue diff --git a/src/api/cabinet/cabinet-cell.ts b/src/api/cabinet/cabinet-cell.ts index c6bbf99..e7c6253 100644 --- a/src/api/cabinet/cabinet-cell.ts +++ b/src/api/cabinet/cabinet-cell.ts @@ -15,6 +15,10 @@ export interface CabinetCellDTO { usageStatus: number; availableStatus: number; operator?: string; + goodsId?: number; + goodsName?: string; + price?: number; + coverImg?: string; } export interface AddCabinetCellCommand { @@ -60,4 +64,7 @@ export interface ConfigureGoodsCellsCommand { export const configureGoodsCells = (cellId: number, goodsId: number) => { return http.request>('put', `/cabinet/cell/configureGoodsCells/${cellId}/${goodsId}`); +}; +export const configureGoodsCellsStock = (cellId: number, goodsId: number, stock: number) => { + return http.request>('put', `/cabinet/cell/configureGoodsCellsStock/${cellId}/${goodsId}/${stock}`); }; \ No newline at end of file diff --git a/src/api/cabinet/smart-cabinet.ts b/src/api/cabinet/smart-cabinet.ts index 0953d84..d494d78 100644 --- a/src/api/cabinet/smart-cabinet.ts +++ b/src/api/cabinet/smart-cabinet.ts @@ -58,3 +58,7 @@ export const deleteSmartCabinet = (ids: string) => { export const getAllCabinetsWithCells = () => { return http.request>('get', '/cabinet/smartCabinet/all'); }; + +export const allCabinets = () => { + return http.request>>('get', '/cabinet/smartCabinet/allCabinets'); +}; \ No newline at end of file diff --git a/src/api/shop/goods.ts b/src/api/shop/goods.ts index d18ca9c..6054c0a 100644 --- a/src/api/shop/goods.ts +++ b/src/api/shop/goods.ts @@ -25,6 +25,7 @@ export interface GoodsDTO { deleted?: number; cabinetName?: string; cellNo?: number; + totalStock?: number; } /** 商品请求参数 */ diff --git a/src/views/shop/cabinet-goods/cabinet-goods-config-modal.vue b/src/views/shop/cabinet-goods/cabinet-goods-config-modal.vue new file mode 100644 index 0000000..7a3b21d --- /dev/null +++ b/src/views/shop/cabinet-goods/cabinet-goods-config-modal.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/cabinet-goods/index.vue b/src/views/shop/cabinet-goods/index.vue new file mode 100644 index 0000000..dd9c6e4 --- /dev/null +++ b/src/views/shop/cabinet-goods/index.vue @@ -0,0 +1,245 @@ + + + + +