Commit defd162d by Sweet Zhang

Merge branch 'test' into sw

parents 66ff3719 f1e81e99
<template>
<div class="cardOneContainer">
<el-card class="cardStyle">
<template #header>
<template #header v-if="showTitle">
<div class="cardOneheader">
<div class="cardOneLeft">
<div class="mainTitle">
......@@ -25,6 +25,10 @@ const props = defineProps({
type: String,
default: ''
},
showTitle: {
type: Boolean,
default: true
},
desTitle: {
type: String,
default: ''
......
const beneficiary = [
{
fatherTitle: '是否法定受益人',
fatherTitle: '',
showTitle: false,
keyType: 'Object', //用于表单收集值时,判断是数组还是对象
key: 'isLegalBeneficiary',
anchorKey: 'isLegalBeneficiary',
......
......@@ -2,6 +2,7 @@ const customer = [
// 与投保人关系-在受保人中显示
{
fatherTitle: '与投保人关系',
showTitle: false,
type: 'object',
key: 'policyholderRel',
anchorKey: 'policyholderRel',
......
......@@ -181,19 +181,19 @@ const productPlan = [
lg: 8 //栅格布局份数
},
{
label: '保单日期回溯',
key: 'isBacktrack',
domType: 'Select',
required: false,
label: '保单回溯日期',
key: 'backtrackDate',
domType: 'DatePicker',
required: true,
disabled: false,
placeholder: '请选择',
dictType: 'sys_no_yes',
show: true,
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '是否参加递增保障权益',
key: 'isJoin',
......
const secondHolder = [
{
fatherTitle: '是否有第二持有人',
fatherTitle: '',
showTitle: false,
keyType: 'Object', //用于表单收集值时,判断是数组还是对象
key: 'isSecond',
anchorKey: 'isSecond',
......
......@@ -11,6 +11,7 @@
<!-- -->
<el-anchor-link
v-for="item in anchorList"
:key="item.title"
:href="'#' + item.title"
:title="item.name"
@click="e => handleLinkClick(e, item.title)"
......@@ -100,6 +101,7 @@ const handleLinkClick = (e, anchorId) => {
// 滚动到锚点
const scrollToAnchor = anchorId => {
const targetElement = document.getElementById(anchorId)
if (!targetElement) return
let scrollContainer
......@@ -131,7 +133,43 @@ const scrollToAnchor = anchorId => {
})
}
}
// 预留备用
// const scrollToAnchor = async (anchorId: string) => {
// // 确保 DOM 更新完成(尤其在 tab 切换后)
// await nextTick()
// const target = document.getElementById(anchorId)
// if (!target) {
// console.warn(`[Anchor Scroll] Target element not found: #${anchorId}`)
// return
// }
// // 关键:从目标元素向上查找最近的 .appointmentTabPaneBox
// let scrollContainer: HTMLElement | null = target
// while (scrollContainer && !scrollContainer.classList.contains('appointmentTabPaneBox')) {
// scrollContainer = scrollContainer.parentElement
// }
// if (!scrollContainer) {
// // 如果没找到,回退到全局滚动
// target.scrollIntoView({ behavior: 'smooth', block: 'start' })
// return
// }
// // 计算相对滚动位置
// const containerRect = scrollContainer.getBoundingClientRect()
// const targetRect = target.getBoundingClientRect()
// const scrollTop =
// scrollContainer.scrollTop +
// (targetRect.top - containerRect.top) -
// props.scrollOffset
// scrollContainer.scrollTo({
// top: scrollTop,
// behavior: 'smooth'
// })
// }
// 暴露方法给父组件
defineExpose({
scrollToAnchor
......
<template>
<div class="customerContainer">
<div class="customerContainer" style="padding-top: 10px">
<div ref="customerRightRef">
<div class="editBtn">
<el-button
......@@ -24,7 +24,11 @@
<el-form :model="form" :rules="rules" label-width="120px" ref="customerFormRef">
<el-row v-for="(father, fIndex) in processedCustomerData" :id="father.anchorKey">
<div class="formBox">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:showTitle="father.showTitle"
:title="father.fatherTitle"
v-if="father.showMoudle"
>
<template #content>
<el-row :gutter="20" v-if="!father.showTable">
<template v-for="child in father.data" :key="child.key">
......
<template>
<div v-if="processedFanFormData.length > 0">
<div v-if="processedFanFormData.length > 0" style="padding-top: 10px">
<div ref="fanContainerRef">
<div class="editBtn">
<el-button
......@@ -326,7 +326,7 @@
@click="submitForm('save')"
size="large"
:disabled="editStatus"
>立即预约</el-button
>保存,去填写预约单</el-button
>
</div>
</el-col>
......@@ -754,7 +754,7 @@ const setFormValue = (obj, formData) => {
// 重疾险要加上row.showSumInsured = true便于控制重疾险保额输入框的显示
for (const section of processedData) {
if (section.keyType == 'Array') {
if (section.key == 'existingSecurityOwner') {
if (section.key == 'existingSecurityOwner' && obj[section.key]) {
obj[section.key].forEach(item => {
if (item.insuranceCategoryBizId == 'CI') {
item.showSumInsured = true
......
......@@ -340,37 +340,37 @@ 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'
])
// 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'
// ])
}
// 更新流程
......
......@@ -73,6 +73,7 @@
@selection-change="tableSelect"
@sort-change="sortChange"
border
max-height="380px"
>
<el-table-column type="index" width="50" label="序号" />
<el-table-column label="客户姓名" align="center" prop="customerName" width="100" />
......@@ -111,23 +112,40 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="250"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button type="primary" link @click="handleUpdate(scope.row)">修改</el-button>
<el-button type="success" link @click="handleCopy(scope.row)">生成副本</el-button>
<el-button
v-if="!scope.row.policyNo"
type="danger"
link
@click="handleDelete(scope.row)"
>删除</el-button
>
<el-table-column fixed="right" label="操作" width="80" align="center">
<template #default="{ row }">
<el-popover placement="left" :width="160" trigger="click">
<template #reference>
<el-button link type="primary" size="small">
<el-icon><MoreFilled /></el-icon>
</el-button>
</template>
<el-menu @select="index => handleSelect(index, row)" popper-class="custom-menu">
<el-menu-item
v-for="item in getVisibleDropdownItems(row)"
:index="item.value"
:key="item.value"
>
<el-text class="mx-1" v-if="!item.confirm">{{ item.label }}</el-text>
<el-popconfirm
v-else
confirm-button-text="Yes"
cancel-button-text="No"
:icon="InfoFilled"
icon-color="#626AEF"
:title="item.confirm"
@confirm="handleMenuConfirm(item.value, row)"
width="300"
placement="left-end"
>
<template #reference>
<el-text class="mx-1">{{ item.label }}</el-text>
</template>
</el-popconfirm>
</el-menu-item>
</el-menu>
</el-popover>
</template>
</el-table-column>
</el-table>
......@@ -144,7 +162,9 @@
import CommonPage from '@/components/commonPage'
import { getFnaList, deleteFna, subProcess } from '@/api/sign/fna'
import useUserStore from '@/store/modules/user'
import { MoreFilled, InfoFilled } from '@element-plus/icons-vue'
import useDictStore from '@/store/modules/dict'
const dictStore = useDictStore()
const userStore = useUserStore()
const router = useRouter()
const { proxy } = getCurrentInstance()
......@@ -188,6 +208,63 @@ const operationBtnList = ref([
click: handleQuery
}
])
// 表格操作栏相关方法
// 基础菜单项配置(不使用 ref,因为它是静态的)
const baseDropdownItems = [
{ label: '修改', value: 'edit', confirm: '' },
{
label: '生成副本',
value: 'copy',
confirm: ''
},
{
label: '删除',
value: 'delete',
confirm: '是否确认删除FNA流程?',
// 只有当 row.status == 1 时才显示
showCondition: row => !row.policyNo
}
]
const getVisibleDropdownItems = row => {
return baseDropdownItems.filter(item => {
// 如果有 showCondition,则执行;否则默认显示
return typeof item.showCondition === 'function' ? item.showCondition(row) : true
})
}
// 菜单选择处理(无确认的操作)
const handleSelect = (index, row) => {
// 只处理不需要确认的操作
const item = baseDropdownItems.find(i => i.value === index)
if (item && !item.confirm) {
handleMenuAction(index, row)
}
// 如果有 confirm,则由 el-popconfirm 触发 handleMenuConfirm
}
// 带确认的操作(由 popconfirm 触发)
const handleMenuConfirm = (value, row) => {
handleMenuAction(value, row)
}
// 统一处理菜单动作
const handleMenuAction = (action, row) => {
switch (action) {
case 'edit':
handleUpdate(row)
break
case 'copy':
handleCopy(row)
break
case 'delete':
if (!row.policyNo) {
handleDelete(row)
}
break
default:
proxy.$message.info('功能暂未开放')
}
}
const changePageNo = val => {
queryParams.value.pageNo = val
getList()
......@@ -268,17 +345,16 @@ function resetQuery() {
}
/** 删除按钮操作 */
function handleDelete(row) {
proxy.$modal
.confirm('是否确认删除' + row.customerName + '的FNA流程?')
.then(function () {
return deleteFna({ fnaBizId: row.fnaBizId })
})
.then(() => {
async function handleDelete(row) {
try {
let res = await deleteFna({ fnaBizId: row.fnaBizId })
if (res.code === 200) {
getList()
proxy.$modal.msgSuccess('删除成功')
})
.catch(() => {})
}
} catch (error) {
console.log('error', error)
}
}
/** 新增按钮操作 */
......@@ -301,6 +377,40 @@ function handleUpdate(row) {
}
getList()
// 请求一下字典值方便表单回显
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',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
</script>
<style lang="scss" scoped>
.bottomBtn {
......
......@@ -122,7 +122,12 @@
</el-col>
</el-row>
<el-tabs v-model="activeName" type="card" class="demo-tabs" :before-leave="beforeTabLeave">
<el-tab-pane v-for="tab in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<el-tab-pane
v-for="(tab, index) in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<div
class="appointmentTabPaneBox"
:style="{
......@@ -181,7 +186,9 @@
:customerBizId="props.processDetail.customerBizId"
/>
</div>
<!-- 受保人 -->
<div v-if="tab.name === 'insurantInfo'">
<!-- anchorContainer=".appointmentTabPaneBox" -->
<Customer
:activeName="activeName"
:fatherTabName="tabName"
......@@ -194,6 +201,7 @@
:fatherEditStatus="editStatus"
:idsObj="idsObj"
:customerBizId="props.processDetail.customerBizId"
:customerInfo="customerInfo"
:apiInsurantInfoDto="appointmentSummeryInfo.apiInsurantInfoDto"
/>
</div>
......@@ -418,7 +426,6 @@ const props = defineProps({
policyDetailInfo: { type: Object, default: () => ({}) }, //新单跟进传递关于保单的详情信息
policyId: { type: Object, default: () => ({}) } //新单跟进传递的Id
})
// console.log();
const userStore = useUserStore()
const dictStore = useDictStore()
......@@ -442,7 +449,6 @@ const idsObj = ref({}) //各个模块的bizId
const appointmentSummeryInfo = ref({}) //预约详情总信息
const currentFile = ref(null)
const foldInsurantInfo = ref(false) //健康信息中得受保人信息是否隐藏
const showCancelApply = ref(false) //是否显示取消申请按钮
const processInfo = ref({
fnaNo: '暂无',
status: '未完成',
......@@ -526,6 +532,7 @@ const tabsList = ref([
key: 'fnaBizId'
}
])
const assetVerification = () => {
proxy.$message.warning('此功能等待开放')
}
......@@ -671,6 +678,10 @@ function getAppointmentInfo(appointmentBizId, changeTab) {
appointmentSummeryInfo.value.apiSecondHolderInfoDto.isSecond =
res.data.apiAppointmentInfoDto.isSecond
}
// 如果受保人中与投保人关系选择得是本人,那么健康信息中问卷只要填写投保人得问卷
// if (res.data.apiInsurantInfoDto && res.data.apiInsurantInfoDto.policyholderRel == 'MYSELF') {
// foldInsurantInfo.value = true
// }
let options = fetchDictData('csf_ap_status')
options.forEach(item => {
if (item.value == appointmentSummeryInfo.value.status) {
......@@ -849,8 +860,44 @@ const getDictsData = async () => {
])
}
// Tab切换前的验证
const beforeTabLeave = (activeTabName, oldTabName) => {
return true
const beforeTabLeave = async (activeTabName, oldTabName) => {
foldInsurantInfo.value = false
// 获取受保人数据
let insuredData = null
if (insuredInfoRef.value) {
insuredData = await insuredInfoRef.value[0].handleFormValues('insuredInfoRef')
// 健康信息得展示内容要根据受保人与投保人得关系展示
if (activeTabName == 'questionnaires') {
// 编辑状态下
if (idsObj.value.appointmentBizId) {
// 已经点过受保人这个tab
if (insuredData && insuredData.policyholderRel && insuredData.policyholderRel == 'MYSELF') {
foldInsurantInfo.value = true
} else if (
!insuredData &&
appointmentSummeryInfo.value.apiInsurantInfoDto.policyholderRel == 'MYSELF'
) {
foldInsurantInfo.value = true
} else {
foldInsurantInfo.value = false
}
} else {
// 新增状态下
if (!insuredData) {
proxy.$message.error('请完善受保人信息')
foldInsurantInfo.value = false
return false
}
// 已经点过受保人这个tab
if (insuredData && insuredData.policyholderRel && insuredData.policyholderRel == 'MYSELF') {
foldInsurantInfo.value = true
} else {
foldInsurantInfo.value = false
}
}
}
return true
}
}
// 判断是否为数组
......
......@@ -241,7 +241,7 @@
/>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<!-- <el-table-column width="60px" align="center" label="操作">
<template #default="scope">
<el-icon
class="deleteIcon"
......@@ -249,7 +249,7 @@
><Delete
/></el-icon>
</template>
</el-table-column>
</el-table-column> -->
</template>
<template v-if="father.key == 'userSignDtoList'">
<el-table-column label="姓名" prop="name" align="center">
......@@ -341,7 +341,7 @@
/>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<!-- <el-table-column width="60px" align="center" label="操作">
<template #default="scope">
<el-icon
@click="deleteChildren(father, scope.$index)"
......@@ -349,7 +349,7 @@
><Delete
/></el-icon>
</template>
</el-table-column>
</el-table-column> -->
</template>
</el-table>
</el-row>
......@@ -1232,14 +1232,21 @@ const setFormValue = (obj, formData) => {
}
// 给表单表格赋值
for (const objKey in obj) {
if (objKey == section.key && section.keyType == 'Array') {
console.log('key', section.key, obj[section.key])
if (
objKey == section.key &&
section.keyType == 'Array' &&
obj[section.key] &&
obj[section.key].length > 0
) {
section.data = obj[section.key]
}
}
if (section.data) {
for (const field of section.data) {
if (field.dictType) {
// 获取字典数据
field.options = fetchDictData(field.dictType)
}
if (field.key == 'confirmAppointmentTime' && props.appointmentStatus !== 0) {
field.show = true
}
......@@ -1548,8 +1555,16 @@ watch(
}
}
)
watch(
() => props.detailInfo,
newVal => {
if (newVal) {
setFormValue(props.detailInfo, appointmentDomData)
}
}
)
if (Object.keys(props.detailInfo).length > 0) {
// processFormData()
setFormValue(props.detailInfo, appointmentDomData)
}
// 暴露给父组件
......
<template>
<div v-if="processedAppointmentData.length > 0">
<div ref="appointmentRef">
<!-- 预约为父组件得第一个tab,初次渲染得时候锚点没正常显示,先这样解决有空再解决 -->
<div style="position: relative; top: -100%; left: -1100%">
{{ appointmentRef }}
</div>
<CommonForm
:anchorList="anchorList"
:affixOffset="affixOffset"
......@@ -386,7 +390,7 @@
:showOperationBtn="false"
>
<template #table>
<el-table v-loading="tableLoading" :data="tableData" border>
<el-table v-loading="tableLoading" :data="tableData" border height="350px">
<el-table-column label="创建人" align="center" prop="creatorName" />
<el-table-column label="创建时间" align="center" prop="createTime">
......@@ -600,6 +604,7 @@ const deleteKeyList = ref([
const searchOptions = ref({}) // 存储不同key对应的选项
const searchLoadingStates = ref({}) // 存储不同key对应的加载状态
const total = ref(0)
const anchorListReady = ref(false)
const data = reactive({
form: {},
processedAppointmentData: [], // 处理后的表单数据
......@@ -724,7 +729,7 @@ function getItineraryInfo() {
// 导出行程单Pdf
const handleExprotPdf = () => {
exportLoading.value = true
getItineraryExprot(appointmentSummeryInfo.value.appointmentBizId).then(res => {
getItineraryExprot(props.idsObj.appointmentBizId).then(res => {
if (res.code == 200) {
// 创建隐藏的下载链接
const link = document.createElement('a')
......@@ -733,8 +738,8 @@ const handleExprotPdf = () => {
// 设置下载文件名(重要)
// 从URL中提取文件名,或者使用返回的文件名
const fileName = `香港行程安排.pdf`
link.download = fileName
link.download = `香港行程安排.pdf`
// 触发下载
document.body.appendChild(link)
......@@ -1125,6 +1130,7 @@ const processFormData = async () => {
}
console.log('processedAppointmentData.value', processedAppointmentData.value)
console.log('form.value', form.value)
anchorListReady.value = true
}
//弹出右侧抽屉
......@@ -1349,7 +1355,12 @@ const setFormValue = (obj, formData) => {
}
// 给表单表格赋值
for (const objKey in obj) {
if (objKey == section.key && section.keyType == 'Array' && obj[section.key].length > 0) {
if (
objKey == section.key &&
section.keyType == 'Array' &&
obj[section.key] &&
obj[section.key].length > 0
) {
section.data = obj[section.key]
}
}
......@@ -1578,7 +1589,7 @@ const handleFormValues = () => {
if (item.key == 'referrerDtoList') {
if (form.value['isReferrerAccompany'] == 1 && item.data.length > 0) {
item.data.forEach((item1, index) => {
for (const key in item1) {
for (const key in obj) {
if (!item1[key]) {
errorFields.value.push({
message: `陪同转介人-第${index + 1}${obj[key]}不能为空`
......@@ -1602,7 +1613,7 @@ const handleFormValues = () => {
}
if (item.key == 'userSignDtoList' && item.data.length > 0) {
item.data.forEach((item1, index) => {
for (const key in item1) {
for (const key in obj1) {
if (!item1[key]) {
errorFields.value.push({
message: `签单员-第${index + 1}${obj1[key]}不能为空`
......@@ -1651,6 +1662,8 @@ const anchorList = computed(() => {
data.push({ title: section.anchorKey, name: section.fatherTitle })
}
}
console.log('锚点', data)
return data
})
// 关闭弹窗时清空弹窗历史签约表格
......@@ -1699,14 +1712,7 @@ watch(
}
}
)
watch(
() => props.formStatus,
newVal => {
if (newVal === 'appointmentEdit') {
processFormData()
}
}
)
// 暴露给父组件
defineExpose({
handleFormValues,
......
<template>
<!-- v-if="processedBeneficiaryData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div ref="beneficiaryRef">
<CommonForm :showAnchor="false">
<template #form-right>
<el-form ref="beneficiaryInfoFormRef" :model="form" :rules="rules">
<el-row v-for="father in processedBeneficiaryData" style="margin-bottom: 10px">
<div class="formBox formFna">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:showTitle="father.showTitle"
:title="father.fatherTitle"
v-if="father.showMoudle"
>
<template #content>
<el-row v-if="!father.showTable" :gutter="20">
<template v-for="child in father.data" :key="child.key">
......
......@@ -92,6 +92,7 @@
:on-exceed="handleExceed"
:on-success="uploadSuccess"
:before-upload="handleBeforeUpload"
ref="uploadRef"
>
<div class="uploadBox">
<el-icon size="20"><DocumentAdd /></el-icon>
......@@ -151,7 +152,7 @@ const props = defineProps({
idsObj: { type: Object, default: () => ({}) }, //父组件传递过来的id对象
pageSource: { type: String, default: '' } //页面来源
})
const uploadRef = ref(null)
const dictStore = useDictStore() //获取字典数据
const { proxy } = getCurrentInstance()
const editVisible = ref(false)
......@@ -186,11 +187,7 @@ const handleSubmitUpload = () => {
fileBizIdList: uploadedFiles.value.map(item => item.fileBizId)
}).then(response => {
getFileList()
// fileTableList.value.forEach(item => {
// if (item.materialBizId == currentUploadRow.value.materialBizId) {
// item.status = 'YSC'
// }
// })
editVisible.value = false
})
} catch (error) {
......@@ -206,7 +203,6 @@ const handleSubmitUpload = () => {
item.status = 'YSC'
}
})
console.log('fileTableList.value', fileTableList.value)
}
}
editVisible.value = false
......@@ -234,6 +230,9 @@ const fetchDictData = dictType => {
// 重置上传列表(比如关闭弹窗时清空)
const resetUploadedList = () => {
uploadedFiles.value = []
if (uploadRef.value) {
uploadRef.value.clearFiles()
}
}
const handleUploadFile = row => {
currentUploadRow.value = JSON.parse(JSON.stringify(row))
......@@ -447,6 +446,7 @@ const handleFormValues = () => {
watch(editVisible, newVal => {
if (!newVal) {
resetUploadedList()
limit.value = 10
}
})
const hasLoaded = ref(false) // 新增:是否已加载过数据
......
<template>
<div>
<div style="padding-top: 10px">
<div v-if="questionnairesDom.length > 0" ref="questionRef">
<CommonForm
:anchorList="anchorList"
......@@ -225,7 +225,7 @@ const props = defineProps({
customerInfo: { type: Object, default: () => ({}) },
//客户详情回显表单用
showSubmitBtn: { type: Boolean, default: false }, //父组件状态,新增、修改
foldInsurantInfo: { type: Boolean, default: false }, //是否隐藏受保人信息
foldInsurantInfo: { type: Boolean }, //是否隐藏受保人信息
pageSource: { type: String, default: '' }, //页面来源
anchorContainer: { type: String, default: '' }, //锚点滚动容器
tabIndex: { type: [String, Number], default: '' }, //tab索引
......@@ -585,9 +585,7 @@ const hasLoaded = ref(false) // 新增:是否已加载过数据
watch(
() => props.activeName,
newVal => {
// 切换tab的时侯把表单值保存在临时变量里,方便切换回来的时候回显
tempSecondHolderForm.value = { ...form.value }
questionRef.value = null
if (newVal === 'questionnaires') {
if (!hasLoaded.value) {
getQuestionnairesInfo()
......@@ -597,6 +595,17 @@ watch(
}
)
// 受保人模块,与投保人关系改变这里要重新获取问卷信息
watch(
() => props.foldInsurantInfo,
newVal => {
questionnairesDom.value = []
getQuestionnairesInfo()
console.log('newVal', newVal)
}
)
console.log('foldInsurantInfo', props.foldInsurantInfo)
// 暴露给父组件
defineExpose({
handleFormValues,
......
<template>
<!-- v-if="processedProductData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div ref="productRef">
<CommonForm
:anchorList="anchorList"
......@@ -289,6 +289,7 @@ const currencyType = ref([]) // 是否列表
const searchOptions = ref({}) // 存储不同key对应的选项
const searchLoadingStates = ref({}) // 存储不同key对应的加载状态
const additionalProductForm = ref([]) // 附加险的表单
const dateKey = ref({})
const data = reactive({
form: { apiProductPlanMainInfoDto: {}, apiProductPlanAdditionalInfoDtoList: [] },
tempForm: {}, //由于切换tab的时候,表单数据会重置,所以需要保存一份临时表单数据
......@@ -624,11 +625,6 @@ const processFormData = async () => {
if (section.data) {
for (const formKey in form.value) {
if (section.key == formKey) {
// if (section.dataLength) {
// for (let i = 1; i < section.dataLength; i++) {
// section.data.push(JSON.parse(JSON.stringify(section.data[0])))
// }
// }
for (const field of section.data) {
// 为下拉搜索框加options
if (field.domType == 'SearchSelect') {
......@@ -650,10 +646,9 @@ const processFormData = async () => {
// 获取字典数据
field.options = fetchDictData(field.dictType)
}
//
/*
1.没有嵌套子级的也就是没有children的数据加rules,根据data中的required字段判断是否必填
*/
if (field.domType == 'DatePicker') {
dateKey.value[field.key] = field.key
}
if (field.required) {
rules.value[section.key][field.key] = [
{ required: true, message: `${field.label}不能为空`, trigger: 'blur' }
......@@ -698,6 +693,7 @@ const processFormData = async () => {
processedProductData.value = processedData
}
}
console.log('产品', form.value)
}
// 根据联动重置表单项的显示与否
......@@ -728,12 +724,12 @@ const handleSelectChange = (father, child) => {
}
break
case 'isBacktrack':
case 'isTraceable':
// 选是,展示日期
if (form.value[father.key][child.key] == '1') {
resetShow('policyEffectiveDate', true)
resetShow('backtrackDate', true)
} else {
resetShow('policyEffectiveDate', false)
resetShow('backtrackDate', false)
}
break
......@@ -799,6 +795,15 @@ const setFormValue = (obj, formData) => {
}
}
if (section.data) {
for (const filed of section.data) {
if (
filed.key == 'backtrackDate' &&
obj.apiProductPlanMainInfoDto.isTraceable &&
obj.apiProductPlanMainInfoDto.isTraceable == '1'
) {
filed.show = true
}
}
// 为附加险增加dom
if (
section.key == 'apiProductPlanAdditionalInfoDtoList' &&
......@@ -861,8 +866,23 @@ const handleSubmitForm = () => {
if (section.keyType == 'Array' && section.data.length > 0) {
submitObj[section.key] = JSON.parse(JSON.stringify(section.data))
}
if (section.keyType == 'Object' && section.data) {
for (const field of section.data) {
// 时间加00:00:00
if (field.domType == 'DatePicker' && dateKey.value[field.key]) {
submitObj[section.key][field.key] = proxy.formatToDateTime(
submitObj[section.key][field.key]
)
}
}
}
})
if (
submitObj.apiProductPlanMainInfoDto.isTraceable &&
submitObj.apiProductPlanMainInfoDto.isTraceable == '0'
) {
delete submitObj.apiProductPlanMainInfoDto.backtrackDate
}
if (errorFields.value.length > 0) {
proxy.$message.error(errorFields.value[0].message)
return undefined
......
<template>
<!-- v-if="processedSecondHolderData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div>
<CommonForm :showAnchor="false">
<template #form-right>
<el-form ref="secondHolderFormRef" :model="form" :rules="rules">
<el-row v-for="father in processedSecondHolderData" style="margin-bottom: 10px">
<div class="formBox formFna">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:title="father.fatherTitle"
v-if="father.showMoudle"
:showTitle="father.showTitle"
>
<template #content>
<el-row v-if="!father.showTable" :gutter="20">
<template v-for="child in father.data" :key="child.key">
......
......@@ -13,7 +13,7 @@
>
<!-- 查询条件插槽 -->
<template #searchForm>
<el-form :model="queryParams" ref="queryRef" label-width="100px">
<el-form :model="queryParams" ref="queryRef" label-width="100px" label-position="top">
<el-row :gutter="30">
<el-col :sm="12" :lg="8" :xs="24">
<el-form-item label="确认预约时间">
......@@ -61,58 +61,58 @@
:data="tenantList"
@selection-change="tableSelect"
@sort-change="sortChange"
max-height="380px"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="预约编号" align="center" prop="appointmentNo" width="200" />
<el-table-column label="预约状态" align="center">
<el-table-column type="index" label="序号" width="60" fixed="left" />
<el-table-column
label="预约编号"
align="center"
prop="appointmentNo"
width="200"
fixed="left"
/>
<el-table-column label="预约状态" align="center" prop="status" fixed="left" width="100">
<template #default="scope">
<dict-tag :options="csf_ap_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="最终预约时间" align="center" width="180">
<el-table-column
label="产品名称"
align="center"
prop="productName"
width="200"
show-overflow-tooltip
/>
<el-table-column label="签单日" align="center" width="180" prop="signDate">
<template #default="scope">
<span>{{
scope.row.confirmAppointmentTime
? parseTime(scope.row.confirmAppointmentTime)
: '--'
}}</span>
<span>{{ scope.row.signDate ? formatToDate(scope.row.signDate) : '--' }}</span>
</template>
</el-table-column>
<el-table-column label="产品名称" align="center" prop="productName" width="150" />
<el-table-column label="保险公司" align="center" prop="companyName" width="150" />
<el-table-column
label="业务员"
align="center"
prop="businessRepresentName1"
width="150"
/>
<el-table-column label="签单员" align="center" prop="signName" width="150" />
<el-table-column label="投保人" align="center" prop="policyholder" width="150" />
<el-table-column label="受保人" align="center" prop="insurant" width="150" />
<el-table-column label="供款年期" align="center" prop="paymentTerm" width="100" />
<el-table-column label="每期保费" align="center" prop="eachIssuePremium" width="100" />
<el-table-column label="货币" align="center" width="150">
<!-- <el-table-column label="供款频率" align="center" prop="paymentFrequency" width="100">
<template #default="scope">
<dict-tag :options="bx_currency_type" :value="scope.row.currency" />
<dict-tag :options="csf_ap_frequency" :value="scope.row.paymentFrequency" />
</template>
</el-table-column> -->
<el-table-column label="供款频率" align="center" width="150" prop="paymentFrequency">
<template #default="scope">
<dict-tag :options="csf_ap_frequency" :value="scope.row.paymentFrequency" />
</template>
</el-table-column>
<el-table-column label="供款期数" align="center" prop="paymentTerm" width="100" />
<el-table-column label="每期保费" align="center" prop="eachIssuePremium" width="100" />
<el-table-column
label="意向预约时间"
align="center"
prop="intentionAppointmentTime"
width="240"
show-overflow-tooltip
>
<el-table-column label="保单币种" align="center" width="150" prop="currency">
<template #default="scope">
<span>{{
scope.row.intentionAppointmentTime
? parseTime(scope.row.intentionAppointmentTime)
: '--'
}}</span>
<dict-tag :options="bx_currency_type" :value="scope.row.currency" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
<template #default="scope">
<span>{{ formatToDate(scope.row.createTime) }}</span>
......@@ -203,6 +203,7 @@ import CommonPage from '@/components/commonPage'
import DetailPanel from '@/components/DetailPanel'
import { onMounted, onActivated, ref } from 'vue'
import CommonDialog from '@/components/commonDialog'
import useDictStore from '@/store/modules/dict'
import {
getAppointmentList,
getAppointmentExprot,
......@@ -211,7 +212,7 @@ import {
getItineraryExprot
} from '@/api/sign/appointment'
import useUserStore from '@/store/modules/user'
const dictStore = useDictStore()
const userStore = useUserStore()
const router = useRouter()
const { proxy } = getCurrentInstance()
......@@ -259,10 +260,11 @@ const data = reactive({
})
const { queryParams, form, rules } = toRefs(data)
const { bx_currency_type, csf_ap_status, csf_ap_meeting_point } = proxy.useDict(
const { bx_currency_type, csf_ap_status, csf_ap_meeting_point, csf_ap_frequency } = proxy.useDict(
'bx_currency_type',
'csf_ap_status',
'csf_ap_meeting_point'
'csf_ap_meeting_point',
'csf_ap_frequency'
)
// 基础菜单项配置(不使用 ref,因为它是静态的)
const baseDropdownItems = [
......@@ -584,6 +586,40 @@ function handleUpdate(row, type) {
}
getList()
// 请求一下字典值方便表单回显
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',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
</script>
<style lang="scss" scoped>
.app-container {
......
......@@ -56,9 +56,9 @@
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
<el-icon>
<MoreFilled />
</el-icon>
<el-button link type="primary" size="small">
<el-icon><MoreFilled /></el-icon>
</el-button>
</template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu">
<el-menu-item
......@@ -134,9 +134,7 @@ import SearchForm from '@/components/SearchForm/SearchForm.vue'
import { ElMessage } from 'element-plus'
import { formatCurrency } from '@/utils/number'
// 接口
import {
updatePayoutAmount,
} from '@/api/financial/commission'
import { updatePayoutAmount } from '@/api/financial/commission'
import {
getPolicyReceiptList,
addPolicyReceipt,
......@@ -181,13 +179,13 @@ const searchConfig = ref([
prop: 'insurer',
label: '保险公司',
api: '/insurance/base/api/insuranceCompany/page',
keywordField: 'queryContent',
keywordField: 'fullName',
requestParams: { pageNo: 1, pageSize: 20 },
placeholder: '输入保险公司名称搜索',
debounceWait: 500, // 自定义防抖时间
multiple: false,
valueKey: 'insuranceCompanyBizId',
labelKey: 'abbreviation',
labelKey: 'fullName',
transform: res => {
console.log(res)
return res?.data.records || []
......
......@@ -31,7 +31,12 @@
<el-table-column prop="currentIssueNumber" label="当前期数" width="80" fixed="left" />
<el-table-column prop="reconciliationType" label="对账类型" width="150">
<template #default="{ row }">
{{ getDictLabel('reconciliation_type', row.reconciliationType) }}
{{
row.currentIssueNumber && row.currentIssueNumber == '1'
? '首期保费对账'
: '续期保费对账'
}}
</template>
</el-table-column>
<el-table-column prop="insuranceCompany" label="保险公司" width="150" />
......@@ -109,32 +114,13 @@
<el-table-column prop="reconciliationCompany" label="对账公司" width="150">
</el-table-column>
<!-- <el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
<el-icon>
<MoreFilled />
</el-icon>
</template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu">
<el-menu-item
:index="item.value"
v-for="item in dropdownItems"
:key="item.value"
>{{ item.label }}</el-menu-item
>
</el-menu>
</el-popover>
</template>
</el-table-column> -->
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
<el-icon>
<MoreFilled />
</el-icon>
<el-button link type="primary" size="small">
<el-icon><MoreFilled /></el-icon>
</el-button>
</template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu">
......@@ -186,6 +172,11 @@
{{ getDictLabel('csf_ap_first_issue', row.paymentMethod) }}
</template>
</el-table-column>
<el-table-column prop="paymentDate" label="付款日期" width="150">
<template #default="{ row }">
{{ row.paymentDate ? formatToDate(row.paymentDate) : '' }}
</template>
</el-table-column>
<el-table-column label="付款金额" prop="paymentAmount" />
<el-table-column label="付款币种" prop="paymentCurrency">
<template #default="{ row }">
......@@ -709,13 +700,13 @@ const remittanceConfig = [
label: '保险公司',
disabled: true
},
{
type: 'select',
prop: 'reconciliationType',
label: '对账类型',
disabled: true,
dictType: 'reconciliation_type'
},
// {
// type: 'select',
// prop: 'reconciliationType',
// label: '对账类型',
// disabled: true,
// dictType: 'reconciliation_type'
// },
{
type: 'upload',
prop: 'paymentVoucherList',
......@@ -1038,13 +1029,13 @@ function removeRemittance(row, index) {
// ==============新增对账结束============
const addCheckRecordConfig = [
{
type: 'select',
prop: 'reconciliationType',
label: '对账类型',
dictType: 'reconciliation_type',
rules: [{ required: true, message: '请输入对账类型', trigger: 'blur' }]
},
// {
// type: 'select',
// prop: 'reconciliationType',
// label: '对账类型',
// dictType: 'reconciliation_type',
// rules: [{ required: true, message: '请输入对账类型', trigger: 'blur' }]
// },
{
type: 'input',
prop: 'applicant',
......@@ -1253,14 +1244,6 @@ const handleSelectionChange = val => {
// 完成检核按钮是否禁用
updatePayRollStatusDisable.value = val.length === 0
}
import FileUploadPreview from '@/components/fileUploadPreview/fileUploadPreview.vue'
const onSubmit = data => {
console.log('提交给后端的数据:', data)
// 调用保存 API
}
// 获取入账状态,字典值转化方法
onMounted(async () => {
try {
......@@ -1294,7 +1277,7 @@ watch(receiptsFlag, newVal => {
if (!newVal) {
isSubmitReceipts.value = false
tipTxt.value = ''
addCheckRecordFormModel.value = {}
addCheckRecordFormModel.value = { apiPremiumRemittanceDtoList: [] }
receiptsDialogTitle.value = ''
}
})
......
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