Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
3f5ee310
Commit
3f5ee310
authored
Dec 26, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
做到了fnaForm的保险公司
parent
f43a9d6e
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1437 additions
and
1416 deletions
+1437
-1416
src/App.vue
+2
-3
src/api/common.js
+32
-0
src/components/formCard/cardOne.vue
+6
-2
src/formJson/appointmentInfo.js
+32
-0
src/formJson/customer.js
+35
-32
src/formJson/fnaForm.js
+310
-432
src/formJson/insured.js
+0
-1
src/formJson/productPlan.js
+8
-8
src/store/modules/dict.js
+21
-1
src/utils/2.js
+0
-0
src/views/sign/FnaList/components/customer.vue
+227
-122
src/views/sign/FnaList/components/fanForm.vue
+279
-411
src/views/sign/FnaList/edit.vue
+75
-8
src/views/sign/appointment/appointmentEdit.vue
+81
-67
src/views/sign/appointment/components/appointmentInfo.vue
+218
-70
src/views/sign/appointment/components/productPlan.vue
+111
-259
No files found.
src/App.vue
View file @
3f5ee310
<
template
>
<el-watermark
:font=
"font"
:content=
"content"
>
<router-view
/>
</el-watermark>
...
...
@@ -10,10 +9,10 @@ import useSettingsStore from '@/store/modules/settings'
import
{
handleThemeStyle
}
from
'@/utils/theme'
import
{
reactive
}
from
'vue'
const
font
=
reactive
({
color
:
'rgba(0, 0, 0, .15)'
,
color
:
'rgba(0, 0, 0, .15)'
})
const
content
=
re
active
(
'csf
'
)
const
content
=
re
f
(
'
'
)
onMounted
(()
=>
{
nextTick
(()
=>
{
...
...
src/api/common.js
View file @
3f5ee310
...
...
@@ -111,3 +111,35 @@ export function getUserSaleExpandList(data) {
data
:
data
})
}
// 第二个附加险列表
export
function
secondAdditonalList
(
data
)
{
return
request
({
url
:
'/product/api/relProjectProductLaunch/parameter/page'
,
method
:
'post'
,
data
:
data
})
}
// 获取签单员列表
export
function
getAllSignList
(
data
)
{
return
request
({
url
:
'/insurance/base/api/userSignExpand/page'
,
method
:
'post'
,
data
:
data
})
}
// 获取团队列表
export
function
getAllTeam
(
data
)
{
return
request
({
url
:
'/csf/api/team/page'
,
method
:
'post'
,
data
:
data
})
}
// 获取保险公司列表
export
function
getInsuranceCompany
(
data
)
{
return
request
({
url
:
'/insurance/base/api/insuranceCompany/page'
,
data
:
data
,
method
:
'post'
})
}
src/components/formCard/cardOne.vue
View file @
3f5ee310
...
...
@@ -4,7 +4,10 @@
<template
#
header
>
<div
class=
"cardOneheader"
>
<div
class=
"cardOneLeft"
>
<div
class=
"mainTitle"
>
{{
title
}}
</div>
<div
class=
"mainTitle"
>
{{
title
}}
<slot
name=
"mainTitCustom"
></slot>
</div>
<slot
name=
"headerRight"
></slot>
</div>
<div
class=
"subTitle"
v-if=
"desTitle"
>
{{
desTitle
}}
</div>
...
...
@@ -60,6 +63,7 @@ const props = defineProps({
padding-left
:
5px
;
display
:
flex
;
align-items
:
center
;
margin-right
:
20px
;
/* border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
...
...
@@ -69,7 +73,7 @@ const props = defineProps({
content
:
''
;
display
:
inline-block
;
width
:
4px
;
height
:
22
px
;
height
:
18
px
;
background
:
#0052d9
;
margin-right
:
5px
;
border-radius
:
4px
;
...
...
src/formJson/appointmentInfo.js
View file @
3f5ee310
...
...
@@ -142,6 +142,10 @@ const appointmentInfo = [
label
:
'到港时间'
,
key
:
'arrivalTime'
,
domType
:
'datetimePicker'
,
dateValue
:
''
,
//YYYY-MM-DD
timeValue
:
''
,
//HH:mm
compositionTime
:
true
,
//是否组合时间
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
...
...
@@ -155,6 +159,9 @@ const appointmentInfo = [
label
:
'离港时间(离港时间必须晚于到港时间)'
,
key
:
'departureTime'
,
domType
:
'datetimePicker'
,
dateValue
:
''
,
//YYYY-MM-DD
timeValue
:
''
,
//HH:mm
compositionTime
:
true
,
//是否组合时间
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
...
...
@@ -213,6 +220,31 @@ const appointmentInfo = [
}
]
},
// 陪同转介人信息
{
fatherTitle
:
'签单员'
,
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
key
:
'userSignDtoList'
,
anchorKey
:
'userSignDtoList'
,
moudleType
:
'userSignDtoList'
,
dataLength
:
1
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
showTable
:
true
,
showMoudle
:
true
,
//模块是否展示
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'签单员'
,
//新增按钮得文本
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
isOpen
:
false
,
//dom是否展开
data
:
[
// {
// name: '', //姓名
// practiceCode: '', //执业编码
// phone: '', //手机号
// cardType: '', //证件类型
// cardNo: '', //证件号码
// email: '' //邮箱
// }
]
},
// 开户信息
{
fatherTitle
:
'开户信息'
,
...
...
src/formJson/customer.js
View file @
3f5ee310
const
customer
=
[
// 与投保人关系-在受保人中显示
{
fatherTitle
:
'与投保人关系'
,
type
:
'object'
,
key
:
'policyholderRel'
,
anchorKey
:
'policyholderRel'
,
showTable
:
false
,
showMoudle
:
false
,
data
:
[
{
label
:
'与投保人关系'
,
key
:
'policyholderRel'
,
domType
:
'Select'
,
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
dictType
:
'csf_ap_rel'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
}
]
},
// 基础信息
{
fatherTitle
:
'基础信息'
,
...
...
@@ -6,6 +31,7 @@ const customer = [
key
:
'personInfo'
,
anchorKey
:
'personInfo'
,
showTable
:
false
,
showMoudle
:
true
,
data
:
[
{
label
:
'名字(中文)'
,
...
...
@@ -40,20 +66,7 @@ const customer = [
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
// {
// label: '称谓',
// key: 'title',
// domType: 'Select',
// required: true,
// disabled: false,
// placeholder: '请选择',
// dictType: 'csf_customer_title',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label
:
'证件类型'
,
key
:
'documentType'
,
...
...
@@ -183,21 +196,7 @@ const customer = [
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
// {
// label: '吸烟数量(支/天)',
// key: 'smokeQuantity',
// domType: 'Input',
// inputType: 'number',
// maxLength: 30,
// required: false,
// disabled: false,
// placeholder: '请输入',
// show: false,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label
:
'婚姻状况'
,
key
:
'maritalStatus'
,
...
...
@@ -325,6 +324,7 @@ const customer = [
anchorKey
:
'apiTaxationDtoList'
,
moudleType
:
'apiTaxationDtoList'
,
dataLength
:
1
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
showMoudle
:
true
,
showTable
:
true
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'税务'
,
//新增按钮得文本
...
...
@@ -335,7 +335,7 @@ const customer = [
// id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
// span: 24, //栅格布局份数
// taxCountry: '',
// tax
Number
: ''
// tax
Id
: ''
// }
]
},
...
...
@@ -346,6 +346,7 @@ const customer = [
key
:
'contactInfo'
,
anchorKey
:
'contactInfo'
,
showTable
:
false
,
showMoudle
:
true
,
data
:
[
{
label
:
'移动电话'
,
...
...
@@ -403,7 +404,7 @@ const customer = [
domType
:
'Input'
,
inputType
:
'text'
,
maxLength
:
30
,
required
:
tru
e
,
required
:
fals
e
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
...
...
@@ -421,7 +422,7 @@ const customer = [
maxLength
:
20
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
fals
e
,
show
:
tru
e
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
...
...
@@ -483,6 +484,7 @@ const customer = [
key
:
'companyInfo'
,
anchorKey
:
'companyInfo'
,
showTable
:
false
,
showMoudle
:
true
,
data
:
[
{
label
:
'就业情况'
,
...
...
@@ -649,6 +651,7 @@ const customer = [
key
:
'financeInfo'
,
anchorKey
:
'financeInfo'
,
showTable
:
false
,
showMoudle
:
true
,
data
:
[
{
label
:
'平均每月收入'
,
...
...
src/formJson/fnaForm.js
View file @
3f5ee310
/**
* 1.普通模块得数据格式,无子级:
* {
一些页面用到得属性,比如个人资料模块得数据格式
data:[] data主要是这个模块对应得表单dom数据
}
2. 有子级得模块得数据格式:
{
一些页面用到得属性,比如家庭状况模块得数据格式
data:[ data主要父级模块对应得表单
{
比如家庭状况中有父亲,母亲,配偶,这个对象就代表这些人
children:[],代表得是这些人对应得表单dom
}
]
}
以上两种格式说明了fnaForm页面得dom数据格式,如果有子级得dom请参照2格式添加,否则可能有未知错误
*/
const
fnaForm
=
[
{
fatherTitle
:
'个人资料'
,
keyType
:
'Object'
,
//用于表单收集值时,判断是数组还是对象
key
:
'personalData'
,
child
:
'no'
,
//没有子级dom,直接展示
fatherRequired
:
true
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
{
label
:
'转介人'
,
key
:
'accountName'
,
domType
:
'SearchSelect'
,
required
:
true
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
// 介绍人信息
{
fatherTitle
:
'转介人信息'
,
keyType
:
'Array'
,
key
:
'brokerList'
,
anchorKey
:
'brokerList'
,
moudleType
:
'brokerList'
,
dataLength
:
1
,
showMoudle
:
true
,
showTable
:
true
,
addChildren
:
true
,
addChildrenTxt
:
'转介人'
,
fatherRequired
:
false
,
isOpen
:
false
,
// 新增表格列配置
columns
:
[
{
label
:
'姓名'
,
prop
:
'brokerName'
,
type
:
'remoteSelect'
,
searchType
:
'brokerName'
,
placeholder
:
'请输入关键词搜索'
,
required
:
false
},
// {
// label: '签单员注册编号',
// key: 'registrationNumber',
// domType: 'Input',
// inputType: 'text',
// required: true,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '140px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '签单员内部编码',
// key: 'number',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '130px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label
:
'客户姓名'
,
key
:
'customerName'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
true
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
label
:
'性别'
,
prop
:
'brokerGender'
,
type
:
'select'
,
dictType
:
'sys_gender'
,
placeholder
:
'请选择'
,
required
:
false
},
// {
// label: '税务国家',
// key: 'taxCountry',
// domType: 'Input',
// inputType: 'text',
// required: true,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label
:
'就业情况'
,
key
:
'employment'
,
domType
:
'Select'
,
required
:
true
,
maxLength
:
30
,
disabled
:
false
,
label
:
'内部编号'
,
prop
:
'brokerNumber'
,
type
:
'input'
,
placeholder
:
'请输入'
,
show
:
true
,
dictType
:
'csf_employment'
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
required
:
false
},
{
label
:
'是否退休'
,
key
:
'isRetired'
,
domType
:
'Select'
,
required
:
true
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
dictType
:
'sys_no_yes'
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
label
:
'所属团队'
,
prop
:
'brokerTeam'
,
type
:
'remoteSelect'
,
searchType
:
'brokerTeam'
,
placeholder
:
'请输入关键词搜索'
,
required
:
false
},
{
label
:
'退休年龄'
,
key
:
'retiredAge'
,
domType
:
'Input'
,
inputType
:
'number'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
label
:
'分配比例'
,
prop
:
'brokerRatio'
,
type
:
'inputNumber'
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
required
:
true
},
{
label
:
'其他就业情况'
,
key
:
'otherEmployment'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
label
:
'备注'
,
prop
:
'remark'
,
type
:
'input'
,
placeholder
:
'请输入'
,
show
:
false
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
required
:
false
}
],
data
:
[
{
brokerName
:
''
,
brokerGender
:
''
,
brokerNumber
:
''
,
brokerTeam
:
''
,
brokerRatio
:
''
,
remark
:
''
}
]
},
{
fatherTitle
:
'家庭状况'
,
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
showTable
:
true
,
//以table的形式展示
key
:
'familyMembers'
,
moudleType
:
'family'
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'添加儿女'
,
//新增按钮得文本
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
// 受供养人信息
{
fatherTitle
:
'受供养人信息'
,
keyType
:
'Array'
,
key
:
'dependantList'
,
anchorKey
:
'dependantList'
,
moudleType
:
'dependantList'
,
dataLength
:
1
,
showMoudle
:
true
,
showTable
:
true
,
addChildren
:
true
,
addChildrenTxt
:
'受供养人'
,
fatherRequired
:
false
,
isOpen
:
false
,
openIcon
:
true
,
data
:
[
{
type
:
'1'
,
childTitle
:
'父亲'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
age
:
''
,
needProvide
:
''
,
disabled
:
false
,
dictType
:
'sys_no_yes'
,
options
:
[]
// 表格列配置
columns
:
[
{
label
:
'与投保人关系'
,
prop
:
'policyholderRel'
,
type
:
'select'
,
dictType
:
'csf_ap_rel'
,
placeholder
:
'请选择'
,
required
:
false
},
{
type
:
'2'
,
childTitle
:
'母亲'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
age
:
''
,
needProvide
:
''
,
disabled
:
false
,
dictType
:
'sys_no_yes'
,
options
:
[]
},
label
:
'年龄'
,
prop
:
'dependantAge'
,
type
:
'inputNumber'
,
placeholder
:
'请输入年龄'
,
required
:
false
}
],
data
:
[
{
type
:
'3'
,
childTitle
:
'配偶'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
age
:
''
,
needProvide
:
''
,
disabled
:
false
,
dictType
:
'sys_no_yes'
,
options
:
[]
policyholderRel
:
''
,
dependantAge
:
''
}
]
},
//
财务需要分析
//
已生效仍在缴费期的保单情况
{
fatherTitle
:
'财务需要分析'
,
subTitle
:
'保单持有人个人已有保障'
,
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
fatherTitle
:
'已生效仍在缴费期的保单情况'
,
keyType
:
'Array'
,
key
:
'existingSecurityOwner'
,
moudleType
:
'finance'
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'保单持有人个人已有保障'
,
//新增按钮得文本
anchorKey
:
'existingSecurityOwner'
,
moudleType
:
'existingSecurityOwner'
,
dataLength
:
1
,
showMoudle
:
true
,
showTable
:
true
,
dataLength
:
5
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
addChildren
:
true
,
addChildrenTxt
:
'保单'
,
fatherRequired
:
false
,
isOpen
:
false
,
openIcon
:
true
,
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
// 表格列配置
columns
:
[
{
label
:
'保险公司'
,
prop
:
'insurer'
,
type
:
'remoteSelect'
,
searchType
:
'insurer'
,
placeholder
:
'请搜索保险公司名称'
,
required
:
true
},
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
childTitle
:
'保单持有人个人已有保障'
,
insurer
:
''
,
insuranceType
:
''
,
sumInsured
:
''
,
policyIssueDate
:
''
,
currency
:
''
,
label
:
'保险种类'
,
prop
:
'insuranceType'
,
type
:
'remoteSelect'
,
searchType
:
'insuranceType'
,
placeholder
:
'请选择'
,
required
:
true
},
{
label
:
'保单币种'
,
prop
:
'currency'
,
type
:
'select'
,
dictType
:
'bx_currency_type'
,
options
:
[]
}
]
placeholder
:
'请选择'
,
required
:
true
},
//受保人个人已有保障
{
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
subTitle
:
'受保人个人已有保障'
,
key
:
'existingSecurityInsured'
,
moudleType
:
'finance'
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'受保人个人已有保障'
,
//新增按钮得文本
dataLength
:
5
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
showTable
:
true
,
isOpen
:
false
,
//dom是否展开
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
label
:
'投保日期'
,
prop
:
'policyIssueDate'
,
type
:
'datePicker'
,
placeholder
:
'请选择日期'
,
required
:
true
}
// 有重疾险才让填写
// {
// label: '保额',
// prop: 'sumInsured',
// type: 'inputNumber',
// placeholder: '请输入保额',
// required: true
// },
],
data
:
[
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
subTitle
:
'受保人个人已有保障'
,
insurer
:
''
,
insuranceType
:
''
,
sumInsured
:
''
,
policyIssueDate
:
''
,
currency
:
''
,
dictType
:
'bx_currency_type'
,
options
:
[]
}
]
},
// 投资房地产
{
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
key
:
'investment'
,
moudleType
:
'finance'
,
subTitle
:
'投资房地产'
,
showTable
:
true
,
dataLength
:
2
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'投资房地产'
,
//新增按钮得文本
isOpen
:
false
,
//dom是否展开
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
{
childTitle
:
'投资房地产'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
address
:
''
,
currency
:
''
,
dictType
:
'bx_currency_type'
,
marketValue
:
''
policyIssueDate
:
''
}
]
},
//
保单持有人资产
//
不动产信息
{
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
fatherTitle
:
'不动产信息'
,
keyType
:
'Array'
,
key
:
'primaryResidence'
,
moudleType
:
'finance'
,
dataLength
:
1
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
showTable
:
true
,
subTitle
:
'保单持有人资产'
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'保单持有人资产'
,
//新增按钮得文本
isOpen
:
false
,
//dom是否展开
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
{
childTitle
:
'自住用途之房地产'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
address
:
''
,
currency
:
''
,
dictType
:
'bx_currency_type'
,
marketValue
:
''
}
]
},
// 税务国家
{
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
key
:
'taxList'
,
moudleType
:
'finance'
,
dataLength
:
1
,
//设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
anchorKey
:
'primaryResidence'
,
moudleType
:
'primaryResidence'
,
dataLength
:
1
,
showMoudle
:
true
,
showTable
:
true
,
subTitle
:
'税务'
,
addChildren
:
true
,
//是否可以新增子级dom
addChildrenTxt
:
'税务'
,
//新增按钮得文本
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
isOpen
:
false
,
//dom是否展开
data
:
[
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
t
axCountry
:
'
'
,
taxNumber
:
''
}
]
addChildren
:
true
,
addChildren
Txt
:
'不动产'
,
fatherRequired
:
false
,
isOpen
:
false
,
// 表格列配置
columns
:
[
{
label
:
'类型'
,
prop
:
'propertyType'
,
t
ype
:
'select
'
,
dictType
:
'csf_property_type'
,
placeholder
:
'请选择'
,
required
:
true
},
//公司业务资料
{
keyType
:
'Object'
,
//用于表单收集值时,判断是数组还是对象
key
:
'companyBusinessData'
,
child
:
'no'
,
//有子级dom,需要循环展示
isOpen
:
true
,
//是否展开
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
subTitle
:
'公司业务资料 (适用于公司老板跟股东)'
,
data
:
[
{
label
:
'公司過去兩年平均純利'
,
key
:
'averageNetProfit'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'220px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
label
:
'房地产地址'
,
prop
:
'address'
,
type
:
'input'
,
placeholder
:
'请输入地址'
,
required
:
false
},
{
label
:
'公司現時大約的總資產'
,
key
:
'estimatedTotalAssets'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'220px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
label
:
'市值'
,
prop
:
'marketValue'
,
type
:
'inputNumber'
,
placeholder
:
'请输入市场价值'
,
required
:
false
},
{
label
:
'币种'
,
key
:
'currency'
,
domType
:
'Select'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
prop
:
'currency'
,
type
:
'select'
,
dictType
:
'bx_currency_type'
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
placeholder
:
'请选择'
,
required
:
false
}
],
data
:
[
{
label
:
'资产所佔百分比 (%)'
,
key
:
'assetPercentage'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'220px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
propertyType
:
''
,
address
:
''
,
marketValue
:
''
,
currency
:
''
}
]
},
//支出
{
key
:
'incomeExpense'
,
keyType
:
'Object'
,
//用于表单收集值时,判断是数组还是对象
child
:
'no'
,
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
// 保费负担能力评估
{
fatherTitle
:
'保费负担能力评估'
,
type
:
'object'
,
key
:
'premiumAffordability'
,
anchorKey
:
'premiumAffordability'
,
showTable
:
false
,
showMoudle
:
true
,
data
:
[
{
label
:
'在过去12个月里,你从所有所得的收入来源所得的平均每月收入为(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等。'
,
label
:
'在过去12个月里你的平均每月收入'
,
key
:
'monthlyIncome'
,
value
:
''
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
unit
:
'HKD'
,
showDes
:
true
,
//是否展示描述
inputType
:
'number'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
placeholder
:
'请输入平均每月收入'
,
tooltip
:
'包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等'
,
show
:
true
,
inputWidth
:
'300px'
,
labelWidth
:
'
80
0px'
,
//标签宽度
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'
12
0px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
24
,
//栅格布局份数
labelPosition
:
'top'
//标签的位置
lg
:
8
//栅格布局份数
},
{
label
:
'
过去12个月每月里,你每月的平均开支为
'
,
label
:
'
在过去12个月里你的平均每月开支
'
,
key
:
'monthlyExpense'
,
value
:
''
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
unit
:
'HKD'
,
showDes
:
true
,
//是否展示描述
inputType
:
'number'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
placeholder
:
'请输入
平均每月开支
'
,
show
:
true
,
inputWidth
:
'300px'
,
//输入框宽度
labelWidth
:
'
26
0px'
,
//标签宽度
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'
12
0px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
12
,
//栅格布局份数
labelPosition
:
'top'
//标签的位置
}
]
lg
:
8
//栅格布局份数
},
{
key
:
'liquidAssets'
,
keyType
:
'Object'
,
//用于表单收集值时,判断是数组还是对象
child
:
'no'
,
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
{
label
:
'您现时的累积流动资产约有多少?'
,
key
:
'liquidAssets'
,
value
:
''
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
unit
:
'HKD'
,
inputType
:
'number'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
placeholder
:
'请输入流动资产'
,
tooltip
:
'流動资産是指可以容易變為现金的資産。例如現金、存款、外幣及股票,不包括物業。'
,
show
:
true
,
inputWidth
:
'300px'
,
//输入框宽度
labelWidth
:
'
2
20px'
,
//标签宽度
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'
1
20px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
12
,
//栅格布局份数
labelPosition
:
'top'
//标签的位置
lg
:
8
//栅格布局份数
},
{
label
:
'流动资产种类'
,
label
:
'流动资产种类
有?(多选)
'
,
key
:
'liquidAssetType'
,
value
:
[],
domType
:
'Checkbox'
,
required
:
false
,
dictType
:
'csf_liquid_asset_type'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelWidth
:
'100px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
24
,
//栅格布局份数
labelPosition
:
'top'
,
//标签的位置
dictType
:
'csf_liquid_asset_type'
},
{
label
:
''
,
key
:
'otherLiquidAsset'
,
inputType
:
'Input'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
false
,
labelWidth
:
'0px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
24
,
//栅格布局份数
labelPosition
:
'top'
//标签的位置
}
]
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
fatherTitle
:
''
,
keyType
:
'Object'
,
//用于表单收集值时,判断是数组还是对象
child
:
'no'
,
fatherRequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
key
:
'other'
,
data
:
[
{
label
:
'首期及续保保费的财富来源'
,
label
:
'首期及续保保费的财富来源
?(多选)
'
,
key
:
'premiumFundingSource'
,
value
:
[],
domType
:
'Checkbox'
,
required
:
false
,
maxLength
:
30
,
dictType
:
'csf_premium_funding_source'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelWidth
:
'180px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
24
,
//栅格布局份数
labelPosition
:
'top'
,
//标签的位置
dictType
:
'csf_premium_funding_source'
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
}
]
}
// 公司业务资料
// {
// fatherTitle: '公司业务资料',
// type: 'object',
// key: 'companyBusinessData',
// anchorKey: 'companyBusinessData',
// showTable: false,
// showMoudle: true,
// data: [
// {
// label: '公司过去两年平均纯利',
// key: 'averageNetProfit',
// value: '',
// domType: 'Input',
// unit: 'HKD',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '公司现时大约总资产',
// key: 'estimatedTotalAssets',
// value: '',
// domType: 'Input',
// unit: 'HKD',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '币种',
// key: 'currency',
// value: '',
// domType: 'Select',
// required: false,
// disabled: false,
// placeholder: '请选择',
// dictType: 'bx_currency_type',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '资产所占百分比(%)',
// key: 'assetPercentage',
// value: '',
// domType: 'Input',
// unit: 'HKD',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// }
// ]
// }
]
export
default
fnaForm
src/formJson/insured.js
View file @
3f5ee310
...
...
@@ -10,7 +10,6 @@ const insured = [
{
label
:
'与投保人关系'
,
key
:
'policyholderRel'
,
// customerKey: 'customerType',
domType
:
'Select'
,
required
:
true
,
disabled
:
false
,
...
...
src/formJson/productPlan.js
View file @
3f5ee310
...
...
@@ -286,7 +286,7 @@ const productPlan = [
//附加险
{
showMoudle
:
true
,
//模块是否展示
fatherTitle
:
'附加
险
'
,
fatherTitle
:
'附加
计划
'
,
keyType
:
'Array'
,
//用于表单收集值时,判断是数组还是对象
key
:
'apiProductPlanAdditionalInfoDtoList'
,
anchorKey
:
'apiProductPlanAdditionalInfoDtoList'
,
...
...
@@ -429,7 +429,7 @@ const productPlan = [
{
label
:
'产品名称'
,
value
:
''
,
key
:
'
addProduct
Name'
,
key
:
'
productLaunch
Name'
,
domType
:
'SearchSelect'
,
required
:
false
,
maxLength
:
30
,
...
...
@@ -443,13 +443,13 @@ const productPlan = [
},
{
label
:
'供款期数'
,
key
:
'
paymentTerm
'
,
key
:
'
issueNumber
'
,
value
:
''
,
domType
:
'Select'
,
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
dictType
:
'
paymentTerm
'
,
dictType
:
'
issueNumber
'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
...
...
@@ -458,7 +458,7 @@ const productPlan = [
},
{
label
:
'保障年期(若是终身,输入999)'
,
key
:
'
sumInsure
d'
,
key
:
'
guaranteePerio
d'
,
value
:
''
,
domType
:
'Input'
,
inputType
:
'number'
,
...
...
@@ -474,7 +474,7 @@ const productPlan = [
},
{
label
:
'保单币种'
,
key
:
'
c
urrency'
,
key
:
'
policyC
urrency'
,
value
:
''
,
domType
:
'Select'
,
inputType
:
'text'
,
...
...
@@ -507,7 +507,7 @@ const productPlan = [
},
{
label
:
'每期保费'
,
key
:
'
p
remium'
,
key
:
'
eachIssueP
remium'
,
value
:
''
,
domType
:
'Input'
,
inputType
:
'number'
,
...
...
@@ -541,7 +541,7 @@ const productPlan = [
{
label
:
'保障级别'
,
value
:
''
,
key
:
'
insuranceType
'
,
key
:
'
protectionLevel
'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
...
...
src/store/modules/dict.js
View file @
3f5ee310
...
...
@@ -11,7 +11,11 @@ const useDictStore = defineStore('dict', {
dictTypeLists
:
[],
//字典列表,根据请求得不同会变化,所以使用之前需要使用useDictLists请求数据
signNameList
:
[],
bankList
:
[],
//银行列表
userSaleExpandList
:
[]
//最新转介人列表
userSaleExpandList
:
[],
//最新转介人列表
productAdditionalList
:
[],
//附加险产品列表对应的是产品计划
signPeopleList
:
[],
//所有签单员
allTeaList
:
[],
//所有团队
allInsuranceCompanyList
:
[]
//最新的保险公司列表
}),
actions
:
{
// 获取字典
...
...
@@ -94,6 +98,22 @@ const useDictStore = defineStore('dict', {
//设置最新转介人列表
setUserSaleExpandList
(
list
)
{
this
.
userSaleExpandList
=
list
},
//设置最新的附加险产品列表
setProductAdditionalList
(
list
)
{
this
.
productAdditionalList
=
list
},
//设置签单员列表
setSignPeopleList
(
list
)
{
this
.
signPeopleList
=
list
},
//设置团队列表
setAllTeaList
(
list
)
{
this
.
allTeaList
=
list
},
//设置最新的保险公司列表
setAllInsuranceCompanyList
(
list
)
{
this
.
allInsuranceCompanyList
=
list
}
}
})
...
...
src/utils/2.js
View file @
3f5ee310
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/sign/FnaList/components/customer.vue
View file @
3f5ee310
...
...
@@ -3,7 +3,7 @@
<div
ref=
"customerRightRef"
>
<div
class=
"editBtn"
>
<el-button
v-if=
"props.customerBizId"
v-if=
"props.customerBizId
&& tabSource == 'customer'
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus"
...
...
@@ -12,20 +12,19 @@
</div>
<CommonForm
:anchorList=
"anchorList"
:affixOffset=
"
250
"
:affixOffset=
"
affixOffset
"
:anchorOffset=
"10"
:scrollContainerSelector=
"anchorContainer"
:scrollOffset=
"10"
:domIndex=
"tabIndex"
:containerRef=
"tabPaneRef"
:activeName=
"activeName"
v-if=
"customerRightRef"
>
<template
#
form-right
>
<el-form
ref=
"customerRef"
:model=
"form"
:rules=
"rules"
label-width=
"120px
"
>
<el-form
:model=
"form"
:rules=
"rules"
label-width=
"120px"
ref=
"customerFormRef
"
>
<el-row
v-for=
"(father, fIndex) in processedCustomerData"
:id=
"father.anchorKey"
>
<div
class=
"formBox"
>
<CardOne
:title=
"father.fatherTitle"
>
<CardOne
:title=
"father.fatherTitle"
v-if=
"father.showMoudle"
>
<template
#
content
>
<el-row
:gutter=
"20"
v-if=
"!father.showTable"
>
<template
v-for=
"child in father.data"
:key=
"child.key"
>
...
...
@@ -71,7 +70,9 @@
v-model=
"form[child.key]"
:placeholder=
"child.placeholder"
maxlength=
"30"
:disabled=
"child.disabled"
:disabled=
"
child.key == 'age' || child.key == 'bmi' ? true : editStatus
"
@
blur=
"handleInputBlur(child)"
>
<
template
#
append
v-if=
"child.unit"
>
...
...
@@ -87,7 +88,7 @@
v-model=
"form[child.key]"
:placeholder=
"child.placeholder"
@
change=
"handleSelectChange(child)"
:disabled=
"
child.disabled
"
:disabled=
"
editStatus
"
>
<el-option
v-for=
"item in child.options"
...
...
@@ -104,7 +105,7 @@
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
:placeholder=
"child.placeholder"
:disabled=
"
child.disabled
"
:disabled=
"
editStatus
"
:disabled-date=
"time => disabledDate(time, child)"
:default-value=
"defaultDisplayDate"
@
change=
"handleDateChange(child)"
...
...
@@ -117,7 +118,7 @@
@
click=
"handleFoucs(child)"
:suffix-icon=
"ArrowRight"
readonly
:disabled=
"
child.disabled
"
:disabled=
"
editStatus
"
>
</el-input>
</el-form-item>
...
...
@@ -175,8 +176,7 @@
</CardOne>
</div>
</el-row>
<el-row>
<el-row
v-if=
"tabSource == 'customer'"
>
<el-col>
<div
class=
"tabButton"
>
<el-button
...
...
@@ -187,10 +187,11 @@
:disabled=
"editStatus"
>
取消
</el-button
>
<!-- @click="submitForm" -->
<el-button
type=
"primary"
icon=
"Check"
@
click=
"
submitForm
"
@
click=
"
handleFormValues
"
size=
"large"
:disabled=
"editStatus"
>
提交
</el-button
...
...
@@ -247,15 +248,16 @@
>
<!-- 查询条件插槽 -->
<
template
#
searchForm
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
label-width=
"100px"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
label-width=
"100px"
label-position=
"top"
>
<el-row
:gutter=
"30"
>
<el-col
:sm=
"12"
:lg=
"8"
:xs=
"24"
>
<el-form-item
label=
"预约编号"
prop=
"appointmentNo"
>
<el-input
v-model=
"queryParams.appointmentNo"
placeholder=
"请输入预约编号"
clearable
/>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入姓名"
clearable
/>
</el-form-item>
</el-col>
<el-col
:sm=
"12"
:lg=
"8"
:xs=
"24"
>
<el-form-item
label=
"手机号"
prop=
"mobile"
>
<el-input
v-model=
"queryParams.mobile"
placeholder=
"请输入手机号"
clearable
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -331,23 +333,18 @@ import {
calculateFieldValue
}
from
'@/api/sign/fna'
import
useDictStore
from
'@/store/modules/dict'
import
{
HttpStatusCode
}
from
'axios'
const
dictStore
=
useDictStore
()
//获取字典数据
const
props
=
defineProps
({
activeName
:
{
type
:
String
,
default
:
''
},
//tab名称
fatherEditStatus
:
{
type
:
Boolean
,
default
:
true
},
//因为嵌套了双层tab,所以需要父组件传值控制子组件的编辑状态
anchorContainer
:
{
type
:
String
,
default
:
''
},
//锚点滚动容器
tabIndex
:
{
type
:
[
String
,
Number
],
default
:
''
},
//tab索引
tabPaneRef
:
{
type
:
Object
,
default
:
null
},
fearthStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
}
//提交状态,新增、修改
affixOffset
:
{
type
:
Number
,
default
:
250
},
//锚点吸顶距离
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
tabSource
:
{
type
:
String
,
default
:
''
}
//引用这个组件的页面来源,用于逻辑判断
})
const
emit
=
defineEmits
([
'handleSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const
anchorList
=
ref
([])
//锚点列表
const
customerRightRef
=
ref
(
null
)
const
showPhoneDrawer
=
ref
(
false
)
//电话抽屉开关
const
showAddressDrawer
=
ref
(
false
)
//地址抽屉开关
...
...
@@ -362,7 +359,6 @@ const oldObjInfo = ref({}) // 修改时存储原始数据,便于撤销操作
const
tableLoading
=
ref
(
false
)
const
tableData
=
ref
([])
const
total
=
ref
(
0
)
const
customerRef
=
ref
(
null
)
//计算默认显示的日期(18年前的今天)
const
defaultDisplayDate
=
ref
(
dayjs
().
subtract
(
18
,
'year'
).
toDate
())
// 地址组件菜单数据
...
...
@@ -452,6 +448,8 @@ const operationBtnList = ref([
click
:
handleQuery
}
])
const
customerFormRef
=
ref
(
null
)
const
changePageNo
=
val
=>
{
queryParams
.
value
.
pageNo
=
val
customerList
()
...
...
@@ -547,7 +545,7 @@ const addChildren = father => {
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
taxCountry
:
''
,
tax
Number
:
''
tax
Id
:
''
}
for
(
const
section
of
processedData
)
{
...
...
@@ -555,9 +553,8 @@ const addChildren = father => {
section
.
data
.
push
(
obj4
)
}
}
//更新form表单对应的数据,以便收集填写的值
// form.value[father.key].push(obj)
processedCustomerData
.
value
=
processedData
console
.
log
(
'processedCustomerData.value'
,
processedCustomerData
.
value
)
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
if
(
editStatus
.
value
)
{
...
...
@@ -644,10 +641,12 @@ const customerList = () => {
}
// 从客户列表中导入客户信息到当前表单
const
handleExport
=
row
=>
{
console
.
log
(
'row'
,
row
)
oldCustomerData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
processedCustomerData
.
value
))
// 修改时存储原始数据,便于撤销操作
oldObjInfo
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
// 修改时存储原始数据,便于撤销操作
// setFormValue(row, processedCustomerData.value, true)
console
.
log
(
'导入前form'
,
oldObjInfo
.
value
)
console
.
log
(
'导入前dom'
,
oldCustomerData
.
value
)
setFormValue
(
row
,
processedCustomerData
.
value
,
true
)
openList
.
value
=
false
}
...
...
@@ -673,12 +672,30 @@ const fetchDictData = dictType => {
}
// 处理表单配置,添加字典数据
const
processFormData
=
async
()
=>
{
anchorList
.
value
=
[]
// 深拷贝原始数据
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
customerDomData
))
rules
.
value
=
{}
for
(
const
section
of
processedData
)
{
anchorList
.
value
.
push
({
title
:
section
.
anchorKey
,
name
:
section
.
fatherTitle
})
// 如果在受保人中,与投保人关系已填写,根据填写内容展示对应的模块
if
(
props
.
activeName
==
'insurantInfo'
&&
form
.
value
[
'policyholderRel'
]
&&
form
.
value
[
'policyholderRel'
]
==
'MYSELF'
)
{
if
(
section
.
key
==
'policyholderRel'
)
{
section
.
showMoudle
=
true
}
else
{
section
.
showMoudle
=
false
}
}
else
{
section
.
showMoudle
=
true
}
if
(
props
.
activeName
==
'insurantInfo'
&&
section
.
key
==
'policyholderRel'
)
{
section
.
showMoudle
=
true
}
else
if
(
props
.
activeName
!==
'insurantInfo'
&&
section
.
key
==
'policyholderRel'
)
{
section
.
showMoudle
=
false
}
if
(
section
.
data
)
{
for
(
const
field
of
section
.
data
)
{
if
(
field
.
dictType
)
{
...
...
@@ -702,27 +719,27 @@ const processFormData = async () => {
]
}
}
if
(
field
.
key
===
'bmi'
)
{
rules
.
value
[
field
.
key
]
=
[{
validator
:
validateBMI
,
trigger
:
'change'
}]
}
if
(
props
.
customerBizId
)
{
field
.
disabled
=
true
// if (field.key === 'bmi') {
// rules.value[field.key] = [
// { required: false, trigger: 'change' },
// { validator: validateBMI,trigger: 'change' }
// ]
// }
}
}
}
// 为私有的加form验证
if
(
props
.
activeName
==
'insurantInfo'
)
{
rules
.
value
[
'policyholderRel'
]
=
[
{
required
:
true
,
message
:
`与投保人关系不能为空`
,
trigger
:
'blur'
}
]
}
if
(
props
.
customerBizId
)
{
getCustomerInfo
(
props
.
customerBizId
,
processedData
)
editStatus
.
value
=
true
}
else
{
editStatus
.
value
=
false
form
.
value
.
customerType
=
'INDIVIDUAL'
processedCustomerData
.
value
=
oldCustomerData
.
value
=
processedData
}
console
.
log
(
'===================================='
)
console
.
log
(
'anchorList.value'
,
anchorList
.
value
)
console
.
log
(
'===================================='
)
console
.
log
(
'form'
,
form
.
value
)
}
//弹出右侧抽屉
...
...
@@ -863,7 +880,7 @@ const confirmDrawer = info => {
nextTick
(()
=>
{
// 根据不同的drawerType确定要验证的字段key
const
validateField
=
drawerInfo
.
value
.
key
customerRef
.
value
.
clearValidate
(
validateField
)
customer
Form
Ref
.
value
.
clearValidate
(
validateField
)
})
}
...
...
@@ -873,15 +890,6 @@ const confirmDrawer = info => {
const
handleSelectChange
=
child
=>
{
switch
(
child
.
key
)
{
case
'documentType'
:
// 先不加这个验证,有问题
// if (form.value[child.key] == 'idCard') {
// rules.value.idNumber.push({
// validator: validateIdCard,
// trigger: 'blur'
// })
// } else {
// rules.value.idNumber = [{ required: true, message: `证件号码不能为空`, trigger: 'blur' }]
// }
break
case
'isRetirement'
:
if
(
form
.
value
[
child
.
key
]
==
'1'
)
{
...
...
@@ -890,7 +898,18 @@ const handleSelectChange = child => {
resetShow
(
'retirementAge'
,
false
)
}
break
case
'policyholderRel'
:
processedCustomerData
.
value
.
forEach
(
section
=>
{
if
(
form
.
value
[
child
.
key
]
==
'MYSELF'
)
{
if
(
section
.
key
==
'policyholderRel'
)
{
section
.
showMoudle
=
true
}
else
{
section
.
showMoudle
=
false
}
}
else
{
section
.
showMoudle
=
true
}
})
break
default
:
break
...
...
@@ -934,15 +953,18 @@ const setFormValue = (obj, formData, exportValue) => {
// if (section.key == 'personInfo') {
// section.data.push()
// }
if
(
section
.
key
==
'apiTaxationDtoList'
&&
obj
.
apiTaxationDtoList
&&
obj
.
apiTaxationDtoList
.
length
>
0
)
{
section
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
obj
.
apiTaxationDtoList
))
}
if
(
section
.
data
)
{
for
(
const
field
of
section
.
data
)
{
if
(
obj
.
isRetirement
&&
obj
.
isRetirement
==
'1'
&&
field
.
key
==
'retirementAge'
)
{
field
.
show
=
true
}
//证件类型是身份证,身份证地址就显示否则不显示
// if (field.key == 'idCardAddress' && obj.idType == 'idCard') {
// field.show = true
// }
//要判断drawerType,因为抽屉要回显数据
switch
(
field
.
drawerType
)
{
case
'phone'
:
...
...
@@ -1002,12 +1024,12 @@ const setFormValue = (obj, formData, exportValue) => {
break
case
'country'
:
form
.
value
[
field
.
key
]
=
obj
.
countryName
form
.
value
[
field
.
key
]
=
obj
.
nationality
saveKey
.
value
[
field
.
key
]
=
{
country
:
obj
.
country
||
''
,
countryCode
:
obj
.
country
||
''
,
countryName
:
obj
.
countryName
||
''
,
name
:
obj
.
countryName
||
''
,
//
country: obj.country || '',
//
countryCode: obj.country || '',
//
countryName: obj.countryName || '',
name
:
obj
.
nationality
||
''
,
objType
:
field
.
drawerType
}
break
...
...
@@ -1044,11 +1066,11 @@ const setFormValue = (obj, formData, exportValue) => {
phoneQuickList
.
value
=
removeDuplicates
(
tempPhoneList
,
'phoneString'
)
addressQuickList
.
value
=
removeDuplicates
(
tempAddressList
,
'addressString'
)
if
(
!
exportValue
)
{
// 保存一份就得表单数据便于做撤销操作
oldObjInfo
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
}
processedCustomerData
.
value
=
oldCustomerData
.
value
=
processedData
//
if (!exportValue) {
//
// 保存一份就得表单数据便于做撤销操作
//
oldObjInfo.value = JSON.parse(JSON.stringify(form.value))
//
}
processedCustomerData
.
value
=
processedData
}
// 数组去重
function
removeDuplicates
(
arr
,
key
)
{
...
...
@@ -1077,15 +1099,98 @@ const getInvalidFields = fields => {
}
return
errors
}
// 表单提交
const
submitForm
=
()
=>
{
//提交得时候要处理税务国家得数据。表格得值收集在processedCustomerData中,所以需要从processedCustomerData中取值
const
resetForm
=
()
=>
{
proxy
.
$modal
.
confirm
(
'是否确认撤销所作操作?'
)
.
then
(
function
()
{
customerFormRef
.
value
.
resetFields
()
console
.
log
(
'切换之前的form'
,
oldObjInfo
.
value
)
console
.
log
(
'切换之前的dom'
,
oldCustomerData
.
value
)
// processedCustomerData.value = JSON.parse(JSON.stringify(oldCustomerData.value))
setFormValue
(
oldObjInfo
.
value
,
oldCustomerData
.
value
)
})
.
catch
(()
=>
{})
}
// 获取客户详情
function
getCustomerInfo
(
customerBizId
,
formData
)
{
getCustomerDetail
(
customerBizId
).
then
(
async
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
}
})
}
// 根据联动重置表单项的显示与否
const
resetShow
=
(
key
,
status
)
=>
{
for
(
const
section
of
processedCustomerData
.
value
)
{
if
(
section
.
data
)
{
for
(
const
field
of
section
.
data
)
{
if
(
field
.
key
==
key
)
{
// 获取字典数据
field
.
show
=
status
}
}
}
}
}
// 方法1:使用 Promise 包装 validateField
const
debugValidation
=
async
()
=>
{
const
fieldNames
=
Object
.
keys
(
rules
.
value
)
console
.
log
(
'开始验证以下字段:'
,
fieldNames
)
// 1. 为每个字段创建验证Promise,并直接返回该字段的验证结果
const
validationPromises
=
fieldNames
.
map
(
field
=>
{
return
new
Promise
(
resolve
=>
{
if
(
!
customerFormRef
.
value
)
{
console
.
error
(
`[
${
field
}
] 表单实例不存在`
)
resolve
({
field
,
error
:
null
,
valid
:
false
})
// 标记为无效
return
}
customerFormRef
.
value
.
validateField
(
field
,
errorMessage
=>
{
console
.
log
(
`[
${
field
}
] 验证结果:`
,
errorMessage
?
`失败 -
${
errorMessage
}
`
:
'通过'
)
// 关键修改:只有当 errorMessage 存在(有错误)时,才携带错误信息
if
(
errorMessage
)
{
resolve
({
field
,
error
:
errorMessage
,
valid
:
false
})
}
else
{
resolve
({
field
,
error
:
null
,
valid
:
true
})
}
})
})
})
// 2. 等待所有验证完成
const
results
=
await
Promise
.
all
(
validationPromises
)
// 3. 筛选出所有验证失败的字段
const
errors
=
results
.
filter
(
result
=>
!
result
.
valid
&&
result
.
error
)
.
map
(
result
=>
({
field
:
result
.
field
,
message
:
result
.
error
}))
console
.
log
(
'最终收集到的错误列表:'
,
errors
)
return
errors
}
// 滚动到第一个错误字段
const
scrollToFirstError
=
()
=>
{
const
firstError
=
document
.
querySelector
(
'.el-form-item__error'
)
if
(
firstError
)
{
firstError
.
scrollIntoView
({
behavior
:
'smooth'
,
block
:
'center'
})
}
}
const
handleFormValues
=
()
=>
{
return
new
Promise
(
async
resolve
=>
{
let
submitObj
=
{
...
form
.
value
}
let
addressList
=
[]
submitObj
[
'birthday'
]
=
proxy
.
formatToDate
(
submitObj
[
'birthday'
])
customerFormRef
.
value
.
validate
((
valid
,
fields
)
=>
{
proxy
.
$refs
[
'customerRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
errorFields
.
value
=
[]
// 清空错误信息
//处理表单数据
for
(
const
key1
in
form
.
value
)
{
for
(
const
key2
in
saveKey
.
value
)
{
...
...
@@ -1117,12 +1222,25 @@ const submitForm = () => {
}
submitObj
[
'birthday'
]
=
proxy
.
formatToDate
(
submitObj
[
'birthday'
])
submitObj
[
'addressList'
]
=
addressList
processedCustomerData
.
value
.
forEach
(
item
=>
{
if
(
item
.
key
==
'apiTaxationDtoList'
&&
item
.
data
.
length
>
0
)
{
submitObj
[
'apiTaxationDtoList'
]
=
item
.
data
.
filter
(
item
=>
{
return
item
.
taxCountry
&&
item
.
taxCountry
.
trim
()
&&
item
.
taxId
&&
item
.
taxId
.
trim
()
})
}
})
// 删除多余字段
deleteKeyList
.
value
.
forEach
(
item
=>
{
delete
submitObj
[
item
]
})
return
if
(
props
.
customerBizId
)
{
if
(
errorFields
.
value
.
length
>
0
)
{
proxy
.
$message
.
error
(
errorFields
.
value
[
0
].
message
)
return
undefined
}
if
(
props
.
customerBizId
&&
props
.
activeName
==
'customer'
)
{
editCustomer
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
()
...
...
@@ -1134,10 +1252,9 @@ const submitForm = () => {
})
}
})
}
else
{
}
else
if
(
!
props
.
customerBizId
&&
props
.
activeName
==
'customer'
)
{
addFna
({
remark
:
''
}).
then
(
response
=>
{
if
(
response
.
code
==
200
)
{
// res.data.fnaBizId 写到这了,先增加fna,再增加客户 看一下流程是否报错
addCustomer
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'客户新增成功'
)
...
...
@@ -1152,66 +1269,54 @@ const submitForm = () => {
}
})
}
// emit('submitForm', submitObj)
errorFields
.
value
=
[]
// 清空错误信息
resolve
(
errorFields
.
value
.
length
==
0
?
submitObj
:
null
)
}
else
{
// 获取校验失败的字段信息
errorFields
.
value
=
getInvalidFields
(
fields
)
if
(
errorFields
.
value
.
length
>
0
)
{
proxy
.
$message
.
error
(
errorFields
.
value
[
0
].
message
)
}
resolve
(
undefined
)
}
})
}
const
resetForm
=
()
=>
{
proxy
.
$modal
.
confirm
(
'是否确认撤销所作操作?'
)
.
then
(
function
()
{
if
(
props
.
customerBizId
)
{
form
.
value
=
{
...
oldObjInfo
.
value
}
editStatus
.
value
=
true
}
else
{
// resetShow('smokeQuantity', false)
proxy
.
$refs
[
'customerRef'
].
resetFields
()
}
processedCustomerData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
oldCustomerData
.
value
))
})
.
catch
(()
=>
{})
}
// 获取客户详情
function
getCustomerInfo
(
customerBizId
,
formData
)
{
getCustomerDetail
(
customerBizId
).
then
(
async
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
}
})
}
// 根据联动重置表单项的显示与否
const
resetShow
=
(
key
,
status
)
=>
{
const
anchorList
=
computed
(()
=>
{
let
data
=
[]
for
(
const
section
of
processedCustomerData
.
value
)
{
if
(
section
.
data
)
{
for
(
const
field
of
section
.
data
)
{
if
(
field
.
key
==
key
)
{
// 获取字典数据
field
.
show
=
status
if
(
section
.
showMoudle
)
{
data
.
push
({
title
:
section
.
anchorKey
,
name
:
section
.
fatherTitle
})
}
}
}
}
}
return
data
})
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
editStatus
.
value
=
false
customerRightRef
.
value
=
null
if
(
newVal
===
'customer'
)
{
if
(
newVal
===
'customer'
||
newVal
===
'policyholder'
||
newVal
===
'insurantInfo'
)
{
processFormData
()
// 因为客户资料里的编辑状态是单独控制的
if
(
props
.
tabSource
==
'customer'
&&
props
.
customerBizId
)
{
editStatus
.
value
=
true
}
else
if
(
props
.
tabSource
==
'customer'
&&
!
props
.
customerBizId
)
{
editStatus
.
value
=
false
}
}
}
)
watch
(
()
=>
props
.
fatherEditStatus
,
newVal
=>
{
editStatus
.
value
=
newVal
}
)
// 暴露给父组件
defineExpose
({
handleFormValues
,
handleEditStatus
})
</
script
>
<
style
lang=
"scss"
scoped
>
.dialogBox
{
...
...
src/views/sign/FnaList/components/fanForm.vue
View file @
3f5ee310
<
template
>
<div>
<div
v-if=
"processedFanFormData.length > 0"
>
<el-row>
<div
ref=
"fanContainerRef"
>
<!--
<el-row>
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
...
...
@@ -13,58 +13,79 @@
>
</div>
</el-col>
</el-row>
<el-form
ref=
"fanFormRef"
:model=
"form"
:rules=
"rules"
>
<div
v-for=
"father in processedFanFormData"
>
<div>
<div
class=
"fatherLable"
>
{{
father
.
fatherTitle
}}
<div
class=
"openCon"
v-if=
"father.openIcon"
@
click=
"changeOpenStatus(father)"
>
<el-icon
v-if=
"!father.isOpen"
><Hide
/></el-icon>
<el-icon
v-else
><View
/></el-icon>
</div>
</div>
<div
class=
"subTitle"
v-if=
"father.subTitle && father.isOpen"
>
{{
father
.
subTitle
}}
</div>
</el-row>
-->
<CommonForm
:anchorList=
"anchorList"
:affixOffset=
"250"
:anchorOffset=
"10"
:scrollContainerSelector=
"anchorContainer"
:scrollOffset=
"10"
:domIndex=
"tabIndex"
:activeName=
"activeName"
v-if=
"fanContainerRef"
>
<template
#
form-right
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"fanFormRef"
>
<el-row
v-for=
"(father, fIndex) in processedFanFormData"
:id=
"father.anchorKey"
>
<div
class=
"formBox"
>
<CardOne
:title=
"father.fatherTitle"
v-if=
"father.showMoudle"
>
<template
#
mainTitCustom
>
<div
class=
"dependNum"
v-if=
"father.key == 'dependantList' && father.data.length > 0"
>
受供养人数目:
{{
father
.
data
.
length
}}
</div>
<el-row
v-if=
"father.child == 'no'"
:gutter=
"20"
>
</
template
>
<
template
#
content
>
<el-row
:gutter=
"20"
v-if=
"!father.showTable"
class=
"selfStyle"
>
<template
v-for=
"child in father.data"
:key=
"child.key"
>
<el-col
:sm=
"child.sm"
:lg=
"child.lg"
class=
"formItem"
v-if=
"child.show"
>
<div>
<el-form-item
:label=
"child.label"
:prop=
"father.key + '.' + child.key"
:label=
"
child.key === 'monthlyIncome' && child.domType === 'Input'
? ''
: child.label
"
:prop=
"child.key"
:key=
"child.key"
:label-width=
"child.labelWidth"
:label-position=
"child.labelPosition"
>
<!-- 自定义 label 插槽 -->
<template
v-if=
"
(child.key === 'monthlyIncome' || child.key === 'liquidAssets') &&
child.domType === 'Input'
"
#
label
>
<div
class=
"custom-label"
>
<span>
{{
child
.
label
}}
</span>
<el-tooltip
:content=
"child.tooltip"
placement=
"top"
>
<el-icon><QuestionFilled
/></el-icon>
</el-tooltip>
</div>
</
template
>
<el-input
v-if=
"child.domType === 'Input'"
:type=
"child.inputType"
v-model=
"form[father.key][child.key]"
:placeholder=
"child.placeholder"
maxlength=
"30"
:disabled=
"child.disabled"
:style=
"
{ width: child.inputWidth ? child.inputWidth : '100%' }"
/>
<el-input
v-if=
"child.inputType === 'Input'"
:type=
"child.inputType"
v-model=
"form[father.key][child.key]"
v-model=
"child.value"
:placeholder=
"child.placeholder"
maxlength=
"30"
:disabled=
"child.disabled"
:style=
"
{ width: child.inputWidth ? child.inputWidth : '100%' }"
class="formInput"
/>
:disabled=
"editStatus"
>
<
template
#
append
v-if=
"child.unit"
>
<span>
{{
child
.
unit
}}
</span>
</
template
>
</el-input>
<el-select
v-if=
"child.domType === 'Select'"
v-model=
"form[father.key][child.key]
"
v-model=
"child.value
"
:placeholder=
"child.placeholder"
@
change=
"handleSelectChange(father, child)"
:disabled=
"child.disabled"
clearable
@
change=
"handleSelectChange(child)"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in child.options"
...
...
@@ -76,17 +97,33 @@
<el-date-picker
style=
"width: 100%"
v-if=
"child.domType === 'DatePicker'"
v-model=
"form[father.key][child.key]
"
v-model=
"child.value
"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
:placeholder=
"child.placeholder"
:disabled=
"child.disabled"
:disabled=
"editStatus"
:disabled-date=
"time => disabledDate(time, child)"
:default-value=
"defaultDisplayDate"
@
change=
"handleDateChange(child)"
/>
<el-input
v-if=
"child.domType === 'arrowRight'"
v-model=
"child.value"
:placeholder=
"child.placeholder"
@
click=
"handleFoucs(child)"
:suffix-icon=
"ArrowRight"
readonly
:disabled=
"editStatus"
>
</el-input>
<el-checkbox-group
v-if=
"child.domType === 'Checkbox'"
v-model=
"form[father.key][child.key]"
:disabled=
"child.disabled"
@
change=
"changeCheck(father, child)"
v-model=
"child.value"
:disabled=
"editStatus"
>
<
template
class=
"customCheckBox"
>
<el-checkbox
v-for=
"item in child.options"
:key=
"item.value"
...
...
@@ -94,299 +131,133 @@
>
{{
item
.
label
}}
</el-checkbox>
</el-checkbox-group>
<el-select
v-model=
"form[father.key][child.key]"
v-if=
"child.domType === 'SearchSelect'"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, child.key)"
:loading=
"searchLoadingStates[child.key]"
:disabled=
"child.disabled"
clearable
>
<el-option
v-for=
"item in searchOptions[child.key] || []"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
<el-input
style=
"width: 250px"
v-if=
"
child.key === 'liquidAssetType' &&
child.value.filter(item => item == 'G').length > 0
"
v-model=
"child.otherLiquidAsset"
placeholder=
"请输入说明"
:disabled=
"editStatus"
/>
</el-select>
</
template
>
</el-checkbox-group>
</el-form-item>
</div>
</el-col>
</template>
</el-row>
<el-row
v-if=
"father.showTable && father.isOpen"
>
<el-table
:data=
"father.data"
border
>
<
template
v-if=
"father.key == 'familyMembers'"
>
<el-table-column
label=
"亲属"
prop=
"childTitle"
width=
"100px"
align=
"center"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
type
==
'4'
?
`${scope.row.childTitle
}
-${scope.$index - 2
}
`
:
scope
.
row
.
childTitle
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"年龄"
prop
=
"age"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
v
-
model
=
"scope.row.age"
size
=
"default"
placeholder
=
"请输入"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"是否需要供养"
prop
=
"needProvide"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
select
v
-
model
=
"scope.row.needProvide"
placeholder
=
"请选择"
<el-row
v-if=
"father.showTable"
>
<el-col
:span=
"24"
v-if=
"father.addChildren"
>
<el-button
:disabled=
"editStatus"
clearable
type=
"primary"
icon=
"Plus"
size=
"small"
style=
"margin-bottom: 10px"
@
click=
"addChildren(father)"
>
{{ father.addChildrenTxt }}
</el-button
>
<
el
-
option
v
-
for
=
"item in scope.row.options"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
/>
<
/el-select
>
<
/template
>
<
/el-table-column
>
</el-col>
<el-table
:data=
"father.data"
border
v-if=
"father.data.length > 0"
>
<!-- 动态渲染列 -->
<el-table-column
width
=
"60px"
v
-
if
=
"father.data && father.data.some(item => item.type === '4')"
v-for=
"column in father.columns"
:key=
"column.prop"
:label=
"column.label"
:prop=
"column.prop"
align=
"center"
label
=
"操作"
>
<
template
#
default=
"scope"
>
<
el
-
icon
v
-
if
=
"scope.row.type == '4'"
@
click
=
"deleteChildren(father, scope.$index)"
class
=
"deleteIcon"
><
Delete
/><
/el-icon
>
<
/template
>
<
/el-table-column
>
<
/template
>
<
template
v
-
if
=
"
father.key == 'existingSecurityOwner' || father.key == 'existingSecurityInsured'
"
>
<
el
-
table
-
column
label
=
"保险公司"
prop
=
"insurer"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
size
=
"default"
placeholder
=
"请输入"
v
-
model
=
"scope.row.insurer"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"保障类型"
prop
=
"insuranceType"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
v
-
model
=
"scope.row.insuranceType"
size
=
"default"
placeholder
=
"请输入"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"保额"
prop
=
"sumInsured"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
v
-
model
=
"scope.row.sumInsured"
size
=
"default"
placeholder
=
"请输入"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"币种"
prop
=
"currency"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<!-- 远程搜索选择框 -->
<el-select
v
-
model
=
"scope.row.currency"
placeholder
=
"请选择"
v-if=
"column.type === 'remoteSelect'"
v-model=
"scope.row[column.prop]"
filterable
remote
reserve-keyword
:placeholder=
"column.placeholder"
:remote-method=
"query => searchSelectList(query, column.searchType)"
:loading=
"searchLoadingStates[column.searchType]"
:disabled=
"editStatus"
clearable
@
change=
"handleRemoteSelectChange(scope.row, column)"
>
<el-option
v
-
for
=
"item in scope.row.options
"
:
key
=
"item.value
"
v-for=
"item in searchOptions[column.searchType] || []
"
:key=
"item.id
"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"保单签发日期"
prop
=
"policyIssueDate"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
date
-
picker
style
=
"width: 100%"
v
-
model
=
"scope.row.policyIssueDate"
type
=
"date"
placeholder
=
"请输入"
:
disabled
=
"editStatus"
:
disabled
-
date
=
"disabledDate"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"60px"
align
=
"center"
label
=
"操作"
>
<
template
#
default
=
"scope"
>
<
el
-
icon
@
click
=
"deleteChildren(father, scope.$index)"
class
=
"deleteIcon"
><
Delete
/><
/el-icon
>
<
/template
>
<
/el-table-column
>
<
/template
>
<
template
v
-
if
=
"father.key == 'investment'"
>
<
el
-
table
-
column
label
=
"地址"
prop
=
"address"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
size
=
"default"
placeholder
=
"请输入"
v
-
model
=
"scope.row.address"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"市值"
prop
=
"marketValue"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
v
-
model
=
"scope.row.marketValue"
size
=
"default"
placeholder
=
"请输入"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"币种"
prop
=
"currency"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<!-- 普通选择框 -->
<el-select
v
-
model
=
"scope.row.currency"
placeholder
=
"请选择"
v-else-if=
"column.type === 'select'"
v-model=
"scope.row[column.prop]"
:placeholder=
"column.placeholder"
:disabled=
"editStatus"
clearable
>
<el-option
v
-
for
=
"item in scope.row.options
"
v-for=
"item in fetchDictData(column.dictType)
"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"60px"
align
=
"center"
label
=
"操作"
>
<
template
#
default
=
"scope"
>
<
el
-
icon
@
click
=
"deleteChildren(father, scope.$index)"
class
=
"deleteIcon"
><
Delete
/><
/el-icon
>
<
/template
>
<
/el-table-column
>
<
/template
>
<
template
v
-
if
=
"father.key == 'primaryResidence'"
>
<
el
-
table
-
column
label
=
"自住用途之房地产地址"
prop
=
"address"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
size
=
"default"
placeholder
=
"请输入"
v
-
model
=
"scope.row.address"
<!-- 日期选择器 -->
<el-date-picker
v-else-if=
"column.type === 'datePicker'"
v-model=
"scope.row[column.prop]"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
:placeholder=
"column.placeholder"
:disabled=
"editStatus"
style=
"width: 100%"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"自住用途之房地产市值"
prop
=
"marketValue"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<!-- 数字输入框 -->
<el-input
v
-
model
=
"scope.row.marketValue
"
size
=
"default
"
placeholder
=
"请输入
"
v-else-if=
"column.type === 'inputNumber'
"
v-model
.
number=
"scope.row[column.prop]
"
:placeholder=
"column.placeholder
"
:disabled=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"币种"
prop
=
"currency"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
select
v
-
model
=
"scope.row.currency"
placeholder
=
"请选择"
:
disabled
=
"editStatus"
clearable
type=
"number"
>
<
el
-
option
v
-
for
=
"item in scope.row.options"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
/>
<
/el-select
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"60px"
align
=
"center"
label
=
"操作"
>
<
template
#
default
=
"scope"
>
<
el
-
icon
@
click
=
"deleteChildren(father, scope.$index)"
class
=
"deleteIcon"
><
Delete
/><
/el-icon
>
<template
v-if=
"column.unit"
#
append
>
<span>
{{
column
.
unit
}}
</span>
</
template
>
<
/el-table-column
>
<
/template
>
<
template
v
-
if
=
"father.key == 'taxList'"
>
<
el
-
table
-
column
label
=
"税务国家"
prop
=
"taxCountry"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
el
-
input
size
=
"default"
placeholder
=
"请输入"
v
-
model
=
"scope.row.taxCountry"
:
disabled
=
"editStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"税务编号"
prop
=
"taxNumber"
align
=
"center"
>
<
template
#
default
=
"scope"
>
</el-input>
<!-- 普通输入框(默认) -->
<el-input
v
-
model
=
"scope.row.taxNumber"
size
=
"default
"
placeholder
=
"请输入
"
v-else
v-model=
"scope.row[column.prop]
"
:placeholder=
"column.placeholder
"
:disabled=
"editStatus"
/>
</template>
</el-table-column>
<!-- 操作列(固定) -->
<el-table-column
width=
"60px"
align=
"center"
label=
"操作"
>
<
template
#
default=
"scope"
>
<
el
-
icon
@
click
=
"deleteChildren(father, scope.$index)"
class
=
"deleteIcon"
<el-icon
class=
"deleteIcon"
@
click=
"deleteChildren(father, scope.$index)"
><Delete
/></el-icon>
</
template
>
</el-table-column>
<
/template
>
</el-table>
<
el
-
col
:
span
=
"24"
v
-
if
=
"father.addChildren"
style
=
"display: flex; justify-content: center"
>
<
el
-
button
:
disabled
=
"editStatus"
style
=
"margin-top: 10px"
type
=
"primary"
icon
=
"Plus"
@
click
=
"addChildren(father)"
>
{{
father
.
addChildrenTxt
}}
<
/el-butto
n
>
<
/el-col
>
</el-row>
</template>
</CardOne>
</div>
</el-row>
<el-row>
<el-col>
<div
class=
"tabButton"
>
...
...
@@ -410,31 +281,37 @@
</el-col>
</el-row>
</el-form>
</template>
</CommonForm>
</div>
<
div
v
-
else
class
=
"domEmpty"
v
-
loading
=
"loading"
><
/div
>
<
!-- <div v-else class="domEmpty" v-loading="loading"></div> --
>
</div>
</template>
<
script
setup
name=
"fanForm"
>
import
CommonForm
from
'@/views/components/commonForm'
import
CardOne
from
'@/components/formCard/cardOne'
import
{
processUserName
}
from
'@/utils/common'
import
useDictStore
from
'@/store/modules/dict'
import
fanFormDomData
from
'@/formJson/fnaForm'
import
{
watch
,
nextTick
}
from
'vue'
import
{
addfanForm
,
getfanFormDetail
,
editFanForm
,
getCustomerList
}
from
'@/api/sign/fna'
import
{
listTenantUser
}
from
'@/api/common'
import
{
getUserSaleExpandList
,
getAllTeam
,
getInsuranceCompany
}
from
'@/api/common'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
const
props
=
defineProps
({
customerInfo
:
{
type
:
Object
,
default
:
()
=>
{}
},
//客户详情
activeName
:
{
type
:
String
,
default
:
''
},
//tab名称
fearthStatus
:
{
type
:
String
,
default
:
''
}
,
//父组件状态,新增、修改
fnaFormBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
//多个字典值数据
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
//多个字典值数据
anchorContainer
:
{
type
:
String
,
default
:
''
},
//锚点滚动容器
tabIndex
:
{
type
:
[
String
,
Number
],
default
:
''
}
//tab索引
})
const
emit
=
defineEmits
([
'handleSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const
{
sys_no_yes
}
=
proxy
.
useDict
(
'sys_no_yes'
)
const
fanContainerRef
=
ref
(
null
)
const
loading
=
ref
(
false
)
const
fanFormRef
=
ref
(
null
)
const
errorFields
=
ref
([])
// 存储校验失败的字段信息
...
...
@@ -465,61 +342,70 @@ const {
tempFanFormValue
,
tempFanFormData
}
=
toRefs
(
data
)
const
changeCheck
=
(
father
,
child
)
=>
{
if
(
child
.
key
==
'liquidAssetType'
)
{
resetShow
(
'otherLiquidAsset'
,
form
.
value
[
father
.
key
][
child
.
key
].
includes
(
'G'
))
}
}
const
changeOpenStatus
=
father
=>
{
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'familyMembers'
&&
section
.
key
==
father
.
key
&&
section
.
moudleType
==
'family'
)
{
section
.
isOpen
=
!
father
.
isOpen
}
if
(
section
.
moudleType
==
'finance'
&&
father
.
key
!==
'familyMembers'
)
{
section
.
isOpen
=
!
father
.
isOpen
}
const
handleRemoteSelectChange
=
(
row
,
column
)
=>
{
console
.
log
(
row
,
column
)
// 通过保险公司查保险种类 row中收集了insurer的值
if
(
column
.
prop
==
'insurer'
)
{
}
processedFanFormData
.
value
=
processedData
console
.
log
(
'processedFanFormData.value'
,
processedFanFormData
.
value
)
}
const
disabledDate
=
time
=>
{
return
time
.
getTime
()
>
Date
.
now
()
}
// 搜索方法
const
searchSelectList
=
async
(
query
,
fieldKey
)
=>
{
// 设置该字段的加载状态
searchLoadingStates
.
value
[
fieldKey
]
=
true
let
queryString
=
query
.
trim
()
try
{
// 根据不同的字段key调用不同的API
if
(
fieldKey
===
'accountName'
)
{
const
params
=
{
tenantBizId
:
userStore
.
projectInfo
.
tenantBizId
,
realName
:
query
.
trim
(),
if
(
fieldKey
===
'brokerName'
)
{
const
params5
=
{
pageNo
:
1
,
pageSize
:
10
pageSize
:
10
,
queryContent
:
queryString
}
const
response
=
await
listTenantUser
(
params
)
if
(
response
.
code
==
200
)
{
let
result
=
processUserName
(
response
.
data
.
records
)
result
=
result
.
map
(
item
=>
{
const
response5
=
await
getUserSaleExpandList
(
params5
)
if
(
response5
.
code
==
200
)
{
response5
.
data
.
records
=
response5
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
realName
,
value
:
item
.
userSaleBizId
}
})
searchOptions
.
value
[
fieldKey
]
=
response5
.
data
.
records
}
}
else
if
(
fieldKey
===
'brokerTeam'
)
{
const
params8
=
{
pageNo
:
1
,
pageSize
:
10
,
teamName
:
queryString
}
const
response8
=
await
getAllTeam
(
params8
)
if
(
response8
.
code
==
200
)
{
response8
.
data
.
records
=
response8
.
data
.
records
.
map
(
item
=>
{
return
{
value
:
item
.
userBizId
,
label
:
item
.
showName
...
item
,
label
:
item
.
teamName
,
value
:
item
.
teamBizId
}
})
searchOptions
.
value
[
fieldKey
]
=
result
searchOptions
.
value
[
fieldKey
]
=
response8
.
data
.
records
}
}
else
if
(
fieldKey
===
'insurer'
)
{
const
params9
=
{
pageNo
:
1
,
pageSize
:
10
,
queryContent
:
queryString
}
const
response9
=
await
getInsuranceCompany
(
params9
)
if
(
response9
.
code
==
200
)
{
response9
.
data
.
records
=
response9
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
fullName
,
value
:
item
.
insuranceCompanyBizId
}
})
searchOptions
.
value
[
fieldKey
]
=
response9
.
data
.
records
}
// 可以添加其他字段的处理,可以放其他的字段得请求,目前只有accountName,以后有了其他的在填充
else
if
(
fieldKey
===
'otherField'
)
{
console
.
log
(
'otherField'
)
}
}
catch
(
error
)
{
console
.
error
(
`
${
fieldKey
}
搜索失败`
,
error
)
...
...
@@ -529,6 +415,10 @@ const searchSelectList = async (query, fieldKey) => {
}
}
const
disabledDate
=
time
=>
{
return
time
.
getTime
()
>
Date
.
now
()
}
// 获取字典数据
const
fetchDictData
=
dictType
=>
{
let
options
=
[]
...
...
@@ -569,36 +459,13 @@ const processFormData = async () => {
form
.
value
[
section
.
key
]
=
{}
}
if
(
section
.
data
)
{
for
(
const
formKey
in
form
.
value
)
{
if
(
section
.
key
==
formKey
)
{
if
(
section
.
dataLength
)
{
for
(
let
i
=
1
;
i
<
section
.
dataLength
;
i
++
)
{
section
.
data
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
section
.
data
[
0
])))
form
.
value
[
formKey
].
push
(
JSON
.
parse
(
JSON
.
stringify
(
section
.
data
[
0
])))
}
}
for
(
const
field
of
section
.
data
)
{
// 为下拉搜索框加options
if
(
field
.
domType
==
'SearchSelect'
)
{
if
(
field
.
key
==
'accountName'
)
{
searchOptions
.
value
[
field
.
key
]
=
dictStore
.
tenantUserList
}
}
if
(
section
.
key
==
formKey
&&
field
.
children
)
{
for
(
const
child
of
field
.
children
)
{
if
(
child
.
dictType
)
{
child
.
options
=
fetchDictData
(
child
.
dictType
)
if
(
child
.
dictType
==
'sys_no_yes'
)
{
noYesList
.
value
=
child
.
options
}
}
if
(
props
.
fnaFormBizId
)
{
child
.
disabled
=
true
}
else
{
child
.
disabled
=
false
}
}
}
// if (field.domType == 'SearchSelect') {
// if (field.key == 'accountName') {
// searchOptions.value[field.key] = dictStore.tenantUserList
// }
// }
if
(
field
.
dictType
)
{
// 获取字典数据
field
.
options
=
fetchDictData
(
field
.
dictType
)
...
...
@@ -606,35 +473,23 @@ const processFormData = async () => {
noYesList
.
value
=
field
.
options
}
}
//
/*
1.没有嵌套子级的也就是没有children的数据加rules,根据data中的required字段判断是否必填
2.有嵌套子级的也就是有children的数据,根据children中的required字段判断是否必填,现在没这个需求,所以先注释
*/
if
(
field
.
required
&&
section
.
child
==
'no'
)
{
rules
.
value
[
section
.
key
][
field
.
key
]
=
[
if
(
field
.
required
)
{
rules
.
value
[
field
.
key
]
=
[
{
required
:
true
,
message
:
`
${
field
.
label
}
不能为空`
,
trigger
:
'blur'
}
]
}
if
(
props
.
fnaFormBizId
)
{
field
.
disabled
=
true
}
else
{
if
(
field
.
key
==
'customerName'
&&
section
.
key
==
'personalData'
)
{
form
.
value
[
'personalData'
][
field
.
key
]
=
props
.
customerInfo
.
firstNamePinyin
}
field
.
disabled
=
false
}
}
if
(
section
.
child
==
'yes'
)
{
form
.
value
[
formKey
]
=
section
.
data
//便于表单收集值
}
}
}
}
}
if
(
props
.
fnaFormBizId
)
{
getFanformInfo
(
props
.
fnaFormBizId
,
processedData
)
editStatus
.
value
=
true
//
getFanformInfo(props.fnaFormBizId, processedData)
//
editStatus.value = true
}
else
{
// tab切走在切回来时,表单会重置,所以这里需要把表单的值赋回去
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
...
...
@@ -649,67 +504,55 @@ const processFormData = async () => {
}
editStatus
.
value
=
false
loading
.
value
=
false
console
.
log
(
'processedFanFormData.value'
,
processedFanFormData
.
value
)
}
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
}
// 添加表单子级dom
const
addChildren
=
father
=>
{
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
let
obj
=
{
type
:
'4'
,
childTitle
:
'儿女'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
delete
:
true
,
//是否显示删除按钮
age
:
''
,
needProvide
:
''
,
options
:
noYesList
.
value
let
obj1
=
{
brokerName
:
''
,
brokerGender
:
''
,
brokerNumber
:
''
,
brokerTeam
:
''
,
brokerRatio
:
''
,
remark
:
''
}
let
obj2
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
policyholderRel
:
''
,
dependantAge
:
''
}
let
obj3
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
insurer
:
''
,
insuranceType
:
''
,
sumInsured
:
''
,
policyIssueDate
:
''
,
currency
:
''
,
options
:
fetchDictData
(
'bx_currency_type'
)
policyIssueDate
:
''
}
let
obj3
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
let
obj4
=
{
propertyType
:
''
,
address
:
''
,
currency
:
''
,
marketValue
:
''
,
options
:
fetchDictData
(
'bx_currency_type'
)
}
let
obj4
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
taxCountry
:
''
,
taxNumber
:
''
currency
:
''
}
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'
familyMembers
'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj
)
if
(
father
.
key
==
'
brokerList
'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj
1
)
}
if
(
father
.
key
==
'
existingSecurityOwner
'
&&
section
.
key
==
father
.
key
)
{
if
(
father
.
key
==
'
dependantList
'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj2
)
}
if
(
father
.
key
==
'existingSecurityInsured'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj2
)
}
if
(
father
.
key
==
'investment'
&&
section
.
key
==
father
.
key
)
{
if
(
father
.
key
==
'existingSecurityOwner'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj3
)
}
if
(
father
.
key
==
'primaryResidence'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj3
)
}
if
(
father
.
key
==
'taxList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj4
)
}
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
push
(
obj
)
processedFanFormData
.
value
=
processedData
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
...
...
@@ -1116,6 +959,15 @@ function getFanformInfo(fnaFormBizId, formData) {
}
})
}
const
anchorList
=
computed
(()
=>
{
let
data
=
[]
for
(
const
section
of
processedFanFormData
.
value
)
{
if
(
section
.
showMoudle
)
{
data
.
push
({
title
:
section
.
anchorKey
,
name
:
section
.
fatherTitle
})
}
}
return
data
})
watch
(
fanFormRef
,
newVal
=>
{
if
(
newVal
)
{
for
(
const
key
in
rules
.
value
)
{
...
...
@@ -1128,20 +980,30 @@ watch(fanFormRef, newVal => {
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
fanContainerRef
.
value
=
null
tempFanFormValue
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
tempFanFormData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
if
(
newVal
===
'fnaform'
)
{
openList
.
value
=
false
setTimeout
(()
=>
{
processFormData
()
}
,
500
)
}
}
)
</
script
>
<
style
lang=
"scss"
scoped
>
.dependNum
{
font-size
:
14px
;
font-weight
:
none
;
margin-left
:
10px
;
}
.customCheckBox
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
}
.domEmpty
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -1267,6 +1129,12 @@ watch(
.formFna
:deep
(
.el-checkbox
)
{
margin-right
:
10px
;
}
.selfStyle
:deep
(
.el-form-item--label-top
.el-form-item__label
)
{
text-align
:
none
!important
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
}
/* @media only screen and (min-width: 768px) {
.formInput {
...
...
src/views/sign/FnaList/edit.vue
View file @
3f5ee310
...
...
@@ -86,22 +86,22 @@
<Customer
v-if=
"tab.name === 'customer'"
:activeName=
"activeName"
:fearthStatus=
"route.query.type"
:customerBizId=
"processInfo.customerBizId"
@
handleSuccess=
"handleSuccess"
:tabPaneRef=
"tabPaneRef"
:tabIndex=
"tabsList.findIndex(t => t.name === 'customer')"
anchorContainer=
".tabPaneBox"
tabSource=
"customer"
/>
<div
v-if=
"tab.name === 'fnaform'"
>
<FanForm
:activeName=
"activeName"
:fearthStatus=
"route.query.type"
:fnaFormBizId=
"processInfo.fnaFormBizId"
:customerBizId=
"processInfo.customerBizId"
:dictTypeLists=
"dictTypeLists"
:customerInfo=
"customerInfo"
@
handleSuccess=
"handleSuccess"
:tabIndex=
"tabsList.findIndex(t => t.name === 'fnaform')"
anchorContainer=
".tabPaneBox"
/>
</div>
<div
v-if=
"tab.name === 'appointment'"
>
...
...
@@ -133,7 +133,11 @@ import {
getInsuranceProductList
,
getAdditionalProductList
,
getBankList
,
getUserSaleExpandList
getUserSaleExpandList
,
secondAdditonalList
,
getAllSignList
,
getAllTeam
,
getInsuranceCompany
}
from
'@/api/common'
import
Customer
from
'./components/customer'
import
FanForm
from
'./components/fanForm'
...
...
@@ -258,7 +262,6 @@ const getDictsData = async () => {
}
const
response4
=
await
getBankList
(
params4
)
if
(
response4
.
code
==
200
)
{
response4
.
data
.
records
=
response4
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
...
...
@@ -274,7 +277,6 @@ const getDictsData = async () => {
}
const
response5
=
await
getUserSaleExpandList
(
params5
)
if
(
response5
.
code
==
200
)
{
response5
.
data
.
records
=
response5
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
...
...
@@ -284,6 +286,70 @@ const getDictsData = async () => {
})
dictStore
.
setUserSaleExpandList
(
response5
.
data
.
records
)
}
const
params6
=
{
pageNo
:
1
,
pageSize
:
99999
,
projectBizId
:
userStore
.
projectInfo
.
projectBizId
,
tenantBizId
:
userStore
.
projectInfo
.
tenantBizId
,
fieldBizId
:
'field_olk1qZe81qHHKXbw'
,
fieldValueBizId
:
'field_value_yXzTigvgUdRMFpoR'
}
const
response6
=
await
secondAdditonalList
(
params6
)
if
(
response6
.
code
==
200
)
{
response6
.
data
.
records
=
response6
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
title
,
value
:
item
.
productLaunchBizId
}
})
dictStore
.
setProductAdditionalList
(
response6
.
data
.
records
)
}
const
params7
=
{
pageNo
:
1
,
pageSize
:
99999
}
const
response7
=
await
getAllSignList
(
params7
)
if
(
response7
.
code
==
200
)
{
response7
.
data
.
records
=
response7
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
realName
,
value
:
item
.
userSignBizId
}
})
dictStore
.
setSignPeopleList
(
response7
.
data
.
records
)
}
const
params8
=
{
pageNo
:
1
,
pageSize
:
99999
}
const
response8
=
await
getAllTeam
(
params8
)
if
(
response8
.
code
==
200
)
{
response8
.
data
.
records
=
response8
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
teamName
,
value
:
item
.
teamBizId
}
})
dictStore
.
setAllTeaList
(
response8
.
data
.
records
)
}
const
params9
=
{
pageNo
:
1
,
pageSize
:
99999
}
const
response9
=
await
getInsuranceCompany
(
params9
)
if
(
response9
.
code
==
200
)
{
response9
.
data
.
records
=
response9
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
fullName
,
value
:
item
.
insuranceCompanyBizId
}
})
dictStore
.
setAllInsuranceCompanyList
(
response9
.
data
.
records
)
}
// 请求每个流程中所涉及到的字典值数据
proxy
.
useDictLists
([
'csf_employment'
,
...
...
@@ -311,7 +377,8 @@ const getDictsData = async () => {
'wj_question_first_category'
,
'wj_question_second_category'
,
'csf_ap_policy_transfer'
,
'md_bank'
'md_bank'
,
'csf_property_type'
])
}
...
...
@@ -354,7 +421,7 @@ function getProcessInfo(fnaBizId, changeTab) {
// Tab切换前的验证
const
beforeTabLeave
=
(
activeTabName
,
oldTabName
)
=>
{
if
(
processInfo
.
value
.
customerBizId
)
{
getCustomerInfo
(
processInfo
.
value
.
customerBizId
)
//
getCustomerInfo(processInfo.value.customerBizId)
}
// 如果切换到总览,始终允许
if
(
activeTabName
===
'overview'
||
activeTabName
===
'customer'
)
{
...
...
src/views/sign/appointment/appointmentEdit.vue
View file @
3f5ee310
...
...
@@ -117,8 +117,21 @@
:editStatus=
"editStatus"
/>
</div>
<!-- 投保人 -->
<div
v-if=
"tab.name === 'policyholder'"
>
<PolicyHolderInfo
<!-- :customerBizId="processInfo.customerBizId" @handleSuccess="handleSuccess"-->
<Customer
:activeName=
"activeName"
:fatherTabName=
"tabName"
:fatherStatus=
"editStatus"
:affixOffset=
"360"
:tabIndex=
"tabsList.findIndex(t => t.name === 'policyholder')"
anchorContainer=
".appointmentTabPaneBox"
tabSource=
"policyholder"
ref=
"policyHolderInfoRef"
:fatherEditStatus=
"editStatus"
/>
<!--
<PolicyHolderInfo
:activeName=
"activeName"
:formStatus=
"formStatus"
:customerInfo=
"customerInfo"
...
...
@@ -130,10 +143,22 @@
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
/>
-->
</div>
<div
v-if=
"tab.name === 'insurantInfo'"
>
<InsuredInfo
<!-- :customerBizId="processInfo.customerBizId" @handleSuccess="handleSuccess"-->
<Customer
:activeName=
"activeName"
:fatherTabName=
"tabName"
:fatherStatus=
"editStatus"
:affixOffset=
"360"
:tabIndex=
"tabsList.findIndex(t => t.name === 'insurantInfo')"
anchorContainer=
".appointmentTabPaneBox"
tabSource=
"insurantInfo"
ref=
"insuredInfoRef"
:fatherEditStatus=
"editStatus"
/>
<!--
<InsuredInfo
:activeName=
"activeName"
:formStatus=
"formStatus"
:customerInfo=
"customerInfo"
...
...
@@ -146,7 +171,7 @@
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
/>
-->
</div>
<div
v-if=
"tab.name === 'secondHolder'"
>
<SecondHolderInfo
...
...
@@ -317,6 +342,7 @@ import PolicyTransferInfo from './components/policyTransferInfo.vue'
import
FileUpload
from
'./components/fileUpload.vue'
import
HealthInfo
from
'./components/healthInfo.vue'
import
PolicyInfo
from
'@/views/sign/underwritingMain/components/policyInfo'
//新单跟进里的保单信息
import
Customer
from
'@/views/sign/FnaList/components/customer'
import
PolicyFileUpload
from
'@/views/sign/underwritingMain/components/fileUpload.vue'
//新单跟进里的保单附件
import
PolicyBrokerInfo
from
'@/views/sign/underwritingMain/components/brokerInfo.vue'
//新单跟进里的保单附件
import
PolicyMailing
from
'@/views/sign/underwritingMain/components/policyMailing.vue'
//新单跟进里的保单附件
...
...
@@ -339,7 +365,9 @@ import {
getInsuranceProductList
,
getAdditionalProductList
,
getBankList
,
getUserSaleExpandList
getUserSaleExpandList
,
secondAdditonalList
,
getAllSignList
}
from
'@/api/common'
import
{
Check
,
Edit
}
from
'@element-plus/icons-vue'
import
{
ref
,
nextTick
,
onUnmounted
}
from
'vue'
...
...
@@ -384,7 +412,7 @@ const processInfo = ref({
createTime
:
proxy
.
parseTime
(
new
Date
()),
customerName
:
userStore
.
name
})
const
editStatus
=
ref
(
tru
e
)
//编辑状态
const
editStatus
=
ref
(
fals
e
)
//编辑状态
const
execlDialog
=
ref
(
false
)
const
isEmbed
=
ref
(
false
)
//是否作为组件插入
const
policyNo
=
ref
(
''
)
//新单跟进保单号
...
...
@@ -581,7 +609,7 @@ function getAppointmentInfo(appointmentBizId, changeTab) {
processInfo
.
value
.
status
=
item
.
label
}
})
getCustomerInfo
(
res
.
data
.
apiAppointmentInfoDto
.
customerBizId
)
//
getCustomerInfo(res.data.apiAppointmentInfoDto.customerBizId)
if
(
!
appointmentSummeryInfo
.
value
.
apiAppointmentInfoDto
.
appointmentBizId
)
{
showStorage
.
value
=
true
}
...
...
@@ -708,6 +736,40 @@ const getDictsData = async () => {
})
dictStore
.
setUserSaleExpandList
(
response5
.
data
.
records
)
}
const
params6
=
{
pageNo
:
1
,
pageSize
:
99999
,
projectBizId
:
userStore
.
projectInfo
.
projectBizId
,
tenantBizId
:
userStore
.
projectInfo
.
tenantBizId
,
fieldBizId
:
'field_olk1qZe81qHHKXbw'
,
fieldValueBizId
:
'field_value_yXzTigvgUdRMFpoR'
}
const
response6
=
await
secondAdditonalList
(
params6
)
if
(
response6
.
code
==
200
)
{
response6
.
data
.
records
=
response6
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
title
,
value
:
item
.
productLaunchBizId
}
})
dictStore
.
setProductAdditionalList
(
response6
.
data
.
records
)
}
const
params7
=
{
pageNo
:
1
,
pageSize
:
99999
}
const
response7
=
await
getAllSignList
(
params7
)
if
(
response7
.
code
==
200
)
{
response7
.
data
.
records
=
response7
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
realName
,
value
:
item
.
userSignBizId
}
})
dictStore
.
setSignPeopleList
(
response7
.
data
.
records
)
}
proxy
.
useDictLists
([
'csf_employment'
,
'sys_no_yes'
,
...
...
@@ -740,54 +802,6 @@ const getDictsData = async () => {
}
// Tab切换前的验证
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
}
...
...
@@ -808,15 +822,15 @@ const isObject = value => {
}
const
handleSubmit
=
async
type
=>
{
// 提交得时候要拿到各个步骤得表单数据
if
(
appointmentInfoRef
.
value
)
{
const
result
=
await
appointmentInfoRef
.
value
[
0
].
handleFormValues
()
submitAppointmentObj
.
value
.
apiAppointmentInfoDto
=
result
if
(
!
submitAppointmentObj
.
value
.
apiAppointmentInfoDto
)
return
}
//
if (appointmentInfoRef.value) {
//
const result = await appointmentInfoRef.value[0].handleFormValues()
//
submitAppointmentObj.value.apiAppointmentInfoDto = result
//
if (!submitAppointmentObj.value.apiAppointmentInfoDto) return
//
}
if
(
productPlanRef
.
value
)
{
submitAppointmentObj
.
value
.
apiProductPlanInfoDto
=
productPlanRef
.
value
[
0
].
handleSubmitForm
()
}
//
if (productPlanRef.value) {
//
submitAppointmentObj.value.apiProductPlanInfoDto = productPlanRef.value[0].handleSubmitForm()
//
}
if
(
policyHolderInfoRef
.
value
)
{
submitAppointmentObj
.
value
.
apiPolicyholderInfoDto
=
policyHolderInfoRef
.
value
[
0
].
handleFormValues
()
...
...
@@ -824,6 +838,7 @@ const handleSubmit = async type => {
if
(
insuredInfoRef
.
value
)
{
submitAppointmentObj
.
value
.
apiInsurantInfoDto
=
insuredInfoRef
.
value
[
0
].
handleFormValues
()
}
return
if
(
secondHolderInfoRef
.
value
)
{
submitAppointmentObj
.
value
.
apiSecondHolderInfoDto
=
secondHolderInfoRef
.
value
[
0
].
handleFormValues
()
...
...
@@ -832,7 +847,7 @@ const handleSubmit = async type => {
submitAppointmentObj
.
value
.
apiBeneficiaryInfoDtoList
=
beneficiaryInfoRef
.
value
[
0
].
handleFormValues
()
}
//
return
return
// 代表新增预约
if
(
formStatus
.
value
==
'appointmentAdd'
&&
!
idsObj
.
value
.
appointmentBizId
)
{
submitAppointmentObj
.
value
.
apiAppointmentInfoDto
.
customerBizId
=
...
...
@@ -913,7 +928,6 @@ const handleSubmit = async type => {
// 编辑预约单
editAppointmentDetail
(
submitAppointmentObj
.
value
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// getAppointmentInfo(idsObj.value.appointmentBizId)
appointmentInfoRef
.
value
[
0
].
handleEditStatus
(
true
)
productPlanRef
.
value
[
0
].
handleEditStatus
(
true
)
policyHolderInfoRef
.
value
[
0
].
handleEditStatus
(
true
)
...
...
@@ -991,7 +1005,7 @@ watch(
//代表是新增预约状态
if
(
!
idsObj
.
value
.
appointmentBizId
)
{
formStatus
.
value
=
'appointmentAdd'
getCustomerInfo
(
props
.
processDetail
.
customerBizId
)
//
getCustomerInfo(props.processDetail.customerBizId)
tabsList
.
value
=
[
{
...
...
@@ -1151,7 +1165,7 @@ const getPolicyDetail = tabName => {
}
if
(
route
.
query
.
source
==
'policyList'
)
{
idsObj
.
value
.
policyBizId
=
route
.
query
.
policyBizId
getCustomerInfo
(
props
.
policyDetailInfo
.
customerBizId
)
//
getCustomerInfo(props.policyDetailInfo.customerBizId)
appointmentSummeryInfo
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
policyDetailInfo
))
if
(
appointmentSummeryInfo
.
value
.
apiProductPlanInfoDto
)
{
appointmentSummeryInfo
.
value
.
apiAppointmentInfoDto
=
JSON
.
parse
(
...
...
src/views/sign/appointment/components/appointmentInfo.vue
View file @
3f5ee310
...
...
@@ -60,19 +60,32 @@
/>
</el-select>
<!-- 带时分的时间框 -->
<div
v-if=
"child.domType === 'datetimePicker'"
class=
"compositionDateTime"
>
<el-date-picker
v-model=
"form[child.key]"
type=
"date"
placeholder=
"选择日期"
style=
"width: 100%"
v-if=
"child.domType === 'datetimePicker'"
:type=
"child.timeType || 'datetime'"
:placeholder=
"child.placeholder"
v-model=
"form[child.key]"
:disabled=
"editStatus"
@
change=
"handleDateChange(child)"
:disabled-date=
"time => disabledDate(time, child)"
format=
"YYYY-MM-DD HH:mm
"
value-format=
"YYYY-MM-DD HH:mm:ss
"
format=
"YYYY-MM-DD
"
value-format=
"YYYY-MM-DD
"
@
clear=
"handleDateClear(child)"
/>
<span
class=
"text-gray-500"
>
-
</span>
<el-time-picker
placeholder=
"选择时分"
style=
"width: 100%"
v-model=
"child.timeValue"
:disabled=
"editStatus"
format=
"HH:mm"
value-format=
"HH:mm"
/>
</div>
<!-- 不带时分 -->
<el-date-picker
style=
"width: 100%"
...
...
@@ -217,6 +230,105 @@
</
template
>
</el-table-column>
</template>
<
template
v-if=
"father.key == 'userSignDtoList'"
>
<el-table-column
label=
"姓名"
prop=
"name"
align=
"center"
>
<template
#
header
>
<span
class=
"required-label"
>
姓名
</span>
</
template
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.name"
filterable
remote
reserve-keyword
placeholder=
"请选择"
:remote-method=
"query => searchSelectList(query, 'name')"
:loading=
"searchLoadingStates['name']"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in searchOptions['name'] || []"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"手机号"
prop=
"phone"
align=
"center"
>
<
template
#
header
>
<span
class=
"required-label"
>
手机号
</span>
</
template
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.phone"
size=
"default"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"执业编码"
prop=
"practiceCode"
align=
"center"
>
<
template
#
header
>
<span
class=
"required-label"
>
执业编码
</span>
</
template
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.practiceCode"
size=
"default"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"邮箱"
prop=
"email"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.email"
size=
"default"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"证件类型"
prop=
"cardType"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.cardType"
placeholder=
"请选择"
:disabled=
"editStatus"
clearable
>
<el-option
v-for=
"item in fetchDictData('csf_id_type')"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"证件号"
prop=
"cardNo"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.cardNo"
size=
"default"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
width=
"60px"
align=
"center"
label=
"操作"
>
<
template
#
default=
"scope"
>
<el-icon
@
click=
"deleteChildren(father, scope.$index)"
class=
"deleteIcon"
><Delete
/></el-icon>
</
template
>
</el-table-column>
</template>
</el-table>
</el-row>
</template>
...
...
@@ -224,20 +336,6 @@
</div>
</el-row>
</div>
<!-- <el-row v-if="props.idsObj.appointmentBizId">
<el-col>
<div class="tabButton">
<el-button
type="primary"
icon="Check"
@click="submitForm"
size="large"
:disabled="editStatus"
>提交</el-button
>
</div>
</el-col>
</el-row> -->
</el-form>
</template>
</CommonForm>
...
...
@@ -263,35 +361,6 @@
@
close=
"handleCloseDrawer"
@
confirmCountry=
"confirmDrawer"
/>
<!-- <CommonDialog
dialogTitle="签约信息错误提示"
confirmText="下载行程单"
cancleText="关闭"
dialogWidth="70%"
:openDialog="showError"
@close="showError = false"
>
<div class="dialogBox">
<div class="dialogItem" v-for="item in detailData">
<div class="dialogItemTitle">{{ item.title }}</div>
<DetailPanel
:data="item.data"
:row-span="24"
col-gap="10px"
label-width="120px"
row-height="45px"
:show-col-border="true"
/>
</div>
<div class="remarkBOx">
<div class="remarkTitle">备注</div>
<div class="remarkContent" v-if="appointmentSummeryInfo.remark">
{{ appointmentSummeryInfo.remark }}
</div>
<div class="remarkEmpty" v-else>暂无备注</div>
</div>
</div>
</CommonDialog> -->
</div>
</template>
<
script
setup
name=
"appointmentInfo"
>
...
...
@@ -303,9 +372,8 @@ import Phone from '@/views/components/phone'
import
Address
from
'@/views/components/address'
import
{
watch
,
nextTick
}
from
'vue'
import
{
getCustomerDetail
}
from
'@/api/sign/fna'
import
{
editAppointmentInfo
,
newPolicy
}
from
'@/api/sign/appointment'
import
{
getBankList
,
getUserSaleExpandList
}
from
'@/api/common'
import
{
getBankList
,
get
AllSignList
,
get
UserSaleExpandList
}
from
'@/api/common'
import
CommonForm
from
'@/views/components/commonForm'
import
CardOne
from
'@/components/formCard/cardOne'
import
useDictStore
from
'@/store/modules/dict'
...
...
@@ -316,7 +384,7 @@ const props = defineProps({
formStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiAppointmentInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的
预
约信息的详情
apiAppointmentInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的
签
约信息的详情
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
fatherTabName
:
{
type
:
String
,
default
:
''
},
//一级tab名称
...
...
@@ -327,7 +395,6 @@ const props = defineProps({
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
{
proxy
}
=
getCurrentInstance
()
const
appointmentRef
=
ref
(
null
)
// const anchorList = ref([]) //锚点列表
const
showPhoneDrawer
=
ref
(
false
)
//电话抽屉开关
const
showAddressDrawer
=
ref
(
false
)
//地址抽屉开关
const
showCountryDrawer
=
ref
(
false
)
//国家/地区抽屉开关
...
...
@@ -422,18 +489,31 @@ const addChildren = father => {
phone
:
''
,
realName
:
''
}
let
obj5
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
span
:
24
,
//栅格布局份数
name
:
''
,
//姓名
practiceCode
:
''
,
//执业编码
phone
:
''
,
//手机号
cardType
:
''
,
//证件类型
cardNo
:
''
,
//证件号码
email
:
''
//邮箱
}
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'referrerDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj4
)
}
if
(
father
.
key
==
'userSignDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj5
)
}
}
//更新form表单对应的数据,以便收集填写的值
// form.value[father.key].push(obj)
processedAppointmentData
.
value
=
processedData
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
if
(
editStatus
.
value
)
{
if
(
props
.
editStatus
.
value
)
{
proxy
.
$modal
.
confirm
(
`请先点击编辑再进行删除操作`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
return
}
...
...
@@ -442,6 +522,9 @@ const deleteChildren = (father, childIndex) => {
if
(
father
.
key
==
'referrerDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
splice
(
childIndex
,
1
)
}
if
(
father
.
key
==
'userSignDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
splice
(
childIndex
,
1
)
}
}
processedAppointmentData
.
value
=
processedData
}
...
...
@@ -486,6 +569,23 @@ const searchSelectList = async (query, key) => {
})
searchOptions
.
value
[
key
]
=
response5
.
data
.
records
}
}
else
if
(
key
==
'name'
)
{
const
params5
=
{
pageNo
:
1
,
pageSize
:
10
,
realName
:
queryString
}
const
response5
=
await
getAllSignList
(
params5
)
if
(
response5
.
code
==
200
)
{
response5
.
data
.
records
=
response5
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
realName
,
value
:
item
.
userSignBizId
}
})
searchOptions
.
value
[
key
]
=
response5
.
data
.
records
}
}
}
catch
(
error
)
{
console
.
error
(
` 搜索失败`
,
error
)
...
...
@@ -563,8 +663,7 @@ const handleDateChange = child => {
resetShow
({
type
:
'child'
,
key
:
'openAccountEndTime'
,
status
:
false
,
flag
:
'disabled'
})
disabledDate
(
form
.
value
[
'openAccountStartTime'
],
{
key
:
'openAccountEndTime'
})
}
// resetShow({ type: 'child', key: 'departureTime', status: false, flag: 'disabled' })
// disabledDate(form.value['arrivalTime'], { key: 'departureTime' })
// 离港时间在到港时间之前
if
(
child
.
key
==
'arrivalTime'
&&
...
...
@@ -1099,23 +1198,17 @@ const handleFormValues = () => {
}
})
}
if
(
submitObj
[
'departureTime'
])
{
// 开始时间是否在结束时间之前
if
(
submitObj
[
'arrivalTime'
]
&&
!
dayjs
(
submitObj
[
'arrivalTime'
]).
isBefore
(
dayjs
(
submitObj
[
'departureTime'
]))
)
{
errorFields
.
value
.
push
({
message
:
'预约信息模块--离港时间必须晚于到港时间!!'
})
return
undefined
}
}
let
obj
=
{
realName
:
'转介人姓名'
,
phone
:
'转介人手机'
,
email
:
'转介人邮箱'
}
let
obj1
=
{
name
:
'签单员姓名'
,
phone
:
'签单员电话'
,
practiceCode
:
'签单员执业编码'
}
processedAppointmentData
.
value
.
forEach
(
item
=>
{
if
(
item
.
key
==
'referrerDtoList'
)
{
if
(
form
.
value
[
'isReferrerAccompany'
]
==
1
&&
item
.
data
.
length
>
0
)
{
...
...
@@ -1130,7 +1223,7 @@ const handleFormValues = () => {
for
(
const
key
in
item1
)
{
if
(
!
item1
[
key
])
{
errorFields
.
value
.
push
({
message
:
`第
${
index
+
1
}
行
${
obj
[
key
]}
不能为空`
message
:
`
陪同转介人-
第
${
index
+
1
}
行
${
obj
[
key
]}
不能为空`
})
}
}
...
...
@@ -1142,11 +1235,61 @@ const handleFormValues = () => {
})
}
else
if
(
form
.
value
[
'isReferrerAccompany'
]
==
1
&&
item
.
data
.
length
==
0
)
{
errorFields
.
value
.
push
({
message
:
'预约信息模块--转介人陪同时,陪同转介人信息不能为空!!'
message
:
'签约信息模块--转介人陪同时,陪同转介人信息不能为空!!'
})
}
}
if
(
item
.
key
==
'position'
)
{
item
.
data
.
forEach
((
item1
,
index
)
=>
{
if
(
item1
.
compositionTime
)
{
if
(
item1
.
timeValue
)
{
submitObj
[
item1
.
key
]
=
form
.
value
[
item1
.
key
]
+
' '
+
item1
.
timeValue
+
':00'
}
else
{
submitObj
[
item1
.
key
]
=
form
.
value
[
item1
.
key
]
+
' 00:00:00'
}
}
})
}
if
(
item
.
key
==
'userSignDtoList'
&&
item
.
data
.
length
>
0
)
{
submitObj
[
'userSignDtoList'
]
=
item
.
data
.
map
((
item1
,
index
)
=>
{
if
(
item1
.
name
)
{
searchOptions
.
value
[
'name'
].
forEach
(
item2
=>
{
if
(
item1
.
name
==
item2
.
userSignBizId
)
{
item1
.
name
=
item2
.
realName
}
})
}
for
(
const
key
in
item1
)
{
if
(
!
item1
[
key
])
{
errorFields
.
value
.
push
({
message
:
`签单员-第
${
index
+
1
}
行
${
obj1
[
key
]}
不能为空`
})
}
}
return
{
name
:
item1
.
name
,
phone
:
item1
.
phone
,
email
:
item1
.
email
,
practiceCode
:
item1
.
practiceCode
,
cardType
:
item1
.
cardType
,
cardNo
:
item1
.
cardNo
}
})
}
})
console
.
log
(
'submitObj'
,
submitObj
)
if
(
submitObj
[
'departureTime'
])
{
// 开始时间是否在结束时间之前
if
(
submitObj
[
'arrivalTime'
]
&&
!
dayjs
(
submitObj
[
'arrivalTime'
]).
isBefore
(
dayjs
(
submitObj
[
'departureTime'
]))
)
{
errorFields
.
value
.
push
({
message
:
'签约信息模块--离港时间必须晚于到港时间!!'
})
// return undefined
}
}
if
(
errorFields
.
value
.
length
>
0
)
{
proxy
.
$message
.
error
(
errorFields
.
value
[
0
].
message
)
...
...
@@ -1337,6 +1480,11 @@ defineExpose({
font-size
:
18px
;
padding-top
:
10px
;
}
.compositionDateTime
{
display
:
flex
;
width
:
100%
;
box-sizing
:
border-box
;
}
@media
only
screen
and
(
min-width
:
768px
)
{
.formBtn
{
margin-top
:
0
!important
;
...
...
src/views/sign/appointment/components/productPlan.vue
View file @
3f5ee310
<
template
>
<!-- 只画好了样式具体的逻辑还没处理 -->
<div
v-if=
"processedProductData.length > 0"
>
<div
ref=
"productRef"
>
<!--
<el-row>
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
v-if=
"props.showSubmitBtn"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
>
编辑
</el-button
>
</div>
</el-col>
</el-row>
-->
<CommonForm
:anchorList=
"anchorList"
:affixOffset=
"360"
...
...
@@ -122,7 +110,7 @@
icon=
"Plus"
size=
"small"
style=
"margin-bottom: 10px"
@
click=
"addChildren(father
, scope.$index
)"
@
click=
"addChildren(father)"
>
{{ father.addChildrenTxt }}
</el-button
>
</el-col>
...
...
@@ -141,56 +129,50 @@
</template>
</el-table>
</el-row>
<!-- 有子孙的dom -->
<!-- <el-row v-if="father.child == 'yes' && father.data.length > 0" :gutter="20">
<template v-for="(child, childIndex) in father.data" :key="child.id">
<el-col :span="child.span">
<div
class="childLabel"
v-if="father.key == 'apiProductPlanAdditionalInfoDtoList'"
@click="deleteChildren(father, childIndex)"
>
<span>{{ `${child.childTitle}-${childIndex + 1}` }}</span>
<el-icon
v-if="child.deleteBtn"
style="color: red; font-size: 18px; margin-left: 10px"
><Delete
/></el-icon>
</template>
</CardOne>
</div>
</el-col>
<template v-for="grandchildren in child.children" :key="grandchildren.key">
<el-col
:sm="grandchildren.sm"
:lg="grandchildren.lg"
class="formItem"
v-if="
grandchildren.show && form[father.key] && form[father.key][childIndex]
"
</el-row>
</el-form>
</template>
</CommonForm>
</div>
<CommonDialog
:dialogTitle=
"dialogTitle"
confirmText=
"确定"
cancleText=
"关闭"
dialogWidth=
"70%"
:showClose=
"true"
:openDialog=
"dialogVisible"
@
close=
"dialogVisible = false"
>
<div
class=
"dialogBox"
>
<el-form>
<el-row
:gutter=
"20"
>
<
template
v-for=
"(child, dIndex) in additionalProductForm"
>
<el-col
:sm=
"child.sm"
:lg=
"child.lg"
class=
"formItem"
>
<el-form-item
:label="grandchildren
.label"
:prop="grandchildren
.key"
:key="grandchildren
.key"
:label-width="grandchildren
.labelWidth"
:label-position="grandchildren
.labelPosition"
:label=
"child
.label"
:prop=
"child
.key"
:key=
"child
.key"
:label-width=
"child
.labelWidth"
:label-position=
"child
.labelPosition"
>
<el-input
v-if="grandchildren
.domType === 'Input'"
:type="grandchildren
.inputType"
v-model="form[father.key][childIndex][grandchildren.key]
"
:placeholder="grandchildren
.placeholder"
v-if=
"child
.domType === 'Input'"
:type=
"child
.inputType"
v-model=
"child.value
"
:placeholder=
"child
.placeholder"
maxlength=
"30"
:disabled="grandchildren.disabled"
/>
<el-select
v-if="grandchildren.domType === 'Select'"
v-model="form[father.key][childIndex][grandchildren.key]"
:placeholder="grandchildren.placeholder"
:disabled="grandchildren.disabled"
v-if=
"child.domType === 'Select'"
v-model=
"child.value"
:placeholder=
"child.placeholder"
>
<el-option
v-for="item in grandchildren
.options"
v-for=
"item in child
.options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
...
...
@@ -198,25 +180,24 @@
</el-select>
<el-date-picker
style=
"width: 100%"
v-if="grandchildren
.domType === 'DatePicker'"
v-model="form[father.key][childIndex][grandchildren.key]
"
v-if=
"child
.domType === 'DatePicker'"
v-model=
"child.value
"
type=
"date"
:placeholder="grandchildren.placeholder"
:disabled="grandchildren.disabled"
:placeholder=
"child.placeholder"
/>
<el-select
v-model="form[father.key][childIndex][grandchildren.key]
"
v-if="grandchildren
.domType === 'SearchSelect'"
v-model=
"child.value
"
v-if=
"child
.domType === 'SearchSelect'"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method="query => searchSelectList(query, grandchildren.key
)"
:loading="searchLoadingStates[grandchildren.key]
"
:disabled="grandchildren.disabled
"
@
change=
"handleSearchSelectChange(child.key, dIndex
)"
:remote-method=
"query => searchSelectList(query, child.key)
"
:loading=
"searchLoadingStates[child.key]
"
>
<el-option
v-for="item in searchOptions[grandchildren
.key] || []"
v-for=
"item in searchOptions[child
.key] || []"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
...
...
@@ -225,42 +206,26 @@
</el-form-item>
</el-col>
</
template
>
</template>
</el-row> -->
</template>
</CardOne>
</div>
</el-row>
<el-row
v-if=
"props.showSubmitBtn"
>
<el-col>
<div
class=
"tabButton"
>
<el-button
type=
"success"
icon=
"Check"
@
click=
"submitForm()"
size=
"large"
:disabled=
"editStatus"
>
保存
</el-button
>
</div>
</el-col>
</el-row>
</el-form>
</template>
</CommonForm>
</div>
</CommonDialog>
</div>
</template>
<
script
setup
name=
"customer"
>
import
CommonForm
from
'@/views/components/commonForm'
import
CommonDialog
from
'@/components/commonDialog'
import
CardOne
from
'@/components/formCard/cardOne'
import
useDictStore
from
'@/store/modules/dict'
import
productDomData
from
'@/formJson/productPlan'
import
{
watch
}
from
'vue'
import
{
getInsuranceProductList
,
getAdditionalProductList
}
from
'@/api/common'
import
{
getInsuranceProductList
,
getAdditionalProductList
,
secondAdditonalList
}
from
'@/api/common'
import
{
editProductPlanInfo
,
delAdditional
}
from
'@/api/sign/appointment'
import
{
updatePolicyProduct
,
delPolicyAdditional
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
...
...
@@ -286,15 +251,18 @@ const props = defineProps({
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { sys_no_yes } = proxy.useDict('sys_no_yes')
const
dialogTitle
=
ref
(
'新增'
)
const
dialogVisible
=
ref
(
false
)
const
productRef
=
ref
(
null
)
// 用于存储当前点击的drawer框返回的对象,修改的时候回显值也要存key
const
errorFields
=
ref
([])
// 存储校验失败的字段信息
const
anchorList
=
ref
([])
// 存储校验失败的字段信息
//
const anchorList = ref([]) // 存储校验失败的字段信息
// const editStatus = ref(true) // 表单是否可编辑,若是修改初始不可编辑
const
openList
=
ref
(
false
)
// 客户列表弹窗
const
oldObjInfo
=
ref
({})
// 修改时存储原始数据,便于撤销操作
const
currencyType
=
ref
([])
// 是否列表
const
searchOptions
=
ref
({})
// 存储不同key对应的选项
const
searchLoadingStates
=
ref
({})
// 存储不同key对应的加载状态
const
additionalProductForm
=
ref
([])
// 附加险的表单
const
data
=
reactive
({
form
:
{},
tempForm
:
{},
//由于切换tab的时候,表单数据会重置,所以需要保存一份临时表单数据
...
...
@@ -310,150 +278,15 @@ const data = reactive({
const
{
form
,
rules
,
processedProductData
,
queryParams
,
oldProductDomData
,
tempForm
}
=
toRefs
(
data
)
// 添加表单子级dom
const
addChildren
=
father
=>
{
if
(
editStatus
.
value
)
{
if
(
props
.
editStatus
)
{
proxy
.
$message
.
warning
(
'请先点击编辑'
)
return
}
return
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedProductData
.
value
))
let
obj
=
{
// id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
span
:
24
,
//栅格布局份数
childTitle
:
'附加险'
,
deleteBtn
:
true
,
children
:
[
{
label
:
'产品名称'
,
key
:
'addProductName'
,
domType
:
'SearchSelect'
,
required
:
true
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
labelPosition
:
'top'
,
//标签的位置
lg
:
8
//栅格布局份数
},
{
label
:
'保额'
,
key
:
'sumInsured'
,
domType
:
'Input'
,
inputType
:
'number'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'保费'
,
key
:
'premium'
,
domType
:
'Input'
,
inputType
:
'number'
,
required
:
true
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'保障地区'
,
key
:
'guaranteeRegion'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'货币'
,
key
:
'currency'
,
domType
:
'Select'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
dictType
:
'bx_currency_type'
,
options
:
fetchDictData
(
'bx_currency_type'
),
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'等级'
,
key
:
'insuranceType'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'自付额'
,
key
:
'deductibles'
,
domType
:
'Input'
,
inputType
:
'number'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
12
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'附加保障'
,
key
:
'additionalSafeguards'
,
domType
:
'Input'
,
inputType
:
'textarea'
,
required
:
false
,
maxLength
:
300
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
24
,
//栅格布局份数
lg
:
24
//栅格布局份数
}
]
if
(
father
.
key
==
'apiProductPlanAdditionalInfoDtoList'
)
{
dialogTitle
.
value
=
'新增附加计划'
additionalProductForm
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
father
.
formItem
))
dialogVisible
.
value
=
true
}
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'apiProductPlanAdditionalInfoDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj
)
}
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
push
(
obj
)
processedProductData
.
value
=
processedData
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
if
(
editStatus
.
value
)
{
...
...
@@ -510,33 +343,34 @@ const deleteChildren = (father, childIndex) => {
processedProductData
.
value
=
processedData
}
const
handleSearchSelectChange
=
(
father
,
child
)
=>
{
let
productItem
=
dictStore
.
insureProductList
.
filter
(
item
=>
{
return
item
.
value
==
form
.
value
[
father
.
key
][
child
.
key
]
})
let
options
=
productItem
[
0
].
paymentTerm
.
split
(
','
).
map
(
item
=>
{
return
{
label
:
item
,
value
:
item
}
const
handleSearchSelectChange
=
(
key
,
index
)
=>
{
// 附加计划选择产品后,给供款期数下拉框赋值
if
(
key
==
'productLaunchName'
)
{
additionalProductForm
.
value
.
forEach
(
item
=>
{
searchOptions
.
value
[
'productLaunchName'
].
forEach
(
item1
=>
{
if
(
item1
.
value
==
additionalProductForm
.
value
[
index
][
'value'
])
{
item1
.
apiAttributeSettingDtoList
.
forEach
(
item2
=>
{
if
(
item2
.
attributeSettingBizId
==
'attribute_setting_okpcuc8tlXRfVIAy'
&&
item
.
key
==
'issueNumber'
)
{
if
(
item2
.
value
)
{
item
.
options
=
item2
.
value
.
split
(
/
[
,,;;
\s]
+/
)
.
map
(
item
=>
item
.
trim
())
.
filter
(
item
=>
item
!==
''
)
.
map
(
item
=>
{
return
{
label
:
item
,
value
:
item
}
})
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedProductData
.
value
))
for
(
const
section
of
processedData
)
{
if
(
section
.
key
==
father
.
key
)
{
if
(
section
.
data
)
{
for
(
const
field
of
section
.
data
)
{
if
(
field
.
dictType
&&
field
.
dictType
==
'paymentTerm'
)
{
field
.
options
=
options
}
}
if
(
item
.
options
.
length
>
0
)
item
.
value
=
item
.
options
[
0
].
value
}
}
})
}
if
(
options
.
length
>
0
)
{
form
.
value
[
father
.
key
][
'paymentTerm'
]
=
options
[
0
].
value
})
})
}
processedProductData
.
value
=
processedData
}
// 下拉框搜索方法
// 搜索方法
...
...
@@ -567,20 +401,24 @@ const searchSelectList = async (query, fieldKey) => {
}
}
// 可以添加其他字段的处理,可以放其他的字段得请求,目前只有accountName,以后有了其他的在填充
else
if
(
fieldKey
===
'
addProduct
Name'
)
{
else
if
(
fieldKey
===
'
productLaunch
Name'
)
{
const
params
=
{
productName
:
query
.
trim
(),
pageNo
:
1
,
pageSize
:
10
pageSize
:
10
,
projectBizId
:
userStore
.
projectInfo
.
projectBizId
,
tenantBizId
:
userStore
.
projectInfo
.
tenantBizId
,
fieldBizId
:
'field_olk1qZe81qHHKXbw'
,
fieldValueBizId
:
'field_value_yXzTigvgUdRMFpoR'
}
const
response
=
await
getAdditionalProduct
List
(
params
)
const
response
=
await
secondAdditonal
List
(
params
)
if
(
response
.
code
==
200
)
{
response
.
data
.
records
=
response
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
productNam
e
,
value
:
item
.
additionalProduct
BizId
label
:
item
.
titl
e
,
value
:
item
.
productLaunch
BizId
}
})
searchOptions
.
value
[
fieldKey
]
=
response
.
data
.
records
...
...
@@ -615,7 +453,7 @@ const processFormData = async () => {
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
productDomData
))
for
(
const
section
of
processedData
)
{
anchorList
.
value
.
push
({
title
:
section
.
anchorKey
,
name
:
section
.
fatherTitle
})
//
anchorList.value.push({ title: section.anchorKey, name: section.fatherTitle })
if
(
section
.
fatherRequired
)
{
rules
.
value
[
section
.
key
]
=
{}
}
...
...
@@ -625,6 +463,13 @@ const processFormData = async () => {
}
else
if
(
section
.
keyType
==
'Object'
)
{
form
.
value
[
section
.
key
]
=
{}
}
if
(
section
.
formItem
)
{
section
.
formItem
.
forEach
(
item
=>
{
if
(
item
.
dictType
)
{
item
.
options
=
fetchDictData
(
item
.
dictType
)
}
})
}
if
(
section
.
data
)
{
for
(
const
formKey
in
form
.
value
)
{
if
(
section
.
key
==
formKey
)
{
...
...
@@ -663,7 +508,7 @@ const processFormData = async () => {
/*
1.没有嵌套子级的也就是没有children的数据加rules,根据data中的required字段判断是否必填
*/
if
(
field
.
required
&&
section
.
child
==
'no'
)
{
if
(
field
.
required
)
{
rules
.
value
[
section
.
key
][
field
.
key
]
=
[
{
required
:
true
,
message
:
`
${
field
.
label
}
不能为空`
,
trigger
:
'blur'
}
]
...
...
@@ -706,9 +551,6 @@ const processFormData = async () => {
// editStatus.value = true
// processedProductData.value = processedData
//在流程和预约的时候要调用这个方法回显修改数据
console
.
log
(
'===================================='
)
console
.
log
(
'props.apiProductPlanInfoDto'
,
props
.
apiProductPlanInfoDto
)
console
.
log
(
'===================================='
)
setFormValue
(
props
.
apiProductPlanInfoDto
,
processedData
)
}
else
{
// editStatus.value = false
...
...
@@ -1107,6 +949,15 @@ const submitForm = saveType => {
}
})
}
const
anchorList
=
computed
(()
=>
{
let
data
=
[]
for
(
const
section
of
processedProductData
.
value
)
{
if
(
section
.
showMoudle
)
{
data
.
push
({
title
:
section
.
anchorKey
,
name
:
section
.
fatherTitle
})
}
}
return
data
})
// 因为tab嵌套了两层,所以需要监听父组件的tab否则锚点的显示就会有bug
watch
(
()
=>
props
.
fatherTabName
,
...
...
@@ -1119,6 +970,7 @@ watch(
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
productRef
.
value
=
null
tempForm
.
value
=
{
...
form
.
value
}
if
(
newVal
===
'productPlan'
)
{
openList
.
value
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment