Commit 902799a5 by Sweet Zhang

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

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