Commit defd162d by Sweet Zhang

Merge branch 'test' into sw

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