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 @@ + + + + +