瀏覽代碼

feat(理赔管理): 新增理赔管理模块,包括路由配置、API接口和前端页面

yz 2 月之前
父節點
當前提交
9fac2a87b0
共有 3 個文件被更改,包括 956 次插入0 次删除
  1. 232 0
      src/api/claim/index.js
  2. 23 0
      src/router/views/index.js
  3. 701 0
      src/views/claim/index.vue

+ 232 - 0
src/api/claim/index.js

@@ -0,0 +1,232 @@
+import request from '@/router/axios';
+
+/**
+ * 理赔申请查询参数类型定义
+ * @typedef {Object} ClaimQueryParams
+ * @property {string} [claimNo] - 理赔编号
+ * @property {number} [claimSourceType] - 理赔来源类型 1-经销商 2-门店
+ * @property {string} [sourceCode] - 来源编码
+ * @property {string} [sourceName] - 来源名称
+ * @property {string} [consumerName] - 消费者姓名
+ * @property {string} [consumerPhone] - 消费者电话
+ * @property {string} [tyreNo] - 轮胎编号
+ * @property {number} [auditStatus] - 审核状态 0-待审核 1-审核通过 2-审核拒绝
+ * @property {string} [startDate] - 开始日期
+ * @property {string} [endDate] - 结束日期
+ */
+
+/**
+ * 理赔申请数据项类型定义
+ * @typedef {Object} ClaimItem
+ * @property {string} id - 理赔ID
+ * @property {string} claimNo - 理赔编号
+ * @property {number} claimSourceType - 理赔来源类型
+ * @property {number} sourceId - 来源ID
+ * @property {string} sourceCode - 来源编码
+ * @property {string} sourceName - 来源名称
+ * @property {string} consumerName - 消费者姓名
+ * @property {string} consumerPhone - 消费者电话
+ * @property {string} tyreNo - 轮胎编号
+ * @property {string} tyreSpecs - 轮胎规格
+ * @property {string} purchaseDate - 购买日期
+ * @property {string} mountDate - 安装日期
+ * @property {number} runMileage - 行驶里程
+ * @property {string} claimReason - 理赔原因
+ * @property {string} claimAmount - 理赔金额
+ * @property {number} auditStatus - 审核状态
+ * @property {string} submitTime - 提交时间
+ * @property {string} createTime - 创建时间
+ * @property {string} updateTime - 更新时间
+ */
+
+/**
+ * 审核记录数据项类型定义
+ * @typedef {Object} ClaimAuditItem
+ * @property {string} [id] - 审核记录ID(编辑时必需)
+ * @property {number} claimId - 理赔ID
+ * @property {string} claimNo - 理赔编号
+ * @property {number} auditResult - 审核结果 1-通过 2-拒绝
+ * @property {number} auditAmount - 审核金额
+ * @property {string} reasonDetail - 审核说明
+ * @property {number} auditorId - 审核人ID
+ * @property {string} auditorName - 审核人姓名
+ * @property {string} auditTime - 审核时间
+ * @property {string} [feedbackChannel] - 反馈渠道
+ * @property {string} [feedbackDesc] - 反馈描述
+ * @property {string} [feedbackTime] - 反馈时间
+ * @property {number} [appealStatus] - 申诉状态 0-无申诉 1-申诉中
+ * @property {string} [appealResult] - 申诉结果
+ * @property {string} [appealTime] - 申诉时间
+ * @property {string} [createTime] - 创建时间
+ */
+
+/**
+ * API响应数据类型定义
+ * @template T
+ * @typedef {Object} ApiResponse
+ * @property {number} code - 响应码
+ * @property {boolean} success - 是否成功
+ * @property {T} data - 响应数据
+ * @property {string} msg - 响应消息
+ */
+
+/**
+ * 分页结果类型定义
+ * @template T
+ * @typedef {Object} PageResult
+ * @property {number} total - 总记录数
+ * @property {T[]} records - 记录列表
+ * @property {number} current - 当前页码
+ * @property {number} size - 每页大小
+ */
+
+/**
+ * 理赔申请分页查询
+ * @param {number} current - 当前页码
+ * @param {number} size - 每页大小
+ * @param {ClaimQueryParams} params - 查询参数
+ * @returns {Promise<ApiResponse<PageResult<ClaimItem>>>} 分页查询结果
+ */
+export const getClaimList = (current, size, params) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim',
+    method: 'get',
+    params: {
+      current,
+      size,
+      ...params
+    }
+  })
+}
+
+/**
+ * 获取理赔申请详情
+ * @param {string} claimId - 理赔ID
+ * @returns {Promise<ApiResponse<ClaimItem>>} 理赔详情
+ */
+export const getClaimDetail = (claimId) => {
+  return request({
+    url: `/api/blade-factory/api/factory/claim/${claimId}`,
+    method: 'get'
+  })
+}
+
+/**
+ * 获取理赔附件列表
+ * @param {number} current - 当前页码
+ * @param {number} size - 每页大小
+ * @param {string} claimId - 理赔ID
+ * @returns {Promise<ApiResponse<PageResult<Object>>>} 附件列表
+ */
+export const getClaimAttachments = (current, size, claimId) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim-attachment',
+    method: 'get',
+    params: {
+      current,
+      size,
+      claimId
+    }
+  })
+}
+
+/**
+ * 获取理赔审核结果列表
+ * @param {number} current - 当前页码
+ * @param {number} size - 每页大小
+ * @param {string} claimId - 理赔ID
+ * @returns {Promise<ApiResponse<PageResult<ClaimAuditItem>>>} 审核记录列表
+ */
+export const getClaimAuditList = (current, size, claimId) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim-audit',
+    method: 'get',
+    params: {
+      current,
+      size,
+      claimId
+    }
+  })
+}
+
+/**
+ * 添加理赔审核记录
+ * @param {ClaimAuditItem} auditData - 审核记录数据
+ * @returns {Promise<ApiResponse<boolean>>} 添加结果
+ */
+export const addClaimAudit = (auditData) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim-audit',
+    method: 'post',
+    data: auditData
+  })
+}
+
+/**
+ * 更新理赔审核记录
+ * @param {ClaimAuditItem} auditData - 审核记录数据(必须包含id)
+ * @returns {Promise<ApiResponse<boolean>>} 更新结果
+ */
+export const updateClaimAudit = (auditData) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim-audit',
+    method: 'put',
+    data: auditData
+  })
+}
+
+/**
+ * 删除理赔审核记录
+ * @param {string} ids - 要删除的ID,多个用逗号分隔
+ * @returns {Promise<ApiResponse<boolean>>} 删除结果
+ */
+export const removeClaimAudit = (ids) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim-audit/remove',
+    method: 'post',
+    params: {
+      ids
+    }
+  })
+}
+
+/**
+ * 添加理赔申请
+ * @param {ClaimItem} row - 理赔申请数据
+ * @returns {Promise<ApiResponse<boolean>>} 添加结果
+ */
+export const addClaim = (row) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim',
+    method: 'post',
+    data: row
+  })
+}
+
+/**
+ * 更新理赔申请
+ * @param {ClaimItem} row - 理赔申请数据
+ * @returns {Promise<ApiResponse<boolean>>} 更新结果
+ */
+export const updateClaim = (row) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim',
+    method: 'put',
+    data: row
+  })
+}
+
+/**
+ * 删除理赔申请
+ * @param {string} ids - 要删除的ID,多个用逗号分隔
+ * @returns {Promise<ApiResponse<boolean>>} 删除结果
+ */
+export const removeClaim = (ids) => {
+  return request({
+    url: '/api/blade-factory/api/factory/claim/remove',
+    method: 'post',
+    params: {
+      ids
+    }
+  })
+}

+ 23 - 0
src/router/views/index.js

@@ -103,6 +103,29 @@ export default [
         ]
     },
     {
+        path: "/claim",
+        component: Layout,
+        redirect: "/claim/index",
+        meta: {
+            icon: "el-icon-warning",
+            title: "理赔管理",
+            keepAlive: true
+        },
+        children: [
+            {
+                path: "index",
+                name: "理赔管理",
+                component: () => import("@/views/claim/index"),
+                meta: {
+                    keepAlive: true,
+                    isAuth: true,
+                    title: "理赔管理",
+                    icon: "el-icon-warning"
+                }
+            }
+        ]
+    },
+    {
         path: "/search",
         component: Layout,
         redirect: "/search/comprehensive",

+ 701 - 0
src/views/claim/index.vue

@@ -0,0 +1,701 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               ref="crud"
+               v-model="form"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel">
+      <template slot-scope="scope" slot="menu">
+        <el-button type="text"
+                   size="small"
+                   plain
+                   class="none-border"
+                   @click.stop="handleDetail(scope.row)">详情
+        </el-button>
+        <el-button type="text"
+                   size="small"
+                   plain
+                   class="none-border"
+                   @click.stop="handleAttachments(scope.row)">附件
+        </el-button>
+        <el-button type="text"
+                   size="small"
+                   plain
+                   class="none-border"
+                   @click.stop="handleAudit(scope.row)">审核记录
+        </el-button>
+      </template>
+      <template slot-scope="{row}" slot="claimSourceType">
+        <el-tag :type="row.claimSourceType === 1 ? 'primary' : 'success'">
+          {{ row.claimSourceType === 1 ? '经销商' : '门店' }}
+        </el-tag>
+      </template>
+      <template slot-scope="{row}" slot="auditStatus">
+        <el-tag :type="getAuditStatusType(row.auditStatus)">
+          {{ getAuditStatusText(row.auditStatus) }}
+        </el-tag>
+      </template>
+    </avue-crud>
+
+    <!-- 理赔详情对话框 -->
+    <el-dialog title="理赔详情"
+               :visible.sync="detailVisible"
+               width="800px"
+               append-to-body>
+      <div v-if="claimDetail">
+        <el-descriptions :column="2" border>
+          <el-descriptions-item label="理赔编号">{{ claimDetail.claimNo }}</el-descriptions-item>
+          <el-descriptions-item label="来源类型">
+            <el-tag :type="claimDetail.claimSourceType === 1 ? 'primary' : 'success'">
+              {{ claimDetail.claimSourceType === 1 ? '经销商' : '门店' }}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item label="来源名称">{{ claimDetail.sourceName }}</el-descriptions-item>
+          <el-descriptions-item label="来源编码">{{ claimDetail.sourceCode }}</el-descriptions-item>
+          <el-descriptions-item label="消费者姓名">{{ claimDetail.consumerName }}</el-descriptions-item>
+          <el-descriptions-item label="消费者电话">{{ claimDetail.consumerPhone }}</el-descriptions-item>
+          <el-descriptions-item label="轮胎编号">{{ claimDetail.tyreNo }}</el-descriptions-item>
+          <el-descriptions-item label="轮胎规格">{{ claimDetail.tyreSpecs }}</el-descriptions-item>
+          <el-descriptions-item label="购买日期">{{ claimDetail.purchaseDate }}</el-descriptions-item>
+          <el-descriptions-item label="安装日期">{{ claimDetail.mountDate }}</el-descriptions-item>
+          <el-descriptions-item label="行驶里程">{{ claimDetail.runMileage }} 公里</el-descriptions-item>
+          <el-descriptions-item label="理赔金额">¥{{ claimDetail.claimAmount }}</el-descriptions-item>
+          <el-descriptions-item label="理赔原因" :span="2">{{ claimDetail.claimReason }}</el-descriptions-item>
+          <el-descriptions-item label="审核状态">
+            <el-tag :type="getAuditStatusType(claimDetail.auditStatus)">
+              {{ getAuditStatusText(claimDetail.auditStatus) }}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item label="提交时间">{{ claimDetail.submitTime }}</el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="detailVisible = false">关闭</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 附件列表对话框 -->
+    <el-dialog title="理赔附件"
+               :visible.sync="attachmentVisible"
+               width="600px"
+               append-to-body>
+      <el-table :data="attachmentList" v-loading="attachmentLoading">
+        <el-table-column prop="fileName" label="文件名" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="fileType" label="文件类型" width="100"></el-table-column>
+        <el-table-column prop="fileSize" label="文件大小" width="120">
+          <template slot-scope="scope">
+            {{ formatFileSize(scope.row.fileSize) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="downloadFile(scope.row)">下载</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="attachmentVisible = false">关闭</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 审核记录对话框 -->
+    <el-dialog title="审核记录"
+               :visible.sync="auditVisible"
+               width="1000px"
+               append-to-body>
+      <div style="margin-bottom: 16px;">
+        <el-button type="primary" size="small" @click="handleAddAudit">新增审核</el-button>
+      </div>
+      <el-table :data="auditList" v-loading="auditLoading">
+        <el-table-column prop="auditResult" label="审核结果" width="100">
+          <template slot-scope="scope">
+            <el-tag :type="getAuditResultType(scope.row.auditResult)">
+              {{ getAuditResultText(scope.row.auditResult) }}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="auditAmount" label="审核金额" width="120">
+          <template slot-scope="scope">
+            ¥{{ scope.row.auditAmount }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="reasonDetail" label="审核说明" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="auditorName" label="审核人" width="100"></el-table-column>
+        <el-table-column prop="auditTime" label="审核时间" width="150"></el-table-column>
+        <el-table-column label="操作" width="150">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="handleEditAudit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="handleDeleteAudit(scope.row)" style="color: #f56c6c;">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="auditVisible = false">关闭</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 审核记录新增/编辑对话框 -->
+    <el-dialog :title="auditFormMode === 'add' ? '新增审核记录' : '编辑审核记录'"
+               :visible.sync="auditFormVisible"
+               width="600px"
+               append-to-body>
+      <el-form :model="auditForm" :rules="auditFormRules" ref="auditFormRef" label-width="120px">
+        <el-form-item label="审核结果" prop="auditResult">
+          <el-select v-model="auditForm.auditResult" placeholder="请选择审核结果" style="width: 100%;">
+            <el-option label="通过" :value="1"></el-option>
+            <el-option label="拒绝" :value="2"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核金额" prop="auditAmount">
+          <el-input-number v-model="auditForm.auditAmount" :precision="4" :min="0" :max="999999.9999" style="width: 100%;" placeholder="请输入审核金额"></el-input-number>
+        </el-form-item>
+        <el-form-item label="审核说明" prop="reasonDetail">
+          <el-input type="textarea" v-model="auditForm.reasonDetail" :rows="3" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+        <el-form-item label="审核人" prop="auditorName">
+          <el-input v-model="auditForm.auditorName" placeholder="请输入审核人姓名"></el-input>
+        </el-form-item>
+        <el-form-item label="审核时间" prop="auditTime">
+          <el-date-picker v-model="auditForm.auditTime" type="datetime" placeholder="请选择审核时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="反馈渠道">
+          <el-select v-model="auditForm.feedbackChannel" placeholder="请选择反馈渠道" style="width: 100%;" clearable>
+            <el-option label="电话" value="电话"></el-option>
+            <el-option label="在线客服" value="在线客服"></el-option>
+            <el-option label="邮件" value="邮件"></el-option>
+            <el-option label="短信" value="短信"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="反馈描述">
+          <el-input type="textarea" v-model="auditForm.feedbackDesc" :rows="2" placeholder="请输入反馈描述"></el-input>
+        </el-form-item>
+        <el-form-item label="反馈时间">
+          <el-date-picker v-model="auditForm.feedbackTime" type="datetime" placeholder="请选择反馈时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="申诉状态">
+          <el-select v-model="auditForm.appealStatus" placeholder="请选择申诉状态" style="width: 100%;">
+            <el-option label="无申诉" :value="0"></el-option>
+            <el-option label="申诉中" :value="1"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="申诉结果" v-if="auditForm.appealStatus === 1">
+          <el-input v-model="auditForm.appealResult" placeholder="请输入申诉结果"></el-input>
+        </el-form-item>
+        <el-form-item label="申诉时间" v-if="auditForm.appealStatus === 1">
+          <el-date-picker v-model="auditForm.appealTime" type="datetime" placeholder="请选择申诉时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="auditFormVisible = false">取消</el-button>
+        <el-button type="primary" @click="handleSaveAudit" :loading="auditFormLoading">确定</el-button>
+      </span>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+import { getClaimList, getClaimDetail, getClaimAttachments, getClaimAuditList, addClaimAudit, updateClaimAudit, removeClaimAudit } from '@/api/claim/index'
+import { mapGetters } from 'vuex'
+
+export default {
+  data() {
+    return {
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      detailVisible: false,
+      attachmentVisible: false,
+      auditVisible: false,
+      auditFormVisible: false,
+      claimDetail: null,
+      attachmentList: [],
+      auditList: [],
+      attachmentLoading: false,
+      auditLoading: false,
+      auditFormLoading: false,
+      currentClaimRow: null,
+      auditFormMode: 'add', // 'add' | 'edit'
+      auditForm: {
+        id: null,
+        claimId: null,
+        claimNo: '',
+        auditResult: null,
+        auditAmount: 0,
+        reasonDetail: '',
+        auditorId: null,
+        auditorName: '',
+        auditTime: '',
+        feedbackChannel: '',
+        feedbackDesc: '',
+        feedbackTime: '',
+        appealStatus: 0,
+        appealResult: '',
+        appealTime: ''
+      },
+      auditFormRules: {
+        auditResult: [
+          { required: true, message: '请选择审核结果', trigger: 'change' }
+        ],
+        auditAmount: [
+          { required: true, message: '请输入审核金额', trigger: 'blur' }
+        ],
+        reasonDetail: [
+          { required: true, message: '请输入审核说明', trigger: 'blur' },
+          { min: 10, message: '审核说明至少10个字符', trigger: 'blur' }
+        ],
+        auditorName: [
+          { required: true, message: '请输入审核人姓名', trigger: 'blur' }
+        ],
+        auditTime: [
+          { required: true, message: '请选择审核时间', trigger: 'change' }
+        ]
+      },
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        indexLabel: '序号',
+        selection: true,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        column: [
+          {
+            label: '理赔编号',
+            prop: 'claimNo',
+            search: true
+          },
+          {
+            label: '来源类型',
+            prop: 'claimSourceType',
+            type: 'select',
+            dicData: [
+              { label: '经销商', value: 1 },
+              { label: '门店', value: 2 }
+            ],
+            search: true,
+            slot: true
+          },
+          {
+            label: '来源名称',
+            prop: 'sourceName',
+            search: true
+          },
+          {
+            label: '来源编码',
+            prop: 'sourceCode',
+            search: true
+          },
+          {
+            label: '消费者姓名',
+            prop: 'consumerName',
+            search: true
+          },
+          {
+            label: '消费者电话',
+            prop: 'consumerPhone',
+            search: true
+          },
+          {
+            label: '轮胎编号',
+            prop: 'tyreNo',
+            search: true
+          },
+          {
+            label: '轮胎规格',
+            prop: 'tyreSpecs'
+          },
+          {
+            label: '理赔金额',
+            prop: 'claimAmount',
+            type: 'number'
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            type: 'select',
+            dicData: [
+              { label: '待审核', value: 0 },
+              { label: '审核通过', value: 1 },
+              { label: '审核拒绝', value: 2 }
+            ],
+            search: true,
+            slot: true
+          },
+          {
+            label: '提交时间',
+            prop: 'submitTime',
+            type: 'datetime',
+            format: 'yyyy-MM-dd HH:mm:ss',
+            valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          }
+        ]
+      },
+      data: []
+    }
+  },
+  computed: {
+    ...mapGetters(['permission'])
+  },
+  methods: {
+    /**
+     * 获取列表数据
+     * @param {Object} page - 分页参数
+     * @param {Object} params - 查询参数
+     */
+    async onLoad(page, params = {}) {
+      try {
+        this.loading = true
+        const res = await getClaimList(page.currentPage, page.pageSize, Object.assign(params, this.query))
+        const data = res.data.data
+        this.page.total = data.total
+        this.data = data.records
+      } catch (error) {
+        console.error('获取理赔列表失败:', error)
+        this.$message.error('获取理赔列表失败')
+      } finally {
+        this.loading = false
+      }
+    },
+
+    /**
+     * 搜索
+     * @param {Object} params - 搜索参数
+     * @param {Function} done - 完成回调
+     */
+    searchChange(params, done) {
+      this.query = params
+      this.onLoad(this.page, params)
+      done()
+    },
+
+    /**
+     * 搜索重置
+     */
+    searchReset() {
+      this.query = {}
+      this.onLoad(this.page)
+    },
+
+    /**
+     * 选择改变
+     * @param {Array} list - 选中的列表
+     */
+    selectionChange(list) {
+      this.selectionList = list
+    },
+
+    /**
+     * 当前页改变
+     * @param {number} currentPage - 当前页码
+     */
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage
+    },
+
+    /**
+     * 页大小改变
+     * @param {number} pageSize - 页大小
+     */
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize
+    },
+
+    /**
+     * 刷新
+     */
+    refreshChange() {
+      this.onLoad(this.page, this.query)
+    },
+
+    /**
+     * 查看详情
+     * @param {Object} row - 行数据
+     */
+    async handleDetail(row) {
+      try {
+        const res = await getClaimDetail(row.id)
+        this.claimDetail = res.data.data
+        this.detailVisible = true
+      } catch (error) {
+        console.error('获取理赔详情失败:', error)
+        this.$message.error('获取理赔详情失败')
+      }
+    },
+
+    /**
+     * 查看附件
+     * @param {Object} row - 行数据
+     */
+    async handleAttachments(row) {
+      try {
+        this.attachmentLoading = true
+        this.attachmentVisible = true
+        const res = await getClaimAttachments(1, 1000, row.id)
+        this.attachmentList = res.data.data.records || []
+      } catch (error) {
+        console.error('获取理赔附件失败:', error)
+        this.$message.error('获取理赔附件失败')
+      } finally {
+        this.attachmentLoading = false
+      }
+    },
+
+    /**
+     * 查看审核记录
+     * @param {Object} row - 行数据
+     */
+    async handleAudit(row) {
+      try {
+        this.currentClaimRow = row
+        this.auditLoading = true
+        this.auditVisible = true
+        const res = await getClaimAuditList(1, 100, row.id)
+        this.auditList = res.data.data.records || []
+      } catch (error) {
+        console.error('获取审核记录失败:', error)
+        this.$message.error('获取审核记录失败')
+      } finally {
+        this.auditLoading = false
+      }
+    },
+
+    /**
+     * 新增审核记录
+     */
+    handleAddAudit() {
+      this.auditFormMode = 'add'
+      this.resetAuditForm()
+      this.auditForm.claimId = this.currentClaimRow.id
+      this.auditForm.claimNo = this.currentClaimRow.claimNo
+      this.auditFormVisible = true
+    },
+
+    /**
+     * 编辑审核记录
+     * @param {Object} row - 审核记录数据
+     */
+    handleEditAudit(row) {
+      this.auditFormMode = 'edit'
+      this.auditForm = {
+        id: row.id,
+        claimId: row.claimId,
+        claimNo: row.claimNo,
+        auditResult: row.auditResult,
+        auditAmount: row.auditAmount,
+        reasonDetail: row.reasonDetail,
+        auditorId: row.auditorId,
+        auditorName: row.auditorName,
+        auditTime: row.auditTime,
+        feedbackChannel: row.feedbackChannel || '',
+        feedbackDesc: row.feedbackDesc || '',
+        feedbackTime: row.feedbackTime || '',
+        appealStatus: row.appealStatus || 0,
+        appealResult: row.appealResult || '',
+        appealTime: row.appealTime || ''
+      }
+      this.auditFormVisible = true
+    },
+
+    /**
+     * 删除审核记录
+     * @param {Object} row - 审核记录数据
+     */
+    async handleDeleteAudit(row) {
+      try {
+        await this.$confirm('确定删除该审核记录吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+
+        await removeClaimAudit(row.id)
+        this.$message.success('删除成功')
+        this.refreshAuditList()
+      } catch (error) {
+        if (error !== 'cancel') {
+          console.error('删除审核记录失败:', error)
+          this.$message.error('删除审核记录失败')
+        }
+      }
+    },
+
+    /**
+     * 保存审核记录
+     */
+    async handleSaveAudit() {
+      try {
+        const valid = await this.$refs.auditFormRef.validate()
+        if (!valid) return
+
+        this.auditFormLoading = true
+
+        // 设置审核人ID(这里可以从用户信息中获取)
+        if (!this.auditForm.auditorId) {
+          this.auditForm.auditorId = 10001 // 默认审核人ID,实际应该从当前登录用户获取
+        }
+
+        if (this.auditFormMode === 'add') {
+          await addClaimAudit(this.auditForm)
+          this.$message.success('新增审核记录成功')
+        } else {
+          await updateClaimAudit(this.auditForm)
+          this.$message.success('更新审核记录成功')
+        }
+
+        this.auditFormVisible = false
+        this.refreshAuditList()
+      } catch (error) {
+        console.error('保存审核记录失败:', error)
+        this.$message.error('保存审核记录失败')
+      } finally {
+        this.auditFormLoading = false
+      }
+    },
+
+    /**
+     * 重置审核表单
+     */
+    resetAuditForm() {
+      this.auditForm = {
+        id: null,
+        claimId: null,
+        claimNo: '',
+        auditResult: null,
+        auditAmount: 0,
+        reasonDetail: '',
+        auditorId: null,
+        auditorName: '',
+        auditTime: '',
+        feedbackChannel: '',
+        feedbackDesc: '',
+        feedbackTime: '',
+        appealStatus: 0,
+        appealResult: '',
+        appealTime: ''
+      }
+      this.$nextTick(() => {
+        if (this.$refs.auditFormRef) {
+          this.$refs.auditFormRef.clearValidate()
+        }
+      })
+    },
+
+    /**
+     * 刷新审核记录列表
+     */
+    async refreshAuditList() {
+      if (!this.currentClaimRow) return
+
+      try {
+        this.auditLoading = true
+        const res = await getClaimAuditList(1, 100, this.currentClaimRow.id)
+        this.auditList = res.data.data.records || []
+      } catch (error) {
+        console.error('刷新审核记录失败:', error)
+        this.$message.error('刷新审核记录失败')
+      } finally {
+        this.auditLoading = false
+      }
+    },
+
+    /**
+     * 下载文件
+     * @param {Object} file - 文件信息
+     */
+    downloadFile(file) {
+      window.open(file.fileUrl)
+    },
+
+    /**
+     * 格式化文件大小
+     * @param {number} size - 文件大小(字节)
+     * @returns {string} 格式化后的文件大小
+     */
+    formatFileSize(size) {
+      if (size < 1024) {
+        return size + ' B'
+      } else if (size < 1024 * 1024) {
+        return (size / 1024).toFixed(2) + ' KB'
+      } else {
+        return (size / (1024 * 1024)).toFixed(2) + ' MB'
+      }
+    },
+
+    /**
+     * 获取审核状态类型
+     * @param {number} status - 审核状态
+     * @returns {string} 状态类型
+     */
+    getAuditStatusType(status) {
+      const typeMap = {
+        0: 'warning',
+        1: 'success',
+        2: 'danger'
+      }
+      return typeMap[status] || 'info'
+    },
+
+    /**
+     * 获取审核状态文本
+     * @param {number} status - 审核状态
+     * @returns {string} 状态文本
+     */
+    getAuditStatusText(status) {
+      const textMap = {
+        0: '待审核',
+        1: '审核通过',
+        2: '审核拒绝'
+      }
+      return textMap[status] || '未知'
+    },
+
+    /**
+     * 获取审核结果类型
+     * @param {number} result - 审核结果
+     * @returns {string} 结果类型
+     */
+    getAuditResultType(result) {
+      const typeMap = {
+        1: 'success',
+        2: 'danger'
+      }
+      return typeMap[result] || 'info'
+    },
+
+    /**
+     * 获取审核结果文本
+     * @param {number} result - 审核结果
+     * @returns {string} 结果文本
+     */
+    getAuditResultText(result) {
+      const textMap = {
+        1: '通过',
+        2: '拒绝'
+      }
+      return textMap[result] || '未知'
+    }
+  }
+}
+</script>