Commit 935894cd by yuzhenWang

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

优化修复bug,发布测试

See merge request !25
parents 98c6fe67 2fbd81ef
...@@ -107,7 +107,6 @@ export function completePolicyFortune(data) { ...@@ -107,7 +107,6 @@ export function completePolicyFortune(data) {
}) })
} }
// 获取对账公司 // 获取对账公司
// /csf/api/reconciliation_company/list/page // /csf/api/reconciliation_company/list/page
export function getReconciliationCompanyList(data) { export function getReconciliationCompanyList(data) {
...@@ -148,7 +147,6 @@ export function addPolicyFortuneAccount(data) { ...@@ -148,7 +147,6 @@ export function addPolicyFortuneAccount(data) {
}) })
} }
// 删除发佣 // 删除发佣
// /csf/api/fortune/delete/fortuneAccount // /csf/api/fortune/delete/fortuneAccount
export function deletePolicyFortuneAccount(data) { export function deletePolicyFortuneAccount(data) {
...@@ -168,11 +166,27 @@ export function addPolicyCommission(data) { ...@@ -168,11 +166,27 @@ export function addPolicyCommission(data) {
data: data data: data
}) })
} }
// 入账管理的统计数据
export function incomeStatistics(data) {
return request({
url: '/csf/api/commission/statistics',
method: 'post',
data: data
})
}
// 出账管理的统计数据
export function billStatistics(data) {
return request({
url: '/csf/api/fortune/statistics',
method: 'post',
data: data
})
}
// 出账管理的统计数据
export function salaryStatistics(data) {
return request({
url: '/csf/api/fortune/fortuneAccount/statistics',
method: 'post',
data: data
})
}
...@@ -56,6 +56,37 @@ export function getPolicyStatus(policyBizId) { ...@@ -56,6 +56,37 @@ export function getPolicyStatus(policyBizId) {
method: 'get' method: 'get'
}) })
} }
// 获取预计来佣生成状态
export function expectedFortuneIsGenerate(policyNo) {
return request({
url: `/csf/api/expectedFortune/isGenerate?policyNo=${policyNo}`,
method: 'get'
})
}
// 生成签约单
export function policyFollowReport(policyBizId) {
return request({
url: `/csf/api/policy_follow/report/download?policyBizId=${policyBizId}`,
method: 'get',
responseType: 'blob' // 关键设置
})
}
// 生成预计发佣
export function expectedFortuneGenerate(data) {
return request({
url: '/csf/api/expectedFortune/generate',
method: 'post',
data: data
})
}
//发佣日志信息
export function getExpectedFortuneLog(data) {
return request({
url: '/csf/api/expectedFortuneLog/page',
method: 'post',
data: data
})
}
// 新单跟进附件列表 // 新单跟进附件列表
export function getAttachmentList(data) { export function getAttachmentList(data) {
return request({ return request({
...@@ -142,6 +173,14 @@ export function getCommissionList(data) { ...@@ -142,6 +173,14 @@ export function getCommissionList(data) {
data: data data: data
}) })
} }
// 新单跟进的预计发佣列表
export function getExpectedFortuneList(data) {
return request({
url: '/csf/api/expectedFortune/page',
method: 'post',
data: data
})
}
// 新单跟进的预计来佣单个提交 // 新单跟进的预计来佣单个提交
export function editSigalCommission(data) { export function editSigalCommission(data) {
return request({ return request({
...@@ -173,3 +212,4 @@ export function changePolicyStatus(data) { ...@@ -173,3 +212,4 @@ export function changePolicyStatus(data) {
data: data data: data
}) })
} }
...@@ -3,11 +3,15 @@ ...@@ -3,11 +3,15 @@
<template v-for="(item, index) in options"> <template v-for="(item, index) in options">
<template v-if="values.includes(item.value)"> <template v-if="values.includes(item.value)">
<span <span
v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)" v-if="
(item.elTagType == 'default' || item.elTagType == '') &&
(item.elTagClass == '' || item.elTagClass == null)
"
:key="item.value" :key="item.value"
:index="index" :index="index"
:class="item.elTagClass" :class="item.elTagClass"
>{{ item.label + " " }}</span> >{{ item.label + ' ' }}</span
>
<el-tag <el-tag
v-else v-else
:disable-transitions="true" :disable-transitions="true"
...@@ -15,7 +19,8 @@ ...@@ -15,7 +19,8 @@
:index="index" :index="index"
:type="item.elTagType" :type="item.elTagType"
:class="item.elTagClass" :class="item.elTagClass"
>{{ item.label + " " }}</el-tag> >{{ item.label + ' ' }}</el-tag
>
</template> </template>
</template> </template>
<template v-if="unmatch && showValue"> <template v-if="unmatch && showValue">
...@@ -32,30 +37,39 @@ const props = defineProps({ ...@@ -32,30 +37,39 @@ const props = defineProps({
// 数据 // 数据
options: { options: {
type: Array, type: Array,
default: null, default: null
}, },
// 当前的值 // 当前的值
value: [Number, String, Array], value: [Number, String, Array],
// 当未找到匹配的数据时,显示value // 当未找到匹配的数据时,显示value
showValue: { showValue: {
type: Boolean, type: Boolean,
default: true, default: true
}, },
separator: { separator: {
type: String, type: String,
default: ",", default: ','
} }
}) })
const values = computed(() => { const values = computed(() => {
if (props.value === null || typeof props.value === 'undefined' || props.value === '') return [] if (props.value === null || typeof props.value === 'undefined' || props.value === '') return []
return Array.isArray(props.value) ? props.value.map(item => '' + item) : String(props.value).split(props.separator) return Array.isArray(props.value)
? props.value.map(item => '' + item)
: String(props.value).split(props.separator)
}) })
const unmatch = computed(() => { const unmatch = computed(() => {
unmatchArray.value = [] unmatchArray.value = []
// 没有value不显示 // 没有value不显示
if (props.value === null || typeof props.value === 'undefined' || props.value === '' || !Array.isArray(props.options) || props.options.length === 0) return false if (
props.value === null ||
typeof props.value === 'undefined' ||
props.value === '' ||
!Array.isArray(props.options) ||
props.options.length === 0
)
return false
// 传入值为数组 // 传入值为数组
let unmatch = false // 添加一个标志来判断是否有未匹配项 let unmatch = false // 添加一个标志来判断是否有未匹配项
values.value.forEach(item => { values.value.forEach(item => {
...@@ -68,9 +82,9 @@ const unmatch = computed(() => { ...@@ -68,9 +82,9 @@ const unmatch = computed(() => {
}) })
function handleArray(array) { function handleArray(array) {
if (array.length === 0) return "" if (array.length === 0) return ''
return array.reduce((pre, cur) => { return array.reduce((pre, cur) => {
return pre + " " + cur return pre + ' ' + cur
}) })
} }
</script> </script>
......
...@@ -178,7 +178,7 @@ const applicant = [ ...@@ -178,7 +178,7 @@ const applicant = [
label: '通讯地址', label: '通讯地址',
commonKey: true, //是否是公共字段 commonKey: true, //是否是公共字段
key: 'txAddress', key: 'txAddress',
// customerKey: 'mailingAddress', customerKey: 'residenceAddress',
domType: 'arrowRight', domType: 'arrowRight',
required: false, required: false,
disabled: false, disabled: false,
......
...@@ -75,7 +75,7 @@ const appointmentInfo = [ ...@@ -75,7 +75,7 @@ const appointmentInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '业务代表账号', label: '签单员账号',
key: 'businessRepresentAccount1', key: 'businessRepresentAccount1',
domType: 'Input', domType: 'Input',
inputType: 'text', inputType: 'text',
...@@ -90,7 +90,7 @@ const appointmentInfo = [ ...@@ -90,7 +90,7 @@ const appointmentInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '业务代表姓名', label: '签单员姓名',
key: 'businessRepresentName1', key: 'businessRepresentName1',
domType: 'Input', domType: 'Input',
inputType: 'text', inputType: 'text',
...@@ -105,7 +105,7 @@ const appointmentInfo = [ ...@@ -105,7 +105,7 @@ const appointmentInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '业务代表电话号码', label: '签单员电话号码',
key: 'businessRepresentMobile1', key: 'businessRepresentMobile1',
domType: 'arrowRight', domType: 'arrowRight',
required: false, required: false,
...@@ -122,7 +122,7 @@ const appointmentInfo = [ ...@@ -122,7 +122,7 @@ const appointmentInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '业务代表邮箱', label: '签单员邮箱',
key: 'businessRepresentEmail1', key: 'businessRepresentEmail1',
domType: 'Input', domType: 'Input',
inputType: 'text', inputType: 'text',
...@@ -267,11 +267,11 @@ const appointmentInfo = [ ...@@ -267,11 +267,11 @@ const appointmentInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '离港时间(先选择离港时间)', label: '离港时间(离港时间必须晚于到港时间)',
key: 'departureTime', key: 'departureTime',
domType: 'datetimePicker', domType: 'datetimePicker',
required: false, required: false,
disabled: true, disabled: false,
placeholder: '请选择', placeholder: '请选择',
show: true, show: true,
labelPosition: 'top', //标签的位置 labelPosition: 'top', //标签的位置
......
...@@ -452,6 +452,21 @@ const customer = [ ...@@ -452,6 +452,21 @@ const customer = [
labelWidth: '120px', //标签宽度 labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数 sm: 8, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
},
{
label: '身份证地址',
key: 'idCardAddress',
type: 'Input',
inputType: 'text',
required: false,
maxLength: 20,
disabled: false,
placeholder: '请输入',
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
} }
] ]
}, },
...@@ -493,12 +508,27 @@ const customer = [ ...@@ -493,12 +508,27 @@ const customer = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '职位', label: '公司地址',
key: 'position', key: 'companyAddress',
type: 'arrowRight',
required: false,
disabled: false,
placeholder: '请填写',
show: true,
drawerType: 'address',
companyAddress: {},
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '公司地址邮编',
key: 'companyAddressPostcode',
type: 'Input', type: 'Input',
inputType: 'text', inputType: 'text',
required: false, required: false,
maxLength: 300, maxLength: 20,
disabled: false, disabled: false,
placeholder: '请输入', placeholder: '请输入',
show: true, show: true,
...@@ -508,10 +538,10 @@ const customer = [ ...@@ -508,10 +538,10 @@ const customer = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '总工作年期', label: '职位',
key: 'workYear', key: 'position',
type: 'Input', type: 'Input',
inputType: 'number', inputType: 'text',
required: false, required: false,
maxLength: 300, maxLength: 300,
disabled: false, disabled: false,
...@@ -523,8 +553,8 @@ const customer = [ ...@@ -523,8 +553,8 @@ const customer = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '现时每月收入', label: '工作年期',
key: 'salary', key: 'workYear',
type: 'Input', type: 'Input',
inputType: 'number', inputType: 'number',
required: false, required: false,
...@@ -538,15 +568,15 @@ const customer = [ ...@@ -538,15 +568,15 @@ const customer = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '公司地址', label: '现时每月收入',
key: 'companyAddress', key: 'salary',
type: 'arrowRight', type: 'Input',
inputType: 'number',
required: false, required: false,
maxLength: 300,
disabled: false, disabled: false,
placeholder: '请填写', placeholder: '请输入',
show: true, show: true,
drawerType: 'address',
companyAddress: {},
labelPosition: 'top', //标签的位置 labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度 labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数 sm: 8, //栅格布局份数
......
...@@ -8,6 +8,21 @@ const insured = [ ...@@ -8,6 +8,21 @@ const insured = [
showMoudle: true, //模块是否展示 showMoudle: true, //模块是否展示
data: [ data: [
{ {
label: '与投保人关系',
key: 'policyholderRel',
// customerKey: 'customerType',
domType: 'Select',
required: true,
disabled: false,
placeholder: '请选择',
dictType: 'csf_ap_rel',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '客户类型', label: '客户类型',
key: 'customerType', key: 'customerType',
customerKey: 'customerType', customerKey: 'customerType',
...@@ -37,25 +52,10 @@ const insured = [ ...@@ -37,25 +52,10 @@ const insured = [
labelWidth: '120px', //标签宽度 labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数 sm: 12, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
},
{
label: '与投保人关系',
key: 'policyholderRel',
// customerKey: 'customerType',
domType: 'Select',
required: true,
disabled: false,
placeholder: '请选择',
dictType: 'csf_ap_rel',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
} }
] ]
}, },
// 基础信息
{ {
fatherTitle: '基础信息', fatherTitle: '基础信息',
type: 'object', type: 'object',
...@@ -193,7 +193,7 @@ const insured = [ ...@@ -193,7 +193,7 @@ const insured = [
label: '通讯地址', label: '通讯地址',
commonKey: true, //是否是公共字段 commonKey: true, //是否是公共字段
key: 'txAddress', key: 'txAddress',
// customerKey: 'mailingAddress', customerKey: 'residenceAddress',
domType: 'arrowRight', domType: 'arrowRight',
required: false, required: false,
disabled: false, disabled: false,
...@@ -482,36 +482,7 @@ const insured = [ ...@@ -482,36 +482,7 @@ const insured = [
sm: 12, //栅格布局份数 sm: 12, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
// {
// label: '平均每月收入',
// key: 'monthIncome',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入平均每月收入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '平均每月支出',
// key: 'monthExpenditure',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入平均每月支出',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{ {
label: '受雇于现职年期', label: '受雇于现职年期',
key: 'currentTenure', key: 'currentTenure',
...@@ -527,21 +498,7 @@ const insured = [ ...@@ -527,21 +498,7 @@ const insured = [
sm: 12, //栅格布局份数 sm: 12, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
// {
// label: '总流动资产',
// key: 'totalCurrentAssets',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入平均每月支出',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{ {
label: '总负债额', label: '总负债额',
key: 'totalDebt', key: 'totalDebt',
......
...@@ -7,38 +7,6 @@ const policyInfo = [ ...@@ -7,38 +7,6 @@ const policyInfo = [
child: 'no', //没有子级dom,直接展示 child: 'no', //没有子级dom,直接展示
fatherrequired: false, //父级必填,代表个人资料这个模块有必填项 fatherrequired: false, //父级必填,代表个人资料这个模块有必填项
data: [ data: [
// {
// label: '客户姓名',
// key: 'customerName',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '客户编号',
// key: 'customerBizId',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '140px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{ {
label: '保单号', label: '保单号',
key: 'policyNo', key: 'policyNo',
...@@ -69,22 +37,22 @@ const policyInfo = [ ...@@ -69,22 +37,22 @@ const policyInfo = [
sm: 8, //栅格布局份数 sm: 8, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ // {
label: '签单人', // label: '签单人',
key: 'signer', // key: 'signer',
domType: 'Input', // domType: 'Input',
inputType: 'text', // inputType: 'text',
required: false, // required: false,
maxLength: 30, // maxLength: 30,
disabled: false, // disabled: false,
placeholder: '请输入', // placeholder: '请输入',
show: true, // show: true,
value: '', // value: '',
labelPosition: 'top', //标签的位置 // labelPosition: 'top', //标签的位置
labelWidth: '130px', //标签宽度 // labelWidth: '130px', //标签宽度
sm: 8, //栅格布局份数 // sm: 8, //栅格布局份数
lg: 8 //栅格布局份数 // lg: 8 //栅格布局份数
}, // },
{ {
label: '生效日期', label: '生效日期',
key: 'effectiveDate', key: 'effectiveDate',
...@@ -113,53 +81,7 @@ const policyInfo = [ ...@@ -113,53 +81,7 @@ const policyInfo = [
sm: 8, //栅格布局份数 sm: 8, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
// {
// label: '产品名称',
// key: 'productName',
// domType: 'SearchSelect',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// labelPosition: 'top', //标签的位置
// lg: 8 //栅格布局份数
// },
// {
// label: '产品类别',
// key: 'productCate',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '130px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '供款年期',
// key: 'paymentTerm',
// domType: 'Select',
// required: false,
// disabled: false,
// placeholder: '请选择',
// dictType: 'paymentTerm',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{ {
label: '期交保费', label: '期交保费',
key: 'paymentPremium', key: 'paymentPremium',
...@@ -254,37 +176,32 @@ const policyInfo = [ ...@@ -254,37 +176,32 @@ const policyInfo = [
sm: 8, //栅格布局份数 sm: 8, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
// {
// label: '受保人', {
// key: 'insured', label: '备注',
// domType: 'Input', key: 'remark',
// inputType: 'text', domType: 'Input',
// required: false, inputType: 'textarea',
// maxLength: 30, required: false,
// disabled: false, maxLength: 30,
// placeholder: '请输入', disabled: false,
// show: true, placeholder: '请输入',
// value: '', show: true,
// labelPosition: 'top', //标签的位置 value: '',
// labelWidth: '120px', //标签宽度 labelPosition: 'top', //标签的位置
// sm: 8, //栅格布局份数 labelWidth: '120px', //标签宽度
// lg: 8 //栅格布局份数 sm: 24, //栅格布局份数
// }, lg: 24 //栅格布局份数
// { }
// label: '币种', ]
// key: 'currency', },
// domType: 'Select', {
// required: false, fatherTitle: '缴费信息',
// disabled: false, keyType: 'Object', //用于表单收集值时,判断是数组还是对象
// placeholder: '请选择', key: 'policyFollowUpdateDto',
// dictType: 'bx_currency_type', child: 'no', //没有子级dom,直接展示
// show: true, fatherrequired: false, //父级必填,代表个人资料这个模块有必填项
// value: '', data: [
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{ {
label: '首期保费', label: '首期保费',
key: 'initialPremium', key: 'initialPremium',
...@@ -302,10 +219,10 @@ const policyInfo = [ ...@@ -302,10 +219,10 @@ const policyInfo = [
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
}, },
{ {
label: '备注', label: '保单征费',
key: 'remark', key: 'policyLevy',
domType: 'Input', domType: 'Input',
inputType: 'textarea', inputType: 'number',
required: false, required: false,
maxLength: 30, maxLength: 30,
disabled: false, disabled: false,
...@@ -314,10 +231,79 @@ const policyInfo = [ ...@@ -314,10 +231,79 @@ const policyInfo = [
value: '', value: '',
labelPosition: 'top', //标签的位置 labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度 labelWidth: '120px', //标签宽度
sm: 24, //栅格布局份数 sm: 8, //栅格布局份数
lg: 24 //栅格布局份数 lg: 8 //栅格布局份数
},
{
label: '首期待交保费',
key: 'initialPremiumDue',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 30,
disabled: false,
placeholder: '请输入',
show: true,
value: '',
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '首期已交保费',
key: 'initialPremiumPaid',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 30,
disabled: false,
placeholder: '请输入',
show: true,
value: '',
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '最晚缴费日期',
key: 'latestPaymentDate',
domType: 'DatePicker',
required: false,
disabled: false,
placeholder: '请选择',
show: true,
value: '',
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
} }
] ]
},
//签单人信息
{
keyType: 'Array', //用于表单收集值时,判断是数组还是对象
key: 'signerList',
showTable: true,
subTitle: '签单人信息',
addChildren: true, //是否可以新增子级dom
addChildrenTxt: '签单人', //新增按钮得文本
isOpen: false, //dom是否展开
fatherRequired: false, //父级必填,代表个人资料这个模块有必填项
data: [
// {
// span: 24, //栅格布局份数
// signer: '',
// phone: '',
// email: '',
// idType: '',
// idNo: '',
// dictType: 'csf_id_type',
// registrationNumber: ''
// }
]
} }
] ]
export default policyInfo export default policyInfo
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<!-- <router-link to="/user/profile"> <!-- <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item>个人中心</el-dropdown-item>
</router-link> --> </router-link> -->
<el-dropdown-item divided command="logout"> <el-dropdown-item command="logout">
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
......
...@@ -13,3 +13,36 @@ export default function deepClone(obj) { ...@@ -13,3 +13,36 @@ export default function deepClone(obj) {
return clonedObj return clonedObj
} }
} }
// 处理用户名相同的情况
export function processUserName(users) {
const nameCountMap = new Map()
// 统计 realName 重复情况
users.forEach(user => {
if (!nameCountMap.has(user.realName)) {
nameCountMap.set(user.realName, new Set())
}
nameCountMap.get(user.realName).add(user.userBizId)
})
// 处理 showName
return users.map(user => {
const userBizIds = nameCountMap.get(user.realName)
const needDistinguish = userBizIds && userBizIds.size > 1
if (needDistinguish) {
const mobile = user.mobile
const prefix = mobile.substring(0, 3)
const suffix = mobile.substring(mobile.length - 4)
return {
...user,
showName: `${user.realName} ${prefix}****${suffix}`
}
} else {
return {
...user,
showName: user.realName
}
}
})
}
...@@ -28,13 +28,44 @@ ...@@ -28,13 +28,44 @@
<template v-for="child in father.data" :key="child.key"> <template v-for="child in father.data" :key="child.key">
<el-col :sm="child.sm" :lg="child.lg" class="formItem" v-if="child.show"> <el-col :sm="child.sm" :lg="child.lg" class="formItem" v-if="child.show">
<div> <div>
<el-form-item <!-- <el-form-item
:label="child.label" :label="child.label"
:prop="child.key" :prop="child.key"
:key="child.key" :key="child.key"
:label-width="child.labelWidth" :label-width="child.labelWidth"
:label-position="child.labelPosition" :label-position="child.labelPosition"
> -->
<el-form-item
:label="
child.key === 'residentialAddress' && child.type === 'arrowRight'
? ''
: child.label
"
:prop="child.key"
:key="child.key"
:label-width="child.labelWidth"
:label-position="child.labelPosition"
> >
<!-- 自定义 label 插槽 -->
<template
v-if="child.key === 'residentialAddress' && child.type === 'arrowRight'"
#label
>
<div class="custom-label">
<span>{{ child.label }}</span>
<el-checkbox-group
v-model="form.isCopyAddress"
size="small"
style="margin-left: 8px"
@change="changeAddressStatus(child)"
:disabled="copyAddress"
>
<el-checkbox :value="true" name="isCopyAddress">
同通讯地址
</el-checkbox>
</el-checkbox-group>
</div>
</template>
<el-input <el-input
v-if="child.type === 'Input'" v-if="child.type === 'Input'"
:type="child.inputType" :type="child.inputType"
...@@ -228,7 +259,7 @@ const total = ref(0) ...@@ -228,7 +259,7 @@ const total = ref(0)
const customerRef = ref(null) const customerRef = ref(null)
//计算默认显示的日期(18年前的今天) //计算默认显示的日期(18年前的今天)
const defaultDisplayDate = ref(dayjs().subtract(18, 'year').toDate()) const defaultDisplayDate = ref(dayjs().subtract(18, 'year').toDate())
// const copyAddress = ref(false) //是否可以复制地址
// 地址组件菜单数据 // 地址组件菜单数据
const addressMenuList = ref([ const addressMenuList = ref([
{ {
...@@ -288,7 +319,7 @@ const deleteKeyList = ref([ ...@@ -288,7 +319,7 @@ const deleteKeyList = ref([
'companyAddress' 'companyAddress'
]) // 存储需要删除的key ]) // 存储需要删除的key
const data = reactive({ const data = reactive({
form: {}, form: { isCopyAddress: [] },
processedCustomerData: [], // 处理后的表单数据 processedCustomerData: [], // 处理后的表单数据
oldCustomerData: [], // 保存旧的表单Dom,便于撤销操作 oldCustomerData: [], // 保存旧的表单Dom,便于撤销操作
rules: {}, //表单验证规则, rules: {}, //表单验证规则,
...@@ -299,6 +330,31 @@ const data = reactive({ ...@@ -299,6 +330,31 @@ const data = reactive({
} }
}) })
const { form, rules, processedCustomerData, queryParams, oldCustomerData } = toRefs(data) const { form, rules, processedCustomerData, queryParams, oldCustomerData } = toRefs(data)
const copyAddress = computed(() => {
const residenceAddressIndex = addressQuickList.value.findIndex(
item => item.type === 'residenceAddress'
)
if (residenceAddressIndex !== -1) {
return false
} else {
return true
}
})
const changeAddressStatus = child => {
// 复用地址
if (form.value.isCopyAddress.length > 0 && form.value.isCopyAddress[0]) {
if (child.key == 'residentialAddress') {
form.value[child.key] = form.value['residenceAddress']
// 这里是直接复用地址了,但是地址组件的值是双向绑定的,所以这里需要手动更新地址组件的值
addressQuickList.value.forEach(item => {
if (item.type == 'residenceAddress') {
saveKey.value[child.key] = { ...item, type: child.key }
}
})
}
}
console.log('saveKey.value', saveKey.value)
}
const handleInputChange = child => { const handleInputChange = child => {
if ( if (
(child.key == 'lastName' || child.key == 'firstName') && (child.key == 'lastName' || child.key == 'firstName') &&
...@@ -480,11 +536,11 @@ const handleCloseDrawer = () => { ...@@ -480,11 +536,11 @@ const handleCloseDrawer = () => {
} }
// 点击了抽屉的确定 // 点击了抽屉的确定
const confirmDrawer = info => { const confirmDrawer = info => {
console.log('抽屉info', info) // console.log('抽屉info', info)
// info 为抽屉返回的值 // info 为抽屉返回的值
if (drawerInfo.value.type == 'arrowRight' && drawerInfo.value.drawerType) { if (drawerInfo.value.type == 'arrowRight' && drawerInfo.value.drawerType) {
console.log('drawerInfo.value', drawerInfo.value) // console.log('drawerInfo.value', drawerInfo.value)
let newObj = info[drawerInfo.value.key] let newObj = info[drawerInfo.value.key]
//要判断drawerType //要判断drawerType
...@@ -525,6 +581,28 @@ const confirmDrawer = info => { ...@@ -525,6 +581,28 @@ const confirmDrawer = info => {
newObj.type = drawerInfo.value.key newObj.type = drawerInfo.value.key
form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}` form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
saveKey.value[info.key] = newObj saveKey.value[info.key] = newObj
console.log('newObj', newObj)
newObj.addressString = `${newObj.region}${newObj.city}${newObj.street}${newObj.location}`
// 检查数组中是否已存在key的地址
// debugger
const existinAddressIndex = addressQuickList.value.findIndex(
item => item.type === newObj.type
)
if (existinAddressIndex !== -1) {
// 更新已存在的电话
addressQuickList.value[existinAddressIndex] = {
...newObj
}
} else {
// 添加新的快捷电话
addressQuickList.value.push(newObj)
}
addressQuickList.value = removeDuplicates(addressQuickList.value, 'addressString')
console.log('填写地址', copyAddress.value)
break break
case 'country': case 'country':
info.objType = drawerInfo.value.drawerType info.objType = drawerInfo.value.drawerType
...@@ -569,9 +647,15 @@ const handleSelectChange = child => { ...@@ -569,9 +647,15 @@ const handleSelectChange = child => {
} else { } else {
resetShow('smokeQuantity', false) resetShow('smokeQuantity', false)
} }
break break
case 'idType':
// 选择吸烟,展示吸烟数量
if (form.value[child.key] == 'idCard') {
resetShow('idCardAddress', true)
} else {
resetShow('idCardAddress', false)
}
break
default: default:
break break
} }
...@@ -610,7 +694,10 @@ const setFormValue = (obj, formData, exportValue) => { ...@@ -610,7 +694,10 @@ const setFormValue = (obj, formData, exportValue) => {
if (obj.smokeQuantity && field.key == 'smokeQuantity') { if (obj.smokeQuantity && field.key == 'smokeQuantity') {
field.show = true field.show = true
} }
//证件类型是身份证,身份证地址就显示否则不显示
if (field.key == 'idCardAddress' && obj.idType == 'idCard') {
field.show = true
}
//要判断drawerType,因为抽屉要回显数据 //要判断drawerType,因为抽屉要回显数据
switch (field.drawerType) { switch (field.drawerType) {
case 'phone': case 'phone':
...@@ -654,7 +741,7 @@ const setFormValue = (obj, formData, exportValue) => { ...@@ -654,7 +741,7 @@ const setFormValue = (obj, formData, exportValue) => {
form.value[ form.value[
field.key field.key
] = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}` ] = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}`
addressObj.addressString = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}` addressObj.addressString = `${addressObj.region}${addressObj.city}${addressObj.street}${addressObj.location}`
addressObj.objType = field.drawerType addressObj.objType = field.drawerType
saveKey.value[field.key] = addressObj saveKey.value[field.key] = addressObj
if (tempAddressList.length > 0) { if (tempAddressList.length > 0) {
...@@ -717,12 +804,12 @@ const setFormValue = (obj, formData, exportValue) => { ...@@ -717,12 +804,12 @@ const setFormValue = (obj, formData, exportValue) => {
oldObjInfo.value = JSON.parse(JSON.stringify(form.value)) oldObjInfo.value = JSON.parse(JSON.stringify(form.value))
} }
processedCustomerData.value = oldCustomerData.value = processedData processedCustomerData.value = oldCustomerData.value = processedData
console.log('====================================') // console.log('====================================')
console.log('processedCustomerData.value', processedCustomerData.value) // console.log('processedCustomerData.value', processedCustomerData.value)
console.log('====================================') // console.log('====================================')
console.log('====================================') // console.log('====================================')
console.log('form', form.value) // console.log('form', form.value)
console.log('====================================') // console.log('====================================')
} }
// 数组去重 // 数组去重
function removeDuplicates(arr, key) { function removeDuplicates(arr, key) {
...@@ -730,7 +817,7 @@ function removeDuplicates(arr, key) { ...@@ -730,7 +817,7 @@ function removeDuplicates(arr, key) {
const result = [] const result = []
for (const item of arr) { for (const item of arr) {
if (!seen.has(item[key])) { if (!seen.has(item[key]) && item[key]) {
seen.set(item[key], true) seen.set(item[key], true)
result.push(item) result.push(item)
} }
...@@ -872,6 +959,11 @@ watch( ...@@ -872,6 +959,11 @@ watch(
) )
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-label {
width: 100%;
display: flex;
align-items: center;
}
.topBtn { .topBtn {
width: 100%; width: 100%;
display: flex; display: flex;
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
</div> </div>
</template> </template>
<script setup name="FnaEdit"> <script setup name="FnaEdit">
import { onUnmounted } from 'vue' import { processUserName } from '@/utils/common'
import AppointmentEdit from '@/views/sign/appointment/appointmentEdit' import AppointmentEdit from '@/views/sign/appointment/appointmentEdit'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useDictStore from '@/store/modules/dict' import useDictStore from '@/store/modules/dict'
...@@ -209,7 +209,14 @@ const getDictsData = async () => { ...@@ -209,7 +209,14 @@ const getDictsData = async () => {
} }
const response1 = await listTenantUser(params1) const response1 = await listTenantUser(params1)
if (response1.code == 200) { if (response1.code == 200) {
dictStore.setTenantUserList(response1.data.records) let result = processUserName(response1.data.records)
result = result.map(item => {
return {
value: item.userBizId,
label: item.showName
}
})
dictStore.setTenantUserList(result)
} }
const params2 = { const params2 = {
loginTenantBizId: userStore.projectInfo.tenantBizId, loginTenantBizId: userStore.projectInfo.tenantBizId,
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
:customerInfo="customerInfo" :customerInfo="customerInfo"
:idsObj="idsObj" :idsObj="idsObj"
:apiInsurantInfoDto="appointmentSummeryInfo.apiInsurantInfoDto" :apiInsurantInfoDto="appointmentSummeryInfo.apiInsurantInfoDto"
:currentPolicyholderInfo="currentPolicyholderInfo"
:appointmentStatus="appointmentSummeryInfo.status" :appointmentStatus="appointmentSummeryInfo.status"
@handleSuccessEdit="getAppointmentInfo(idsObj.appointmentBizId)" @handleSuccessEdit="getAppointmentInfo(idsObj.appointmentBizId)"
ref="insuredInfoRef" ref="insuredInfoRef"
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
ref="questionnairesInfoRef" ref="questionnairesInfoRef"
:pageSource="pageSource" :pageSource="pageSource"
:showSubmitBtn="showSubmitBtn" :showSubmitBtn="showSubmitBtn"
:foldInsurantInfo="foldInsurantInfo"
/> />
</div> </div>
<div v-if="tab.name === 'fna'"> <div v-if="tab.name === 'fna'">
...@@ -244,6 +246,13 @@ ...@@ -244,6 +246,13 @@
:policyNo="policyNo" :policyNo="policyNo"
/> />
</div> </div>
<div v-if="tab.name === 'expectedFortune'">
<expectedFortuneInfo
:activeName="activeName"
:policyBizId="route.query.policyBizId"
:policyNo="policyNo"
/>
</div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -298,6 +307,7 @@ import PolicyBrokerInfo from '@/views/sign/underwritingMain/components/brokerInf ...@@ -298,6 +307,7 @@ import PolicyBrokerInfo from '@/views/sign/underwritingMain/components/brokerInf
import PolicyMailing from '@/views/sign/underwritingMain/components/policyMailing.vue' //新单跟进里的保单附件 import PolicyMailing from '@/views/sign/underwritingMain/components/policyMailing.vue' //新单跟进里的保单附件
import VerifyPolicyInfo from '@/views/sign/underwritingMain/components/verifyPolicyInfo.vue' //新单跟进里的保单附件 import VerifyPolicyInfo from '@/views/sign/underwritingMain/components/verifyPolicyInfo.vue' //新单跟进里的保单附件
import ExpectedCommission from '@/views/sign/underwritingMain/components/expectedCommission.vue' //新单跟进里的保单附件 import ExpectedCommission from '@/views/sign/underwritingMain/components/expectedCommission.vue' //新单跟进里的保单附件
import expectedFortuneInfo from '@/views/sign/underwritingMain/components/expectedFortuneInfo.vue' //新单跟进里得预计发佣
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useDictStore from '@/store/modules/dict' import useDictStore from '@/store/modules/dict'
import { getCustomerDetail } from '@/api/sign/fna' import { getCustomerDetail } from '@/api/sign/fna'
...@@ -346,6 +356,7 @@ const customerInfo = ref({}) ...@@ -346,6 +356,7 @@ const customerInfo = ref({})
const idsObj = ref({}) //各个模块的bizId const idsObj = ref({}) //各个模块的bizId
const appointmentSummeryInfo = ref({}) //预约详情总信息 const appointmentSummeryInfo = ref({}) //预约详情总信息
const currentFile = ref(null) const currentFile = ref(null)
const foldInsurantInfo = ref(false) //健康信息中得受保人信息是否隐藏
const processInfo = ref({ const processInfo = ref({
fnaNo: '暂无', fnaNo: '暂无',
status: '未完成', status: '未完成',
...@@ -355,7 +366,7 @@ const processInfo = ref({ ...@@ -355,7 +366,7 @@ const processInfo = ref({
const execlDialog = ref(false) const execlDialog = ref(false)
const isEmbed = ref(false) //是否作为组件插入 const isEmbed = ref(false) //是否作为组件插入
const policyNo = ref('') //新单跟进保单号 const policyNo = ref('') //新单跟进保单号
const currentPolicyholderInfo = ref({}) //存储下投保人信息,受保人模块要用到
const tabsList = ref([ const tabsList = ref([
{ {
label: '预约信息', label: '预约信息',
...@@ -569,6 +580,9 @@ function getCustomerInfo(customerBizId) { ...@@ -569,6 +580,9 @@ function getCustomerInfo(customerBizId) {
getCustomerDetail(customerBizId).then(res => { getCustomerDetail(customerBizId).then(res => {
if (res.code == 200) { if (res.code == 200) {
customerInfo.value = res.data customerInfo.value = res.data
if (customerInfo.value.smoke) {
customerInfo.value.smoke = Number(customerInfo.value.smoke)
}
} }
}) })
} }
...@@ -649,6 +663,54 @@ const getDictsData = async () => { ...@@ -649,6 +663,54 @@ const getDictsData = async () => {
} }
// Tab切换前的验证 // Tab切换前的验证
const beforeTabLeave = (activeTabName, oldTabName) => { const beforeTabLeave = (activeTabName, oldTabName) => {
// 受保人如果选择了本人,使用投保人得信息填充
// oldTabName == 'policyholder' &&
if (activeTabName == 'insurantInfo') {
currentPolicyholderInfo.value = policyHolderInfoRef.value[0].providePolicyholderInfoData()
} else if (
oldTabName !== 'policyholder' &&
activeTabName == 'insurantInfo' &&
showSubmitBtn.value &&
Object.keys(currentPolicyholderInfo.value).length == 0
) {
currentPolicyholderInfo.value = appointmentSummeryInfo.value.apiPolicyholderInfoDto
}
console.log('预约切换tab', currentPolicyholderInfo.value)
// 健康信息模块,如果投保人选择了本人以及受保人选择了本人,健康信息展示投保人/受保人
let policyHolderResult = policyHolderInfoRef.value[0].handleFormValues()
let insuredResult = insuredInfoRef.value[0].handleFormValues()
console.log('policyHolderResult', policyHolderResult)
console.log('insuredResult', insuredResult)
foldInsurantInfo.value = false
if (activeTabName == 'questionnaires') {
// 投保人和受保人都点击过可以拿到最新填写得表单值
if (
policyHolderResult.customerType &&
policyHolderResult.customerType == 'INDIVIDUAL' &&
insuredResult.policyholderRel &&
insuredResult.policyholderRel == 'MYSELF'
) {
foldInsurantInfo.value = true
} else if (
!policyHolderResult.customerType &&
!insuredResult.policyholderRel &&
showSubmitBtn.value
) {
// 如果投保人和受保人都没有点击过,则使用预约单里得信息
let policyHolderInfo = appointmentSummeryInfo.value.apiPolicyholderInfoDto
let insuredInfo = appointmentSummeryInfo.value.apiInsurantInfoDto
if (
policyHolderInfo.customerType &&
policyHolderInfo.customerType == 'INDIVIDUAL' &&
insuredInfo.policyholderRel &&
insuredInfo.policyholderRel == 'MYSELF'
) {
foldInsurantInfo.value = true
}
}
}
return true return true
} }
...@@ -672,6 +734,7 @@ const handleSubmit = type => { ...@@ -672,6 +734,7 @@ const handleSubmit = type => {
if (appointmentInfoRef.value) { if (appointmentInfoRef.value) {
submitAppointmentObj.value.apiAppointmentInfoDto = submitAppointmentObj.value.apiAppointmentInfoDto =
appointmentInfoRef.value[0].handleFormValues() appointmentInfoRef.value[0].handleFormValues()
if (!submitAppointmentObj.value.apiAppointmentInfoDto) return
} }
if (productPlanRef.value) { if (productPlanRef.value) {
submitAppointmentObj.value.apiProductPlanInfoDto = productPlanRef.value[0].handleSubmitForm() submitAppointmentObj.value.apiProductPlanInfoDto = productPlanRef.value[0].handleSubmitForm()
...@@ -1027,6 +1090,12 @@ if (route.query.source == 'policyList') { ...@@ -1027,6 +1090,12 @@ if (route.query.source == 'policyList') {
key: 'expectedCommission' key: 'expectedCommission'
}, },
{ {
label: '预计发佣',
name: 'expectedFortune',
id: 1,
key: 'expectedFortune'
},
{
label: '保单信息', label: '保单信息',
name: 'policyInfo', name: 'policyInfo',
id: 2, id: 2,
......
...@@ -368,7 +368,7 @@ const addBeneficiary = () => { ...@@ -368,7 +368,7 @@ const addBeneficiary = () => {
// 删除受益人 // 删除受益人
const deleteBeneficiary = (l1, level1) => { const deleteBeneficiary = (l1, level1) => {
console.log('====================================') console.log('====================================')
console.log('l1', form.value.apiBeneficiaryInfoDtoList[l1]) console.log('l1', form.value.apiBeneficiaryInfoDtoList[l1])
console.log('====================================') console.log('====================================')
if (editStatus.value) { if (editStatus.value) {
proxy.$modal.confirm(`编辑状态下才能删除`, { showCancel: '0', title: '填写提示' }) proxy.$modal.confirm(`编辑状态下才能删除`, { showCancel: '0', title: '填写提示' })
...@@ -390,15 +390,20 @@ const deleteBeneficiary = (l1, level1) => { ...@@ -390,15 +390,20 @@ const deleteBeneficiary = (l1, level1) => {
emit('handleSuccessEdit') emit('handleSuccessEdit')
} }
}) })
} else if (form.value.apiBeneficiaryInfoDtoList[l1].policyBeneficiaryBizId && props.pageSource == 'policyList') { } else if (
delPolicyBeneficiary(form.value.apiBeneficiaryInfoDtoList[l1].policyBeneficiaryBizId).then(res => { form.value.apiBeneficiaryInfoDtoList[l1].policyBeneficiaryBizId &&
if (res.code == 200) { props.pageSource == 'policyList'
proxy.$message.success('新单跟进-受益人删除成功') ) {
processedBeneficiaryData.value.splice(l1, 1) delPolicyBeneficiary(form.value.apiBeneficiaryInfoDtoList[l1].policyBeneficiaryBizId).then(
form.value.apiBeneficiaryInfoDtoList.splice(l1, 1) res => {
emit('policyEditSuccess') if (res.code == 200) {
proxy.$message.success('新单跟进-受益人删除成功')
processedBeneficiaryData.value.splice(l1, 1)
form.value.apiBeneficiaryInfoDtoList.splice(l1, 1)
emit('policyEditSuccess')
}
} }
}) )
} else { } else {
proxy.$message.success('受益人删除成功') proxy.$message.success('受益人删除成功')
processedBeneficiaryData.value.splice(l1, 1) processedBeneficiaryData.value.splice(l1, 1)
...@@ -610,6 +615,8 @@ const confirmDrawer = info => { ...@@ -610,6 +615,8 @@ const confirmDrawer = info => {
form.value.apiBeneficiaryInfoDtoList[drawerInfo.value.l1][ form.value.apiBeneficiaryInfoDtoList[drawerInfo.value.l1][
drawerInfo.value.key drawerInfo.value.key
] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}` ] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
newObj.addressString = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
// 检查数组中是否已存在相同ID的地址 // 检查数组中是否已存在相同ID的地址
const existingIndex = phoneOraddressKey.value.findIndex( const existingIndex = phoneOraddressKey.value.findIndex(
item => item.id === newObj.id && item.type === newObj.type item => item.id === newObj.id && item.type === newObj.type
...@@ -622,6 +629,24 @@ const confirmDrawer = info => { ...@@ -622,6 +629,24 @@ const confirmDrawer = info => {
// 添加新地址 // 添加新地址
phoneOraddressKey.value.push({ ...newObj }) phoneOraddressKey.value.push({ ...newObj })
} }
newObj.addressString = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
// 检查数组中是否已存在key的地址
// debugger
const existinAddressIndex = addressQuickList.value.findIndex(
item => item.type === newObj.type
)
if (existinAddressIndex !== -1) {
// 更新已存在的电话
addressQuickList.value[existinAddressIndex] = {
...newObj
}
} else {
// 添加新的快捷电话
addressQuickList.value.push(newObj)
}
addressQuickList.value = removeDuplicates(addressQuickList.value, 'addressString')
break break
case 'country': case 'country':
......
...@@ -21,9 +21,15 @@ ...@@ -21,9 +21,15 @@
<div v-for="(level1, l1) in questionnairesDom" :key="level1.firstCategory"> <div v-for="(level1, l1) in questionnairesDom" :key="level1.firstCategory">
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<div class="formBox"> <div class="formBox">
<div class="fatherLable">{{ level1.firstCategoryName }}</div> <div class="fatherLable">
<span>{{ level1.firstCategoryName }}</span>
<div class="openCon" v-if="level1.showIcon" @click="changeOpenStatus(level1)">
<el-icon v-if="!level1.showMoudle"><Hide /></el-icon>
<el-icon v-else><View /></el-icon>
</div>
</div>
<el-row :gutter="20"> <el-row :gutter="20" v-if="level1.showMoudle">
<template <template
v-for="(level2, l2) in level1.secondCategoryDtoList" v-for="(level2, l2) in level1.secondCategoryDtoList"
:key="level2.secondCategory" :key="level2.secondCategory"
...@@ -218,6 +224,7 @@ const props = defineProps({ ...@@ -218,6 +224,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 }, //是否隐藏受保人信息
pageSource: { type: String, default: '' } //页面来源 pageSource: { type: String, default: '' } //页面来源
}) })
const emit = defineEmits(['handleSuccessEdit']) const emit = defineEmits(['handleSuccessEdit'])
...@@ -226,7 +233,7 @@ const loading = ref(false) ...@@ -226,7 +233,7 @@ const loading = ref(false)
const errorFields = ref([]) // 存储校验失败的字段信息 const errorFields = ref([]) // 存储校验失败的字段信息
const editStatus = ref(true) // 表单是否可编辑,若是修改初始不可编辑 const editStatus = ref(true) // 表单是否可编辑,若是修改初始不可编辑
const oldObjInfo = ref({}) // 修改时存储原始数据,便于撤销操作 const oldObjInfo = ref({}) // 修改时存储原始数据,便于撤销操作
const showInsurant = ref(false) //是否显示受保人信息
const data = reactive({ const data = reactive({
form: [], form: [],
tempSecondHolderForm: [], //由于切换tab的时候,表单数据会重置,所以需要 tempSecondHolderForm: [], //由于切换tab的时候,表单数据会重置,所以需要
...@@ -241,6 +248,16 @@ const data = reactive({ ...@@ -241,6 +248,16 @@ const data = reactive({
}) })
const { form, rules, questionnairesDom, queryParams, oldAppointmentData, tempSecondHolderForm } = const { form, rules, questionnairesDom, queryParams, oldAppointmentData, tempSecondHolderForm } =
toRefs(data) toRefs(data)
const changeOpenStatus = level1 => {
console.log('level1', level1)
let newDom = JSON.parse(JSON.stringify(questionnairesDom.value))
newDom.forEach((item, index) => {
if (item.firstCategory == level1.firstCategory) {
item.showMoudle = !item.showMoudle
}
})
questionnairesDom.value = newDom
}
const addMedical = (l1, l2, l3) => { const addMedical = (l1, l2, l3) => {
form.value[l1]['secondCategoryDtoList'][l2]['questionsDtoList'][l3]['answerSessionsDto'][ form.value[l1]['secondCategoryDtoList'][l2]['questionsDtoList'][l3]['answerSessionsDto'][
'questionTextJsonDtoList' 'questionTextJsonDtoList'
...@@ -453,22 +470,7 @@ const submitForm = () => { ...@@ -453,22 +470,7 @@ const submitForm = () => {
} }
}) })
} }
const resetForm = () => {
proxy.$modal
.confirm('是否确认撤销所作操作?')
.then(function () {
if (props.customerBizId) {
form.value = { ...oldObjInfo.value }
editStatus.value = true
} else {
// resetShow('smokeQuantity', false)
proxy.$refs['heathFormRef'].resetFields()
}
questionnairesDom.value = JSON.parse(JSON.stringify(oldAppointmentData.value))
})
.catch(() => {})
}
const getQuestionnairesInfo = () => { const getQuestionnairesInfo = () => {
loading.value = true loading.value = true
let id = '' let id = ''
...@@ -482,17 +484,30 @@ const getQuestionnairesInfo = () => { ...@@ -482,17 +484,30 @@ const getQuestionnairesInfo = () => {
} }
getQuestionnaires(id).then(res => { getQuestionnaires(id).then(res => {
if (res.code == 200) { if (res.code == 200) {
let result = res.data.firstAndSecondCategoryDtoList let result = []
if (props.foldInsurantInfo) {
result = [res.data.firstAndSecondCategoryDtoList[0]]
} else {
result = res.data.firstAndSecondCategoryDtoList
}
let first_category = fetchDictData('wj_question_first_category') let first_category = fetchDictData('wj_question_first_category')
let second_category = fetchDictData('wj_question_second_category') let second_category = fetchDictData('wj_question_second_category')
form.value = {} form.value = {}
result.forEach((level1, l1) => { result.forEach((level1, l1) => {
// form.value[level1.firstCategory] = {}
first_category.forEach((first, i) => { first_category.forEach((first, i) => {
if (level1.firstCategory == first.value) { if (level1.firstCategory == first.value && !props.foldInsurantInfo) {
level1.firstCategoryName = first.label level1.firstCategoryName = first.label
} else if (props.foldInsurantInfo && level1.firstCategory == 'POLICYHOLDER') {
level1.firstCategoryName = '投保人 / 受保人'
} }
}) })
if (level1.firstCategory == 'POLICYHOLDER') {
// level1.showIcon = true
level1.showMoudle = true
} else if (level1.firstCategory == 'INSURED_PERSON') {
level1.showIcon = true
level1.showMoudle = false
}
level1.secondCategoryDtoList.forEach((level2, l2) => { level1.secondCategoryDtoList.forEach((level2, l2) => {
level2.sm = 24 level2.sm = 24
level2.lg = 24 level2.lg = 24
...@@ -586,6 +601,7 @@ watch( ...@@ -586,6 +601,7 @@ watch(
editStatus.value = true editStatus.value = true
} }
getQuestionnairesInfo() getQuestionnairesInfo()
console.log('foldInsurantInfo', props.foldInsurantInfo)
} }
} }
) )
...@@ -620,6 +636,13 @@ defineExpose({ ...@@ -620,6 +636,13 @@ defineExpose({
font-size: 18px; font-size: 18px;
border-left: 4px solid #165dff; border-left: 4px solid #165dff;
padding-left: 5px; padding-left: 5px;
margin-bottom: 5px;
display: flex;
align-items: center;
.openCon {
margin-left: 10px;
cursor: pointer;
}
} }
.fatherDes { .fatherDes {
font-size: 14px; font-size: 14px;
...@@ -705,7 +728,7 @@ defineExpose({ ...@@ -705,7 +728,7 @@ defineExpose({
} }
} }
.tabButton { .tabButton {
box-shadow: 0 -1px 14px #00000014; /* box-shadow: 0 -1px 14px #00000014; */
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
:label-position="child.labelPosition" :label-position="child.labelPosition"
:rules="getRules(child)" :rules="getRules(child)"
> >
<!-- @input="handleInputChange(father, child)" -->
<el-input <el-input
v-if="child.domType === 'Input'" v-if="child.domType === 'Input'"
:type="child.inputType" :type="child.inputType"
...@@ -223,6 +222,7 @@ const props = defineProps({ ...@@ -223,6 +222,7 @@ const props = defineProps({
apiInsurantInfoDto: { type: Object, default: () => ({}) }, //父组件传递过来的预约信息的详情 apiInsurantInfoDto: { type: Object, default: () => ({}) }, //父组件传递过来的预约信息的详情
appointmentStatus: { type: Number }, //父组件传递过来的预约的状态 appointmentStatus: { type: Number }, //父组件传递过来的预约的状态
customerInfo: { type: Object, default: () => ({}) }, //客户详情回显表单用 customerInfo: { type: Object, default: () => ({}) }, //客户详情回显表单用
currentPolicyholderInfo: { type: Object, default: () => ({}) }, //当前保单的投保人信息
showSubmitBtn: { type: Boolean, default: false }, //父组件状态,新增、修改 showSubmitBtn: { type: Boolean, default: false }, //父组件状态,新增、修改
pageSource: { type: String, default: '' } //页面来源 pageSource: { type: String, default: '' } //页面来源
}) })
...@@ -349,16 +349,7 @@ const getRules = child => { ...@@ -349,16 +349,7 @@ const getRules = child => {
return rules return rules
} }
const handleInputChange = (father, child) => {
switch (child.key) {
case 'nameEn':
validateEnglish(form.value[child.key], child.key)
break
default:
break
}
}
const handleDateChange = child => { const handleDateChange = child => {
let age = null let age = null
if (child.key == 'birthday') { if (child.key == 'birthday') {
...@@ -433,16 +424,6 @@ const fetchDictData = dictType => { ...@@ -433,16 +424,6 @@ const fetchDictData = dictType => {
return [] return []
} }
} }
// // 添加英文校验函数
// const validateEnglish = (rule, value, callback) => {
// if (value && !/^[A-Za-z]*$/.test(value)) {
// // 清空非英文字符
// form.value.firstNamePinyin = ''
// callback(new Error('只能输入英文字母'))
// } else {
// callback()
// }
// }
const mergeObjects = (obj1, obj2) => { const mergeObjects = (obj1, obj2) => {
const result = Object.assign({}, obj1) const result = Object.assign({}, obj1)
...@@ -461,14 +442,20 @@ const mergeObjects = (obj1, obj2) => { ...@@ -461,14 +442,20 @@ const mergeObjects = (obj1, obj2) => {
* exportValue:是否从导入联系人列表中导入客户信息到当前表单 * exportValue:是否从导入联系人列表中导入客户信息到当前表单
*/ */
const processFormData = async obj => { const processFormData = async obj => {
form.value = {}
saveKey.value = {}
let tempPhoneList = [] let tempPhoneList = []
let tempAddressList = [] let tempAddressList = []
form.value = {}
saveKey.value = {}
addressQuickList.value = [] addressQuickList.value = []
phoneQuickList.value = [] phoneQuickList.value = []
// if (!obj.exportValue) {
// form.value = {}
// saveKey.value = {}
// addressQuickList.value = []
// phoneQuickList.value = []
// }
// 深拷贝原始数据 // 深拷贝原始数据
// const processedData = JSON.parse(JSON.stringify(policyDomData))
const processedData = JSON.parse(JSON.stringify(obj.domdata)) const processedData = JSON.parse(JSON.stringify(obj.domdata))
for (const section of processedData) { for (const section of processedData) {
...@@ -576,7 +563,7 @@ const processFormData = async obj => { ...@@ -576,7 +563,7 @@ const processFormData = async obj => {
for (const key1 in field) { for (const key1 in field) {
if (obj.customerInfo.addressList && obj.customerInfo.addressList.length > 0) { if (obj.customerInfo.addressList && obj.customerInfo.addressList.length > 0) {
obj.customerInfo.addressList.forEach(item => { obj.customerInfo.addressList.forEach(item => {
if (key1 == item.type) { if (field.customerKey == item.type) {
addressObj = item addressObj = item
} }
}) })
...@@ -619,6 +606,7 @@ const processFormData = async obj => { ...@@ -619,6 +606,7 @@ const processFormData = async obj => {
} }
} }
} }
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来 //当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if ( if (
JSON.stringify(tempPolicyForm.value) !== '{}' && JSON.stringify(tempPolicyForm.value) !== '{}' &&
...@@ -649,7 +637,11 @@ const processFormData = async obj => { ...@@ -649,7 +637,11 @@ const processFormData = async obj => {
} }
} }
if (props.showSubmitBtn) { if (props.showSubmitBtn) {
field.disabled = true if (obj.source && obj.source == 'policyholderRel' && field.key !== 'age') {
field.disabled = false
} else {
field.disabled = true
}
} else { } else {
if (field.key == 'age') { if (field.key == 'age') {
field.disabled = true field.disabled = true
...@@ -660,7 +652,6 @@ const processFormData = async obj => { ...@@ -660,7 +652,6 @@ const processFormData = async obj => {
} }
} }
} }
addressQuickList.value = tempAddressList addressQuickList.value = tempAddressList
tempPhoneList.forEach(item => { tempPhoneList.forEach(item => {
for (const key in saveKey.value) { for (const key in saveKey.value) {
...@@ -696,11 +687,20 @@ const processFormData = async obj => { ...@@ -696,11 +687,20 @@ const processFormData = async obj => {
if (form.value.smokingAllowed) { if (form.value.smokingAllowed) {
form.value.smokingAllowed = Number(form.value.smokingAllowed) form.value.smokingAllowed = Number(form.value.smokingAllowed)
} }
editStatus.value = true editStatus.value = true
} else { } else {
editStatus.value = false editStatus.value = false
} }
// // 投保人为本人时,信息从投保人带入
// if (obj.source && obj.source == 'policyholderRel') {
// form.value = {
// ...obj.customerInfo,
// policyholderRel: form.value.policyholderRel
// }
// if (form.value.smokingAllowed) {
// form.value.smokingAllowed = Number(form.value.smokingAllowed)
// }
// }
if (form.value['birthday']) { if (form.value['birthday']) {
let age = calculateExactAge(proxy.formatToDate(form.value.birthday)) let age = calculateExactAge(proxy.formatToDate(form.value.birthday))
if (age >= 0) { if (age >= 0) {
...@@ -715,8 +715,6 @@ const processFormData = async obj => { ...@@ -715,8 +715,6 @@ const processFormData = async obj => {
//弹出右侧抽屉 //弹出右侧抽屉
const handleFoucs = child => { const handleFoucs = child => {
if (child.disabled) return if (child.disabled) return
console.log('saveKey.value', saveKey.value)
console.log('child', child)
drawerInfo.value = JSON.parse(JSON.stringify(child)) drawerInfo.value = JSON.parse(JSON.stringify(child))
switch (child.drawerType) { switch (child.drawerType) {
...@@ -810,7 +808,25 @@ const confirmDrawer = info => { ...@@ -810,7 +808,25 @@ const confirmDrawer = info => {
form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}` form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
saveKey.value[info.key] = newObj saveKey.value[info.key] = newObj
newObj.addressString = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
// 检查数组中是否已存在key的地址
// debugger
const existinAddressIndex = addressQuickList.value.findIndex(
item => item.type === newObj.type
)
if (existinAddressIndex !== -1) {
// 更新已存在的电话
addressQuickList.value[existinAddressIndex] = {
...newObj
}
} else {
// 添加新的快捷电话
addressQuickList.value.push(newObj)
}
addressQuickList.value = removeDuplicates(addressQuickList.value, 'addressString')
console.log('填写地址', addressQuickList.value)
break break
case 'country': case 'country':
info.objType = drawerInfo.value.drawerType info.objType = drawerInfo.value.drawerType
...@@ -861,13 +877,10 @@ const handleSelectChange = (father, child) => { ...@@ -861,13 +877,10 @@ const handleSelectChange = (father, child) => {
case 'customerType': case 'customerType':
if (form.value[child.key] == 'COMPANY') { if (form.value[child.key] == 'COMPANY') {
showContacts.value = false showContacts.value = false
console.log(' commonObj.value', commonObj.value)
for (const section of processedinsuredData.value) { for (const section of processedinsuredData.value) {
if (section.key == 'company') { if (section.key == 'company') {
console.log(11111)
for (const key1 in saveKey.value) { for (const key1 in saveKey.value) {
for (const key2 in commonObj.value) { for (const key2 in commonObj.value) {
console.log(key1, key2)
if (key1 == key2) { if (key1 == key2) {
saveKey.value[key1]['fatherKey'] = section.key saveKey.value[key1]['fatherKey'] = section.key
} }
...@@ -908,6 +921,32 @@ const handleSelectChange = (father, child) => { ...@@ -908,6 +921,32 @@ const handleSelectChange = (father, child) => {
} }
break break
case 'policyholderRel':
//选择投保人为本人得时候,带入投保人得信息
if (form.value['policyholderRel'] == 'MYSELF') {
form.value = JSON.parse(JSON.stringify(props.currentPolicyholderInfo.form))
saveKey.value = JSON.parse(JSON.stringify(props.currentPolicyholderInfo.saveKey))
form.value['policyholderRel'] = 'MYSELF'
if (form.value['customerType'] == 'COMPANY') {
resetShow({ type: 'father', key: 'person', status: false })
resetShow({ type: 'father', key: 'company', status: true })
} else if (form.value['customerType'] == 'INDIVIDUAL') {
resetShow({ type: 'father', key: 'person', status: true })
resetShow({ type: 'father', key: 'company', status: false })
}
// 选择吸烟,展示吸烟数量
if (form.value['smokingAllowed'] == '1') {
resetShow({ type: 'child', key: 'smokingVolume', status: true })
} else {
resetShow({ type: 'child', key: 'smokingVolume', status: false })
}
if (form.value['isVip'] == '1') {
resetShow({ type: 'child', key: 'vipRemark', status: true })
} else {
resetShow({ type: 'child', key: 'vipRemark', status: false })
}
}
break
default: default:
break break
...@@ -1077,8 +1116,10 @@ const submitForm = () => { ...@@ -1077,8 +1116,10 @@ const submitForm = () => {
proxy.$refs['insuredInfoFormRef'].validate((valid, fields) => { proxy.$refs['insuredInfoFormRef'].validate((valid, fields) => {
if (valid) { if (valid) {
let submitObj = handleFormValues() let submitObj = handleFormValues()
if (props.idsObj.appointmentBizId&& if (
(props.pageSource == 'fnaList' || props.pageSource == 'appointmentList')) { props.idsObj.appointmentBizId &&
(props.pageSource == 'fnaList' || props.pageSource == 'appointmentList')
) {
submitObj['appointmentBizId'] = props.apiInsurantInfoDto.appointmentBizId submitObj['appointmentBizId'] = props.apiInsurantInfoDto.appointmentBizId
submitObj['id'] = props.apiInsurantInfoDto.id submitObj['id'] = props.apiInsurantInfoDto.id
submitObj['insurantBizId'] = props.apiInsurantInfoDto.insurantBizId submitObj['insurantBizId'] = props.apiInsurantInfoDto.insurantBizId
...@@ -1112,22 +1153,6 @@ const submitForm = () => { ...@@ -1112,22 +1153,6 @@ const submitForm = () => {
} }
}) })
} }
const resetForm = () => {
proxy.$modal
.confirm('是否确认撤销所作操作?')
.then(function () {
if (props.customerBizId) {
form.value = { ...oldObjInfo.value }
editStatus.value = true
} else {
// resetShow('smokeQuantity', false)
proxy.$refs['insuredInfoFormRef'].resetFields()
}
processedinsuredData.value = JSON.parse(JSON.stringify(oldAppointmentData.value))
})
.catch(() => {})
}
watch( watch(
() => props.activeName, () => props.activeName,
...@@ -1153,6 +1178,9 @@ watch( ...@@ -1153,6 +1178,9 @@ watch(
}) })
} }
}, 500) }, 500)
console.log('====================================')
console.log('受保人拿到投保人信息', props.currentPolicyholderInfo)
console.log('====================================')
} }
} }
) )
......
...@@ -211,7 +211,7 @@ const props = defineProps({ ...@@ -211,7 +211,7 @@ const props = defineProps({
idsObj: { type: Object, default: () => ({}) }, //父组件传递过来的id对象 idsObj: { type: Object, default: () => ({}) }, //父组件传递过来的id对象
apiPolicyholderInfoDto: { type: Object, default: () => ({}) }, //父组件传递过来的预约信息的详情 apiPolicyholderInfoDto: { type: Object, default: () => ({}) }, //父组件传递过来的预约信息的详情
appointmentStatus: { type: Number }, //父组件传递过来的预约的状态 appointmentStatus: { type: Number }, //父组件传递过来的预约的状态
customerInfo: { type: Object, default: () => ({}) }, //客户详情回显表单用 customerInfo: { type: Object, default: () => ({}) }, //客户详情新增时带入表单
showSubmitBtn: { type: Boolean, default: false }, //父组件状态,新增、修改 showSubmitBtn: { type: Boolean, default: false }, //父组件状态,新增、修改
pageSource: { type: String, default: '' } //页面来源 pageSource: { type: String, default: '' } //页面来源
}) })
...@@ -343,16 +343,7 @@ const getRules = child => { ...@@ -343,16 +343,7 @@ const getRules = child => {
return rules return rules
} }
const handleInputChange = (father, child) => {
switch (child.key) {
case 'nameEn':
validateEnglish(form.value[child.key], child.key)
break
default:
break
}
}
const handleDateChange = child => { const handleDateChange = child => {
let age = null let age = null
if (child.key == 'birthday') { if (child.key == 'birthday') {
...@@ -409,7 +400,6 @@ const handleExport = row => { ...@@ -409,7 +400,6 @@ const handleExport = row => {
customerInfo: row, customerInfo: row,
exportValue: true exportValue: true
}) })
// setFormValue(row, processedPolicyData.value, true)
openList.value = false openList.value = false
} }
...@@ -569,7 +559,11 @@ const processFormData = async obj => { ...@@ -569,7 +559,11 @@ const processFormData = async obj => {
for (const key1 in field) { for (const key1 in field) {
if (obj.customerInfo.addressList && obj.customerInfo.addressList.length > 0) { if (obj.customerInfo.addressList && obj.customerInfo.addressList.length > 0) {
obj.customerInfo.addressList.forEach(item => { obj.customerInfo.addressList.forEach(item => {
if (key1 == item.type) { // 之前得写法
// if (key1 == item.type) {
// addressObj = item
// }
if (field.customerKey == item.type) {
addressObj = item addressObj = item
} }
}) })
...@@ -641,7 +635,7 @@ const processFormData = async obj => { ...@@ -641,7 +635,7 @@ const processFormData = async obj => {
} }
} }
} }
// props.idsObj.appointmentBizId
if (props.showSubmitBtn) { if (props.showSubmitBtn) {
field.disabled = true field.disabled = true
} else { } else {
...@@ -801,6 +795,25 @@ const confirmDrawer = info => { ...@@ -801,6 +795,25 @@ const confirmDrawer = info => {
newObj.type = drawerInfo.value.key newObj.type = drawerInfo.value.key
form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}` form.value[info.key] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
saveKey.value[info.key] = newObj saveKey.value[info.key] = newObj
newObj.addressString = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
// 检查数组中是否已存在key的地址
// debugger
const existinAddressIndex = addressQuickList.value.findIndex(
item => item.type === newObj.type
)
if (existinAddressIndex !== -1) {
// 更新已存在的电话
addressQuickList.value[existinAddressIndex] = {
...newObj
}
} else {
// 添加新的快捷电话
addressQuickList.value.push(newObj)
}
addressQuickList.value = removeDuplicates(addressQuickList.value, 'addressString')
console.log('填写地址', addressQuickList.value)
break break
case 'country': case 'country':
info.objType = drawerInfo.value.drawerType info.objType = drawerInfo.value.drawerType
...@@ -1056,6 +1069,12 @@ const handleFormValues = () => { ...@@ -1056,6 +1069,12 @@ const handleFormValues = () => {
return submitObj return submitObj
} }
const providePolicyholderInfoData = () => {
return {
form: JSON.parse(JSON.stringify(form.value)),
saveKey: JSON.parse(JSON.stringify(saveKey.value))
}
}
// 表单提交 // 表单提交
const submitForm = () => { const submitForm = () => {
proxy.$refs['policyholderInfoFormRef'].validate((valid, fields) => { proxy.$refs['policyholderInfoFormRef'].validate((valid, fields) => {
...@@ -1099,22 +1118,6 @@ const submitForm = () => { ...@@ -1099,22 +1118,6 @@ const submitForm = () => {
} }
}) })
} }
const resetForm = () => {
proxy.$modal
.confirm('是否确认撤销所作操作?')
.then(function () {
if (props.customerBizId) {
form.value = { ...oldObjInfo.value }
editStatus.value = true
} else {
// resetShow('smokeQuantity', false)
proxy.$refs['policyholderInfoFormRef'].resetFields()
}
processedPolicyData.value = JSON.parse(JSON.stringify(oldAppointmentData.value))
})
.catch(() => {})
}
watch( watch(
() => props.activeName, () => props.activeName,
...@@ -1136,6 +1139,7 @@ watch( ...@@ -1136,6 +1139,7 @@ watch(
} else { } else {
processFormData({ processFormData({
domdata: policyDomData, domdata: policyDomData,
customerInfo: props.customerInfo,
exportValue: null exportValue: null
}) })
} }
...@@ -1147,7 +1151,8 @@ watch( ...@@ -1147,7 +1151,8 @@ watch(
// 暴露给父组件 // 暴露给父组件
defineExpose({ defineExpose({
handleFormValues, handleFormValues,
handleEditStatus handleEditStatus,
providePolicyholderInfoData
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -714,7 +714,6 @@ const handleSelectChange = (father, child) => { ...@@ -714,7 +714,6 @@ const handleSelectChange = (father, child) => {
// 选是,展示日期 // 选是,展示日期
if (form.value[father.key][child.key] == '1') { if (form.value[father.key][child.key] == '1') {
resetShow('policyEffectiveDate', true) resetShow('policyEffectiveDate', true)
// form.value[father.key]['policyEffectiveDate'] = ''
} else { } else {
resetShow('policyEffectiveDate', false) resetShow('policyEffectiveDate', false)
} }
...@@ -925,11 +924,7 @@ const setFormValue = (obj, formData) => { ...@@ -925,11 +924,7 @@ const setFormValue = (obj, formData) => {
for (const field of section.data) { for (const field of section.data) {
if (key == 'apiProductPlanMainInfoDto') { if (key == 'apiProductPlanMainInfoDto') {
for (const key2 in newForm[key]) { for (const key2 in newForm[key]) {
if ( if (field.key == 'policyEffectiveDate' && newForm[key]['isBacktrack'] == '1') {
field.key == 'policyEffectiveDate' &&
newForm[key][field.key] &&
newForm[key]['isBacktrack'] == '1'
) {
field.show = true field.show = true
} }
} }
......
...@@ -73,6 +73,13 @@ ...@@ -73,6 +73,13 @@
<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">
<template #default="scope">
<span>{{
scope.row.confirmAppointmentTime ? parseTime(scope.row.confirmAppointmentTime) : '--'
}}</span>
</template>
</el-table-column>
<el-table-column label="产品名称" align="center" prop="productName" width="150" /> <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 label="业务员" align="center" prop="businessRepresentName1" width="150" /> <el-table-column label="业务员" align="center" prop="businessRepresentName1" width="150" />
...@@ -88,7 +95,20 @@ ...@@ -88,7 +95,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时间" align="center" prop="time" width="240" show-overflow-tooltip> <el-table-column
label="意向预约时间"
align="center"
prop="intentionAppointmentTime"
width="240"
show-overflow-tooltip
>
<template #default="scope">
<span>{{
scope.row.intentionAppointmentTime
? parseTime(scope.row.intentionAppointmentTime)
: '--'
}}</span>
</template>
</el-table-column> </el-table-column>
<!-- sortable --> <!-- sortable -->
<el-table-column label="创建时间" align="center" prop="createTime" width="150"> <el-table-column label="创建时间" align="center" prop="createTime" width="150">
......
...@@ -493,10 +493,7 @@ const handleEditStatus = () => { ...@@ -493,10 +493,7 @@ const handleEditStatus = () => {
} }
processedFanFormData.value = processedData processedFanFormData.value = processedData
} }
//给表单赋值 方便表单回显 obj 为表单数据
const setFormValue = (obj, formData) => {
loading.value = true
}
// 获取校验失败的字段信息 // 获取校验失败的字段信息
const getInvalidFields = fields => { const getInvalidFields = fields => {
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<!-- sortable -->
<el-table-column label="来佣金额" prop="amount" align="center" width="120"> <!-- <el-table-column label="来佣金额" prop="amount" align="center" width="120">
<template #default="scope"> <template #default="scope">
<el-input <el-input
v-model="scope.row.amount" v-model="scope.row.amount"
...@@ -39,8 +39,17 @@ ...@@ -39,8 +39,17 @@
placeholder="请输入" placeholder="请输入"
/> />
</template> </template>
</el-table-column> -->
<el-table-column label="来佣比例" prop="ratio" align="center" width="120">
<template #default="scope">
<el-input
v-model="scope.row.ratio"
size="default"
type="number"
placeholder="请输入"
/>
</template>
</el-table-column> </el-table-column>
<!-- sortable -->
<el-table-column label="佣金期数" prop="commissionPeriod" align="center" width="120"> <el-table-column label="佣金期数" prop="commissionPeriod" align="center" width="120">
<template #default="scope"> <template #default="scope">
<el-input <el-input
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</div> </div>
</template> </template>
<script setup name="FollowUpDetail"> <script setup name="FollowUpDetail">
import { processUserName } from '@/utils/common'
import AppointmentEdit from '@/views/sign/appointment/appointmentEdit' import AppointmentEdit from '@/views/sign/appointment/appointmentEdit'
import { getPolicyfollow, getPolicyInfo } from '@/api/sign/underwritingMain' import { getPolicyfollow, getPolicyInfo } from '@/api/sign/underwritingMain'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
...@@ -39,7 +40,14 @@ const getDictsData = async () => { ...@@ -39,7 +40,14 @@ const getDictsData = async () => {
} }
const response1 = await listTenantUser(params1) const response1 = await listTenantUser(params1)
if (response1.code == 200) { if (response1.code == 200) {
dictStore.setTenantUserList(response1.data.records) let result = processUserName(response1.data.records)
result = result.map(item => {
return {
value: item.userBizId,
label: item.showName
}
})
dictStore.setTenantUserList(result)
} }
const params2 = { const params2 = {
loginTenantBizId: userStore.projectInfo.tenantBizId, loginTenantBizId: userStore.projectInfo.tenantBizId,
......
...@@ -83,9 +83,7 @@ ...@@ -83,9 +83,7 @@
:show-file-list="false" :show-file-list="false"
accept=".xlsx, .xls" accept=".xlsx, .xls"
> >
<el-button type="success" :icon="UploadFilled" size="default"> <el-button type="success" size="default"> 上传Excel文件 </el-button>
上传Excel文件
</el-button>
</el-upload> </el-upload>
<el-button text @click="downloadTemplate" size="default" class="download-template-btn"> <el-button text @click="downloadTemplate" size="default" class="download-template-btn">
下载模板 下载模板
...@@ -136,6 +134,15 @@ ...@@ -136,6 +134,15 @@
<span>{{ convertStatusToDict(1, scope.row.status) }}</span> <span>{{ convertStatusToDict(1, scope.row.status) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="coolingOffEndDate" label="冷静期结束日期" width="150" align="center">
<template #default="scope">
<span>{{
scope.row.coolingOffEndDate ? parseTime(scope.row.coolingOffEndDate) : '--'
}}</span>
</template>
</el-table-column>
<el-table-column prop="coolingOffDays" label="冷静期天数" width="150" align="center">
</el-table-column>
<el-table-column prop="policyNo" label="保单号" width="150" align="center" sortable /> <el-table-column prop="policyNo" label="保单号" width="150" align="center" sortable />
<el-table-column prop="customerName" label="客户名称" width="100" align="center" sortable /> <el-table-column prop="customerName" label="客户名称" width="100" align="center" sortable />
<el-table-column prop="signDate" label="签单日期" width="150" align="center" sortable> <el-table-column prop="signDate" label="签单日期" width="150" align="center" sortable>
...@@ -162,7 +169,11 @@ ...@@ -162,7 +169,11 @@
sortable sortable
/> />
<el-table-column prop="insured" label="受保人" width="100" align="center" sortable /> <el-table-column prop="insured" label="受保人" width="100" align="center" sortable />
<el-table-column prop="currency" label="币种" width="100" align="center" sortable /> <el-table-column prop="currency" label="币种" width="100" align="center" sortable>
<template #default="scope">
<dict-tag :options="currencyTypeOptions" :value="scope.row.currency" />
</template>
</el-table-column>
<el-table-column prop="initialPremium" label="首期保费" width="150" align="center" sortable> <el-table-column prop="initialPremium" label="首期保费" width="150" align="center" sortable>
<template #default="scope"> <template #default="scope">
{{ numberWithCommas(scope.row.initialPremium) }} {{ numberWithCommas(scope.row.initialPremium) }}
...@@ -171,16 +182,37 @@ ...@@ -171,16 +182,37 @@
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
width="250" width="200"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
fixed="right" fixed="right"
> >
<template #default="scope"> <template #default="scope">
<el-button text size="primary" @click="handleView(scope.row)"> 查看 </el-button> <div class="btnCon">
<el-button text size="primary" @click="handleStatus(scope.row)"> 跟进 </el-button> <el-button link type="primary" size="small" @click="handleReport(scope.row)">
生成签约单完成报告
</el-button>
<el-dropdown placement="bottom" style="margin-left: 10px">
<el-button type="primary" link size="small">
更多 <el-icon><ArrowDown /></el-icon
></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleView(scope.row)">查看</el-dropdown-item>
<el-dropdown-item @click="handleStatus(scope.row)">跟进</el-dropdown-item>
<el-dropdown-item @click="handleEditStatus(scope.row)"
>修改状态</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<!-- <el-button text size="primary" @click="handleView(scope.row)"> 查看 </el-button> -->
<!-- <el-button text size="primary" @click="handleStatus(scope.row)"> 跟进 </el-button>
<el-button text type="warning" @click="handleEditStatus(scope.row)"> <el-button text type="warning" @click="handleEditStatus(scope.row)">
修改状态 修改状态
</el-button> </el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -236,7 +268,11 @@ ...@@ -236,7 +268,11 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<!-- {
"code": 200,
"msg": "生成预计发佣正在处理....,稍后查看预计发佣列表",
"data": null
} -->
<script setup> <script setup>
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
...@@ -244,7 +280,8 @@ import axios from 'axios' ...@@ -244,7 +280,8 @@ import axios from 'axios'
import { import {
getPolicyFollowList, getPolicyFollowList,
getExpectedCommissionList, getExpectedCommissionList,
changePolicyStatus changePolicyStatus,
policyFollowReport
} from '@/api/sign/underwritingMain' } from '@/api/sign/underwritingMain'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { listType } from '@/api/system/dict/type' import { listType } from '@/api/system/dict/type'
...@@ -259,6 +296,7 @@ const router = useRouter() ...@@ -259,6 +296,7 @@ const router = useRouter()
const policyFollowStatusList = ref([]) const policyFollowStatusList = ref([])
const commissionStatusList = ref([]) const commissionStatusList = ref([])
const fortuneStatusList = ref([]) const fortuneStatusList = ref([])
const currencyTypeOptions = ref([])
const currentPolicyRow = ref({}) //当前保单 const currentPolicyRow = ref({}) //当前保单
const editStatus = ref(false) //新单信息状态 const editStatus = ref(false) //新单信息状态
const data = reactive({ const data = reactive({
...@@ -287,7 +325,12 @@ const submitForm = () => { ...@@ -287,7 +325,12 @@ const submitForm = () => {
} }
const getLists = () => { const getLists = () => {
listType({ listType({
typeList: ['csf_policy_follow_status', 'csf_expected_commission_status', 'csf_fortune_status'] typeList: [
'csf_policy_follow_status',
'csf_expected_commission_status',
'csf_fortune_status',
'bx_currency_type'
]
}) })
.then(res => { .then(res => {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
...@@ -299,10 +342,20 @@ const getLists = () => { ...@@ -299,10 +342,20 @@ const getLists = () => {
commissionStatusList.value = commissionStatusData?.dictItemList || [] commissionStatusList.value = commissionStatusData?.dictItemList || []
const fortuneStatusData = res.data.find(item => item.dictType === 'csf_fortune_status') const fortuneStatusData = res.data.find(item => item.dictType === 'csf_fortune_status')
fortuneStatusList.value = fortuneStatusData?.dictItemList || [] fortuneStatusList.value = fortuneStatusData?.dictItemList || []
// 处理币种字典值
const currencyData = res.data.find(item => item.dictType === 'bx_currency_type')
if (currencyData) {
currencyData?.dictItemList.forEach(item => {
item.value = item.itemValue
item.label = item.itemLabel
})
}
currencyTypeOptions.value = currencyData?.dictItemList || []
} else { } else {
policyFollowStatusList.value = [] policyFollowStatusList.value = []
commissionStatusList.value = [] commissionStatusList.value = []
fortuneStatusList.value = [] fortuneStatusList.value = []
currencyTypeOptions.value = []
} }
}) })
.catch(error => { .catch(error => {
...@@ -378,7 +431,34 @@ const handleView = async row => { ...@@ -378,7 +431,34 @@ const handleView = async row => {
fetchExpectedCommissionList(row.policyNo) fetchExpectedCommissionList(row.policyNo)
getPolicyFortuneLists(row.policyNo) getPolicyFortuneLists(row.policyNo)
} }
const handleReport = async row => {
try {
const res = await policyFollowReport(row.policyBizId)
console.log('pdf请求', res)
// 创建 Blob 对象
const blob = new Blob([res], { type: 'application/pdf' })
// 创建对象 URL
const url = window.URL.createObjectURL(blob)
// 在新窗口打开
window.open(url, '_blank')
//下载得方式
// const blob = new Blob([res], { type: 'application/pdf' })
// const url = window.URL.createObjectURL(blob)
// // 创建下载链接
// const link = document.createElement('a')
// link.href = url
// link.download = '签约单.pdf' // 设置文件名
// link.click()
// // 清理 URL 对象
// window.URL.revokeObjectURL(url)
} catch (error) {
console.error('导出失败:', error)
}
}
// 处理详情弹窗关闭 // 处理详情弹窗关闭
const handleDetailClose = () => { const handleDetailClose = () => {
viewDialogVisible.value = false viewDialogVisible.value = false
...@@ -668,6 +748,11 @@ const handleEditStatus = row => { ...@@ -668,6 +748,11 @@ const handleEditStatus = row => {
</script> </script>
<style scoped> <style scoped>
.btnCon {
display: flex;
align-items: center;
justify-content: center;
}
.data-management-page { .data-management-page {
padding: 20px; padding: 20px;
/* max-width: 1600px; */ /* max-width: 1600px; */
......
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