Commit 4f8fad46 by yuzhenWang

Merge branch 'test' into 'feature-20250827wyz-写业务'

修复证件类型刷新后没有下拉选项,修复新单跟进无法保存,增加入账检核下载模板

See merge request !47
parents 90164b0b 902799a5
......@@ -182,7 +182,7 @@
@click="fileUploadDialogFlag = true;">导入</el-button>
</el-col>
<el-col :xs="24" :sm="24" :md="3" :lg="3">
<el-button link type="primary">下载导入模板 </el-button>
<el-button type="primary" link @click="downloadTemplate">下载模板</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
......@@ -303,8 +303,13 @@ import { loadDicts, getDictLabel } from '@/utils/useDict'
const { proxy } = getCurrentInstance()
const { csf_expected_commission_status } = proxy.useDict('csf_expected_commission_status')
const { csf_commission_status } = proxy.useDict('csf_commission_status')
const downloadTemplateUrl = 'https://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2026/01/26/33f0637762144d58a256f5d8d3c2d2b6.xlsx'
const downloadTemplate = () => {
const link = document.createElement('a')
link.href = downloadTemplateUrl // 注意:以 / 开头,指向 public 下的文件
link.download = '入账检核导入模板.xlsx' // 设置下载文件名
link.click() // 自动触发点击,无需 append 到 DOM(现代浏览器支持)
}
const formatRatio = (row, column, cellValue, index) => {
if (cellValue == null || cellValue == '' || cellValue == 0) {
return '-'
......
......@@ -10,110 +10,69 @@
<div class="status">{{ processInfo.status || '--' }}</div>
<div class="time">
<span class="iconfont icon-yanqiweiwancheng"></span>
<span
>{{ parseTime(processInfo.createTime) }}{{
processInfo.customerName || '--'
}}创建</span
>
<span>{{ parseTime(processInfo.createTime) }}{{
processInfo.customerName || '--'
}}创建</span>
</div>
</div>
</div>
</div>
</div>
<div class="tabsBox">
<el-tabs
v-model="activeName"
class="demo-tabs"
:before-leave="beforeTabLeave"
ref="tabPaneRef"
>
<el-tab-pane
v-for="(tab, tIndex) in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<el-tabs v-model="activeName" class="demo-tabs" :before-leave="beforeTabLeave" ref="tabPaneRef">
<el-tab-pane v-for="(tab, tIndex) in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<!-- 注意tabPaneBox这个类名与子组件的锚点定位相关,不能轻易改动 -->
<div :class="{ tabPaneBox: activeName !== 'appointment' }">
<div v-if="tab.name === 'overview'" class="overviewBox">
<div
class="oneItem"
v-for="item in tabsList.filter(item => item.id !== -1 && item.status)"
:key="item.id"
@click="handleStep(item)"
>
<div
class="circle"
:class="{
finfishCircle: item.status == '1',
unFinishCircle: item.status == '0'
}"
>
<el-icon v-if="item.status == '1'"><Check /></el-icon>
<div class="oneItem" v-for="item in tabsList.filter(item => item.id !== -1 && item.status)"
:key="item.id" @click="handleStep(item)">
<div class="circle" :class="{
finfishCircle: item.status == '1',
unFinishCircle: item.status == '0'
}">
<el-icon v-if="item.status == '1'">
<Check />
</el-icon>
<span v-else>{{ item.id }}</span>
</div>
<div
class="title"
:class="{
finfishTitle: item.status == '1',
unFinishTitle: item.status == '0'
}"
>
<div class="title" :class="{
finfishTitle: item.status == '1',
unFinishTitle: item.status == '0'
}">
{{ item.label }}
</div>
<div
class="status"
:class="{
finfishStatus: item.status == '1',
unFinishStatus: item.status == '0'
}"
>
<div class="status" :class="{
finfishStatus: item.status == '1',
unFinishStatus: item.status == '0'
}">
{{ item.status == '1' ? '已完成' : '未完成' }}
</div>
<div class="operation">
<el-icon class="editIcon" v-if="item.status == '0'"><EditPen /></el-icon>
<div
:class="{
finfishOperation: item.status == '1',
unFinishOperation: item.status == '0'
}"
>
<el-icon class="editIcon" v-if="item.status == '0'">
<EditPen />
</el-icon>
<div :class="{
finfishOperation: item.status == '1',
unFinishOperation: item.status == '0'
}">
{{ item.status == '1' ? '点击查看详情' : '去填写' }}
</div>
</div>
</div>
</div>
<Customer
v-if="tab.name === 'customer'"
:activeName="activeName"
:customerBizId="processInfo.customerBizId"
@handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'customer')"
anchorContainer=".tabPaneBox"
tabSource="customer"
/>
<Customer v-if="tab.name === 'customer'" :activeName="activeName"
:customerBizId="processInfo.customerBizId" @handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'customer')" anchorContainer=".tabPaneBox"
tabSource="customer" />
<div v-if="tab.name === 'fnaform'">
<FanForm
:activeName="activeName"
:fnaFormBizId="processInfo.fnaFormBizId"
:customerBizId="processInfo.customerBizId"
:dictTypeLists="dictTypeLists"
:customerInfo="customerInfo"
@handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'fnaform')"
anchorContainer=".tabPaneBox"
tabSource="fnaform"
/>
<FanForm :activeName="activeName" :fnaFormBizId="processInfo.fnaFormBizId"
:customerBizId="processInfo.customerBizId" :dictTypeLists="dictTypeLists" :customerInfo="customerInfo"
@handleSuccess="handleSuccess" :tabIndex="tabsList.findIndex(t => t.name === 'fnaform')"
anchorContainer=".tabPaneBox" tabSource="fnaform" />
</div>
<div v-if="tab.name === 'appointment'">
<AppointmentEdit
:embed="true"
editStatus="add"
:tabName="activeName"
:processDetail="processInfo"
@handleSuccess="handleSuccess"
source="fnaList"
/>
<AppointmentEdit :embed="true" editStatus="add" :tabName="activeName" :processDetail="processInfo"
@handleSuccess="handleSuccess" source="fnaList" />
</div>
<div v-if="tab.name === 'newpolicy'">关联新单内容</div>
</div>
......@@ -339,38 +298,41 @@ const getDictsData = async () => {
})
dictStore.setAllInsuranceCompanyList(response9.data.records)
}
// 请求每个流程中所涉及到的字典值数据
// proxy.useDictLists([
// 'csf_employment',
// 'sys_no_yes',
// 'bx_currency_type',
// 'csf_liquid_asset_type',
// 'csf_premium_funding_source',
// 'csf_customer_type',
// 'csf_customer_title',
// 'sys_gender',
// 'csf_marriage',
// 'csf_education',
// 'csf_id_type',
// 'csf_ap_apply_type',
// 'csf_ap_meeting_point',
// 'csf_ap_first_issue',
// 'csf_ap_dividend',
// 'csf_ap_frequency',
// 'csf_ap_rel',
// 'csf_ap_registration',
// 'csf_ap_exercise',
// 'csf_ap_risk',
// 'csf_ap_movie',
// 'csf_ap_game',
// 'wj_question_first_category',
// 'wj_question_second_category',
// 'csf_ap_policy_transfer',
// 'md_bank',
// 'csf_property_type',
// 'oss_data_type',
// 'oss_data_person'
// ])
// 请求每个流程中所涉及到的字典值数据,如果缓存中有,则不再请求
if (dictStore.dictTypeLists.length == 0) {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_policy_transfer',
'md_bank',
'csf_property_type',
'oss_data_type',
'oss_data_person'
])
}
}
// 更新流程
......@@ -529,11 +491,12 @@ const handleSuccess = info => {
getDictsData()
</script>
<style lang="scss" scoped>
:deep(.el-card ) {
:deep(.el-card) {
border: none !important;
}
:deep(.el-input-group__append ),
:deep(.el-input-group__prepend ) {
:deep(.el-input-group__append),
:deep(.el-input-group__prepend) {
background-color: #fff !important;
}
......@@ -543,15 +506,18 @@ getDictsData()
min-height: calc(100vh - 84.5px);
padding: 20px;
background-color: #f2f3f5;
.cardHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.left {
display: flex;
justify-content: flex-start;
align-items: center;
.iconBox {
width: 40px;
height: 40px;
......@@ -561,17 +527,21 @@ getDictsData()
text-align: center;
padding: 5px;
}
.rightBox {
margin-left: 10px;
display: flex;
flex-direction: column;
.num {
font-size: 14px;
}
.bottom {
display: flex;
align-items: center;
margin-top: 3px;
.status {
font-size: 11px;
color: #00b42a;
......@@ -584,6 +554,7 @@ getDictsData()
.time {
font-size: 12px;
color: #86909c;
.icon-yanqiweiwancheng {
margin-right: 5px;
font-size: 12px;
......@@ -593,6 +564,7 @@ getDictsData()
}
}
}
.tabsBox {
.tabButton {
box-shadow: 0 -1px 14px #00000014;
......@@ -602,6 +574,7 @@ getDictsData()
justify-content: flex-end;
padding-right: 20px;
padding-top: 20px;
.sumbitBtn {
display: flex;
align-items: center;
......@@ -611,6 +584,7 @@ getDictsData()
background-color: #165dff;
color: #fff;
padding: 0 30px;
.buttonIcon {
font-size: 16px;
color: #fff;
......@@ -649,15 +623,18 @@ getDictsData()
.tabPaneBox::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
.overviewBox {
display: flex;
align-items: center;
justify-content: space-between;
.oneItem {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.circle {
width: 35px;
height: 35px;
......@@ -668,59 +645,73 @@ getDictsData()
align-items: center;
margin-bottom: 5px;
}
.el-icon {
font-size: 16px;
font-weight: 600;
}
}
.finfishCircle {
background-color: #e8f3ff;
color: #165dff;
}
.todoCircle {
background-color: #165dff;
color: #fff;
}
.unFinishCircle {
background-color: #f2f3f5;
color: #4e5969;
}
.title {
font-size: 14px;
margin-bottom: 5px;
}
.finfishTitle {
color: #1d2129;
font-size: 14px;
}
.unFinishTitle {
color: #4e5969;
font-size: 13px;
}
.status {
font-size: 12px;
margin-bottom: 8px;
color: #86909c;
}
.finfishStatus {
color: #165dff;
}
.unFinishStatus {
color: #4e5969;
}
.operation {
display: flex;
align-items: center;
font-size: 12px;
.editIcon {
margin-right: 3px;
color: #165dff;
font-size: 12px;
}
}
.finfishOperation {
color: #4e5969;
}
.unFinishOperation {
color: #165dff;
}
......
......@@ -3,7 +3,7 @@
<div class="form-page">
<el-form ref="formRef" :model="localData" label-width="120px" size="default">
<!-- Tabs -->
<el-tabs v-model="activeTab" @tab-click="handleTabClick" @before-leave="handleBeforeLeave">
<el-tabs v-model="activeTab" @tab-click="handleTabClick" :before-leave="handleBeforeLeave">
<el-tab-pane label="基础信息" name="basic"></el-tab-pane>
<el-tab-pane label="产品计划" name="productPlan"></el-tab-pane>
<el-tab-pane label="首期缴费" name="firstPayment"></el-tab-pane>
......@@ -751,7 +751,7 @@ onMounted(async () => {
localData.value = { ...defaultFormData(), ...props.modelValue }
}
try {
getPolicyfollowDetail()
} catch (error) {
console.error('字典加载失败', error)
......@@ -763,20 +763,40 @@ onMounted(async () => {
policyInfoFormConfig.value = policyInfoFormConfig ? applyViewMode(policyInfoFormConfig.value, props.mode) : []
})
// 监听基本信息(basic)
watch(
() => ({
...basicInfoFormData.value,
...policyInfoFormData.value,
...firstPremiumFormData.value,
...postalFormData.value,
...basicPlanFormData.value
}),
[
basicInfoFormData,
policyInfoFormData,
],
() => {
console.log('========父组件监听basicPlanFormData的变化', basicPlanFormData.value)
tabDirty.value.basic = true
},
{ deep: true }
)
// 监听首期保费(firstPayment)
watch(
firstPremiumFormData,
() => {
tabDirty.value.firstPayment = true
},
{ deep: true }
)
// 监听邮寄信息
watch(
postalFormData,
() => {
tabDirty.value.postal = true
},
{ deep: true })
// 监听基本计划(productPlan)
watch(
basicPlanFormData,
() => {
tabDirty.value.productPlan = true
},
{ deep: true }
)
// ✅ 监听 localData 变化,emit 出去(用于 v-model)
watch(
() => localData.value,
......@@ -793,11 +813,11 @@ const activeTab = ref('basic')
// ✅ 新增:切换前确认
// ========================
const handleBeforeLeave = async (newTabName, oldTabName) => {
console.log('切换前确认', newTabName, oldTabName)
console.log('切换前确认-----------------------', newTabName, oldTabName)
if (tabDirty.value[oldTabName]) {
try {
await ElMessageBox.confirm(
`“${getTabLabel(oldTabName)}有未保存的内容,确定要切换吗?`,
`“${getTabLabel(oldTabName)}未提交,确定要切换吗?`,
'提示',
{
confirmButtonText: '继续切换',
......@@ -848,7 +868,6 @@ const handleSubmit = () => {
formRef.value?.validate((valid) => {
if (valid) {
console.log('提交数据', introducerTableData.value)
savTabList.value.push(activeTab.value)
if (activeTab.value === 'postal') {
emit('submit', { ...postalFormData.value, activeTab: activeTab.value })
} else if (activeTab.value === 'firstPayment') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment