From b9e0077b4dba078f0d2b22773f7c4258014528f3 Mon Sep 17 00:00:00 2001 From: dzq Date: Thu, 26 Jun 2025 11:39:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=99=BA=E8=83=BD=E6=9F=9C):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=8E=B7=E5=8F=96=E7=A7=9F=E7=94=A8=E4=B8=AD=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E6=9F=9C=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增获取租用中智能柜详情的API接口函数getRentingCabinetDetailApi 添加RentingCabinetDetailDTO和CabinetCellEntity类型定义 --- src/common/apis/cabinet/index.ts | 13 ++++++++++- src/common/apis/cabinet/type.ts | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/common/apis/cabinet/index.ts b/src/common/apis/cabinet/index.ts index 665ead2..a12a059 100644 --- a/src/common/apis/cabinet/index.ts +++ b/src/common/apis/cabinet/index.ts @@ -1,5 +1,5 @@ import { request } from '@/http/axios' -import type { CabinetDetailResponse } from './type' +import type { CabinetDetailResponse, RentingCabinetDetailDTO } from './type' import { OpenCabinetApiData } from '../shop/type' /** 获取智能柜详情接口 */ @@ -13,6 +13,17 @@ export function getCabinetDetailApi(shopId: number) { }) } +/** 获取租用中的智能柜详情接口 */ +export function getRentingCabinetDetailApi(shopId: number) { + return request>({ + url: 'cabinet/detail/renting', + method: 'get', + params: { + shopId + } + }) +} + export function openCabinet(cabinetId: number, pinNo: number, data: OpenCabinetApiData) { return request>({ url: `cabinet/openCabinet/${cabinetId}/${pinNo}`, diff --git a/src/common/apis/cabinet/type.ts b/src/common/apis/cabinet/type.ts index d409040..4c57c07 100644 --- a/src/common/apis/cabinet/type.ts +++ b/src/common/apis/cabinet/type.ts @@ -5,6 +5,46 @@ export interface CabinetDetailDTO { cells: CellInfoDTO[] } +/** 租用中的智能柜详情DTO */ +export interface RentingCabinetDetailDTO { + /** 柜机ID */ + cabinetId: number + /** 柜机名称 */ + cabinetName: string + /** 锁控编号 */ + lockControlNo: number + /** 柜格列表 */ + cells: CabinetCellEntity[] +} + +/** 智能柜格口实体类 */ +export interface CabinetCellEntity { + /** 格口唯一ID */ + cellId: number + /** 关联柜机ID */ + cabinetId: number + /** 主板ID */ + mainboardId?: number + /** 格口号 */ + cellNo: number + /** 针脚序号 */ + pinNo: number + /** 库存数量 */ + stock: number + /** 格口价格 */ + cellPrice?: number + /** 是否已租用:0-未租用,1-已租用 */ + isRented: number + /** 格口类型(1小格 2中格 3大格 4超大格) */ + cellType: number + /** 使用状态:1空闲 2已占用 */ + usageStatus: number + /** 可用状态:1正常 2故障 */ + availableStatus: number + /** 商品ID */ + goodsId?: number +} + export interface CellInfoDTO { cellId: number cellNo: number