From 24bdfa27c3b6b723dc1d6caf431fa254295a81e1 Mon Sep 17 00:00:00 2001 From: dzq Date: Sat, 26 Apr 2025 07:59:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E5=92=8C?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将订单编号字段从`orderNumber`改为`orderId`并添加`cellId`字段以支持格口ID查询 - 在订单DTO中添加`goodsNames`和`coverImgs`字段以展示商品名称和封面图 - 在订单列表页面增加商品名称和封面图的展示,并调整分页大小为5 - 在格口商品页面添加购买记录按钮,支持跳转到订单列表并自动查询该格口的订单 --- src/api/shop/order.ts | 16 +++++++- src/views/shop/cabinet-goods/index.vue | 17 +++++++-- src/views/shop/order/index.vue | 51 +++++++++++++++++++++----- 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/src/api/shop/order.ts b/src/api/shop/order.ts index f596854..4b939f8 100644 --- a/src/api/shop/order.ts +++ b/src/api/shop/order.ts @@ -2,7 +2,9 @@ import { http } from "@/utils/http"; export interface OrderQuery extends BasePageQuery { /** 订单编号 */ - orderNumber?: string; + orderId?: number; + /** 格口id */ + cellId?: number; /** * 订单状态 * @remarks @@ -74,6 +76,18 @@ export interface OrderDTO { paymentMethod?: string; /** 支付时间 */ payTime?: string; + /** + * 商品名称 + * @remarks + * 多个商品名称用逗号分隔 + */ + goodsNames?: string; + /** + * 商品封面图 + * @remarks + * 多个商品封面图用逗号分隔 + */ + coverImgs?: string; } export const getOrderListApi = (params?: OrderQuery) => { diff --git a/src/views/shop/cabinet-goods/index.vue b/src/views/shop/cabinet-goods/index.vue index 78ff1e6..7dd41b7 100644 --- a/src/views/shop/cabinet-goods/index.vue +++ b/src/views/shop/cabinet-goods/index.vue @@ -14,11 +14,13 @@ import { ElMessage, ElMessageBox } from "element-plus"; import { on } from "events"; import CabinetGoodsConfigModal from "./cabinet-goods-config-modal.vue"; import { getGoodsInfo } from "@/api/shop/goods"; +import { useRouter } from "vue-router"; defineOptions({ name: "CabinetGoods" }); +const router = useRouter(); const formRef = ref(); const tableRef = ref(); @@ -258,7 +260,7 @@ const handleClearGoods = async (row: CabinetCellDTO) => { --> - + - - - + + + + +