From 363721b0c206a2f6099ee24dfab31b88e6fd447b Mon Sep 17 00:00:00 2001 From: dzq Date: Tue, 1 Jul 2025 11:38:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=99=BA=E8=83=BD=E6=9F=9C):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9F=9C=E6=A0=BC=E7=A7=9F=E8=B5=81=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=92=8C=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 CabinetCellDTO 中新增租赁相关字段,包括租赁状态、订单信息和用户信息 添加 handleAb98ViewDetail 方法处理用户详情页跳转,并显示租赁用户信息 修改柜格卡片显示逻辑,支持展示租赁用户头像和姓名 --- src/api/cabinet/cabinet-cell.ts | 14 ++++++++ .../cabinet/smart-cabinet-card/detail.vue | 34 +++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/api/cabinet/cabinet-cell.ts b/src/api/cabinet/cabinet-cell.ts index 352f55f..4c6e393 100644 --- a/src/api/cabinet/cabinet-cell.ts +++ b/src/api/cabinet/cabinet-cell.ts @@ -38,6 +38,20 @@ export interface CabinetCellDTO { orderCount?: number; /** 商品价格 */ cellPrice?: number; + /** 是否已租用:0-未租用,1-已租用 */ + isRented?: number; + /** 关联订单商品ID */ + orderGoodsId?: number; + /** 关联订单ID */ + orderId?: number; + /** 购买人姓名 */ + name?: string; + /** 购买人手机号 */ + mobile?: string; + /** 购买人人脸图片 */ + faceImg?: string; + /** 购买人98ab用户ID */ + ab98UserId?: number; } export interface AddCabinetCellCommand { diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index fcc3f29..9ac48bc 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -24,6 +24,7 @@ import EditCabinetDrawer from "./edit-cabinet-drawer.vue"; import { CabinetMainboardDTO, deleteMainboard, getMainboardList, updateMainboard } from "@/api/cabinet/mainboards"; import { getShopById, ShopDTO, getModeText } from "@/api/shop/shop"; import { useBtnPermissionStore } from "@/store/modules/btnPermission"; +import { useMultiTagsStoreHook } from "@/store/modules/multiTags"; defineOptions({ name: "SmartCabinetDetail" @@ -268,6 +269,26 @@ async function handleDeleteMainboard(row: CabinetMainboardDTO) { } } + +const handleAb98ViewDetail = (ab98UserId: number, name: string) => { + // 保存信息到标签页 + useMultiTagsStoreHook().handleTags("push", { + path: `/user/ab98/detail`, + name: "ab98Detail", + query: { id: ab98UserId }, + meta: { + title: `${name}`, + dynamicLevel: 3 + } + }); + router.push({ + path: '/user/ab98/detail', + query: { + id: ab98UserId + } + }); +}; + onMounted(() => { cabinetId.value = Number(route.query.id); fetchCabinetDetail(); @@ -360,7 +381,8 @@ onMounted(() => {
- + @@ -392,10 +414,16 @@ onMounted(() => { @click="handleEditCell(item)" class="cell-btn"> {{ item.goodsName }} - + 格口配置 + + {{ item.name }} +