完善项目
This commit is contained in:
@@ -116,8 +116,28 @@ const handleResponse = async (response) => {
|
||||
const fetchRequest = async (url, options = {}) => {
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 处理查询参数
|
||||
let finalUrl = url.startsWith('http') ? url : `${API_CONFIG.baseURL}${url}`
|
||||
|
||||
if (options.params) {
|
||||
const searchParams = new URLSearchParams()
|
||||
Object.keys(options.params).forEach(key => {
|
||||
if (options.params[key] !== undefined && options.params[key] !== null) {
|
||||
searchParams.append(key, options.params[key])
|
||||
}
|
||||
})
|
||||
|
||||
const queryString = searchParams.toString()
|
||||
if (queryString) {
|
||||
finalUrl += (finalUrl.includes('?') ? '&' : '?') + queryString
|
||||
}
|
||||
|
||||
// 从options中移除params,避免传递给fetch
|
||||
delete options.params
|
||||
}
|
||||
|
||||
// 构建完整URL
|
||||
const fullUrl = url.startsWith('http') ? url : `${API_CONFIG.baseURL}${url}`
|
||||
const fullUrl = finalUrl
|
||||
|
||||
// 对于登录、刷新token接口,跳过token检查
|
||||
const skipTokenCheck = url.includes('/auth/login') ||
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
>
|
||||
<a-form-item label="申请单号">
|
||||
<a-input
|
||||
v-model:value="searchForm.applicationNumber"
|
||||
v-model:value="searchForm.application_no"
|
||||
placeholder="请输入申请单号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="投保人姓名">
|
||||
<a-input
|
||||
v-model:value="searchForm.applicantName"
|
||||
v-model:value="searchForm.customer_name"
|
||||
placeholder="请输入投保人姓名"
|
||||
allow-clear
|
||||
/>
|
||||
@@ -170,31 +170,31 @@
|
||||
size="small"
|
||||
>
|
||||
<a-descriptions-item label="申请单号" :span="2">
|
||||
{{ selectedApplication.application_number }}
|
||||
{{ selectedApplication.application_no }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="参保类型">
|
||||
{{ selectedApplication.insurance_category === 'individual' ? '个人参保' : '企业参保' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="参保险种">
|
||||
{{ selectedApplication.insurance_type }}
|
||||
{{ selectedApplication.insurance_type?.name || selectedApplication.insurance_type_id }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="保险金额">
|
||||
¥{{ Number(selectedApplication.insurance_amount).toLocaleString() }}
|
||||
¥{{ Number(selectedApplication.application_amount).toLocaleString() }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="保险期限">
|
||||
{{ selectedApplication.insurance_period }}个月
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="投保人姓名">
|
||||
{{ selectedApplication.applicant_name }}
|
||||
{{ selectedApplication.customer_name }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="身份证号">
|
||||
{{ maskIdCard(selectedApplication.id_card) }}
|
||||
{{ maskIdCard(selectedApplication.customer_id_card) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="联系电话">
|
||||
{{ maskPhone(selectedApplication.phone) }}
|
||||
{{ maskPhone(selectedApplication.customer_phone) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="联系地址" :span="2">
|
||||
{{ selectedApplication.address }}
|
||||
{{ selectedApplication.customer_address }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="申请时间">
|
||||
{{ selectedApplication.application_date }}
|
||||
@@ -277,20 +277,20 @@
|
||||
<a-radio value="enterprise">企业参保</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="参保险种" name="insurance_type" :rules="[{ required: true, message: '请选择参保险种' }]">
|
||||
<a-select v-model:value="createForm.insurance_type" placeholder="请选择参保险种">
|
||||
<a-form-item label="参保险种" name="insurance_type_id" :rules="[{ required: true, message: '请选择参保险种' }]">
|
||||
<a-select v-model:value="createForm.insurance_type_id" placeholder="请选择参保险种">
|
||||
<a-select-option
|
||||
v-for="type in insuranceTypes"
|
||||
:key="type.id"
|
||||
:value="type.name"
|
||||
:value="type.id"
|
||||
>
|
||||
{{ type.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="保险金额" name="insurance_amount" :rules="[{ required: true, message: '请输入保险金额' }]">
|
||||
<a-form-item label="保险金额" name="application_amount" :rules="[{ required: true, message: '请输入保险金额' }]">
|
||||
<a-input-number
|
||||
v-model:value="createForm.insurance_amount"
|
||||
v-model:value="createForm.application_amount"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
style="width: 100%"
|
||||
@@ -304,17 +304,17 @@
|
||||
<a-select-option value="36">36个月</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="投保人姓名" name="applicant_name" :rules="[{ required: true, message: '请输入投保人姓名' }]">
|
||||
<a-input v-model:value="createForm.applicant_name" placeholder="请输入投保人姓名" />
|
||||
<a-form-item label="投保人姓名" name="customer_name" :rules="[{ required: true, message: '请输入投保人姓名' }]">
|
||||
<a-input v-model:value="createForm.customer_name" placeholder="请输入投保人姓名" />
|
||||
</a-form-item>
|
||||
<a-form-item label="身份证号" name="id_card" :rules="[{ required: true, message: '请输入身份证号' }]">
|
||||
<a-input v-model:value="createForm.id_card" placeholder="请输入身份证号" />
|
||||
<a-form-item label="身份证号" name="customer_id_card" :rules="[{ required: true, message: '请输入身份证号' }]">
|
||||
<a-input v-model:value="createForm.customer_id_card" placeholder="请输入身份证号" />
|
||||
</a-form-item>
|
||||
<a-form-item label="联系电话" name="phone" :rules="[{ required: true, message: '请输入联系电话' }]">
|
||||
<a-input v-model:value="createForm.phone" placeholder="请输入联系电话" />
|
||||
<a-form-item label="联系电话" name="customer_phone" :rules="[{ required: true, message: '请输入联系电话' }]">
|
||||
<a-input v-model:value="createForm.customer_phone" placeholder="请输入联系电话" />
|
||||
</a-form-item>
|
||||
<a-form-item label="联系地址" name="address" :rules="[{ required: true, message: '请输入联系地址' }]">
|
||||
<a-textarea v-model:value="createForm.address" placeholder="请输入联系地址" />
|
||||
<a-form-item label="联系地址" name="customer_address" :rules="[{ required: true, message: '请输入联系地址' }]">
|
||||
<a-textarea v-model:value="createForm.customer_address" placeholder="请输入联系地址" />
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="remarks">
|
||||
<a-textarea v-model:value="createForm.remarks" placeholder="请输入备注信息" />
|
||||
@@ -347,8 +347,8 @@ const selectedApplication = ref(null)
|
||||
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
applicationNumber: '',
|
||||
applicantName: '',
|
||||
application_no: '',
|
||||
customer_name: '',
|
||||
insuranceType: '',
|
||||
insuranceCategory: '',
|
||||
status: ''
|
||||
@@ -366,13 +366,13 @@ const reviewFormData = reactive({
|
||||
// 新增申请表单
|
||||
const createForm = reactive({
|
||||
insurance_category: '',
|
||||
insurance_type: '',
|
||||
insurance_amount: null,
|
||||
insurance_type_id: '',
|
||||
application_amount: null,
|
||||
insurance_period: '',
|
||||
applicant_name: '',
|
||||
id_card: '',
|
||||
phone: '',
|
||||
address: '',
|
||||
customer_name: '',
|
||||
customer_id_card: '',
|
||||
customer_phone: '',
|
||||
customer_address: '',
|
||||
remarks: ''
|
||||
})
|
||||
|
||||
@@ -390,14 +390,14 @@ const pagination = reactive({
|
||||
const columns = [
|
||||
{
|
||||
title: '申请单号',
|
||||
dataIndex: 'application_number',
|
||||
key: 'application_number',
|
||||
dataIndex: 'application_no',
|
||||
key: 'application_no',
|
||||
width: 180,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
title: '投保人姓名',
|
||||
dataIndex: 'applicant_name',
|
||||
dataIndex: 'customer_name',
|
||||
key: 'applicant_name',
|
||||
width: 120
|
||||
},
|
||||
@@ -409,14 +409,17 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '参保险种',
|
||||
dataIndex: 'insurance_type',
|
||||
key: 'insurance_type',
|
||||
width: 150
|
||||
dataIndex: 'insurance_type_id',
|
||||
key: 'insurance_type_id',
|
||||
width: 150,
|
||||
customRender: ({ record }) => {
|
||||
return record.insurance_type?.name || record.insurance_type_id
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '保险金额',
|
||||
dataIndex: 'insurance_amount',
|
||||
key: 'insurance_amount',
|
||||
dataIndex: 'application_amount',
|
||||
key: 'application_amount',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
@@ -427,8 +430,8 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
dataIndex: 'customer_phone',
|
||||
key: 'customer_phone',
|
||||
width: 130
|
||||
},
|
||||
{
|
||||
@@ -517,8 +520,8 @@ const handleSearch = () => {
|
||||
|
||||
const resetSearch = () => {
|
||||
Object.assign(searchForm, {
|
||||
applicationNumber: '',
|
||||
applicantName: '',
|
||||
application_no: '',
|
||||
customer_name: '',
|
||||
insuranceType: '',
|
||||
insuranceCategory: '',
|
||||
status: ''
|
||||
@@ -575,13 +578,13 @@ const showCreateModal = () => {
|
||||
isEdit.value = false
|
||||
Object.assign(createForm, {
|
||||
insurance_category: '',
|
||||
insurance_type: '',
|
||||
insurance_amount: null,
|
||||
insurance_type_id: '',
|
||||
application_amount: null,
|
||||
insurance_period: '',
|
||||
applicant_name: '',
|
||||
id_card: '',
|
||||
phone: '',
|
||||
address: '',
|
||||
customer_name: '',
|
||||
customer_id_card: '',
|
||||
customer_phone: '',
|
||||
customer_address: '',
|
||||
remarks: ''
|
||||
})
|
||||
createModalVisible.value = true
|
||||
|
||||
@@ -17,37 +17,74 @@
|
||||
<a-form layout="inline" :model="searchForm">
|
||||
<a-form-item label="理赔单号">
|
||||
<a-input
|
||||
v-model:value="searchForm.claim_number"
|
||||
v-model:value="searchForm.claim_no"
|
||||
placeholder="请输入理赔单号"
|
||||
@pressEnter="handleSearch"
|
||||
@change="onSearchFieldChange('claim_no', $event)"
|
||||
@input="onSearchFieldInput('claim_no', $event)"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="保单号">
|
||||
<a-input
|
||||
v-model:value="searchForm.policy_number"
|
||||
v-model:value="searchForm.policy_no"
|
||||
placeholder="请输入保单号"
|
||||
@pressEnter="handleSearch"
|
||||
@change="onSearchFieldChange('policy_no', $event)"
|
||||
@input="onSearchFieldInput('policy_no', $event)"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="申请人">
|
||||
<a-form-item label="报案人">
|
||||
<a-input
|
||||
v-model:value="searchForm.applicant_name"
|
||||
placeholder="请输入申请人姓名"
|
||||
v-model:value="searchForm.reporter_name"
|
||||
placeholder="请输入报案人姓名"
|
||||
@pressEnter="handleSearch"
|
||||
@change="onSearchFieldChange('reporter_name', $event)"
|
||||
@input="onSearchFieldInput('reporter_name', $event)"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="联系电话">
|
||||
<a-input
|
||||
v-model:value="searchForm.contact_phone"
|
||||
placeholder="请输入联系电话"
|
||||
@pressEnter="handleSearch"
|
||||
@change="onSearchFieldChange('contact_phone', $event)"
|
||||
@input="onSearchFieldInput('contact_phone', $event)"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="事故类型">
|
||||
<a-select
|
||||
v-model:value="searchForm.claim_type"
|
||||
placeholder="请选择事故类型"
|
||||
style="width: 120px"
|
||||
@change="onSearchFieldChange('claim_type', $event)"
|
||||
allowClear
|
||||
>
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="disease">疾病</a-select-option>
|
||||
<a-select-option value="accident">意外事故</a-select-option>
|
||||
<a-select-option value="natural_disaster">自然灾害</a-select-option>
|
||||
<a-select-option value="theft">盗窃</a-select-option>
|
||||
<a-select-option value="other">其他</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态">
|
||||
<a-select
|
||||
v-model:value="searchForm.status"
|
||||
v-model:value="searchForm.claim_status"
|
||||
placeholder="请选择状态"
|
||||
style="width: 120px"
|
||||
@change="onSearchFieldChange('claim_status', $event)"
|
||||
allowClear
|
||||
>
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="pending">待审核</a-select-option>
|
||||
<a-select-option value="pending">待处理</a-select-option>
|
||||
<a-select-option value="investigating">调查中</a-select-option>
|
||||
<a-select-option value="approved">已通过</a-select-option>
|
||||
<a-select-option value="rejected">已拒绝</a-select-option>
|
||||
<a-select-option value="processing">处理中</a-select-option>
|
||||
<a-select-option value="completed">已完成</a-select-option>
|
||||
<a-select-option value="paid">已赔付</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
@@ -73,41 +110,62 @@
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'status'">
|
||||
<a-tag :color="getStatusColor(record.status)">
|
||||
{{ getStatusText(record.status) }}
|
||||
<template v-if="column.key === 'claim_status'">
|
||||
<a-tag :color="getStatusColor(record.claim_status)">
|
||||
{{ getStatusText(record.claim_status) }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'claim_type'">
|
||||
<a-tag :color="getClaimTypeColor(record.claim_type)">
|
||||
{{ getClaimTypeText(record.claim_type) }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'claim_amount'">
|
||||
<span>¥{{ record.claim_amount?.toLocaleString() }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'approved_amount'">
|
||||
<span v-if="record.approved_amount">¥{{ record.approved_amount?.toLocaleString() }}</span>
|
||||
<span v-else>-</span>
|
||||
<template v-else-if="column.key === 'contact_phone'">
|
||||
<span>{{ record.contact_phone || '-' }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-button size="small" @click="handleView(record)">查看</a-button>
|
||||
<a-button
|
||||
size="small"
|
||||
:type="record.status === 'pending' ? 'primary' : 'default'"
|
||||
@click="handleProcess(record)"
|
||||
:disabled="record.status !== 'pending'"
|
||||
type="primary"
|
||||
@click="handleEdit(record)"
|
||||
>
|
||||
处理
|
||||
编辑
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
title="确定要删除这条理赔记录吗?"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
@confirm="handleDelete(record.id)"
|
||||
>
|
||||
<a-button size="small" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
<a-dropdown>
|
||||
<a-button size="small">更多</a-button>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item @click="handleEdit(record)">编辑</a-menu-item>
|
||||
<a-menu-item @click="handleApprove(record)" :disabled="record.status !== 'pending'">
|
||||
<a-menu-item
|
||||
@click="handleProcess(record)"
|
||||
:disabled="record.claim_status !== 'pending'"
|
||||
>
|
||||
处理
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
@click="handleApprove(record)"
|
||||
:disabled="record.claim_status !== 'pending'"
|
||||
>
|
||||
通过
|
||||
</a-menu-item>
|
||||
<a-menu-item @click="handleReject(record)" :disabled="record.status !== 'pending'">
|
||||
<a-menu-item
|
||||
@click="handleReject(record)"
|
||||
:disabled="record.claim_status !== 'pending'"
|
||||
>
|
||||
拒绝
|
||||
</a-menu-item>
|
||||
<a-menu-item danger @click="handleDelete(record.id)">删除</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -130,26 +188,29 @@
|
||||
bordered
|
||||
:column="2"
|
||||
>
|
||||
<a-descriptions-item label="理赔单号">{{ currentClaim.claim_number }}</a-descriptions-item>
|
||||
<a-descriptions-item label="保单号">{{ currentClaim.policy_number }}</a-descriptions-item>
|
||||
<a-descriptions-item label="申请人">{{ currentClaim.applicant_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="联系电话">{{ currentClaim.phone }}</a-descriptions-item>
|
||||
<a-descriptions-item label="理赔单号">{{ currentClaim.claim_no }}</a-descriptions-item>
|
||||
<a-descriptions-item label="报案人">{{ currentClaim.reporter_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="联系电话">{{ currentClaim.contact_phone }}</a-descriptions-item>
|
||||
<a-descriptions-item label="保单号">{{ currentClaim.policy_no }}</a-descriptions-item>
|
||||
<a-descriptions-item label="事故类型">{{ currentClaim.claim_type }}</a-descriptions-item>
|
||||
<a-descriptions-item label="受影响数量">{{ currentClaim.affected_count }}</a-descriptions-item>
|
||||
<a-descriptions-item label="申请金额">¥{{ currentClaim.claim_amount?.toLocaleString() }}</a-descriptions-item>
|
||||
<a-descriptions-item label="审核金额" v-if="currentClaim.approved_amount">
|
||||
¥{{ currentClaim.approved_amount?.toLocaleString() }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="申请时间">{{ currentClaim.apply_date }}</a-descriptions-item>
|
||||
<a-descriptions-item label="事故时间">{{ currentClaim.accident_date }}</a-descriptions-item>
|
||||
<a-descriptions-item label="出险地址">{{ currentClaim.incident_location }}</a-descriptions-item>
|
||||
<a-descriptions-item label="报案时间">{{ currentClaim.report_date }}</a-descriptions-item>
|
||||
<a-descriptions-item label="事故时间">{{ currentClaim.incident_date }}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">
|
||||
<a-tag :color="getStatusColor(currentClaim.status)">
|
||||
{{ getStatusText(currentClaim.status) }}
|
||||
<a-tag :color="getStatusColor(currentClaim.claim_status)">
|
||||
{{ getStatusText(currentClaim.claim_status) }}
|
||||
</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="审核人">{{ currentClaim.reviewer_name || '-' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="调查员">{{ currentClaim.investigator_name || '-' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="调查时间">{{ currentClaim.investigation_date || '-' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="审核员">{{ currentClaim.reviewer_name || '-' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="审核时间">{{ currentClaim.review_date || '-' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="拒绝原因" :span="2" v-if="currentClaim.reject_reason">
|
||||
{{ currentClaim.reject_reason }}
|
||||
<a-descriptions-item label="赔付金额" v-if="currentClaim.payment_amount">
|
||||
¥{{ currentClaim.payment_amount?.toLocaleString() }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="赔付时间">{{ currentClaim.payment_date || '-' }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
|
||||
<a-divider />
|
||||
@@ -259,26 +320,50 @@
|
||||
>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="理赔单号" name="claim_number">
|
||||
<a-input v-model:value="formState.claim_number" placeholder="请输入理赔单号" />
|
||||
<a-form-item label="理赔单号" name="claim_no">
|
||||
<a-input v-model:value="formState.claim_no" placeholder="请输入理赔单号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="保单号" name="policy_number">
|
||||
<a-input v-model:value="formState.policy_number" placeholder="请输入保单号" />
|
||||
<a-form-item label="保单号" name="policy_no">
|
||||
<a-input v-model:value="formState.policy_no" placeholder="请输入保单号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="申请人姓名" name="applicant_name">
|
||||
<a-input v-model:value="formState.applicant_name" placeholder="请输入申请人姓名" />
|
||||
<a-form-item label="报案人" name="reporter_name">
|
||||
<a-input v-model:value="formState.reporter_name" placeholder="请输入报案人姓名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="联系电话" name="phone">
|
||||
<a-input v-model:value="formState.phone" placeholder="请输入联系电话" />
|
||||
<a-form-item label="联系电话" name="contact_phone">
|
||||
<a-input v-model:value="formState.contact_phone" placeholder="请输入联系电话" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="事故类型" name="claim_type">
|
||||
<a-select v-model:value="formState.claim_type" placeholder="请选择事故类型">
|
||||
<a-select-option value="disease">疾病</a-select-option>
|
||||
<a-select-option value="accident">意外</a-select-option>
|
||||
<a-select-option value="natural_disaster">自然灾害</a-select-option>
|
||||
<a-select-option value="other">其他</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="受影响数量" name="affected_count">
|
||||
<a-input-number
|
||||
v-model:value="formState.affected_count"
|
||||
:min="0"
|
||||
:step="1"
|
||||
style="width: 100%"
|
||||
placeholder="请输入受影响数量"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -296,34 +381,30 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="申请日期" name="apply_date">
|
||||
<a-date-picker
|
||||
v-model:value="formState.apply_date"
|
||||
style="width: 100%"
|
||||
placeholder="请选择申请日期"
|
||||
/>
|
||||
<a-form-item label="出险地址" name="incident_location">
|
||||
<a-input v-model:value="formState.incident_location" placeholder="请输入出险地址" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="事故日期" name="accident_date">
|
||||
<a-form-item label="事故日期" name="incident_date">
|
||||
<a-date-picker
|
||||
v-model:value="formState.accident_date"
|
||||
v-model:value="formState.incident_date"
|
||||
style="width: 100%"
|
||||
placeholder="请选择事故日期"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="状态" name="status">
|
||||
<a-select v-model:value="formState.status" placeholder="请选择状态">
|
||||
<a-select-option value="pending">待审核</a-select-option>
|
||||
<a-select-option value="processing">处理中</a-select-option>
|
||||
<a-form-item label="状态" name="claim_status">
|
||||
<a-select v-model:value="formState.claim_status" placeholder="请选择状态">
|
||||
<a-select-option value="pending">待处理</a-select-option>
|
||||
<a-select-option value="investigating">调查中</a-select-option>
|
||||
<a-select-option value="approved">已通过</a-select-option>
|
||||
<a-select-option value="rejected">已拒绝</a-select-option>
|
||||
<a-select-option value="completed">已完成</a-select-option>
|
||||
<a-select-option value="paid">已赔付</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -366,7 +447,8 @@ import {
|
||||
RedoOutlined,
|
||||
FileTextOutlined
|
||||
} from '@ant-design/icons-vue'
|
||||
import { claimAPI } from '@/utils/api'
|
||||
import { livestockClaimApi } from '@/utils/api'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const loading = ref(false)
|
||||
const modalVisible = ref(false)
|
||||
@@ -379,21 +461,25 @@ const formRef = ref()
|
||||
const processFormRef = ref()
|
||||
|
||||
const searchForm = reactive({
|
||||
claim_number: '',
|
||||
policy_number: '',
|
||||
applicant_name: '',
|
||||
status: ''
|
||||
claim_no: '',
|
||||
policy_no: '',
|
||||
reporter_name: '',
|
||||
contact_phone: '',
|
||||
claim_type: '',
|
||||
claim_status: ''
|
||||
})
|
||||
|
||||
const formState = reactive({
|
||||
claim_number: '',
|
||||
policy_number: '',
|
||||
applicant_name: '',
|
||||
phone: '',
|
||||
claim_no: '',
|
||||
policy_no: '',
|
||||
reporter_name: '',
|
||||
contact_phone: '',
|
||||
claim_type: '',
|
||||
affected_count: null,
|
||||
claim_amount: null,
|
||||
apply_date: null,
|
||||
accident_date: null,
|
||||
status: 'pending',
|
||||
incident_location: '',
|
||||
incident_date: null,
|
||||
claim_status: 'pending',
|
||||
accident_description: '',
|
||||
process_description: '',
|
||||
reject_reason: '',
|
||||
@@ -419,45 +505,63 @@ const pagination = reactive({
|
||||
const columns = [
|
||||
{
|
||||
title: '理赔单号',
|
||||
dataIndex: 'claim_number',
|
||||
key: 'claim_number'
|
||||
dataIndex: 'claim_no',
|
||||
key: 'claim_no',
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
title: '报案人',
|
||||
dataIndex: 'reporter_name',
|
||||
key: 'reporter_name',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
dataIndex: 'contact_phone',
|
||||
key: 'contact_phone',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '保单号',
|
||||
dataIndex: 'policy_number',
|
||||
key: 'policy_number'
|
||||
dataIndex: 'policy_no',
|
||||
key: 'policy_no',
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
title: '申请人',
|
||||
dataIndex: 'applicant_name',
|
||||
key: 'applicant_name'
|
||||
title: '事故类型',
|
||||
dataIndex: 'claim_type',
|
||||
key: 'claim_type',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '申请数量',
|
||||
dataIndex: 'affected_count',
|
||||
key: 'affected_count',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '申请金额',
|
||||
key: 'claim_amount',
|
||||
dataIndex: 'claim_amount'
|
||||
},
|
||||
{
|
||||
title: '审核金额',
|
||||
key: 'approved_amount',
|
||||
dataIndex: 'approved_amount'
|
||||
},
|
||||
{
|
||||
title: '申请日期',
|
||||
dataIndex: 'apply_date',
|
||||
key: 'apply_date',
|
||||
dataIndex: 'claim_amount',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
dataIndex: 'status'
|
||||
title: '出险地址',
|
||||
dataIndex: 'incident_location',
|
||||
key: 'incident_location',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'created_at',
|
||||
key: 'created_at',
|
||||
width: 180
|
||||
title: '状态',
|
||||
key: 'claim_status',
|
||||
dataIndex: 'claim_status',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '报案时间',
|
||||
dataIndex: 'report_date',
|
||||
key: 'report_date',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -468,13 +572,16 @@ const columns = [
|
||||
]
|
||||
|
||||
const rules = {
|
||||
claim_number: [{ required: true, message: '请输入理赔单号' }],
|
||||
policy_number: [{ required: true, message: '请输入保单号' }],
|
||||
applicant_name: [{ required: true, message: '请输入申请人姓名' }],
|
||||
claim_no: [{ required: true, message: '请输入理赔单号' }],
|
||||
policy_no: [{ required: true, message: '请输入保单号' }],
|
||||
reporter_name: [{ required: true, message: '请输入报案人姓名' }],
|
||||
contact_phone: [{ required: true, message: '请输入联系电话' }],
|
||||
claim_type: [{ required: true, message: '请选择事故类型' }],
|
||||
affected_count: [{ required: true, message: '请输入受影响数量' }],
|
||||
claim_amount: [{ required: true, message: '请输入申请金额' }],
|
||||
apply_date: [{ required: true, message: '请选择申请日期' }],
|
||||
accident_date: [{ required: true, message: '请选择事故日期' }],
|
||||
status: [{ required: true, message: '请选择状态' }],
|
||||
incident_location: [{ required: true, message: '请输入出险地址' }],
|
||||
incident_date: [{ required: true, message: '请选择事故日期' }],
|
||||
claim_status: [{ required: true, message: '请选择状态' }],
|
||||
accident_description: [{ required: true, message: '请输入事故描述' }]
|
||||
}
|
||||
|
||||
@@ -522,47 +629,192 @@ const getStatusText = (status) => {
|
||||
return texts[status] || '未知'
|
||||
}
|
||||
|
||||
const getClaimTypeText = (type) => {
|
||||
const typeMap = {
|
||||
disease: '疾病',
|
||||
accident: '意外事故',
|
||||
natural_disaster: '自然灾害',
|
||||
theft: '盗窃',
|
||||
other: '其他'
|
||||
}
|
||||
return typeMap[type] || type
|
||||
}
|
||||
|
||||
const getClaimTypeColor = (type) => {
|
||||
const colorMap = {
|
||||
disease: 'red',
|
||||
accident: 'orange',
|
||||
natural_disaster: 'purple',
|
||||
theft: 'volcano',
|
||||
other: 'default'
|
||||
}
|
||||
return colorMap[type] || 'default'
|
||||
}
|
||||
|
||||
const loadClaims = async () => {
|
||||
loading.value = true
|
||||
console.log('🚀 开始加载理赔数据...')
|
||||
|
||||
try {
|
||||
const params = {
|
||||
page: pagination.current,
|
||||
pageSize: pagination.pageSize,
|
||||
...searchForm
|
||||
pageSize: pagination.pageSize
|
||||
}
|
||||
|
||||
console.log('理赔管理API请求参数:', params)
|
||||
const response = await claimAPI.getList(params)
|
||||
console.log('理赔管理API响应:', response)
|
||||
console.log('📋 当前搜索表单状态:', JSON.stringify(searchForm, null, 2))
|
||||
|
||||
// 添加搜索条件
|
||||
if (searchForm.claim_no) {
|
||||
params.claim_no = searchForm.claim_no
|
||||
console.log('🔍 添加理赔单号搜索条件:', searchForm.claim_no)
|
||||
}
|
||||
if (searchForm.policy_no) {
|
||||
params.policy_no = searchForm.policy_no
|
||||
console.log('🔍 添加保单号搜索条件:', searchForm.policy_no)
|
||||
}
|
||||
if (searchForm.reporter_name) {
|
||||
params.reporter_name = searchForm.reporter_name
|
||||
console.log('🔍 添加报案人搜索条件:', searchForm.reporter_name)
|
||||
}
|
||||
if (searchForm.contact_phone) {
|
||||
params.contact_phone = searchForm.contact_phone
|
||||
console.log('🔍 添加联系电话搜索条件:', searchForm.contact_phone)
|
||||
}
|
||||
if (searchForm.claim_type) {
|
||||
params.claim_type = searchForm.claim_type
|
||||
console.log('🔍 添加事故类型搜索条件:', searchForm.claim_type)
|
||||
}
|
||||
if (searchForm.claim_status) {
|
||||
params.claim_status = searchForm.claim_status
|
||||
console.log('🔍 添加状态搜索条件:', searchForm.claim_status)
|
||||
}
|
||||
|
||||
console.log('📤 [前端->后端] API请求参数:', {
|
||||
请求时间: new Date().toLocaleString(),
|
||||
请求URL: '/api/livestock-claims',
|
||||
请求方法: 'GET',
|
||||
请求参数: JSON.stringify(params, null, 2),
|
||||
分页信息: {
|
||||
当前页: pagination.current,
|
||||
每页条数: pagination.pageSize
|
||||
}
|
||||
})
|
||||
|
||||
const response = await livestockClaimApi.getList(params)
|
||||
|
||||
console.log('📥 [后端->前端] API响应:', {
|
||||
响应时间: new Date().toLocaleString(),
|
||||
响应状态: response.status,
|
||||
响应头: response.headers,
|
||||
响应数据结构: {
|
||||
status: response.data?.status,
|
||||
message: response.data?.message,
|
||||
data类型: Array.isArray(response.data?.data) ? 'Array' : typeof response.data?.data,
|
||||
data长度: response.data?.data?.length,
|
||||
pagination: response.data?.pagination
|
||||
},
|
||||
完整响应: JSON.stringify(response.data, null, 2)
|
||||
})
|
||||
|
||||
if (response.data && response.data.status === 'success') {
|
||||
// 后端返回的数据直接是数组格式,不是{list: [], total: 8}格式
|
||||
claimList.value = response.data.data || []
|
||||
pagination.total = response.data.pagination?.total || 0
|
||||
console.log('理赔管理数据设置成功:', claimList.value.length, '条')
|
||||
const newClaimList = response.data.data || []
|
||||
const newTotal = response.data.pagination?.total || 0
|
||||
|
||||
console.log('✅ 数据处理成功:', {
|
||||
处理时间: new Date().toLocaleString(),
|
||||
数据条数: newClaimList.length,
|
||||
总记录数: newTotal,
|
||||
数据样例: newClaimList.length > 0 ? JSON.stringify(newClaimList[0], null, 2) : '无数据'
|
||||
})
|
||||
|
||||
claimList.value = newClaimList
|
||||
pagination.total = newTotal
|
||||
|
||||
console.log('📊 前端状态更新:', {
|
||||
更新时间: new Date().toLocaleString(),
|
||||
列表长度: claimList.value.length,
|
||||
分页总数: pagination.total,
|
||||
当前页: pagination.current,
|
||||
每页条数: pagination.pageSize
|
||||
})
|
||||
} else {
|
||||
console.log('理赔管理响应格式错误:', response)
|
||||
console.error('❌ 响应格式错误:', {
|
||||
错误时间: new Date().toLocaleString(),
|
||||
响应状态: response.data?.status,
|
||||
错误信息: response.data?.message,
|
||||
完整响应: response
|
||||
})
|
||||
message.error(response.data?.message || '加载理赔列表失败')
|
||||
claimList.value = []
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('加载理赔列表失败')
|
||||
console.error('💥 API请求失败:', {
|
||||
错误时间: new Date().toLocaleString(),
|
||||
错误类型: error.name,
|
||||
错误信息: error.message,
|
||||
错误堆栈: error.stack,
|
||||
请求配置: error.config,
|
||||
响应数据: error.response?.data,
|
||||
响应状态: error.response?.status
|
||||
})
|
||||
message.error('加载理赔列表失败: ' + error.message)
|
||||
} finally {
|
||||
loading.value = false
|
||||
console.log('🏁 理赔数据加载完成')
|
||||
}
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
pagination.current = 1
|
||||
console.log('🔍 执行搜索操作:', {
|
||||
触发时间: new Date().toLocaleString(),
|
||||
搜索条件: JSON.stringify(searchForm, null, 2),
|
||||
重置分页: '第1页'
|
||||
})
|
||||
pagination.current = 1
|
||||
loadClaims()
|
||||
}
|
||||
|
||||
const resetSearch = () => {
|
||||
console.log('🔄 重置搜索表单')
|
||||
searchForm.claim_no = ''
|
||||
searchForm.policy_no = ''
|
||||
searchForm.reporter_name = ''
|
||||
searchForm.contact_phone = ''
|
||||
searchForm.claim_type = ''
|
||||
searchForm.claim_status = ''
|
||||
console.log('🔄 重置后的搜索表单:', JSON.stringify(searchForm, null, 2))
|
||||
loadClaims()
|
||||
}
|
||||
|
||||
const resetSearch = () => {
|
||||
searchForm.claim_number = ''
|
||||
searchForm.policy_number = ''
|
||||
searchForm.applicant_name = ''
|
||||
searchForm.status = ''
|
||||
handleSearch()
|
||||
// 搜索字段输入监听器
|
||||
const onSearchFieldInput = (fieldName, event) => {
|
||||
const value = event.target ? event.target.value : event
|
||||
console.log(`📝 [输入监听] ${fieldName}:`, {
|
||||
输入值: value,
|
||||
事件类型: 'input',
|
||||
时间戳: new Date().toLocaleString(),
|
||||
当前表单状态: JSON.stringify(searchForm, null, 2)
|
||||
})
|
||||
}
|
||||
|
||||
// 搜索字段变化监听器
|
||||
const onSearchFieldChange = (fieldName, event) => {
|
||||
const value = event.target ? event.target.value : event
|
||||
console.log(`🔍 [变化监听] ${fieldName}:`, {
|
||||
变化值: value,
|
||||
事件类型: 'change',
|
||||
时间戳: new Date().toLocaleString(),
|
||||
变化前表单: JSON.stringify(searchForm, null, 2)
|
||||
})
|
||||
|
||||
// 延迟一点时间确保 v-model 已更新
|
||||
setTimeout(() => {
|
||||
console.log(`🔍 [变化后] ${fieldName}:`, {
|
||||
表单中的值: searchForm[fieldName],
|
||||
变化后表单: JSON.stringify(searchForm, null, 2)
|
||||
})
|
||||
}, 10)
|
||||
}
|
||||
|
||||
const handleTableChange = (pag) => {
|
||||
@@ -574,14 +826,16 @@ const handleTableChange = (pag) => {
|
||||
const showModal = () => {
|
||||
editingId.value = null
|
||||
Object.assign(formState, {
|
||||
claim_number: '',
|
||||
policy_number: '',
|
||||
applicant_name: '',
|
||||
phone: '',
|
||||
claim_no: '',
|
||||
policy_no: '',
|
||||
reporter_name: '',
|
||||
contact_phone: '',
|
||||
claim_type: '',
|
||||
affected_count: null,
|
||||
claim_amount: null,
|
||||
apply_date: null,
|
||||
accident_date: null,
|
||||
status: 'pending',
|
||||
incident_location: '',
|
||||
incident_date: null,
|
||||
claim_status: 'pending',
|
||||
accident_description: '',
|
||||
process_description: '',
|
||||
reject_reason: '',
|
||||
@@ -590,6 +844,10 @@ const showModal = () => {
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
const handleAdd = () => {
|
||||
showModal()
|
||||
}
|
||||
|
||||
const handleView = (record) => {
|
||||
currentClaim.value = record
|
||||
detailVisible.value = true
|
||||
@@ -608,26 +866,31 @@ const handleProcess = (record) => {
|
||||
|
||||
const handleEdit = (record) => {
|
||||
editingId.value = record.id
|
||||
|
||||
// 复制记录数据到表单
|
||||
Object.assign(formState, {
|
||||
claim_number: record.claim_number,
|
||||
policy_number: record.policy_number,
|
||||
applicant_name: record.applicant_name,
|
||||
phone: record.phone,
|
||||
claim_no: record.claim_no,
|
||||
policy_no: record.policy_no,
|
||||
reporter_name: record.reporter_name,
|
||||
contact_phone: record.contact_phone,
|
||||
claim_type: record.claim_type,
|
||||
affected_count: record.affected_count,
|
||||
claim_amount: record.claim_amount,
|
||||
apply_date: record.apply_date,
|
||||
accident_date: record.accident_date,
|
||||
status: record.status,
|
||||
incident_location: record.incident_location,
|
||||
incident_date: record.incident_date ? dayjs(record.incident_date) : null,
|
||||
claim_status: record.claim_status,
|
||||
accident_description: record.accident_description,
|
||||
process_description: record.process_description,
|
||||
reject_reason: record.reject_reason,
|
||||
approved_amount: record.approved_amount
|
||||
})
|
||||
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
const handleApprove = async (record) => {
|
||||
try {
|
||||
// await claimAPI.approve(record.id, { approved_amount: record.claim_amount })
|
||||
// await livestockClaimApi.approve(record.id, { approved_amount: record.claim_amount })
|
||||
message.success('理赔申请已通过')
|
||||
loadClaims()
|
||||
} catch (error) {
|
||||
@@ -643,7 +906,7 @@ const handleProcessOk = async () => {
|
||||
try {
|
||||
await processFormRef.value.validate()
|
||||
|
||||
// await claimAPI.process(currentClaim.value.id, processForm)
|
||||
// await livestockClaimApi.process(currentClaim.value.id, processForm)
|
||||
message.success('处理完成')
|
||||
processVisible.value = false
|
||||
loadClaims()
|
||||
@@ -660,18 +923,32 @@ const handleModalOk = async () => {
|
||||
try {
|
||||
await formRef.value.validate()
|
||||
|
||||
const formData = { ...formState }
|
||||
|
||||
// 处理日期格式
|
||||
if (formData.incident_date) {
|
||||
formData.incident_date = formData.incident_date.format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
if (editingId.value) {
|
||||
// await claimAPI.update(editingId.value, formState)
|
||||
message.success('理赔更新成功')
|
||||
// 编辑
|
||||
await livestockClaimApi.update(editingId.value, formData)
|
||||
message.success('更新成功')
|
||||
} else {
|
||||
// await claimAPI.create(formState)
|
||||
message.success('理赔创建成功')
|
||||
// 新增
|
||||
// 生成理赔单号
|
||||
if (!formData.claim_no) {
|
||||
formData.claim_no = 'LC' + Date.now()
|
||||
}
|
||||
await livestockClaimApi.create(formData)
|
||||
message.success('新增成功')
|
||||
}
|
||||
|
||||
modalVisible.value = false
|
||||
loadClaims()
|
||||
} catch (error) {
|
||||
console.log('表单验证失败', error)
|
||||
console.error('保存失败:', error)
|
||||
message.error('保存失败: ' + (error.response?.data?.message || error.message))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -681,11 +958,12 @@ const handleModalCancel = () => {
|
||||
|
||||
const handleDelete = async (id) => {
|
||||
try {
|
||||
// await claimAPI.delete(id)
|
||||
message.success('理赔删除成功')
|
||||
await livestockClaimApi.delete(id)
|
||||
message.success('删除成功')
|
||||
loadClaims()
|
||||
} catch (error) {
|
||||
message.error('理赔删除失败')
|
||||
console.error('删除失败:', error)
|
||||
message.error('删除失败: ' + (error.response?.data?.message || error.message))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,36 +17,12 @@
|
||||
<a-form layout="inline" :model="searchForm">
|
||||
<a-form-item label="险种名称">
|
||||
<a-input
|
||||
v-model:value="searchForm.name"
|
||||
v-model="searchForm.name"
|
||||
placeholder="请输入险种名称"
|
||||
@pressEnter="handleSearch"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="适用范围">
|
||||
<a-input
|
||||
v-model:value="searchForm.applicable_scope"
|
||||
placeholder="请输入适用范围"
|
||||
@pressEnter="handleSearch"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="服务区域">
|
||||
<a-input
|
||||
v-model:value="searchForm.service_area"
|
||||
placeholder="请输入服务区域"
|
||||
@pressEnter="handleSearch"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="在线状态">
|
||||
<a-select
|
||||
v-model:value="searchForm.online_status"
|
||||
placeholder="请选择在线状态"
|
||||
style="width: 120px"
|
||||
>
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="true">在线</a-select-option>
|
||||
<a-select-option :value="false">离线</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<a-button type="primary" @click="handleSearch">
|
||||
<search-outlined />
|
||||
@@ -71,25 +47,25 @@
|
||||
:scroll="{ x: 1500 }"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'online_status'">
|
||||
<template v-if="column.key === 'on_sale_status'">
|
||||
<a-switch
|
||||
:checked="record.online_status"
|
||||
@change="(checked) => handleToggleOnlineStatus(record, checked)"
|
||||
checked-children="在线"
|
||||
un-checked-children="离线"
|
||||
:checked="record.on_sale_status"
|
||||
@change="(checked) => handleToggleOnSaleStatus(record, checked)"
|
||||
checked-children="在售"
|
||||
un-checked-children="停售"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'premium_price'">
|
||||
<span>{{ record.premium_price ? `¥${record.premium_price}` : '-' }}</span>
|
||||
<template v-else-if="column.key === 'applicable_livestock'">
|
||||
<span>{{ formatApplicableLivestock(record.applicable_livestock) }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'experience_period'">
|
||||
<span>{{ record.experience_period ? `${record.experience_period}个月` : '-' }}</span>
|
||||
<template v-else-if="column.key === 'coverage_amount'">
|
||||
<span>{{ formatCoverageAmount(record.coverage_amount_min, record.coverage_amount_max) }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'insurance_period'">
|
||||
<span>{{ record.insurance_period ? `${record.insurance_period}个月` : '-' }}</span>
|
||||
<template v-else-if="column.key === 'insurance_term'">
|
||||
<span>{{ record.insurance_term ? `${record.insurance_term}个月` : '-' }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'product_time'">
|
||||
<span>{{ record.product_time ? formatDate(record.product_time) : '-' }}</span>
|
||||
<template v-else-if="column.key === 'created_at'">
|
||||
<span>{{ record.created_at ? formatDate(record.created_at) : '-' }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<a-space>
|
||||
@@ -109,7 +85,8 @@
|
||||
|
||||
<!-- 新增/编辑模态框 -->
|
||||
<a-modal
|
||||
v-model:open="modalVisible"
|
||||
:open="modalVisible"
|
||||
@update:open="modalVisible = $event"
|
||||
:title="isEdit ? '编辑险种' : '新增险种'"
|
||||
:ok-text="isEdit ? '更新' : '创建'"
|
||||
cancel-text="取消"
|
||||
@@ -126,111 +103,163 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="险种名称" name="name">
|
||||
<a-input v-model:value="formState.name" placeholder="请输入险种名称" />
|
||||
<a-input v-model="formState.name" placeholder="请输入险种名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="适用范围" name="applicable_scope">
|
||||
<a-input v-model:value="formState.applicable_scope" placeholder="请输入适用范围" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item label="险种描述" name="description">
|
||||
<a-textarea
|
||||
v-model:value="formState.description"
|
||||
placeholder="请输入险种描述"
|
||||
:rows="3"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="体验期" name="experience_period">
|
||||
<a-input-number
|
||||
v-model:value="formState.experience_period"
|
||||
placeholder="请输入体验期(月)"
|
||||
:min="0"
|
||||
<a-form-item label="适用生资" name="applicable_livestock">
|
||||
<a-select
|
||||
v-model="formState.applicable_livestock"
|
||||
placeholder="请选择适用生资"
|
||||
style="width: 100%"
|
||||
addon-after="个月"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="保险期间" name="insurance_period">
|
||||
<a-input-number
|
||||
v-model:value="formState.insurance_period"
|
||||
placeholder="请输入保险期间(月)"
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
addon-after="个月"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="保费价格" name="premium_price">
|
||||
<a-input-number
|
||||
v-model:value="formState.premium_price"
|
||||
placeholder="请输入保费价格"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
style="width: 100%"
|
||||
addon-before="¥"
|
||||
/>
|
||||
mode="multiple"
|
||||
:max-tag-count="3"
|
||||
>
|
||||
<a-select-option value="牛">牛</a-select-option>
|
||||
<a-select-option value="羊">羊</a-select-option>
|
||||
<a-select-option value="猪">猪</a-select-option>
|
||||
<a-select-option value="鸡">鸡</a-select-option>
|
||||
<a-select-option value="鸭">鸭</a-select-option>
|
||||
<a-select-option value="鹅">鹅</a-select-option>
|
||||
<a-select-option value="马">马</a-select-option>
|
||||
<a-select-option value="驴">驴</a-select-option>
|
||||
<a-select-option value="兔">兔</a-select-option>
|
||||
<a-select-option value="鱼">鱼</a-select-option>
|
||||
<a-select-option value="虾">虾</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="服务区域" name="service_area">
|
||||
<a-input v-model:value="formState.service_area" placeholder="请输入服务区域" />
|
||||
<a-col :span="8">
|
||||
<a-form-item label="保险期限/月" name="insurance_term">
|
||||
<a-select
|
||||
v-model="formState.insurance_term"
|
||||
placeholder="请选择保险期限"
|
||||
style="width: 100%"
|
||||
>
|
||||
<a-select-option :value="1">1个月</a-select-option>
|
||||
<a-select-option :value="3">3个月</a-select-option>
|
||||
<a-select-option :value="6">6个月</a-select-option>
|
||||
<a-select-option :value="12">12个月</a-select-option>
|
||||
<a-select-option :value="24">24个月</a-select-option>
|
||||
<a-select-option :value="36">36个月</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="上架时间" name="product_time">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="服务区域" name="description">
|
||||
<a-input v-model="formState.description" placeholder="请输入服务区域" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="保单形式" name="policy_form">
|
||||
<a-select
|
||||
v-model="formState.policy_form"
|
||||
placeholder="请选择保单形式"
|
||||
style="width: 100%"
|
||||
>
|
||||
<a-select-option value="电子保单">电子保单</a-select-option>
|
||||
<a-select-option value="纸质保单">纸质保单</a-select-option>
|
||||
<a-select-option value="电子保单+纸质保单">电子保单+纸质保单</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="保险额度" name="coverage_amount">
|
||||
<a-input-group compact>
|
||||
<a-input-number
|
||||
v-model="formState.coverage_amount_min"
|
||||
placeholder="最低额度"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
style="width: 45%"
|
||||
addon-before="¥"
|
||||
/>
|
||||
<a-input
|
||||
style="width: 10%; text-align: center; pointer-events: none"
|
||||
placeholder="~"
|
||||
disabled
|
||||
/>
|
||||
<a-input-number
|
||||
v-model="formState.coverage_amount_max"
|
||||
placeholder="最高额度"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
style="width: 45%"
|
||||
addon-before="¥"
|
||||
/>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="添加时间" name="created_at">
|
||||
<a-date-picker
|
||||
v-model:value="formState.product_time"
|
||||
placeholder="请选择上架时间"
|
||||
v-model="formState.created_at"
|
||||
placeholder="请选择添加时间"
|
||||
style="width: 100%"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
show-time
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="在线状态" name="online_status">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="在售状态" name="on_sale_status">
|
||||
<a-switch
|
||||
v-model:checked="formState.online_status"
|
||||
checked-children="在线"
|
||||
un-checked-children="离线"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="排序" name="sort_order">
|
||||
<a-input-number
|
||||
v-model:value="formState.sort_order"
|
||||
placeholder="请输入排序值"
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
v-model="formState.on_sale_status"
|
||||
checked-children="在售"
|
||||
un-checked-children="停售"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item label="备注" name="remarks">
|
||||
<a-textarea
|
||||
v-model:value="formState.remarks"
|
||||
placeholder="请输入备注信息"
|
||||
:rows="3"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
<!-- 详情查看模态框 -->
|
||||
<a-modal
|
||||
:open="detailVisible"
|
||||
@update:open="detailVisible = $event"
|
||||
title="险种详情"
|
||||
:footer="null"
|
||||
width="800px"
|
||||
>
|
||||
<a-descriptions :column="2" bordered>
|
||||
<a-descriptions-item label="险种名称">
|
||||
{{ currentDetail.name || '-' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="适用生资">
|
||||
{{ formatApplicableLivestock(currentDetail.applicable_livestock) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="保险期限">
|
||||
{{ currentDetail.insurance_term ? `${currentDetail.insurance_term}个月` : '-' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="服务区域">
|
||||
{{ currentDetail.description || '-' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="保单形式">
|
||||
{{ currentDetail.policy_form || '-' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="保险额度">
|
||||
{{ formatCoverageAmount(currentDetail.coverage_amount_min, currentDetail.coverage_amount_max) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="添加时间">
|
||||
{{ currentDetail.created_at ? formatDate(currentDetail.created_at) : '-' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="在售状态">
|
||||
<a-tag :color="currentDetail.on_sale_status ? 'green' : 'red'">
|
||||
{{ currentDetail.on_sale_status ? '在售' : '停售' }}
|
||||
</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="最后更新时间" :span="2">
|
||||
{{ currentDetail.updated_at ? formatDate(currentDetail.updated_at) : '-' }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -247,30 +276,27 @@ import {
|
||||
|
||||
const loading = ref(false)
|
||||
const modalVisible = ref(false)
|
||||
const detailVisible = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const typeList = ref([])
|
||||
const formRef = ref()
|
||||
const currentDetail = ref({})
|
||||
|
||||
const searchForm = reactive({
|
||||
name: '',
|
||||
applicable_scope: '',
|
||||
service_area: '',
|
||||
online_status: ''
|
||||
name: ''
|
||||
})
|
||||
|
||||
const formState = reactive({
|
||||
id: null,
|
||||
name: '',
|
||||
applicable_livestock: [],
|
||||
insurance_term: null,
|
||||
description: '',
|
||||
applicable_scope: '',
|
||||
experience_period: null,
|
||||
insurance_period: null,
|
||||
premium_price: null,
|
||||
service_area: '',
|
||||
product_time: null,
|
||||
online_status: true,
|
||||
sort_order: 0,
|
||||
remarks: ''
|
||||
policy_form: '',
|
||||
coverage_amount_min: null,
|
||||
coverage_amount_max: null,
|
||||
created_at: null,
|
||||
on_sale_status: true
|
||||
})
|
||||
|
||||
const pagination = reactive({
|
||||
@@ -291,45 +317,52 @@ const columns = [
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
title: '适用范围',
|
||||
dataIndex: 'applicable_scope',
|
||||
key: 'applicable_scope',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '体验期',
|
||||
dataIndex: 'experience_period',
|
||||
key: 'experience_period',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '保险期间',
|
||||
dataIndex: 'insurance_period',
|
||||
key: 'insurance_period',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '保费价格',
|
||||
dataIndex: 'premium_price',
|
||||
key: 'premium_price',
|
||||
title: '适用生资',
|
||||
dataIndex: 'applicable_livestock',
|
||||
key: 'applicable_livestock',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '保险期限/月',
|
||||
dataIndex: 'insurance_term',
|
||||
key: 'insurance_term',
|
||||
width: 120,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '服务区域',
|
||||
dataIndex: 'service_area',
|
||||
key: 'service_area',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '保单形式',
|
||||
dataIndex: 'policy_form',
|
||||
key: 'policy_form',
|
||||
width: 150,
|
||||
filters: [
|
||||
{ text: '电子保单', value: '电子保单' },
|
||||
{ text: '纸质保单', value: '纸质保单' },
|
||||
{ text: '电子保单+纸质保单', value: '电子保单+纸质保单' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '保险额度',
|
||||
dataIndex: 'coverage_amount',
|
||||
key: 'coverage_amount',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '上架时间',
|
||||
dataIndex: 'product_time',
|
||||
key: 'product_time',
|
||||
width: 180
|
||||
title: '添加时间',
|
||||
dataIndex: 'created_at',
|
||||
key: 'created_at',
|
||||
width: 180,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '在线状态',
|
||||
dataIndex: 'online_status',
|
||||
key: 'online_status',
|
||||
title: '在售状态',
|
||||
dataIndex: 'on_sale_status',
|
||||
key: 'on_sale_status',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
@@ -342,11 +375,12 @@ const columns = [
|
||||
|
||||
const rules = {
|
||||
name: [{ required: true, message: '请输入险种名称' }],
|
||||
applicable_scope: [{ required: true, message: '请输入适用范围' }],
|
||||
experience_period: [{ required: true, message: '请输入体验期' }],
|
||||
insurance_period: [{ required: true, message: '请输入保险期间' }],
|
||||
premium_price: [{ required: true, message: '请输入保费价格' }],
|
||||
service_area: [{ required: true, message: '请输入服务区域' }]
|
||||
applicable_livestock: [{ required: true, message: '请输入适用生资' }],
|
||||
insurance_term: [{ required: true, message: '请输入保险期限' }],
|
||||
description: [{ required: true, message: '请输入服务区域' }],
|
||||
policy_form: [{ required: true, message: '请选择保单形式' }],
|
||||
coverage_amount_min: [{ required: true, message: '请输入最低保险额度' }],
|
||||
coverage_amount_max: [{ required: true, message: '请输入最高保险额度' }]
|
||||
}
|
||||
|
||||
// 格式化日期
|
||||
@@ -355,6 +389,38 @@ const formatDate = (date) => {
|
||||
return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
// 格式化保险额度
|
||||
const formatCoverageAmount = (min, max) => {
|
||||
if (!min && !max) return '-'
|
||||
if (min && max) {
|
||||
return `${min}~${max}元`
|
||||
}
|
||||
if (min) return `${min}元以上`
|
||||
if (max) return `${max}元以下`
|
||||
return '-'
|
||||
}
|
||||
|
||||
// 格式化适用生资
|
||||
const formatApplicableLivestock = (livestock) => {
|
||||
if (!livestock) return '-'
|
||||
if (Array.isArray(livestock)) {
|
||||
return livestock.join('、')
|
||||
}
|
||||
if (typeof livestock === 'string') {
|
||||
// 如果是字符串,尝试解析为数组
|
||||
try {
|
||||
const parsed = JSON.parse(livestock)
|
||||
if (Array.isArray(parsed)) {
|
||||
return parsed.join('、')
|
||||
}
|
||||
} catch (e) {
|
||||
// 如果解析失败,按逗号分割
|
||||
return livestock.split(',').join('、')
|
||||
}
|
||||
}
|
||||
return livestock.toString()
|
||||
}
|
||||
|
||||
const loadInsuranceTypes = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
@@ -391,10 +457,7 @@ const handleSearch = () => {
|
||||
|
||||
const resetSearch = () => {
|
||||
Object.assign(searchForm, {
|
||||
name: '',
|
||||
applicable_scope: '',
|
||||
service_area: '',
|
||||
online_status: ''
|
||||
name: ''
|
||||
})
|
||||
handleSearch()
|
||||
}
|
||||
@@ -410,42 +473,54 @@ const showModal = () => {
|
||||
Object.assign(formState, {
|
||||
id: null,
|
||||
name: '',
|
||||
applicable_livestock: [],
|
||||
insurance_term: null,
|
||||
description: '',
|
||||
applicable_scope: '',
|
||||
experience_period: null,
|
||||
insurance_period: null,
|
||||
premium_price: null,
|
||||
service_area: '',
|
||||
product_time: null,
|
||||
online_status: true,
|
||||
sort_order: 0,
|
||||
remarks: ''
|
||||
policy_form: '',
|
||||
coverage_amount_min: null,
|
||||
coverage_amount_max: null,
|
||||
created_at: null,
|
||||
on_sale_status: true
|
||||
})
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
const handleEdit = (record) => {
|
||||
isEdit.value = true
|
||||
|
||||
// 处理 applicable_livestock 数据类型
|
||||
let applicableLivestock = []
|
||||
if (record.applicable_livestock) {
|
||||
if (Array.isArray(record.applicable_livestock)) {
|
||||
applicableLivestock = record.applicable_livestock
|
||||
} else if (typeof record.applicable_livestock === 'string') {
|
||||
try {
|
||||
applicableLivestock = JSON.parse(record.applicable_livestock)
|
||||
} catch (e) {
|
||||
applicableLivestock = record.applicable_livestock.split(',').map(item => item.trim())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(formState, {
|
||||
id: record.id,
|
||||
name: record.name,
|
||||
applicable_livestock: applicableLivestock,
|
||||
insurance_term: record.insurance_term,
|
||||
description: record.description,
|
||||
applicable_scope: record.applicable_scope,
|
||||
experience_period: record.experience_period,
|
||||
insurance_period: record.insurance_period,
|
||||
premium_price: record.premium_price,
|
||||
service_area: record.service_area,
|
||||
product_time: record.product_time ? dayjs(record.product_time) : null,
|
||||
online_status: record.online_status,
|
||||
sort_order: record.sort_order,
|
||||
remarks: record.remarks
|
||||
policy_form: record.policy_form,
|
||||
coverage_amount_min: record.coverage_amount_min,
|
||||
coverage_amount_max: record.coverage_amount_max,
|
||||
created_at: record.created_at ? dayjs(record.created_at) : null,
|
||||
on_sale_status: record.on_sale_status
|
||||
})
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
const handleView = (record) => {
|
||||
// 查看详情功能
|
||||
message.info('查看详情功能待实现')
|
||||
// 设置详情数据
|
||||
currentDetail.value = { ...record }
|
||||
detailVisible.value = true
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
@@ -454,7 +529,10 @@ const handleSubmit = async () => {
|
||||
|
||||
const submitData = {
|
||||
...formState,
|
||||
product_time: formState.product_time ? formState.product_time.format('YYYY-MM-DD HH:mm:ss') : null
|
||||
applicable_livestock: Array.isArray(formState.applicable_livestock)
|
||||
? formState.applicable_livestock.join(',')
|
||||
: formState.applicable_livestock,
|
||||
created_at: formState.created_at ? formState.created_at.format('YYYY-MM-DD HH:mm:ss') : null
|
||||
}
|
||||
|
||||
if (isEdit.value) {
|
||||
@@ -488,21 +566,21 @@ const handleCancel = () => {
|
||||
modalVisible.value = false
|
||||
}
|
||||
|
||||
const handleToggleOnlineStatus = async (record, checked) => {
|
||||
const handleToggleOnSaleStatus = async (record, checked) => {
|
||||
try {
|
||||
const response = await insuranceTypeAPI.updateStatus(record.id, {
|
||||
online_status: checked
|
||||
on_sale_status: checked
|
||||
})
|
||||
|
||||
if (response.status === 'success') {
|
||||
message.success('在线状态更新成功')
|
||||
message.success('在售状态更新成功')
|
||||
loadInsuranceTypes()
|
||||
} else {
|
||||
message.error(response.message || '在线状态更新失败')
|
||||
message.error(response.message || '在售状态更新失败')
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('在线状态更新失败')
|
||||
console.error('Error updating online status:', error)
|
||||
message.error('在售状态更新失败')
|
||||
console.error('Error updating on sale status:', error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
:column="2"
|
||||
>
|
||||
<a-descriptions-item label="保单号">{{ currentPolicy.policy_number }}</a-descriptions-item>
|
||||
<a-descriptions-item label="保险类型">{{ currentPolicy.insurance_type_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="保险类型">{{ currentPolicy.insurance_type?.name || currentPolicy.insurance_type_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="投保人">{{ currentPolicy.policyholder_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="被保险人">{{ currentPolicy.insured_name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="保费金额">¥{{ currentPolicy.premium_amount?.toLocaleString() }}</a-descriptions-item>
|
||||
@@ -353,7 +353,10 @@ const columns = [
|
||||
{
|
||||
title: '保险类型',
|
||||
dataIndex: 'insurance_type_name',
|
||||
key: 'insurance_type_name'
|
||||
key: 'insurance_type_name',
|
||||
customRender: ({ record }) => {
|
||||
return record.insurance_type?.name || record.insurance_type_name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '投保人',
|
||||
|
||||
Reference in New Issue
Block a user