From 59f8a9f744a69cb23707c84c936fb49412256a5b Mon Sep 17 00:00:00 2001 From: dzq Date: Thu, 27 Nov 2025 10:11:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=80=9F=E8=BF=98=E8=AE=B0=E5=BD=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在商品详情页新增借还记录标签页 - 添加借还记录列表组件,支持分页查询和状态筛选 - 实现借还记录相关接口和类型定义 --- src/api/shop/order.ts | 53 ++++++ src/views/shop/goods/borrow-return-record.vue | 180 ++++++++++++++++++ src/views/shop/goods/detail.vue | 6 + 3 files changed, 239 insertions(+) create mode 100644 src/views/shop/goods/borrow-return-record.vue diff --git a/src/api/shop/order.ts b/src/api/shop/order.ts index 888dfd6..1ab09c0 100644 --- a/src/api/shop/order.ts +++ b/src/api/shop/order.ts @@ -136,4 +136,57 @@ export const exportOrderExcelApi = (params: OrderQuery, fileName: string) => { payTime: params?.payTime ? params.payTime : undefined } }); +}; + +export interface BorrowReturnRecordQuery extends BasePageQuery { + /** 商品ID */ + goodsId?: number; + /** + * 状态 + * @remarks + * 0-未退还 | 1-待审批 | 2-已通过 | 3-已驳回 + */ + status?: number; +} + +export interface BorrowReturnRecordDTO { + /** 订单ID */ + orderId: number; + /** 审批ID */ + approvalId?: number; + /** 订单创建时间 */ + orderTime?: Date; + /** 归还图片 */ + returnImages?: string; + /** 审核图片 */ + auditImages?: string; + /** 订单商品价格 */ + goodsPrice: number; + /** 支付方式 */ + paymentMethod?: string; + /** 订单姓名 */ + orderName?: string; + /** 订单手机号 */ + orderMobile?: string; + /** 订单商品数量 */ + quantity: number; + /** 审批人 */ + auditName?: string; + /** 审核说明 */ + auditRemark?: string; + /** + * 状态 + * @remarks + * 0-未退还 | 1-待审批 | 2-已通过 | 3-已驳回 + */ + status: number; + /** 状态描述 */ + statusStr: string; +} + +/** 获取借还记录分页列表 */ +export const getBorrowReturnRecordListApi = (params?: BorrowReturnRecordQuery) => { + return http.request>>("get", "/shop/order/borrow-return-record", { + params + }); }; \ No newline at end of file diff --git a/src/views/shop/goods/borrow-return-record.vue b/src/views/shop/goods/borrow-return-record.vue new file mode 100644 index 0000000..d658e5a --- /dev/null +++ b/src/views/shop/goods/borrow-return-record.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/shop/goods/detail.vue b/src/views/shop/goods/detail.vue index 41d3f1c..d7f3e37 100644 --- a/src/views/shop/goods/detail.vue +++ b/src/views/shop/goods/detail.vue @@ -7,6 +7,7 @@ import { ElMessage } from "element-plus"; import { useRenderIcon } from '@/components/ReIcon/src/hooks'; import EditPen from '@iconify-icons/ep/edit-pen'; import GoodsEditModal from "./goods-edit-modal.vue"; +import BorrowReturnRecord from "./borrow-return-record.vue"; import { useBtnPermissionStore } from "@/store/modules/btnPermission"; const handleEdit = (row: GoodsDTO) => { @@ -120,6 +121,7 @@ watch(goodsId, () => { + @@ -197,6 +199,10 @@ watch(goodsId, () => {
+ +
+ +