Forráskód Böngészése

feat(order): 更新订单管理页面功能

- 将停止类型字段更改为结束原因,并更新字典代码
- 添加充电订单号自定义模板显示
- 实现时间范围参数处理通用函数
- 重写导出功能以处理时间参数和过滤空值
- 在用户订单中添加退款时间搜索功能
- 在用户反馈中添加图片预览功能
- 在用户信息中添加退款记录查看功能
- 添加用户退款订单API接口和数据模型
zouzexu 3 napja
szülő
commit
62e33982ac

+ 51 - 0
src/api/userManage/user-info-api.ts

@@ -74,6 +74,17 @@ const UserInfoAPI = {
       method: "put",
     });
   },
+  /**
+   * 获取用户退款订单列表
+   * @param queryParams
+   */
+  getUserRefundOrderList(queryParams?: UserRefundOrderPageQuery) {
+    return request<any, PageResult<UserRefundOrderPageVO[]>>({
+      url: `/api/v1/user-refunds-order-info/page`,
+      method: "get",
+      params: queryParams,
+    });
+  },
 };
 
 export default UserInfoAPI;
@@ -121,3 +132,43 @@ export interface UserInfoPageVO {
   /** 创建时间 */
   createTime?: Date;
 }
+
+/** 用户退款订单分页查询参数 */
+export interface UserRefundOrderPageQuery extends PageQuery {
+  /** 用户ID(必传) */
+  userId: number;
+  /** 开始时间 */
+  startTime?: string;
+  /** 结束时间 */
+  endTime?: string;
+}
+
+/** 用户退款订单分页对象 */
+export interface UserRefundOrderPageVO {
+  /** 订单ID */
+  orderId?: number;
+  /** 商户订单号 */
+  orderNo?: string;
+  /** 退款类型:1-主动退款 2-用户申请退款 */
+  type?: number;
+  /** 商户退款单号 */
+  outRefundNo?: string;
+  /** 微信支付退款单号 */
+  refundId?: string;
+  /** 微信支付订单号 */
+  transactionId?: string;
+  /** 退款原因 */
+  reason?: string;
+  /** 退款受理时间 */
+  acceptedTime?: string;
+  /** 退款成功时间 */
+  successTime?: string;
+  /** 退款金额(元) */
+  amount?: number;
+  /** 退款状态 */
+  status?: string;
+  /** 创建时间 */
+  createTime?: string;
+  /** 通知请求 */
+  notifyRequest?: string;
+}

+ 63 - 306
src/views/orderManage/charge-order-info/index.vue

@@ -17,8 +17,8 @@
           v-bind="scope.attrs"
         />
       </template>
-      <template #stopType="scope">
-        <Dict v-model="scope.formData[scope.prop]" code="stop_type" v-bind="scope.attrs" />
+      <template #stopReason="scope">
+        <Dict v-model="scope.formData[scope.prop]" code="charge_stop_reason" v-bind="scope.attrs" />
       </template>
       <template #maspStatus="scope">
         <Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
@@ -51,6 +51,9 @@
       <template #maspStatus="scope">
         <DictLabel v-model="scope.row[scope.prop]" code="masp_status" />
       </template>
+      <template #stopReason="scope">
+        <DictLabel v-model="scope.row[scope.prop]" code="charge_stop_reason" />
+      </template>
     </page-content>
 
     <!-- 新增 -->
@@ -79,6 +82,9 @@
       :modal-config="editModalConfig"
       @submit-click="handleSubmitClick"
     >
+      <template #chargeOrderNo="scope">
+        <span class="color-coolGray">{{ scope.formData[scope.prop] }}</span>
+      </template>
       <template #orderType="scope">
         <Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
       </template>
@@ -109,6 +115,20 @@ import ChargeOrderInfoAPI, {
 import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
 import usePage from "@/components/CURD/usePage";
 
+// 处理时间范围参数的通用函数
+const processTimeParams = (params: any) => {
+  const processedParams = { ...params };
+  if ("createTime" in processedParams) {
+    const createTime = processedParams.createTime as string[];
+    if (createTime?.length > 1) {
+      processedParams.startTime = createTime[0] + " 00:00:00";
+      processedParams.endTime = createTime[1] + " 23:59:59";
+    }
+    delete processedParams.createTime;
+  }
+  return processedParams;
+};
+
 // 组合式 CRUD
 const {
   searchRef,
@@ -120,11 +140,34 @@ const {
   handleAddClick,
   handleEditClick,
   handleSubmitClick,
-  handleExportClick,
+  handleExportClick: defaultHandleExportClick,
   handleSearchClick,
   handleFilterChange,
 } = usePage();
 
+// 重写导出函数,处理时间参数
+const handleExportClick = () => {
+  const queryParams = searchRef.value?.getQueryParams();
+  if (queryParams) {
+    const processedParams = processTimeParams(queryParams);
+    // 过滤空值参数
+    const filteredParams: any = {};
+    for (const key in processedParams) {
+      const value = processedParams[key];
+      if (value !== "" && value !== null && value !== undefined) {
+        if (Array.isArray(value)) {
+          if (value.length > 0) {
+            filteredParams[key] = value;
+          }
+        } else {
+          filteredParams[key] = value;
+        }
+      }
+    }
+    contentRef.value?.exportPageData(filteredParams);
+  }
+};
+
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
   permPrefix: "business:charge-order-info",
@@ -166,18 +209,18 @@ const searchConfig: ISearchConfig = reactive({
       label: "状态", //0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
       prop: "status",
       attrs: {
-        placeholder: "状态",
+        placeholder: "选择状态",
         clearable: true,
         style: { width: "200px" },
       },
     },
     {
       type: "custom",
-      slotName: "stopType",
-      label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
-      prop: "stopType",
+      slotName: "stopReason",
+      label: "结束原因", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
+      prop: "stopReason",
       attrs: {
-        placeholder: "停止类型",
+        placeholder: "选择结束原因",
         clearable: true,
         style: { width: "200px" },
       },
@@ -238,19 +281,9 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
   // 主键
   pk: "id",
   // 列表查询接口
-  // indexAction: ChargeOrderInfoAPI.getPage,
-  // 列表查询接口
   indexAction: (params: any) => {
-    // 处理创建时间范围参数
-    if ("createTime" in params) {
-      const createTime = params.createTime as string[];
-      if (createTime?.length > 1) {
-        params.startTime = createTime[0] + " 00:00:00";
-        params.endTime = createTime[1] + " 23:59:59";
-      }
-      delete params.createTime;
-    }
-    return ChargeOrderInfoAPI.getPage(params);
+    const processedParams = processTimeParams(params);
+    return ChargeOrderInfoAPI.getPage(processedParams);
   },
   // 删除接口
   deleteAction: ChargeOrderInfoAPI.deleteByIds,
@@ -315,17 +348,21 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
     { label: "优惠描述", prop: "discountDesc" },
     { label: "优惠券金额", prop: "couponPrice" },
     {
-      label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
-      prop: "stopType",
+      label: "结束原因",
+      prop: "stopReason",
       templet: "custom",
-      slotName: "stopType",
+      slotName: "stopReason",
     },
-    { label: "充电结束原因", prop: "stopReason" },
     { label: "企业名称", prop: "firmName" },
     { label: "企业专享优惠价", prop: "firmPrice" },
     { label: "备注", prop: "remark" },
     { label: "创建时间", prop: "createTime" },
-
+    {
+      label: "操作",
+      prop: "operation",
+      templet: "tool",
+      operat: ["edit"],
+    },
   ],
 });
 
@@ -348,53 +385,9 @@ const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
   formItems: [
     {
       type: "custom",
-      label: "订单类型",
-      prop: "orderType",
-      slotName: "orderType",
-      attrs: {
-        placeholder: "订单类型",
-        style: { width: "100%" },
-      },
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电桩编号",
-      },
-      label: "充电桩编号",
-      prop: "equipmentId",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电订单号",
-      },
       label: "充电订单号",
       prop: "chargeOrderNo",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电开始时间",
-      },
-      label: "充电开始时间",
-      prop: "startTime",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电结束时间",
-      },
-      label: "充电结束时间",
-      prop: "endTime",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电时间",
-      },
-      label: "充电时间(秒)",
-      prop: "chargeTime",
+      slotName: "chargeOrderNo",
     },
     {
       type: "custom",
@@ -406,242 +399,6 @@ const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
         style: { width: "100%" },
       },
     },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电消费总额",
-      },
-      label: "充电消费总额",
-      prop: "thirdPartyTotalCost",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电服务费",
-      },
-      label: "充电服务费",
-      prop: "thirdPartyServerfee",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电金额",
-      },
-      label: "充电金额",
-      prop: "thirdPartyElecfee",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "实际充电度数",
-      },
-      label: "实际充电度数", //(单位:0.001 kw/h)
-      prop: "totalCharge",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "平台实际收取金额",
-      },
-      label: "平台实际收取金额",
-      prop: "realCost",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "平台总服务费",
-      },
-      label: "平台总服务费",
-      prop: "realServiceCost",
-    },
-    {
-      type: "custom",
-      label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
-      prop: "stopType",
-      slotName: "stopType",
-      attrs: {
-        placeholder: "停止类型",
-        style: { width: "100%" },
-      },
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "请求启动充电的手机号",
-      },
-      label: "请求启动充电的手机号",
-      prop: "phone",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "车牌号",
-      },
-      label: "车牌号", //( 停车减免必传,格式确保正确)
-      prop: "plateNum",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电结束原因",
-      },
-      label: "充电结束原因",
-      prop: "stopReason",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "推送",
-      },
-      label: "推送", //:充电明细信息
-      prop: "chargeDetails",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "充电站id",
-      },
-      label: "充电站id",
-      prop: "thirdPartyStationId",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "预充值金额",
-      },
-      label: "预充值金额",
-      prop: "preAmt",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "平台预扣服务费",
-      },
-      label: "平台预扣服务费",
-      prop: "realPredictServiceCost",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "补缴金额",
-      },
-      label: "补缴金额", //(智停)
-      prop: "maspAmount",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "平台补缴金额",
-      },
-      label: "平台补缴金额",
-      prop: "maspRealAmount",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "需要补缴的总金额",
-      },
-      label: "需要补缴的总金额",
-      prop: "totalMaspMoney",
-    },
-    {
-      type: "custom",
-      label: "补缴状态", //  0.无需补缴  1.待补缴  2.已补缴
-      prop: "maspStatus",
-      slotName: "maspStatus",
-      attrs: {
-        placeholder: "补缴状态",
-        style: { width: "100%" },
-      },
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "补缴时间",
-      },
-      label: "补缴时间",
-      prop: "maspTime",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "补缴描述",
-      },
-      label: "补缴描述", //(默认:系统扣除)
-      prop: "maspDesc",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "优惠金额",
-      },
-      label: "优惠金额",
-      prop: "discountMoney",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "优惠描述",
-      },
-      label: "优惠描述", //(前端展示为优惠描述+优惠金额)
-      prop: "discountDesc",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "优惠活动ID",
-      },
-      label: "优惠活动ID",
-      prop: "discountInfoId",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "按平台计费规则,实际收取的服务费",
-      },
-      label: "按平台计费规则,实际收取的服务费",
-      prop: "realThirdCost",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "企业id",
-      },
-      label: "企业id",
-      prop: "firmId",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "企业专享优惠价",
-      },
-      label: "企业专享优惠价",
-      prop: "firmPrice",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "优惠券金额",
-      },
-      label: "优惠券金额",
-      prop: "couponPrice",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "备注",
-      },
-      label: "备注",
-      prop: "remark",
-    },
-    {
-      type: "input",
-      attrs: {
-        placeholder: "创建时间",
-      },
-      label: "创建时间",
-      prop: "createTime",
-    },
   ],
   // 提交函数
   formAction: (data: ChargeOrderInfoForm) => {

+ 63 - 15
src/views/orderManage/user-order-info/index.vue

@@ -58,17 +58,37 @@
 </template>
 
 <script setup lang="ts">
-import PromotionCouponTemplateAPI from "@/api/operationsManage/promotion-coupon-template-api";
-
 defineOptions({ name: "UserOrderInfo" });
-
 import UserOrderInfoAPI, {
   UserOrderInfoForm,
   UserOrderInfoPageQuery,
 } from "@/api/orderManage/user-order-info-api";
 import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
 import usePage from "@/components/CURD/usePage";
-import ChargeOrderInfoAPI from "@/api/orderManage/charge-order-info-api";
+
+// 处理时间范围参数的通用函数
+const processTimeParams = (params: any) => {
+  const processedParams = { ...params };
+  // 处理创建时间
+  if ("createTime" in processedParams) {
+    const createTime = processedParams.createTime as string[];
+    if (createTime?.length > 1) {
+      processedParams.startTime = createTime[0] + " 00:00:00";
+      processedParams.endTime = createTime[1] + " 23:59:59";
+    }
+    delete processedParams.createTime;
+  }
+  // 处理退款时间
+  if ("refundTime" in processedParams) {
+    const refundTime = processedParams.refundTime as string[];
+    if (refundTime?.length > 1) {
+      processedParams.refundStartTime = refundTime[0] + " 00:00:00";
+      processedParams.refundEndTime = refundTime[1] + " 23:59:59";
+    }
+    delete processedParams.refundTime;
+  }
+  return processedParams;
+};
 
 // 组合式 CRUD
 const {
@@ -81,11 +101,34 @@ const {
   handleAddClick,
   handleEditClick,
   handleSubmitClick,
-  handleExportClick,
+  handleExportClick: defaultHandleExportClick,
   handleSearchClick,
   handleFilterChange,
 } = usePage();
 
+// 重写导出函数,处理时间参数
+const handleExportClick = () => {
+  const queryParams = searchRef.value?.getQueryParams();
+  if (queryParams) {
+    const processedParams = processTimeParams(queryParams);
+    // 过滤空值参数
+    const filteredParams: any = {};
+    for (const key in processedParams) {
+      const value = processedParams[key];
+      if (value !== "" && value !== null && value !== undefined) {
+        if (Array.isArray(value)) {
+          if (value.length > 0) {
+            filteredParams[key] = value;
+          }
+        } else {
+          filteredParams[key] = value;
+        }
+      }
+    }
+    contentRef.value?.exportPageData(filteredParams);
+  }
+};
+
 // 搜索配置
 const searchConfig: ISearchConfig = reactive({
   permPrefix: "business:user-order-info",
@@ -134,6 +177,19 @@ const searchConfig: ISearchConfig = reactive({
         style: { width: "240px" },
       },
     },
+    {
+      type: "date-picker",
+      label: "退款时间",
+      prop: "refundTime",
+      attrs: {
+        type: "daterange",
+        "range-separator": "~",
+        "start-placeholder": "开始时间",
+        "end-placeholder": "截止时间",
+        "value-format": "YYYY-MM-DD",
+        style: { width: "240px" },
+      },
+    },
   ],
 });
 
@@ -149,16 +205,8 @@ const contentConfig: IContentConfig<UserOrderInfoPageQuery> = reactive({
   pk: "id",
   // 列表查询接口
   indexAction: (params: any) => {
-    // 处理创建时间范围参数
-    if ("createTime" in params) {
-      const createTime = params.createTime as string[];
-      if (createTime?.length > 1) {
-        params.startTime = createTime[0] + " 00:00:00";
-        params.endTime = createTime[1] + " 23:59:59";
-      }
-      delete params.createTime;
-    }
-    return UserOrderInfoAPI.getPage(params);
+    const processedParams = processTimeParams(params);
+    return UserOrderInfoAPI.getPage(processedParams);
   },
   // 删除接口
   deleteAction: UserOrderInfoAPI.deleteByIds,

+ 4 - 0
src/views/userManage/user-feedback/index.vue

@@ -24,6 +24,10 @@
           {{ scope.row.replyStatus == 1 ? "已回复" : "未回复" }}
         </el-tag>
       </template>
+      <template #images="scope">
+        <el-image v-if="scope.row.images != ''" :src="scope.row.images" style="width: 100px" />
+        <span v-else>暂未上传图片</span>
+      </template>
     </page-content>
 
     <!-- 新增 -->

+ 223 - 2
src/views/userManage/user-info/index.vue

@@ -34,13 +34,116 @@
       :modal-config="editModalConfig"
       @submit-click="handleSubmitClick"
     ></page-modal>
+
+    <!-- 退款记录弹窗 -->
+    <el-dialog
+      v-model="refundRecordDialogVisible"
+      title="退款记录"
+      width="80%"
+      :close-on-click-modal="false"
+    >
+      <div class="refund-record-container">
+        <!-- 搜索区域 -->
+        <el-form :inline="true" :model="refundQueryParams" class="search-form">
+          <el-form-item label="创建时间">
+            <el-date-picker
+              v-model="refundDateRange"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              value-format="YYYY-MM-DD HH:mm:ss"
+              :default-time="[new Date(0, 0, 0, 0, 0, 0), new Date(0, 0, 0, 23, 59, 59)]"
+              @change="handleRefundDateChange"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="handleRefundQuery">查询</el-button>
+            <el-button @click="handleRefundReset">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <!-- 表格 -->
+        <el-table
+          v-loading="refundTableLoading"
+          :data="refundTableData"
+          border
+          style="width: 100%"
+        >
+          <el-table-column prop="orderId" label="订单ID" width="100" />
+          <el-table-column prop="orderNo" label="商户订单号" width="180" />
+          <el-table-column prop="type" label="退款类型" width="120">
+            <template #default="{ row }">
+              <el-tag :type="row.type === 1 ? 'warning' : 'info'">
+                {{ row.type === 1 ? '主动退款' : '用户申请退款' }}
+              </el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column prop="outRefundNo" label="商户退款单号" width="180" />
+          <el-table-column prop="refundId" label="微信支付退款单号" width="200" />
+          <el-table-column prop="transactionId" label="微信支付订单号" width="200" />
+          <el-table-column prop="reason" label="退款原因" width="150" show-overflow-tooltip />
+          <el-table-column prop="acceptedTime" label="退款受理时间" width="180" />
+          <el-table-column prop="successTime" label="退款成功时间" width="180" />
+          <el-table-column prop="amount" label="退款金额(元)" width="130">
+            <template #default="{ row }">
+              <span class="money-text danger">¥ {{ formatMoney(row.amount) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="status" label="退款状态" width="120" />
+          <el-table-column prop="createTime" label="创建时间" width="180" />
+          <el-table-column label="操作" width="100">
+            <template #default="{ row }">
+              <el-button type="info" link @click="handleRefundRecordClick(row)">退款日志</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 分页 -->
+        <el-pagination
+          v-model:current-page="refundQueryParams.pageNum"
+          v-model:page-size="refundQueryParams.pageSize"
+          :total="refundTotal"
+          :page-sizes="[10, 20, 30, 50]"
+          layout="total, sizes, prev, pager, next, jumper"
+          background
+          @size-change="handleRefundSizeChange"
+          @current-change="handleRefundCurrentChange"
+        />
+      </div>
+    </el-dialog>
+
+    <!-- 退款日志抽屉 -->
+    <el-dialog
+      v-model="refundLogDrawerVisible"
+      title="退款日志"
+      :size="200"
+      :close-on-click-modal="false"
+    >
+      <el-form label-width="120px">
+        <el-form-item label="通知请求">
+          <el-input
+            v-model="currentNotifyRequest"
+            type="textarea"
+            :rows="20"
+            readonly
+            placeholder="暂无数据"
+          />
+        </el-form-item>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
 <script setup lang="ts">
 defineOptions({ name: "UserInfo" });
 
-import UserInfoAPI, { UserInfoForm, UserInfoPageQuery } from "@/api/userManage/user-info-api";
+import UserInfoAPI, {
+  UserInfoForm,
+  UserInfoPageQuery,
+  UserRefundOrderPageQuery,
+  UserRefundOrderPageVO,
+} from "@/api/userManage/user-info-api";
 import UserFirmAPI from "@/api/toBManage/user-firm-api";
 import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
 import usePage from "@/components/CURD/usePage";
@@ -176,6 +279,15 @@ const contentConfig: IContentConfig<UserInfoPageQuery> = reactive({
             size: "small",
           },
         },
+        {
+          name: "refundRecord",
+          text: "退款记录",
+          attrs: {
+            type: "info",
+            link: true,
+            size: "small",
+          },
+        },
         {
           name: "refund",
           text: "退款",
@@ -183,7 +295,7 @@ const contentConfig: IContentConfig<UserInfoPageQuery> = reactive({
             type: "danger",
             size: "small",
           },
-          render: (row: any) => row.balance>0,
+          render: (row: any) => row.balance > 0,
         },
       ],
     },
@@ -245,6 +357,9 @@ const handleOperateClick = (data: IObject) => {
     handleEditClick(data.row, async () => {
       return await UserInfoAPI.getFormData(data.row.id);
     });
+  } else if (data.name === "refundRecord") {
+    // 打开退款记录弹窗
+    openRefundRecordDialog(data.row);
   } else if (data.name === "refund") {
     ElMessageBox.confirm("确认要为该用户执行退款操作吗?", "退款确认", {
       confirmButtonText: "确认",
@@ -289,6 +404,99 @@ const handleSortChange = (data: { prop: string; order: string | null }) => {
   // 带着排序参数重新查询
   contentRef.value?.fetchPageData({ ...sortParams });
 };
+
+// ==================== 退款记录弹窗相关 ====================
+const refundRecordDialogVisible = ref(false);
+const refundTableLoading = ref(false);
+const refundTableData = ref<UserRefundOrderPageVO[]>([]);
+const refundTotal = ref(0);
+const refundDateRange = ref<[string, string]>();
+const currentUserId = ref<number>(0);
+
+// 退款查询参数
+const refundQueryParams = reactive<UserRefundOrderPageQuery>({
+  pageNum: 1,
+  pageSize: 10,
+  userId: 0,
+  startTime: undefined,
+  endTime: undefined,
+});
+
+// 打开退款记录弹窗
+const openRefundRecordDialog = (row: any) => {
+  currentUserId.value = row.id;
+  refundQueryParams.userId = row.id;
+  refundQueryParams.pageNum = 1;
+  refundQueryParams.startTime = undefined;
+  refundQueryParams.endTime = undefined;
+  refundDateRange.value = undefined;
+  refundRecordDialogVisible.value = true;
+  fetchRefundRecordList();
+};
+
+// 获取退款记录列表
+const fetchRefundRecordList = async () => {
+  refundTableLoading.value = true;
+  try {
+    const response = await UserInfoAPI.getUserRefundOrderList(refundQueryParams);
+    refundTableData.value = response.list;
+    refundTotal.value = response.total;
+  } catch (error) {
+    console.error("获取退款记录失败:", error);
+    ElMessage.error("获取退款记录失败");
+  } finally {
+    refundTableLoading.value = false;
+  }
+};
+
+// 处理日期范围变化
+const handleRefundDateChange = (value: [string, string] | null) => {
+  if (value && value.length === 2) {
+    refundQueryParams.startTime = value[0];
+    refundQueryParams.endTime = value[1];
+  } else {
+    refundQueryParams.startTime = undefined;
+    refundQueryParams.endTime = undefined;
+  }
+};
+
+// 查询退款记录
+const handleRefundQuery = () => {
+  refundQueryParams.pageNum = 1;
+  fetchRefundRecordList();
+};
+
+// 重置退款查询
+const handleRefundReset = () => {
+  refundQueryParams.pageNum = 1;
+  refundQueryParams.startTime = undefined;
+  refundQueryParams.endTime = undefined;
+  refundDateRange.value = undefined;
+  fetchRefundRecordList();
+};
+
+// 分页大小变化
+const handleRefundSizeChange = (size: number) => {
+  refundQueryParams.pageSize = size;
+  refundQueryParams.pageNum = 1;
+  fetchRefundRecordList();
+};
+
+// 当前页变化
+const handleRefundCurrentChange = (page: number) => {
+  refundQueryParams.pageNum = page;
+  fetchRefundRecordList();
+};
+
+// ==================== 退款日志抽屉相关 ====================
+const refundLogDrawerVisible = ref(false);
+const currentNotifyRequest = ref("");
+
+// 处理退款记录点击
+const handleRefundRecordClick = (row: UserRefundOrderPageVO) => {
+  currentNotifyRequest.value = row.notifyRequest || "";
+  refundLogDrawerVisible.value = true;
+};
 </script>
 
 <style scoped>
@@ -308,4 +516,17 @@ const handleSortChange = (data: { prop: string; order: string | null }) => {
 .money-text.warning {
   color: #e6a23c;
 }
+
+.refund-record-container {
+  padding: 0;
+}
+
+.search-form {
+  margin-bottom: 16px;
+}
+
+.el-pagination {
+  margin-top: 16px;
+  justify-content: flex-end;
+}
 </style>