feat: 细胞存储缴费催缴、统一样本信息与协议支付能力增强

汇总近期业务改动:催缴菜单与后端、样本信息快捷登记与进度、运费关联、客户档案扩展、协议优惠/期次与押金划转,并同步 SQL 迁移与管理端页面收敛。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-10 21:20:37 +08:00
1 parent 2d3472f5c4
commit db31990ebe
235 files changed
+14898 -10196

No files matched your search

@@ -89,6 +89,7 @@
:disabled="selectedRows.length === 0"
@click="handleBatchDelete"
>
<el-icon><Delete /></el-icon>
批量删除
</el-button>
</div>
@@ -40,6 +40,7 @@
:disabled="selectedRows.length === 0"
@click="handleBatchDelete"
>
<el-icon><Delete /></el-icon>
批量删除
</el-button>
</div>
@@ -78,6 +78,7 @@
:disabled="selectedRows.length === 0"
@click="handleBatchDelete"
>
<el-icon><Delete /></el-icon>
批量删除
</el-button>
</div>
@@ -3,10 +3,6 @@
<template>
<div class="page-container">
<section class="panel">
<div class="panel-top">
<h2 class="title-bar-heading">地区列表</h2>
</div>
<div class="filter-block">
<el-form :model="searchForm" class="filter-form" @submit.prevent>
<div class="filter-grid">
@@ -42,6 +38,7 @@
:disabled="selectedRows.length === 0"
@click="handleBatchDelete"
>
<el-icon><Delete /></el-icon>
批量删除
</el-button>
</div>
@@ -577,9 +574,6 @@
filterable
remote
clearable
collapse-tags
collapse-tags-tooltip
:max-collapse-tags="4"
:remote-method="remoteSearchUsers"
:loading="staffUserLoading"
placeholder="搜索并选择一人或多名人员"
+217 -93
View File
@@ -115,12 +115,61 @@
align="center"
header-align="center"
/>
<el-table-column
prop="birthYm"
label="出生年月"
min-width="110"
align="center"
header-align="center"
>
<template #default="{ row }">{{ formatBirthYm(row.birthYm) }}</template>
</el-table-column>
<el-table-column
prop="ethnic"
label="民族"
min-width="90"
align="center"
header-align="center"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.ethnic || '—' }}</template>
</el-table-column>
<el-table-column
prop="email"
label="邮箱"
min-width="160"
align="center"
header-align="center"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.email || '—' }}</template>
</el-table-column>
<el-table-column
prop="address"
label="家庭住址"
min-width="180"
align="center"
header-align="center"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.address || '—' }}</template>
</el-table-column>
<el-table-column
prop="customerTags"
label="客户标签"
min-width="140"
show-overflow-tooltip
/>
>
<template #default="{ row }">{{ row.customerTags || '—' }}</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="140"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.remark || '—' }}</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
@@ -224,6 +273,41 @@
<el-form-item label="联系电话">
<el-input v-model="formData.phoneNo" placeholder="可选" clearable />
</el-form-item>
<el-form-item label="出生年月">
<el-date-picker
v-model="formData.birthYm"
type="month"
value-format="YYYYMM"
format="YYYY-MM"
placeholder="选择月份"
clearable
style="width: 100%"
/>
</el-form-item>
<el-form-item label="民族">
<el-select
v-model="formData.ethnic"
class="w-full"
filterable
clearable
:loading="ethnicLoading"
placeholder="请选择或检索民族"
style="width: 100%"
>
<el-option
v-for="e in ethnicOptions"
:key="e.ethnicCode || e.ethnicName"
:label="e.ethnicName"
:value="e.ethnicName"
/>
</el-select>
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="formData.email" placeholder="可选" clearable />
</el-form-item>
<el-form-item label="家庭住址" class="form-col-span-2">
<el-input v-model="formData.address" placeholder="可选" />
</el-form-item>
<el-form-item label="客户标签" class="form-col-span-2">
<el-input v-model="formData.customerTags" placeholder="多个标签用英文逗号分隔" />
</el-form-item>
@@ -251,12 +335,12 @@
:meta="`身份证:${viewRow?.idCardNo || '—'}${viewRow?.createTime ? ' · ' + viewRow.createTime : ''}`"
:sections="viewSections"
:loading="relationsLoading"
width="820px"
width="1100px"
:grid-columns="5"
>
<template #append>
<div class="customer-relations" v-loading="relationsLoading">
<h3 class="rel-section-title">关联客户</h3>
<div v-if="!(relations?.relatedGroups || []).length" class="rel-empty">暂无关联协议</div>
<template #related-customers>
<div class="customer-relations">
<p v-if="!(relations?.relatedGroups || []).length" class="view-empty-hint">暂无关联客户</p>
<div
v-for="group in relations?.relatedGroups || []"
:key="`${group.bizType}-${group.protocolId}`"
@@ -271,74 +355,74 @@
</button>
<span class="rel-muted">本客户角色:{{ roleLabel(group.myRole) }}</span>
</div>
<el-table :data="group.members" size="small" class="rel-member-table" stripe>
<el-table-column label="角色" min-width="90" align="center" header-align="center">
<div class="view-subtable-wrap">
<el-table :data="group.members" stripe class="list-table view-subtable">
<el-table-column label="角色" min-width="90" align="center" header-align="center">
<template #default="{ row }">
{{ roleLabel(row.role) }}
<el-tag v-if="row.customerId && row.customerId === viewRow?.id" size="small" type="info">
本人
</el-tag>
</template>
</el-table-column>
<el-table-column label="姓名" min-width="110" align="center" header-align="center">
<template #default="{ row }">
<button
v-if="row.customerId && row.customerId !== viewRow?.id"
type="button"
class="rel-link"
@click="openRelatedCustomer(row)"
>
{{ row.name || '—' }}
</button>
<span v-else>{{ row.name || '—' }}</span>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.phone || '—' }}</template>
</el-table-column>
<el-table-column prop="idCardNo" label="身份证" min-width="160" align="center" header-align="center">
<template #default="{ row }">{{ row.idCardNo || '—' }}</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<template #related-protocols>
<div class="customer-relations">
<p v-if="!(relations?.protocols || []).length" class="view-empty-hint">暂无关联协议</p>
<div v-else class="view-subtable-wrap">
<el-table :data="relations?.protocols || []" stripe class="list-table view-subtable">
<el-table-column label="协议号" min-width="140" align="center" header-align="center">
<template #default="{ row }">
{{ roleLabel(row.role) }}
<el-tag v-if="row.customerId && row.customerId === viewRow?.id" size="small" type="info">
本人
<button type="button" class="rel-link" @click="openProtocol(row)">
{{ row.protocolNo || '—' }}
</button>
</template>
</el-table-column>
<el-table-column label="类型" min-width="110" align="center" header-align="center">
<template #default="{ row }">
<el-tag size="small" :type="row.bizType === 'cell_storage' ? 'primary' : 'success'">
{{ bizTypeLabel(row.bizType) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="姓名" min-width="110" align="center" header-align="center">
<el-table-column label="状态" min-width="100" align="center" header-align="center">
<template #default="{ row }">
<button
v-if="row.customerId && row.customerId !== viewRow?.id"
type="button"
class="rel-link"
@click="openRelatedCustomer(row)"
>
{{ row.name || '—' }}
</button>
<span v-else>{{ row.name || '—' }}</span>
<el-tag size="small" :type="protocolTagType(row)">
{{ protocolLabel(row) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.phone || '—' }}</template>
<el-table-column label="日期" min-width="110" align="center" header-align="center">
<template #default="{ row }">{{ formatRegisterDate(row.registerDate) }}</template>
</el-table-column>
<el-table-column prop="idCardNo" label="身份证" min-width="160" align="center" header-align="center">
<template #default="{ row }">{{ row.idCardNo || '—' }}</template>
<el-table-column label="本客户角色" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ roleLabel(row.myRole) }}</template>
</el-table-column>
</el-table>
</div>
<h3 class="rel-section-title rel-section-title--gap">关联协议</h3>
<div v-if="!(relations?.protocols || []).length" class="rel-empty">暂无关联协议</div>
<el-table
v-else
:data="relations?.protocols || []"
size="small"
class="rel-protocol-table"
stripe
>
<el-table-column label="协议号" min-width="140" align="center" header-align="center">
<template #default="{ row }">
<button type="button" class="rel-link" @click="openProtocol(row)">
{{ row.protocolNo || '—' }}
</button>
</template>
</el-table-column>
<el-table-column label="类型" min-width="110" align="center" header-align="center">
<template #default="{ row }">
<el-tag size="small" :type="row.bizType === 'cell_storage' ? 'primary' : 'success'">
{{ bizTypeLabel(row.bizType) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" min-width="100" align="center" header-align="center">
<template #default="{ row }">
<el-tag size="small" :type="protocolTagType(row)">
{{ protocolLabel(row) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="日期" min-width="110" align="center" header-align="center">
<template #default="{ row }">{{ formatRegisterDate(row.registerDate) }}</template>
</el-table-column>
<el-table-column label="本客户角色" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ roleLabel(row.myRole) }}</template>
</el-table-column>
</el-table>
</div>
</template>
</SystemViewDialog>
@@ -370,6 +454,7 @@
fetchDeleteCustomer,
fetchCustomerRelations
} from '@/api/admin'
import { fetchEthnicList, type EthnicOption } from '@/api/ethnic'
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
import ProtocolViewDialog from '@/views/cell-storage/protocol/ProtocolViewDialog.vue'
import DonationViewDialog from '@/views/research-donation/list/DonationViewDialog.vue'
@@ -406,6 +491,12 @@
const donationViewVisible = ref(false)
const viewDonationId = ref<string | null>(null)
function formatBirthYm(ym: string | undefined | null) {
const s = String(ym || '').trim()
if (/^\d{6}$/.test(s)) return `${s.slice(0, 4)}-${s.slice(4, 6)}`
return s || '—'
}
const viewSections = computed(() => {
const row = viewRow.value
if (!row) return []
@@ -418,10 +509,24 @@
{ label: '身份证号', value: row.idCardNo },
{ label: '年龄', value: row.age },
{ label: '联系电话', value: row.phoneNo },
{ label: '客户标签', value: row.customerTags, span: true },
{ label: '出生年月', value: formatBirthYm(row.birthYm) },
{ label: '民族', value: row.ethnic },
{ label: '邮箱', value: row.email },
{ label: '家庭住址', value: row.address },
{ label: '客户标签', value: row.customerTags },
{ label: '创建时间', value: row.createTime },
{ label: '备注', value: row.remark, span: true }
{ label: '备注', value: row.remark }
]
},
{
title: '关联客户',
fields: [],
slot: 'related-customers'
},
{
title: '关联协议',
fields: [],
slot: 'related-protocols'
}
]
})
@@ -507,12 +612,40 @@
sex: '0',
idCardNo: '',
age: null as number | null,
birthYm: '',
ethnic: '',
email: '',
address: '',
phoneNo: '',
customerTags: '',
orderNum: 0,
remark: ''
})
const ethnicOptions = ref<EthnicOption[]>([])
const ethnicLoading = ref(false)
async function loadEthnicOptions() {
if (ethnicOptions.value.length) return
ethnicLoading.value = true
try {
const res = await fetchEthnicList({ limit: 200 })
ethnicOptions.value = res.list || []
} finally {
ethnicLoading.value = false
}
}
function ensureEthnicOptionInList(name: string) {
const n = (name || '').trim()
if (!n) return
if (ethnicOptions.value.some((e) => e.ethnicName === n)) return
ethnicOptions.value = [
{ id: '', ethnicName: n, ethnicCode: '', orderNum: null },
...ethnicOptions.value
]
}
const formRules = {
customerName: [{ required: true, message: '请输入客户姓名', trigger: 'blur' }]
}
@@ -555,6 +688,10 @@
formData.sex = '0'
formData.idCardNo = ''
formData.age = null
formData.birthYm = ''
formData.ethnic = ''
formData.email = ''
formData.address = ''
formData.phoneNo = ''
formData.customerTags = ''
formData.orderNum = 0
@@ -566,6 +703,7 @@
isEdit.value = false
dialogTitle.value = '新增客户'
resetForm()
void loadEthnicOptions()
dialogVisible.value = true
formRef.value?.clearValidate?.()
}
@@ -578,10 +716,15 @@
formData.sex = row.sex || '2'
formData.idCardNo = row.idCardNo || ''
formData.age = row.age ?? null
formData.birthYm = row.birthYm || ''
formData.ethnic = row.ethnic || ''
formData.email = row.email || ''
formData.address = row.address || ''
formData.phoneNo = row.phoneNo || ''
formData.customerTags = row.customerTags || ''
formData.orderNum = row.orderNum ?? 0
formData.remark = row.remark || ''
void loadEthnicOptions().then(() => ensureEthnicOptionInList(formData.ethnic))
dialogVisible.value = true
formRef.value?.clearValidate?.()
}
@@ -595,6 +738,10 @@
sex: formData.sex,
idCardNo: formData.idCardNo?.trim() || undefined,
age: formData.age,
birthYm: formData.birthYm?.trim() || undefined,
ethnic: formData.ethnic?.trim() || undefined,
email: formData.email?.trim() || undefined,
address: formData.address?.trim() || undefined,
phoneNo: formData.phoneNo?.trim() || undefined,
customerTags: formData.customerTags?.trim() || undefined,
orderNum: formData.orderNum,
@@ -667,29 +814,12 @@
}
.customer-relations {
.rel-section-title {
margin: 0 0 10px;
font-size: 14px;
font-weight: 600;
color: #0f172a;
}
.rel-section-title--gap {
margin-top: 18px;
}
.rel-empty {
padding: 8px 0 4px;
color: var(--mint-text-muted, #64748b);
font-size: 13px;
}
.rel-group {
margin-bottom: 14px;
padding: 10px 12px;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #f8fafc;
&:last-child {
margin-bottom: 0;
}
}
.rel-group-head {
@@ -702,7 +832,7 @@
.rel-muted {
color: var(--mint-text-muted, #64748b);
font-size: 12px;
font-size: 13px;
}
.rel-link {
@@ -715,11 +845,5 @@
text-decoration: underline;
text-underline-offset: 2px;
}
.rel-member-table,
.rel-protocol-table {
width: 100%;
background: #fff;
}
}
</style>
@@ -3,10 +3,6 @@
<template>
<div class="page-container">
<section class="panel">
<div class="panel-top">
<h2>保险公司及险种</h2>
</div>
<div class="filter-block">
<el-form :model="searchForm" class="filter-form" @submit.prevent>
<div class="filter-grid">