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
e480df9e
Commit
e480df9e
authored
Nov 04, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进详情发布测试
parent
ec72c02e
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
681 additions
and
894 deletions
+681
-894
src/api/sign/underwritingMain.js
+61
-0
src/formJson/policyInfo.js
+109
-110
src/formJson/policyMailing.js
+17
-1
src/formJson/verifyPolicyInfo.js
+2
-2
src/utils/dict.js
+4
-0
src/views/sign/appointment/appointmentEdit.vue
+83
-25
src/views/sign/appointment/components/beneficiaryInfo.vue
+61
-31
src/views/sign/appointment/components/fileUpload.vue
+18
-5
src/views/sign/appointment/components/fnaInfo.vue
+1
-9
src/views/sign/appointment/components/insuredInfo.vue
+38
-18
src/views/sign/appointment/components/policyHolderInfo.vue
+40
-23
src/views/sign/appointment/components/policyTransferInfo.vue
+35
-5
src/views/sign/appointment/components/productPlan.vue
+56
-25
src/views/sign/appointment/components/secondHolderInfo.vue
+31
-18
src/views/sign/underwritingMain/components/brokerInfo.vue
+22
-79
src/views/sign/underwritingMain/components/policyInfo.vue
+27
-198
src/views/sign/underwritingMain/components/policyMailing.vue
+18
-215
src/views/sign/underwritingMain/components/verifyPolicyInfo.vue
+20
-93
src/views/sign/underwritingMain/followUpDetail.vue
+25
-33
src/views/sign/underwritingMain/index.vue
+13
-4
No files found.
src/api/sign/underwritingMain.js
View file @
e480df9e
...
...
@@ -42,6 +42,13 @@ export function getPolicyfollow(policyBizId) {
method
:
'get'
})
}
// 获取新单跟进详情
export
function
getPolicyInfo
(
policyBizId
)
{
return
request
({
url
:
`/csf/api/policy_follow/detail/
${
policyBizId
}
`
,
method
:
'get'
})
}
// 获取新单跟进状态
export
function
getPolicyStatus
(
policyBizId
)
{
return
request
({
...
...
@@ -73,3 +80,57 @@ export function uploadPolicyfollow(data) {
data
:
data
})
}
// 新单跟进详情中的产品计划提交
export
function
updatePolicyProduct
(
data
)
{
return
request
({
url
:
'/csf/api/policy/update'
,
method
:
'post'
,
data
:
data
})
}
// 删除附加险
export
function
delPolicyAdditional
(
id
)
{
return
request
({
url
:
'/csf/api/policy_additional/delete?id='
+
id
,
method
:
'delete'
})
}
// 新单跟进详情中的投保人提交
export
function
updatePolicyholder
(
data
)
{
return
request
({
url
:
'/csf/api/policy/update_policyholder'
,
method
:
'post'
,
data
:
data
})
}
// 新单跟进详情中的受保人提交
export
function
updatePolicyInsurant
(
data
)
{
return
request
({
url
:
'/csf/api/policy/update_policy_insurant'
,
method
:
'post'
,
data
:
data
})
}
// 新单跟进详情中的第二持有人提交
export
function
updatePolicySecondHolder
(
data
)
{
return
request
({
url
:
'/csf/api/policy/update_policy_second_holder'
,
method
:
'post'
,
data
:
data
})
}
// 新单跟进详情中的受益人提交
export
function
updatePolicyBeneficiary
(
data
)
{
return
request
({
url
:
'/csf/api/policy_beneficiary/update/list'
,
method
:
'post'
,
data
:
data
})
}
// 删除单个受益人
export
function
delPolicyBeneficiary
(
policyBeneficiaryBizId
)
{
return
request
({
url
:
'/csf/api/policy_beneficiary/delete?policyBeneficiaryBizId='
+
policyBeneficiaryBizId
,
method
:
'delete'
})
}
src/formJson/policyInfo.js
View file @
e480df9e
...
...
@@ -7,39 +7,38 @@ const policyInfo = [
child
:
'no'
,
//没有子级dom,直接展示
fatherrequired
:
false
,
//父级必填,代表个人资料这个模块有必填项
data
:
[
{
label
:
'客户姓名'
,
key
:
'customerName'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'客户编号'
,
key
:
'customerBizId'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'140px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
// {
// label: '客户姓名',
// key: 'customerName',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '客户编号',
// key: 'customerBizId',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// value: '',
// labelPosition: 'top', //标签的位置
// labelWidth: '140px', //标签宽度
// sm: 8, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label
:
'保单号'
,
key
:
'policyNo'
,
...
...
@@ -114,53 +113,53 @@ const policyInfo = [
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'产品名称'
,
key
:
'productName'
,
domType
:
'SearchSelect'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
value
:
''
,
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
labelPosition
:
'top'
,
//标签的位置
lg
:
8
//栅格布局份数
},
{
label
:
'产品类别'
,
key
:
'productCate'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'130px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'供款年期'
,
key
:
'paymentTerm'
,
domType
:
'Select'
,
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
dictType
:
'paymentTerm'
,
//
{
//
label: '产品名称',
//
key: 'productName',
//
domType: 'SearchSelect',
//
required: false,
//
maxLength: 30,
//
disabled: false,
//
placeholder: '请输入',
//
show: true,
//
value: '',
//
labelWidth: '120px', //标签宽度
//
sm: 8, //栅格布局份数
//
labelPosition: 'top', //标签的位置
//
lg: 8 //栅格布局份数
//
},
//
{
//
label: '产品类别',
//
key: 'productCate',
//
domType: 'Input',
//
inputType: 'text',
//
required: false,
//
maxLength: 30,
//
disabled: false,
//
placeholder: '请输入',
//
show: true,
//
value: '',
//
labelPosition: 'top', //标签的位置
//
labelWidth: '130px', //标签宽度
//
sm: 8, //栅格布局份数
//
lg: 8 //栅格布局份数
//
},
//
{
//
label: '供款年期',
//
key: 'paymentTerm',
//
domType: 'Select',
//
required: false,
//
disabled: false,
//
placeholder: '请选择',
//
dictType: 'paymentTerm',
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
//
show: true,
//
value: '',
//
labelPosition: 'top', //标签的位置
//
labelWidth: '120px', //标签宽度
//
sm: 8, //栅格布局份数
//
lg: 8 //栅格布局份数
//
},
{
label
:
'期交保费'
,
key
:
'paymentPremium'
,
...
...
@@ -255,37 +254,37 @@ const policyInfo = [
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'受保人'
,
key
:
'insured'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'币种'
,
key
:
'currency'
,
domType
:
'Select'
,
required
:
false
,
disabled
:
false
,
placeholder
:
'请选择'
,
dictType
:
'bx_currency_type'
,
show
:
true
,
value
:
''
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
//
{
//
label: '受保人',
//
key: 'insured',
//
domType: 'Input',
//
inputType: 'text',
//
required: false,
//
maxLength: 30,
//
disabled: false,
//
placeholder: '请输入',
//
show: true,
//
value: '',
//
labelPosition: 'top', //标签的位置
//
labelWidth: '120px', //标签宽度
//
sm: 8, //栅格布局份数
//
lg: 8 //栅格布局份数
//
},
//
{
//
label: '币种',
//
key: 'currency',
//
domType: 'Select',
//
required: false,
//
disabled: false,
//
placeholder: '请选择',
//
dictType: 'bx_currency_type',
//
show: true,
//
value: '',
//
labelPosition: 'top', //标签的位置
//
labelWidth: '120px', //标签宽度
//
sm: 8, //栅格布局份数
//
lg: 8 //栅格布局份数
//
},
{
label
:
'首期保费'
,
key
:
'initialPremium'
,
...
...
src/formJson/policyMailing.js
View file @
e480df9e
...
...
@@ -9,7 +9,23 @@ const policyMailing = [
data
:
[
{
label
:
'寄送方式'
,
key
:
'productCate'
,
key
:
'mailingMethod'
,
domType
:
'Select'
,
inputType
:
'text'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
dictType
:
'csf_policy_follow_mailing_method'
,
show
:
true
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
lg
:
8
//栅格布局份数
},
{
label
:
'快递单号'
,
key
:
'deliveryNo'
,
domType
:
'Input'
,
inputType
:
'text'
,
required
:
false
,
...
...
src/formJson/verifyPolicyInfo.js
View file @
e480df9e
...
...
@@ -10,13 +10,13 @@ const verifyPolicyInfo = [
{
label
:
'保险种类'
,
key
:
'productCate'
,
domType
:
'Input'
,
inputType
:
'text'
,
domType
:
'Select'
,
required
:
false
,
maxLength
:
30
,
disabled
:
false
,
placeholder
:
'请输入'
,
show
:
true
,
dictType
:
'bx_product_type'
,
labelPosition
:
'top'
,
//标签的位置
labelWidth
:
'120px'
,
//标签宽度
sm
:
8
,
//栅格布局份数
...
...
src/utils/dict.js
View file @
e480df9e
...
...
@@ -39,7 +39,11 @@ export function useDictLists(typeLists) {
dictArray
=
resp
.
data
.
map
(
item
=>
{
item
.
dictItemList
.
forEach
(
dict
=>
{
dict
.
label
=
dict
.
itemLabel
if
(
item
.
dictType
==
'sys_no_yes'
)
{
dict
.
value
=
Number
(
dict
.
itemValue
)
}
else
{
dict
.
value
=
dict
.
itemValue
}
})
return
item
})
...
...
src/views/sign/appointment/appointmentEdit.vue
View file @
e480df9e
...
...
@@ -98,6 +98,7 @@
:appointmentStatus=
"appointmentSummeryInfo.status"
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"productPlanRef"
@
policyEditSuccess=
"getPolicyDetail"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
/>
...
...
@@ -113,6 +114,8 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"policyHolderInfoRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
</div>
<div
v-if=
"tab.name === 'insurantInfo'"
>
...
...
@@ -126,6 +129,8 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"insuredInfoRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
</div>
<div
v-if=
"tab.name === 'secondHolder'"
>
...
...
@@ -139,6 +144,8 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"secondHolderInfoRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
</div>
<div
v-if=
"tab.name === 'beneficiary'"
>
...
...
@@ -151,6 +158,8 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"beneficiaryInfoRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
</div>
<div
v-if=
"tab.name === 'questionnaires'"
>
...
...
@@ -162,6 +171,7 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"questionnairesInfoRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
/>
</div>
<div
v-if=
"tab.name === 'fna'"
>
...
...
@@ -182,33 +192,50 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
ref=
"policyTransferRef"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
@
policyEditSuccess=
"getPolicyDetail"
/>
</div>
<div
v-if=
"tab.name === 'accessories'"
>
<FileUpload
:activeName=
"activeName"
:formStatus=
"formStatus"
:idsObj=
"idsObj"
:apiAppointmentInfoDto=
"appointmentSummeryInfo.apiAppointmentInfoDto"
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
/>
</div>
<div
v-if=
"tab.name === 'policyInfo'"
>
<PolicyInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
/>
<PolicyInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
:policyFollowUpdateDto=
"policyDetailInfo.policyFollowUpdateDto"
/>
</div>
<div
v-if=
"tab.name === 'policyAccessories'"
>
<PolicyFileUpload
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
/>
</div>
<div
v-if=
"tab.name === 'policyBroker'"
>
<PolicyBrokerInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
/>
<PolicyBrokerInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
:brokerList=
"policyDetailInfo.brokerList"
/>
</div>
<div
v-if=
"tab.name === 'policyMailing'"
>
<PolicyMailing
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
/>
<PolicyMailing
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
:policyMailing=
"policyDetailInfo.policyMailing"
/>
</div>
<div
v-if=
"tab.name === 'newpolicyTodo'"
>
新单事项
</div>
<div
v-if=
"tab.name === 'verifyPolicyInfo'"
>
<VerifyPolicyInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
/>
<VerifyPolicyInfo
:activeName=
"activeName"
:policyBizId=
"route.query.policyBizId"
:verifyPolicyInfo=
"policyDetailInfo.verifyPolicyInfo"
/>
</div>
</div>
</el-tab-pane>
...
...
@@ -273,6 +300,7 @@ import {
editAppointmentDetail
,
uploadExcel
}
from
'@/api/sign/appointment'
import
{
getPolicyfollow
,
getPolicyInfo
}
from
'@/api/sign/underwritingMain'
import
{
listTenantUser
,
getInsuranceProductList
,
getAdditionalProductList
}
from
'@/api/common'
import
{
Check
}
from
'@element-plus/icons-vue'
import
{
ref
,
nextTick
,
onUnmounted
}
from
'vue'
...
...
@@ -286,9 +314,9 @@ const props = defineProps({
source
:
{
type
:
String
,
default
:
''
},
//页面来源,不一样的页面会有不一样的操作
tabName
:
{
type
:
String
,
default
:
''
},
//父组件的tab名称
processDetail
:
{
type
:
Object
,
default
:
()
=>
({})
},
//新增预约单时,传入的流程详情信息
policyDetailInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
//新单跟进传递的参数
policyDetailInfo
:
{
type
:
Object
,
default
:
()
=>
({})
},
//新单跟进传递关于保单的详情信息
policyId
:
{
type
:
Object
,
default
:
()
=>
({})
}
//新单跟进传递的Id
})
console
.
log
(
'props'
,
props
.
policyDetailInfo
)
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
...
...
@@ -308,7 +336,6 @@ const policyTransferRef = ref(null)
const
questionnairesInfoRef
=
ref
(
null
)
const
customerInfo
=
ref
({})
const
idsObj
=
ref
({})
//各个模块的bizId
// const appointmentSummeryInfo = ref({ apiAppointmentInfoDto: { appointmentBizId: '' } }) //预约详情总信息
const
appointmentSummeryInfo
=
ref
({})
//预约详情总信息
const
currentFile
=
ref
(
null
)
const
processInfo
=
ref
({
...
...
@@ -736,7 +763,7 @@ const handleSubmit = type => {
// 编辑预约单
editAppointmentDetail
(
submitAppointmentObj
.
value
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
getAppointmentInfo
(
idsObj
.
value
.
appointmentBizId
)
//
getAppointmentInfo(idsObj.value.appointmentBizId)
appointmentInfoRef
.
value
[
0
].
handleEditStatus
(
true
)
productPlanRef
.
value
[
0
].
handleEditStatus
(
true
)
policyHolderInfoRef
.
value
[
0
].
handleEditStatus
(
true
)
...
...
@@ -762,6 +789,7 @@ const handleSubmit = type => {
}
})
}
getAppointmentInfo
(
idsObj
.
value
.
appointmentBizId
)
}
//修改预约数据
...
...
@@ -939,10 +967,40 @@ watch(
}
}
)
// 获取新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
// 使用 Promise.all 并行发送请求
Promise
.
all
([
getPolicyfollow
(
route
.
query
.
policyBizId
),
getPolicyInfo
(
route
.
query
.
policyBizId
)])
.
then
(([
followRes
,
infoRes
])
=>
{
// 只有当两个请求都成功时才执行后续操作
if
(
followRes
.
code
===
200
&&
infoRes
.
code
===
200
)
{
// 合并两个响应数据,infoRes.data 会覆盖 followRes.data 中的同名属性
appointmentSummeryInfo
.
value
=
{
...
followRes
.
data
,
...
infoRes
.
data
}
if
(
route
.
query
.
source
==
'policyList'
)
{
appointmentSummeryInfo
.
value
.
apiAppointmentInfoDto
=
JSON
.
parse
(
JSON
.
stringify
(
appointmentSummeryInfo
.
value
.
apiProductPlanInfoDto
.
apiProductPlanMainInfoDto
)
)
}
}
})
.
catch
(
error
=>
{
// 统一错误处理(可选)
console
.
error
(
'请求失败:'
,
error
)
})
}
if
(
route
.
query
.
source
==
'policyList'
)
{
idsObj
.
value
.
policyBizId
=
route
.
query
.
policyBizId
// idsObj.value.appointmentNo = route.query.appointmentNo
// idsObj.value.appointmentBizId = route.query.appointmentBizId
getCustomerInfo
(
props
.
policyDetailInfo
.
customerBizId
)
appointmentSummeryInfo
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
policyDetailInfo
))
appointmentSummeryInfo
.
value
.
apiAppointmentInfoDto
=
JSON
.
parse
(
JSON
.
stringify
(
appointmentSummeryInfo
.
value
.
apiProductPlanInfoDto
.
apiProductPlanMainInfoDto
)
)
idsObj
.
value
.
appointmentBizId
=
route
.
query
.
appointmentBizId
isEmbed
.
value
=
route
.
query
.
embed
tabsList
.
value
=
[
{
...
...
@@ -975,12 +1033,12 @@ if (route.query.source == 'policyList') {
id
:
5
,
key
:
'verifyPolicyInfo'
},
{
label
:
'新单事项'
,
name
:
'newpolicyTodo'
,
id
:
6
,
key
:
'newpolicyTodo'
},
//
{
//
label: '新单事项',
//
name: 'newpolicyTodo',
//
id: 6,
//
key: 'newpolicyTodo'
//
},
{
label
:
'产品计划'
,
name
:
'productPlan'
,
...
...
@@ -1023,13 +1081,13 @@ if (route.query.source == 'policyList') {
status
:
'0'
,
key
:
'questionnaireBizId'
},
{
label
:
'关联FNA'
,
name
:
'fna'
,
id
:
13
,
status
:
'0'
,
key
:
'fnaBizId'
},
//
{
//
label: '关联FNA',
//
name: 'fna',
//
id: 13,
//
status: '0',
//
key: 'fnaBizId'
//
},
{
label
:
'转保声明'
,
name
:
'policyTransfer'
,
...
...
src/views/sign/appointment/components/beneficiaryInfo.vue
View file @
e480df9e
...
...
@@ -12,7 +12,7 @@
>
新增受益人
</el-button
>
<el-button
v-if=
"props.
idsObj.appointmentBizId
"
v-if=
"props.
showSubmitBtn
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
...
...
@@ -111,7 +111,7 @@
</div>
</el-row>
</div>
<el-row
v-if=
"props.
idsObj.appointmentBizId
"
>
<el-row
v-if=
"props.
showSubmitBtn
"
>
<el-col>
<div
class=
"tabButton"
>
<!-- <el-button
...
...
@@ -210,7 +210,8 @@ import Phone from '@/views/components/phone'
import
Address
from
'@/views/components/address'
import
{
watch
,
nextTick
}
from
'vue'
import
{
addCustomer
,
getCustomerDetail
,
editCustomer
,
getCustomerList
}
from
'@/api/sign/fna'
import
{
getCustomerList
}
from
'@/api/sign/fna'
import
{
updatePolicyBeneficiary
,
delPolicyBeneficiary
}
from
'@/api/sign/underwritingMain'
import
{
editBeneficiaryInfo
,
delBeneficiary
}
from
'@/api/sign/appointment'
import
useDictStore
from
'@/store/modules/dict'
...
...
@@ -222,9 +223,11 @@ const props = defineProps({
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiBeneficiaryInfoDtoList
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
//客户详情回显表单用
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
},
//客户详情回显表单用
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
},
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
false
}
//页面来源
})
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { sys_gender } = proxy.useDict('sys_gender')
const
showPhoneDrawer
=
ref
(
false
)
//电话抽屉开关
...
...
@@ -364,6 +367,9 @@ const addBeneficiary = () => {
}
// 删除受益人
const
deleteBeneficiary
=
(
l1
,
level1
)
=>
{
console
.
log
(
'===================================='
)
console
.
log
(
'l1'
,
form
.
value
.
apiBeneficiaryInfoDtoList
[
l1
])
console
.
log
(
'===================================='
)
if
(
editStatus
.
value
)
{
proxy
.
$modal
.
confirm
(
`编辑状态下才能删除`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
return
...
...
@@ -372,12 +378,25 @@ const deleteBeneficiary = (l1, level1) => {
proxy
.
$modal
.
confirm
(
`至少保留一个受益人`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
return
}
if
(
level1
.
beneficiaryBizId
)
{
if
(
level1
.
beneficiaryBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
)
{
delBeneficiary
(
level1
.
beneficiaryBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'受益人删除成功'
)
proxy
.
$message
.
success
(
'
预约-
受益人删除成功'
)
processedBeneficiaryData
.
value
.
splice
(
l1
,
1
)
form
.
value
.
apiBeneficiaryInfoDtoList
.
splice
(
l1
,
1
)
emit
(
'handleSuccessEdit'
)
}
})
}
else
if
(
form
.
value
.
apiBeneficiaryInfoDtoList
[
l1
].
policyBeneficiaryBizId
&&
props
.
pageSource
==
'policyList'
)
{
delPolicyBeneficiary
(
form
.
value
.
apiBeneficiaryInfoDtoList
[
l1
].
policyBeneficiaryBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'新单跟进-受益人删除成功'
)
processedBeneficiaryData
.
value
.
splice
(
l1
,
1
)
form
.
value
.
apiBeneficiaryInfoDtoList
.
splice
(
l1
,
1
)
emit
(
'policyEditSuccess'
)
}
})
}
else
{
...
...
@@ -480,7 +499,11 @@ const processFormData = async obj => {
}
}
}
if
(
tempBeneficiaryDomData
.
value
.
length
>
0
&&
!
props
.
idsObj
.
appointmentBizId
)
{
if
(
tempBeneficiaryDomData
.
value
.
length
>
0
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
form
.
value
=
{
...
tempBeneficiaryForm
.
value
}
saveKey
.
value
=
{
...
tempSaveKey
.
value
}
addressQuickList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempAddressQuickList
.
value
))
...
...
@@ -489,7 +512,7 @@ const processFormData = async obj => {
}
else
{
processedBeneficiaryData
.
value
=
oldAppointmentData
.
value
=
processedData
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
editStatus
.
value
=
true
}
else
{
editStatus
.
value
=
false
...
...
@@ -798,7 +821,7 @@ const setFormValue = () => {
field
.
options
=
fetchDictData
(
field
.
dictType
)
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
field
.
disabled
=
true
}
}
...
...
@@ -900,14 +923,6 @@ const setFormValue = () => {
}
else
{
processedBeneficiaryData
.
value
.
push
(
oldDom
[
0
])
// 详情中没有数据 ,dom应该根据默认数据来渲染
}
// if (tempBeneficiaryDomData.value.length > 0) {
// form.value = { ...tempBeneficiaryForm.value }
// saveKey.value = { ...tempSaveKey.value }
// addressQuickList.value = JSON.parse(JSON.stringify(tempAddressQuickList.value))
// phoneQuickList.value = JSON.parse(JSON.stringify(tempPhoneQuickList.value))
// processedBeneficiaryData.value = JSON.parse(JSON.stringify(tempBeneficiaryDomData.value))
// }
// editStatus.value = true
}
// 获取校验失败的字段信息
const
getInvalidFields
=
fields
=>
{
...
...
@@ -936,10 +951,17 @@ const handleFormValues = () => {
result
=
JSON
.
parse
(
JSON
.
stringify
(
tempBeneficiaryForm
.
value
))
}
const
pattern
=
/Time$/
// 以Time结尾
console
.
log
(
'result'
,
result
)
for
(
const
section
of
result
[
'apiBeneficiaryInfoDtoList'
])
{
let
submitObj
=
{}
if
(
props
.
pageSource
==
'policyList'
&&
props
.
idsObj
.
policyBizId
&&
section
.
policyBeneficiaryBizId
)
{
submitObj
[
'policyBeneficiaryBizId'
]
=
section
.
policyBeneficiaryBizId
submitObj
[
'policyBizId'
]
=
section
.
policyBizId
}
if
(
phoneOraddressKey
.
value
.
length
>
0
)
{
submitObj
.
addressList
=
[]
}
...
...
@@ -988,9 +1010,7 @@ const handleFormValues = () => {
})
}
})
console
.
log
(
'===================================='
)
console
.
log
(
'受益人'
,
submitObj
)
console
.
log
(
'===================================='
)
deleteKeyList
.
value
.
forEach
(
item
=>
{
delete
submitObj
[
item
]
})
...
...
@@ -1002,7 +1022,7 @@ const handleFormValues = () => {
}
console
.
log
(
'===================================='
)
console
.
log
(
'受益人'
,
submitForm
)
console
.
log
(
'
提交
受益人'
,
submitForm
)
console
.
log
(
'===================================='
)
// 删除多余字段
...
...
@@ -1010,17 +1030,16 @@ const handleFormValues = () => {
}
// 表单提交
const
submitForm
=
()
=>
{
console
.
log
(
'form.value'
,
form
.
value
)
proxy
.
$refs
[
'beneficiaryInfoFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
let
submitObj
=
handleFormValues
()
console
.
log
(
'===================================='
)
console
.
log
(
'submitObj'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
)
{
editBeneficiaryInfo
({
appointmentBizId
:
props
.
idsObj
.
appointmentBizId
,
apiBeneficiaryInfoDtoList
:
submitObj
...
...
@@ -1032,7 +1051,18 @@ const submitForm = () => {
}
})
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
updatePolicyBeneficiary
({
policyBizId
:
props
.
idsObj
.
policyBizId
,
policyBeneficiaryList
:
submitObj
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'新单跟进-受益人修改成功'
)
emit
(
'policyEditSuccess'
)
}
})
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
@@ -1074,7 +1104,7 @@ watch(
openList
.
value
=
false
setTimeout
(()
=>
{
// 修改状态
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
setFormValue
()
}
else
{
// 新增状态
...
...
src/views/sign/appointment/components/fileUpload.vue
View file @
e480df9e
<
template
>
<!-- :limit="limit" :on-exceed="handleExceed"-->
<div>
<!-- 来自新单跟进的不需要上传预约附件,只能看预约附件 -->
<div
v-if=
"props.pageSource !== 'policyList'"
>
<div
class=
"fileUploadBox"
>
<el-upload
:action=
"uploadImgUrl"
...
...
@@ -16,6 +18,7 @@
</el-upload>
</div>
<div
class=
"tip"
>
(支持Word,Excel,PDF,图片格式)
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"fileTableList"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
/>
-->
<el-table-column
label=
"序号"
type=
"index"
width=
"50"
/>
...
...
@@ -45,8 +48,20 @@
>
查看
</el-button>
<el-button
type=
"primary"
link
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<el-button
type=
"danger"
link
@
click=
"handleDetele(scope.row)"
>
删除
</el-button>
<el-button
v-if=
"props.pageSource !== 'policyList'"
type=
"primary"
link
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button
>
<el-button
v-if=
"props.pageSource !== 'policyList'"
type=
"danger"
link
@
click=
"handleDetele(scope.row)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -89,10 +104,8 @@ import { getToken } from '@/utils/auth'
import
{
addFile
,
getAppointmentFile
,
delFile
,
editAppointmentFile
}
from
'@/api/sign/appointment'
const
props
=
defineProps
({
activeName
:
{
type
:
String
,
default
:
''
},
//tab名称
formStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiAppointmentInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
}
//父组件传递过来的预约的状态
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
const
{
proxy
}
=
getCurrentInstance
()
const
editVisible
=
ref
(
false
)
...
...
src/views/sign/appointment/components/fnaInfo.vue
View file @
e480df9e
...
...
@@ -178,15 +178,7 @@ const handleLian = () => {
}
getList
()
}
const
handleCopy
=
row
=>
{
// { fnaBizId: row.fnaBizId }
subProcess
({
fnaBizId
:
row
.
fnaBizId
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
getList
()
proxy
.
$modal
.
msgSuccess
(
'生成副本成功'
)
}
})
}
const
rowClick
=
row
=>
{
let
data
=
{
fnaBizId
:
row
.
fnaBizId
,
...
...
src/views/sign/appointment/components/insuredInfo.vue
View file @
e480df9e
<!-- 新单跟进的修改提交还没写 -->
<
template
>
<div>
<div
v-if=
"processedinsuredData.length > 0"
>
...
...
@@ -12,8 +13,9 @@
:disabled=
"editStatus"
>
导入联系人
</el-button
>
<!-- v-if="props.idsObj.appointmentBizId" -->
<el-button
v-if=
"props.
idsObj.appointmentBizId
"
v-if=
"props.
showSubmitBtn
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
...
...
@@ -107,7 +109,7 @@
</div>
</el-row>
</div>
<el-row
v-if=
"props.
idsObj.appointmentBizId
"
>
<el-row
v-if=
"props.
showSubmitBtn
"
>
<el-col>
<div
class=
"tabButton"
>
<!-- <el-button
...
...
@@ -206,7 +208,7 @@ import policyDomData from '@/formJson/insured'
import
Country
from
'@/views/components/country'
import
Phone
from
'@/views/components/phone'
import
Address
from
'@/views/components/address'
import
{
updatePolicyInsurant
}
from
'@/api/sign/underwritingMain'
import
{
watch
,
nextTick
}
from
'vue'
import
{
getCustomerList
}
from
'@/api/sign/fna'
import
{
editInsurantInfo
}
from
'@/api/sign/appointment'
...
...
@@ -220,9 +222,11 @@ const props = defineProps({
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiInsurantInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
//客户详情回显表单用
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
},
//客户详情回显表单用
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
},
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const
insuredInfoFormRef
=
ref
(
null
)
...
...
@@ -616,7 +620,11 @@ const processFormData = async obj => {
}
}
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
)
{
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
// 客户类型为公司时,隐藏非公司信息
if
(
tempPolicyForm
.
value
[
'customerType'
]
&&
...
...
@@ -640,7 +648,7 @@ const processFormData = async obj => {
}
}
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
field
.
disabled
=
true
}
else
{
if
(
field
.
key
==
'age'
)
{
...
...
@@ -671,14 +679,19 @@ const processFormData = async obj => {
phoneQuickList
.
value
=
removeDuplicates
(
tempPhoneList
,
'phoneString'
)
addressQuickList
.
value
=
removeDuplicates
(
tempAddressList
,
'addressString'
)
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
)
{
//当tab切换走,在切换回来的时候,新增情况下需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
form
.
value
=
{
...
tempPolicyForm
.
value
}
saveKey
.
value
=
{
...
tempSaveKey
.
value
}
addressQuickList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempAddressQuickList
.
value
))
phoneQuickList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempPhoneQuickList
.
value
))
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
// props.idsObj.appointmentBizId
if
(
props
.
showSubmitBtn
)
{
form
.
value
=
mergeObjects
(
form
.
value
,
obj
.
customerInfo
)
if
(
form
.
value
.
smokingAllowed
)
{
form
.
value
.
smokingAllowed
=
Number
(
form
.
value
.
smokingAllowed
)
...
...
@@ -1064,12 +1077,8 @@ const submitForm = () => {
proxy
.
$refs
[
'insuredInfoFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
let
submitObj
=
handleFormValues
()
console
.
log
(
'===================================='
)
console
.
log
(
'submitObj'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
))
{
submitObj
[
'appointmentBizId'
]
=
props
.
apiInsurantInfoDto
.
appointmentBizId
submitObj
[
'id'
]
=
props
.
apiInsurantInfoDto
.
id
submitObj
[
'insurantBizId'
]
=
props
.
apiInsurantInfoDto
.
insurantBizId
...
...
@@ -1081,7 +1090,18 @@ const submitForm = () => {
}
})
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
submitObj
[
'policyInsurantBizId'
]
=
props
.
apiInsurantInfoDto
.
policyInsurantBizId
submitObj
[
'policyBizId'
]
=
props
.
apiInsurantInfoDto
.
policyBizId
submitObj
[
'id'
]
=
props
.
apiInsurantInfoDto
.
id
updatePolicyInsurant
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'新单跟进-受保人修改成功'
)
emit
(
'policyEditSuccess'
)
}
})
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
@@ -1120,7 +1140,7 @@ watch(
if
(
newVal
===
'insurantInfo'
)
{
openList
.
value
=
false
setTimeout
(()
=>
{
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
processFormData
({
domdata
:
policyDomData
,
customerInfo
:
props
.
apiInsurantInfoDto
,
...
...
src/views/sign/appointment/components/policyHolderInfo.vue
View file @
e480df9e
...
...
@@ -12,8 +12,9 @@
:disabled=
"editStatus"
>
导入联系人
</el-button
>
<!-- v-if="props.idsObj.appointmentBizId" -->
<el-button
v-if=
"props.
idsObj.appointmentBizId
"
v-if=
"props.
showSubmitBtn
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
...
...
@@ -34,17 +35,6 @@
<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>
<!-- :rules="
child.required
? [
{
required: true,
message: `${child.label}不能为空`,
trigger: 'blur'
}
]
: []
" -->
<el-form-item
:label-width=
"child.labelWidth"
:label=
"child.label"
...
...
@@ -53,7 +43,6 @@
:label-position=
"child.labelPosition"
:rules=
"getRules(child)"
>
<!-- @input="handleInputChange(father, child)" -->
<el-input
v-if=
"child.domType === 'Input'"
:type=
"child.inputType"
...
...
@@ -108,7 +97,7 @@
</div>
</el-row>
</div>
<el-row
v-if=
"props.
idsObj.appointmentBizId
"
>
<el-row
v-if=
"props.
showSubmitBtn
"
>
<el-col>
<div
class=
"tabButton"
>
<!-- <el-button
...
...
@@ -211,6 +200,7 @@ import Address from '@/views/components/address'
import
{
watch
,
nextTick
}
from
'vue'
import
{
getCustomerList
}
from
'@/api/sign/fna'
import
{
editPolicyholderInfo
}
from
'@/api/sign/appointment'
import
{
updatePolicyholder
}
from
'@/api/sign/underwritingMain'
import
useDictStore
from
'@/store/modules/dict'
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -221,12 +211,15 @@ const props = defineProps({
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiPolicyholderInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
//客户详情回显表单用
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
},
//客户详情回显表单用
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
},
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
//计算默认显示的日期(18年前的今天)
const
defaultDisplayDate
=
ref
(
dayjs
().
subtract
(
18
,
'year'
).
toDate
())
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const
policyholderInfoFormRef
=
ref
(
null
)
...
...
@@ -620,7 +613,11 @@ const processFormData = async obj => {
}
}
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
)
{
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
// 客户类型为公司时,隐藏非公司信息
if
(
tempPolicyForm
.
value
[
'customerType'
]
&&
...
...
@@ -644,8 +641,8 @@ const processFormData = async obj => {
}
}
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
// props.idsObj.appointmentBizId
if
(
props
.
showSubmitBtn
)
{
field
.
disabled
=
true
}
else
{
if
(
field
.
key
==
'age'
)
{
...
...
@@ -677,13 +674,18 @@ const processFormData = async obj => {
addressQuickList
.
value
=
removeDuplicates
(
tempAddressList
,
'addressString'
)
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
)
{
if
(
JSON
.
stringify
(
tempPolicyForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
form
.
value
=
{
...
tempPolicyForm
.
value
}
saveKey
.
value
=
{
...
tempSaveKey
.
value
}
addressQuickList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempAddressQuickList
.
value
))
phoneQuickList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempPhoneQuickList
.
value
))
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
// props.idsObj.appointmentBizId
if
(
props
.
showSubmitBtn
)
{
form
.
value
=
mergeObjects
(
form
.
value
,
obj
.
customerInfo
)
if
(
form
.
value
.
smokingAllowed
)
{
form
.
value
.
smokingAllowed
=
Number
(
form
.
value
.
smokingAllowed
)
...
...
@@ -1060,7 +1062,10 @@ const submitForm = () => {
if
(
valid
)
{
let
submitObj
=
handleFormValues
()
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
)
{
submitObj
[
'appointmentBizId'
]
=
props
.
apiPolicyholderInfoDto
.
appointmentBizId
submitObj
[
'id'
]
=
props
.
apiPolicyholderInfoDto
.
id
submitObj
[
'policyholderBizId'
]
=
props
.
apiPolicyholderInfoDto
.
policyholderBizId
...
...
@@ -1072,6 +1077,18 @@ const submitForm = () => {
}
})
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
submitObj
[
'policyPolicyholderBizId'
]
=
props
.
apiPolicyholderInfoDto
.
policyPolicyholderBizId
submitObj
[
'policyBizId'
]
=
props
.
apiPolicyholderInfoDto
.
policyBizId
submitObj
[
'id'
]
=
props
.
apiPolicyholderInfoDto
.
id
updatePolicyholder
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'新单跟进-投保人修改成功'
)
emit
(
'policyEditSuccess'
)
}
})
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
@@ -1110,7 +1127,7 @@ watch(
if
(
newVal
===
'policyholder'
)
{
openList
.
value
=
false
setTimeout
(()
=>
{
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
processFormData
({
domdata
:
policyDomData
,
customerInfo
:
props
.
apiPolicyholderInfoDto
,
...
...
src/views/sign/appointment/components/policyTransferInfo.vue
View file @
e480df9e
...
...
@@ -65,6 +65,7 @@
import
policyTransferDomData
from
'@/formJson/policyTransferInfo'
import
{
watch
}
from
'vue'
import
{
editPolicytransfer
}
from
'@/api/sign/appointment'
import
{
updatePolicyProduct
}
from
'@/api/sign/underwritingMain'
import
useDictStore
from
'@/store/modules/dict'
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -75,9 +76,11 @@ const props = defineProps({
formStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiAppointmentInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
}
//父组件传递过来的预约的状态
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
},
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const
loading
=
ref
(
false
)
...
...
@@ -132,6 +135,9 @@ const validateEnglish = (rule, value, callback) => {
const
processFormData
=
async
obj
=>
{
form
.
value
=
{}
loading
.
value
=
true
// console.log('====================================')
// console.log('传值', props.apiAppointmentInfoDto)
// console.log('====================================')
// 深拷贝原始数据
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
obj
.
domdata
))
...
...
@@ -141,11 +147,17 @@ const processFormData = async obj => {
section
.
options
=
fetchDictData
(
section
.
dictType
)
}
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
// debugger
if
(
props
.
showSubmitBtn
)
{
if
(
props
.
apiAppointmentInfoDto
.
policyTransfer
)
{
form
.
value
.
policyTransfer
=
props
.
apiAppointmentInfoDto
.
policyTransfer
console
.
log
(
'===================================='
)
console
.
log
(
'表单数据'
,
form
.
value
)
console
.
log
(
'===================================='
)
}
}
console
.
log
(
'转报form'
,
form
.
value
)
policyTransferData
.
value
=
processedData
loading
.
value
=
false
}
...
...
@@ -207,17 +219,35 @@ const submitForm = () => {
if
(
valid
)
{
let
submitObj
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
apiAppointmentInfoDto
))
submitObj
.
policyTransfer
=
form
.
value
.
policyTransfer
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
)
{
submitObj
.
appointmentBizId
=
props
.
idsObj
.
appointmentBizId
if
(
props
.
idsObj
.
appointmentBizId
)
{
editPolicytransfer
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// handleEditStatus(true)
proxy
.
$message
.
success
(
'转保声明修改成功'
)
proxy
.
$message
.
success
(
'
预约-
转保声明修改成功'
)
emit
(
'handleSuccessEdit'
)
}
})
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
// submitObj.policyBizId = props.idsObj.policyBizId
// console.log('转包声明', submitObj)
// return
updatePolicyProduct
({
policyBizId
:
props
.
idsObj
.
policyBizId
,
apiProductPlanMainInfoDto
:
submitObj
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// handleEditStatus(true)
proxy
.
$message
.
success
(
'新单跟进-转保声明修改成功'
)
emit
(
'policyEditSuccess'
)
}
})
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
src/views/sign/appointment/components/productPlan.vue
View file @
e480df9e
...
...
@@ -4,8 +4,9 @@
<el-row>
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<!-- v-if="props.idsObj.appointmentBizId" -->
<el-button
v-if=
"props.
idsObj.appointmentBizId
"
v-if=
"props.
showSubmitBtn
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
...
...
@@ -221,9 +222,10 @@
import
useDictStore
from
'@/store/modules/dict'
import
productDomData
from
'@/formJson/productPlan'
import
{
watch
}
from
'vue'
import
{
addfanForm
,
getfanFormDetail
,
editFanForm
,
getCustomerList
}
from
'@/api/sign/fna'
import
{
getInsuranceProductList
,
getAdditionalProductList
}
from
'@/api/common'
import
{
editProductPlanInfo
,
delAdditional
}
from
'@/api/sign/appointment'
import
{
updatePolicyProduct
,
delPolicyAdditional
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -235,12 +237,12 @@ const props = defineProps({
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
,
//多个字典值数据
formStatus
:
{
type
:
String
,
default
:
''
}
,
//父组件状态,新增、修改
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
}
,
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
false
}
,
//页面来源
pageSource
:
{
type
:
String
,
default
:
''
}
,
//页面来源
idsObj
:
{
type
:
Object
,
default
:
()
=>
({
}
)
}
,
//父组件传递过来的id对象
apiProductPlanInfoDto
:
{
type
:
Object
,
default
:
()
=>
({
}
)
}
,
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
}
//父组件传递过来的预约的状态
}
)
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const
{
sys_no_yes
}
=
proxy
.
useDict
(
'sys_no_yes'
)
const
saveKey
=
ref
({
}
)
// 用于存储当前点击的drawer框返回的对象,修改的时候回显值也要存key
...
...
@@ -469,8 +471,12 @@ const processFormData = async () => {
// 证明是修改
if
(
props
.
showSubmitBtn
)
{
editStatus
.
value
=
true
processedProductData
.
value
=
processedData
// setFormValue(props.apiProductPlanInfoDto, processedData)
// processedProductData.value = processedData
//在流程和预约的时候要调用这个方法回显修改数据
console
.
log
(
'===================================='
)
console
.
log
(
'props.apiProductPlanInfoDto'
,
props
.
apiProductPlanInfoDto
)
console
.
log
(
'===================================='
)
setFormValue
(
props
.
apiProductPlanInfoDto
,
processedData
)
}
else
{
editStatus
.
value
=
false
processedProductData
.
value
=
processedData
...
...
@@ -484,7 +490,7 @@ const addChildren = father => {
}
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedProductData
.
value
))
let
obj
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
//
id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
span
:
24
,
//栅格布局份数
childTitle
:
'附加险'
,
deleteBtn
:
true
,
...
...
@@ -628,7 +634,11 @@ const deleteChildren = (father, childIndex) => {
return
}
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedProductData
.
value
))
if
(
props
.
idsObj
.
appointmentBizId
&&
form
.
value
[
father
.
key
][
childIndex
].
additionalBizId
)
{
if
(
props
.
idsObj
.
appointmentBizId
&&
form
.
value
[
father
.
key
][
childIndex
].
additionalBizId
&&
(
props
.
pageSource
==
'appointmentList'
||
props
.
pageSource
==
'fnaList'
)
)
{
delAdditional
(
form
.
value
[
father
.
key
][
childIndex
].
additionalBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'附加险删除成功'
)
...
...
@@ -639,6 +649,25 @@ const deleteChildren = (father, childIndex) => {
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
splice
(
childIndex
,
1
)
emit
(
'handleSuccessEdit'
)
}
}
)
}
else
if
(
props
.
idsObj
.
policyBizId
&&
form
.
value
[
father
.
key
][
childIndex
].
id
&&
props
.
pageSource
==
'policyList'
)
{
delPolicyAdditional
(
form
.
value
[
father
.
key
][
childIndex
].
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'附加险删除成功'
)
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'apiProductPlanAdditionalInfoDtoList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
splice
(
childIndex
,
1
)
}
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
splice
(
childIndex
,
1
)
emit
(
'policyEditSuccess'
)
}
}
)
}
else
{
...
...
@@ -741,7 +770,7 @@ const setFormValue = (obj, formData) => {
}
// 2.根据最新的表单数据更新processedProductData的值,因为有些模块是多项的,所以表单数据要和dom对应上,防止dom有form表单里没有对应的数据会报错
let
newChildren
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
//
id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
span
:
24
,
//栅格布局份数
childTitle
:
'附加险'
,
deleteBtn
:
true
,
...
...
@@ -889,8 +918,10 @@ const setFormValue = (obj, formData) => {
key
==
'apiProductPlanAdditionalInfoDtoList'
&&
newForm
[
section
.
key
].
length
>
0
)
{
for
(
let
i
=
0
;
i
<
newForm
[
section
.
key
].
length
;
i
++
)
{
section
.
data
.
push
(
newChildren
)
}
}
for
(
const
field
of
section
.
data
)
{
if
(
key
==
'apiProductPlanMainInfoDto'
)
{
for
(
const
key2
in
newForm
[
key
])
{
...
...
@@ -906,7 +937,7 @@ const setFormValue = (obj, formData) => {
if
(
section
.
child
==
'yes'
&&
field
.
children
&&
field
.
children
.
length
>
0
)
{
for
(
const
child
of
field
.
children
)
{
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
child
.
disabled
=
true
}
else
{
child
.
disabled
=
false
...
...
@@ -917,7 +948,9 @@ const setFormValue = (obj, formData) => {
}
}
}
form
.
value
=
newForm
processedProductData
.
value
=
oldProductDomData
.
value
=
processedData
// 保存一份就得表单数据便于做撤销操作
oldObjInfo
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
obj
))
...
...
@@ -1000,6 +1033,7 @@ const handleSubmitForm = () => {
}
}
}
console
.
log
(
'新单提交产品计划'
,
result
)
return
result
}
...
...
@@ -1011,10 +1045,7 @@ const submitForm = saveType => {
proxy
.
$refs
[
'productFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
let
result
=
handleSubmitForm
()
console
.
log
(
'===================================='
)
console
.
log
(
'提交的数据'
,
result
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
...
...
@@ -1022,11 +1053,21 @@ const submitForm = saveType => {
editProductPlanInfo
(
result
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'产品计划修改成功'
)
proxy
.
$message
.
success
(
'
预约-
产品计划修改成功'
)
emit
(
'handleSuccessEdit'
)
}
}
)
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
result
.
policyBizId
=
props
.
idsObj
.
policyBizId
updatePolicyProduct
(
result
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'新单跟进-产品计划修改成功'
)
emit
(
'policyEditSuccess'
)
}
}
)
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
@@ -1038,16 +1079,6 @@ const submitForm = saveType => {
}
)
}
// 获取流程详情
function
getFanformInfo
(
fnaFormBizId
,
formData
)
{
getfanFormDetail
(
fnaFormBizId
).
then
(
async
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
}
}
)
}
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
...
...
src/views/sign/appointment/components/secondHolderInfo.vue
View file @
e480df9e
...
...
@@ -8,7 +8,7 @@
>
导入联系人
</el-button
>
-->
<el-button
v-if=
"props.
idsObj.appointmentBizId
"
v-if=
"props.
showSubmitBtn
"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus(!editStatus)"
...
...
@@ -89,7 +89,7 @@
</div>
</el-row>
</div>
<el-row
v-if=
"props.
idsObj.appointmentBizId
"
>
<el-row
v-if=
"props.
showSubmitBtn
"
>
<el-col>
<div
class=
"tabButton"
>
<!-- <el-button
...
...
@@ -189,6 +189,7 @@ import Address from '@/views/components/address'
import
{
watch
,
nextTick
}
from
'vue'
import
{
getCustomerList
}
from
'@/api/sign/fna'
import
{
editSecondHolderInfo
}
from
'@/api/sign/appointment'
import
{
updatePolicySecondHolder
}
from
'@/api/sign/underwritingMain'
import
useDictStore
from
'@/store/modules/dict'
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -199,10 +200,12 @@ const props = defineProps({
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
apiSecondHolderInfoDto
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的预约信息的详情
appointmentStatus
:
{
type
:
Number
},
//父组件传递过来的预约的状态
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
//客户详情回显表单用
customerInfo
:
{
type
:
Object
,
default
:
()
=>
({})
},
//客户详情回显表单用
showSubmitBtn
:
{
type
:
Boolean
,
default
:
false
},
//父组件状态,新增、修改
pageSource
:
{
type
:
String
,
default
:
false
}
//页面来源
})
const
emit
=
defineEmits
([
'handleSuccessEdit'
])
const
emit
=
defineEmits
([
'handleSuccessEdit'
,
'policyEditSuccess'
])
const
{
proxy
}
=
getCurrentInstance
()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const
showPhoneDrawer
=
ref
(
false
)
//电话抽屉开关
...
...
@@ -417,7 +420,7 @@ const processFormData = async obj => {
}
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
field
.
disabled
=
true
}
}
...
...
@@ -425,10 +428,14 @@ const processFormData = async obj => {
}
//当tab切换走,在切换回来的时候,需要把之前保存的值赋值回来
if
(
JSON
.
stringify
(
tempSecondHolderForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
)
{
if
(
JSON
.
stringify
(
tempSecondHolderForm
.
value
)
!==
'{}'
&&
!
props
.
idsObj
.
appointmentBizId
&&
props
.
pageSource
==
'fnaList'
)
{
form
.
value
=
{
...
tempSecondHolderForm
.
value
}
}
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
showSubmitBtn
)
{
form
.
value
=
{
...
props
.
apiSecondHolderInfoDto
}
editStatus
.
value
=
true
}
else
{
...
...
@@ -652,15 +659,7 @@ const handleFormValues = () => {
submitObj
[
key1
]
=
proxy
.
formatToDateTime
(
submitObj
[
key1
])
}
}
// if (Object.keys(submitObj).length > 0) {
// if (submitForm['documentType'] && !submitForm['idNumber']) {
// proxy.$message.error('请输入证件号码')
// return
// } else if(submitForm['idNumber'] && !submitForm['documentType']){
// proxy.$message.error('请输入证件类型')
// return
// }
// }
return
submitObj
}
// 表单提交
...
...
@@ -668,7 +667,10 @@ const submitForm = () => {
proxy
.
$refs
[
'secondHolderFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
let
submitObj
=
handleFormValues
()
if
(
props
.
idsObj
.
appointmentBizId
)
{
if
(
props
.
idsObj
.
appointmentBizId
&&
(
props
.
pageSource
==
'fnaList'
||
props
.
pageSource
==
'appointmentList'
)
)
{
editSecondHolderInfo
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
...
...
@@ -677,7 +679,18 @@ const submitForm = () => {
}
})
}
if
(
props
.
idsObj
.
policyBizId
&&
props
.
pageSource
==
'policyList'
)
{
// submitObj['policySecondHolderBizId'] = props.apiInsurantInfoDto.policySecondHolderBizId
// submitObj['policyBizId'] = props.apiInsurantInfoDto.policyBizId
// submitObj['id'] = props.apiInsurantInfoDto.id
updatePolicySecondHolder
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'新单跟进-受保人修改成功'
)
emit
(
'policyEditSuccess'
)
}
})
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
...
...
src/views/sign/underwritingMain/components/brokerInfo.vue
View file @
e480df9e
...
...
@@ -5,7 +5,7 @@
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
v-if=
"props.
fnaForm
BizId"
v-if=
"props.
policy
BizId"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus"
...
...
@@ -21,7 +21,6 @@
<div
class=
"subTitle"
v-if=
"father.subTitle"
>
{{
father
.
subTitle
}}
</div>
-->
<el-row
v-if=
"father.showTable"
>
<el-table
:data=
"father.data"
border
>
<!-- && form[father.key].length > 0 -->
<template
v-if=
"father.key == 'brokerList'"
>
<el-table-column
label=
"转介人比例"
prop=
"brokerRatio"
align=
"center"
>
<template
#
default=
"scope"
>
...
...
@@ -153,7 +152,7 @@ import {
getAllCompanys
,
getClientUser
}
from
'@/api/common'
import
{
updatePolicyfollow
}
from
'@/api/sign/underwritingMain'
import
{
updatePolicyfollow
,
getPolicyfollow
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -163,7 +162,8 @@ const props = defineProps({
fearthStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
policyBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
//多个字典值数据
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
//多个字典值数据
brokerList
:
{
type
:
Array
,
default
:
()
=>
[]
}
//详情数据
})
const
emit
=
defineEmits
([
'handleSuccess'
])
...
...
@@ -331,6 +331,9 @@ const processFormData = () => {
if
(
section
.
keyType
==
'Array'
)
{
form
.
value
[
section
.
key
]
=
[]
if
(
section
.
key
==
'brokerList'
)
{
if
(
props
.
policyBizId
&&
props
.
brokerList
.
length
>
0
)
{
section
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
brokerList
))
}
form
.
value
[
section
.
key
]
=
section
.
data
}
}
else
if
(
section
.
keyType
==
'Object'
)
{
...
...
@@ -382,11 +385,11 @@ const processFormData = () => {
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
}
if
(
props
.
policyBizId
)
{
//
editStatus.value = true
editStatus
.
value
=
true
}
else
{
editStatus
.
value
=
false
loading
.
value
=
false
}
loading
.
value
=
false
console
.
log
(
'form'
,
form
.
value
)
}
// 添加表单子级dom
...
...
@@ -519,40 +522,12 @@ const isObject = value => {
// 处理表单填写得数据
const
handleFormValues
=
()
=>
{
// 提交要从dom中拿数据,因为收集到dom中了
console
.
log
(
'processedFanFormData.value'
,
processedFanFormData
.
value
)
let
submitObj
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
const
pattern
=
/Date$/
// 以Time结尾
let
domData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
// let submitObj = JSON.parse(JSON.stringify(form.value))
let
submitObj
=
{
policyBizId
:
props
.
policyBizId
,
brokerList
:
[]
}
// debugger
//处理表单数据
for
(
const
key1
in
form
.
value
)
{
// 对象数据格式
if
(
isObject
(
form
.
value
[
key1
])
&&
Object
.
keys
(
form
.
value
[
key1
]).
length
>
0
)
{
for
(
const
key2
in
form
.
value
[
key1
])
{
if
(
pattern
.
test
(
key2
)
&&
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
proxy
.
formatToDate
(
form
.
value
[
key1
][
key2
])
}
// 处理搜索下拉框数据需要返回的各种业务ID
if
((
key2
==
'insurer'
||
key2
===
'reconciliationCompany'
)
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureCompanyList
.
forEach
(
item
=>
{
if
(
item
.
deptBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
deptName
submitObj
[
key1
][
`
${
key2
}
BizId`
]
=
item
.
deptBizId
}
})
}
else
if
(
key2
==
'productName'
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureProductList
.
forEach
(
item
=>
{
if
(
item
.
productBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
productName
submitObj
[
key1
][
'productBizId'
]
=
item
.
productBizId
}
})
}
}
}
// 数组数据格式
if
(
isArray
(
form
.
value
[
key1
])
&&
form
.
value
[
key1
].
length
>
0
)
{
submitObj
[
key1
]
=
form
.
value
[
key1
].
map
(
item1
=>
{
if
(
domData
[
0
].
data
.
length
>
0
)
{
domData
[
0
].
data
.
forEach
(
item1
=>
{
if
(
item1
.
brokerName
)
{
dictStore
.
clientUserList
.
forEach
(
item
=>
{
if
(
item
.
clientUserBizId
==
item1
.
brokerName
)
{
...
...
@@ -561,50 +536,27 @@ const handleFormValues = () => {
}
})
}
delete
item1
.
id
return
item1
submitObj
.
brokerList
.
push
(
item1
)
})
}
}
return
submitObj
}
// 表单提交
const
submitForm
=
saveType
=>
{
let
submitObj
=
handleFormValues
()
// return
proxy
.
$refs
[
'fanFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
console
.
log
(
'===================================='
)
console
.
log
(
' props.policyBizId'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
policyBizId
)
{
// submitObj.PolicyFollowUpdateDto.policyBizId = props.policyBizId
updatePolicyfollow
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
()
proxy
.
$message
.
success
(
'提交成功'
)
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: props.fnaFormBizId,
// type: 'edit'
// })
// 提交成功后,在获取详情信息,防止数据丢失
getPolicyDetail
()
}
})
}
else
{
// addfanForm(result).then(res => {
// if (res.code == 200) {
// proxy.$message.success('fnaForm新增成功')
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: res.data.fnaFormBizId,
// type: 'add'
// })
// }
// })
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
...
...
@@ -617,24 +569,15 @@ const submitForm = saveType => {
})
}
// 获取
流程详情
function
getFanformInfo
(
fnaFormBizId
,
formData
)
{
get
fanFormDetail
(
fnaFormBizId
).
then
(
async
res
=>
{
// 获取
新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
get
Policyfollow
(
props
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
processedFanFormData
.
value
.
brokerList
=
res
.
data
.
brokerList
}
})
}
watch
(
fanFormRef
,
newVal
=>
{
if
(
newVal
)
{
for
(
const
key
in
rules
.
value
)
{
for
(
const
key2
in
rules
.
value
[
key
])
{
fanFormRef
.
value
.
clearValidate
(
key2
)
}
}
}
})
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
...
...
src/views/sign/underwritingMain/components/policyInfo.vue
View file @
e480df9e
...
...
@@ -5,7 +5,7 @@
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
v-if=
"props.
fnaForm
BizId"
v-if=
"props.
policy
BizId"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus"
...
...
@@ -109,107 +109,6 @@
</el-col>
</
template
>
</el-row>
<el-row
v-if=
"father.showTable"
>
<el-table
:data=
"father.data"
border
>
<!-- && form[father.key].length > 0 -->
<
template
v-if=
"father.key == 'brokerList'"
>
<el-table-column
label=
"转介人比例"
prop=
"brokerRatio"
align=
"center"
>
<template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.brokerRatio"
size=
"default"
type=
"number"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"转介人名称"
prop=
"brokerName"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.brokerName"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, 'brokerName', scope.row)"
:loading=
"searchLoadingStates['brokerName']"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in searchOptions['brokerName'] || []"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"所属团队"
prop=
"team"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.team"
size=
"default"
type=
"text"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
<!-- 和csf的销售小程序团队挂钩,因为没有接口现在先放在这等有了在换 -->
<!--
<el-select
v-model=
"scope.row.team"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, 'team')"
:loading=
"searchLoadingStates['team']"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in searchOptions['team'] || []"
:key=
"item.userBizId"
:label=
"item.realName"
:value=
"item.userBizId"
/>
</el-select>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.remark"
size=
"default"
type=
"textarea"
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-col
:span=
"24"
v-if=
"father.addFamilyChildren"
style=
"display: flex; justify-content: center"
>
<el-button
:disabled=
"editStatus"
style=
"margin-top: 10px"
type=
"primary"
icon=
"Plus"
@
click=
"addChildren(father)"
>
添加转介人
</el-button
>
</el-col>
</el-row>
</div>
</el-row>
...
...
@@ -244,7 +143,7 @@ import {
getAllCompanys
,
getClientUser
}
from
'@/api/common'
import
{
updatePolicyfollow
}
from
'@/api/sign/underwritingMain'
import
{
updatePolicyfollow
,
getPolicyfollow
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -255,7 +154,8 @@ const props = defineProps({
fearthStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
policyBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
//多个字典值数据
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
//多个字典值数据
policyFollowUpdateDto
:
{
type
:
Object
,
default
:
()
=>
{}
}
//详情数据
})
const
emit
=
defineEmits
([
'handleSuccess'
])
...
...
@@ -434,8 +334,8 @@ const processFormData = () => {
for
(
const
field
of
section
.
data
)
{
// 为下拉搜索框加options
if
(
field
.
domType
==
'SearchSelect'
)
{
if
(
field
.
key
==
'
accountName
'
)
{
searchOptions
.
value
[
field
.
key
]
=
dictStore
.
tenantUser
List
if
(
field
.
key
==
'
insurer'
||
field
.
key
==
'reconciliationCompany
'
)
{
searchOptions
.
value
[
field
.
key
]
=
dictStore
.
insureCompany
List
}
}
...
...
@@ -453,7 +353,7 @@ const processFormData = () => {
{
required
:
true
,
message
:
`
${
field
.
label
}
不能为空`
,
trigger
:
'blur'
}
]
}
if
(
props
.
fnaForm
BizId
)
{
if
(
props
.
policy
BizId
)
{
field
.
disabled
=
true
}
else
{
field
.
disabled
=
false
...
...
@@ -463,62 +363,26 @@ const processFormData = () => {
}
}
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
}
if
(
tempFanFormData
.
value
.
length
>
0
)
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormData
.
value
)
)
}
else
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
}
if
(
props
.
policyBizId
)
{
form
.
value
.
policyFollowUpdateDto
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
policyFollowUpdateDto
))
form
.
value
.
policyBizId
=
props
.
policyBizId
editStatus
.
value
=
true
}
else
{
// tab切走在切回来时,表单会重置,所以这里需要把表单的值赋回去
editStatus
.
value
=
false
loading
.
value
=
false
}
console
.
log
(
'form'
,
form
.
value
)
}
// 添加表单子级dom
const
addChildren
=
father
=>
{
// if (editStatus.value) {
// proxy.$modal.confirm(`请先点击编辑再添加儿女`, { showCancel: '0', title: '填写提示' })
// return
// }
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
let
obj
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
brokerName
:
''
,
team
:
''
,
brokerRatio
:
''
,
remark
:
''
}
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'brokerList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj
)
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
push
(
obj
)
processedFanFormData
.
value
=
processedData
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
//
if (editStatus.value)
{
// pro
xy.$modal.confirm(`请先点击编辑再删除儿女`, { showCancel: '0', title: '填写提示' })
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
// if (tempFanFormData.value.length > 0) {
// processedFanFormData.value = oldFanFormData.value = JSON.parse(
// JSON.stringify(tempFanFormData.value)
// )
//
} else
{
// pro
cessedFanFormData.value = oldFanFormData.value = processedData
// }
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'brokerList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
splice
(
childIndex
,
1
)
}
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
splice
(
childIndex
,
1
)
processedFanFormData
.
value
=
processedData
loading
.
value
=
false
}
// 根据联动重置表单项的显示与否
const
resetShow
=
(
childKey
,
status
)
=>
{
...
...
@@ -582,10 +446,6 @@ const handleEditStatus = () => {
}
processedFanFormData
.
value
=
processedData
}
//给表单赋值 方便表单回显 obj 为表单数据
const
setFormValue
=
(
obj
,
formData
)
=>
{
loading
.
value
=
true
}
// 获取校验失败的字段信息
const
getInvalidFields
=
fields
=>
{
...
...
@@ -651,7 +511,7 @@ const handleFormValues = () => {
}
})
}
delete
item1
.
id
//
delete item1.id
return
item1
})
}
...
...
@@ -663,38 +523,18 @@ const handleFormValues = () => {
const
submitForm
=
saveType
=>
{
let
submitObj
=
handleFormValues
()
// return
proxy
.
$refs
[
'fanFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
console
.
log
(
'===================================='
)
console
.
log
(
' props.policyBizId'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
policyBizId
)
{
// submitObj.PolicyFollowUpdateDto.policyBizId = props.policyBizId
updatePolicyfollow
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
()
proxy
.
$message
.
success
(
'提交成功'
)
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: props.fnaFormBizId,
// type: 'edit'
// })
// 提交成功后,在获取详情信息,防止数据丢失
getPolicyDetail
()
}
})
}
else
{
// addfanForm(result).then(res => {
// if (res.code == 200) {
// proxy.$message.success('fnaForm新增成功')
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: res.data.fnaFormBizId,
// type: 'add'
// })
// }
// })
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
...
...
@@ -706,25 +546,15 @@ const submitForm = saveType => {
}
})
}
// 获取流程详情
function
getFanformInfo
(
fnaFormBizId
,
formData
)
{
getfanFormDetail
(
fnaFormBizId
).
then
(
async
res
=>
{
// 获取新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
getPolicyfollow
(
props
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
form
.
value
.
policyFollowUpdateDto
=
res
.
data
.
policyFollowUpdateDto
}
})
}
watch
(
fanFormRef
,
newVal
=>
{
if
(
newVal
)
{
for
(
const
key
in
rules
.
value
)
{
for
(
const
key2
in
rules
.
value
[
key
])
{
fanFormRef
.
value
.
clearValidate
(
key2
)
}
}
}
})
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
...
...
@@ -738,7 +568,6 @@ watch(
}
)
processFormData
()
</
script
>
<
style
lang=
"scss"
scoped
>
.domEmpty
{
...
...
src/views/sign/underwritingMain/components/policyMailing.vue
View file @
e480df9e
...
...
@@ -5,7 +5,7 @@
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
v-if=
"props.
fnaForm
BizId"
v-if=
"props.
policy
BizId"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus"
...
...
@@ -109,107 +109,6 @@
</el-col>
</
template
>
</el-row>
<el-row
v-if=
"father.showTable"
>
<el-table
:data=
"father.data"
border
>
<!-- && form[father.key].length > 0 -->
<
template
v-if=
"father.key == 'brokerList'"
>
<el-table-column
label=
"转介人比例"
prop=
"brokerRatio"
align=
"center"
>
<template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.brokerRatio"
size=
"default"
type=
"number"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"转介人名称"
prop=
"brokerName"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.brokerName"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, 'brokerName', scope.row)"
:loading=
"searchLoadingStates['brokerName']"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in searchOptions['brokerName'] || []"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"所属团队"
prop=
"team"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.team"
size=
"default"
type=
"text"
placeholder=
"请输入"
:disabled=
"editStatus"
/>
<!-- 和csf的销售小程序团队挂钩,因为没有接口现在先放在这等有了在换 -->
<!--
<el-select
v-model=
"scope.row.team"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, 'team')"
:loading=
"searchLoadingStates['team']"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in searchOptions['team'] || []"
:key=
"item.userBizId"
:label=
"item.realName"
:value=
"item.userBizId"
/>
</el-select>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.remark"
size=
"default"
type=
"textarea"
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-col
:span=
"24"
v-if=
"father.addFamilyChildren"
style=
"display: flex; justify-content: center"
>
<el-button
:disabled=
"editStatus"
style=
"margin-top: 10px"
type=
"primary"
icon=
"Plus"
@
click=
"addChildren(father)"
>
添加转介人
</el-button
>
</el-col>
</el-row>
</div>
</el-row>
...
...
@@ -244,7 +143,7 @@ import {
getAllCompanys
,
getClientUser
}
from
'@/api/common'
import
{
updatePolicyfollow
}
from
'@/api/sign/underwritingMain'
import
{
updatePolicyfollow
,
getPolicyfollow
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -254,7 +153,8 @@ const props = defineProps({
fearthStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
policyBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
//多个字典值数据
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
//多个字典值数据
policyMailing
:
{
type
:
Object
,
default
:
()
=>
{}
}
//多个字典值数据
})
const
emit
=
defineEmits
([
'handleSuccess'
])
...
...
@@ -452,7 +352,7 @@ const processFormData = () => {
{
required
:
true
,
message
:
`
${
field
.
label
}
不能为空`
,
trigger
:
'blur'
}
]
}
if
(
props
.
fnaForm
BizId
)
{
if
(
props
.
policy
BizId
)
{
field
.
disabled
=
true
}
else
{
field
.
disabled
=
false
...
...
@@ -462,63 +362,22 @@ const processFormData = () => {
}
}
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
}
if
(
tempFanFormData
.
value
.
length
>
0
)
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormData
.
value
)
)
}
else
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
}
if
(
props
.
policyBizId
)
{
form
.
value
.
policyMailing
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
policyMailing
))
form
.
value
.
policyBizId
=
props
.
policyBizId
editStatus
.
value
=
true
}
else
{
// tab切走在切回来时,表单会重置,所以这里需要把表单的值赋回去
editStatus
.
value
=
false
loading
.
value
=
false
}
console
.
log
(
'form'
,
form
.
value
)
}
// 添加表单子级dom
const
addChildren
=
father
=>
{
// if (editStatus.value) {
// proxy.$modal.confirm(`请先点击编辑再添加儿女`, { showCancel: '0', title: '填写提示' })
// return
// }
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
let
obj
=
{
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
),
//唯一标识
brokerName
:
''
,
team
:
''
,
brokerRatio
:
''
,
remark
:
''
}
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'brokerList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
push
(
obj
)
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
console
.
log
(
'form.value'
,
form
.
value
)
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
push
(
obj
)
processedFanFormData
.
value
=
processedData
loading
.
value
=
false
}
const
deleteChildren
=
(
father
,
childIndex
)
=>
{
// if (editStatus.value) {
// proxy.$modal.confirm(`请先点击编辑再删除儿女`, { showCancel: '0', title: '填写提示' })
// }
const
processedData
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
for
(
const
section
of
processedData
)
{
if
(
father
.
key
==
'brokerList'
&&
section
.
key
==
father
.
key
)
{
section
.
data
.
splice
(
childIndex
,
1
)
}
}
//更新form表单对应的数据,以便收集填写的值
form
.
value
[
father
.
key
].
splice
(
childIndex
,
1
)
processedFanFormData
.
value
=
processedData
}
// 根据联动重置表单项的显示与否
const
resetShow
=
(
childKey
,
status
)
=>
{
console
.
log
(
childKey
,
status
)
...
...
@@ -581,10 +440,6 @@ const handleEditStatus = () => {
}
processedFanFormData
.
value
=
processedData
}
//给表单赋值 方便表单回显 obj 为表单数据
const
setFormValue
=
(
obj
,
formData
)
=>
{
loading
.
value
=
true
}
// 获取校验失败的字段信息
const
getInvalidFields
=
fields
=>
{
...
...
@@ -621,38 +476,7 @@ const handleFormValues = () => {
if
(
pattern
.
test
(
key2
)
&&
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
proxy
.
formatToDate
(
form
.
value
[
key1
][
key2
])
}
// 处理搜索下拉框数据需要返回的各种业务ID
if
((
key2
==
'insurer'
||
key2
===
'reconciliationCompany'
)
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureCompanyList
.
forEach
(
item
=>
{
if
(
item
.
deptBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
deptName
submitObj
[
key1
][
`
${
key2
}
BizId`
]
=
item
.
deptBizId
}
})
}
else
if
(
key2
==
'productName'
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureProductList
.
forEach
(
item
=>
{
if
(
item
.
productBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
productName
submitObj
[
key1
][
'productBizId'
]
=
item
.
productBizId
}
})
}
}
}
// 数组数据格式
if
(
isArray
(
form
.
value
[
key1
])
&&
form
.
value
[
key1
].
length
>
0
)
{
submitObj
[
key1
]
=
form
.
value
[
key1
].
map
(
item1
=>
{
if
(
item1
.
brokerName
)
{
dictStore
.
clientUserList
.
forEach
(
item
=>
{
if
(
item
.
clientUserBizId
==
item1
.
brokerName
)
{
item1
.
brokerName
=
item
.
name
item1
[
'brokerBizId'
]
=
item
.
clientUserBizId
}
})
}
delete
item1
.
id
return
item1
})
}
}
...
...
@@ -666,34 +490,16 @@ const submitForm = saveType => {
proxy
.
$refs
[
'fanFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
console
.
log
(
'===================================='
)
console
.
log
(
' props.policyBizId'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
policyBizId
)
{
// submitObj.PolicyFollowUpdateDto.policyBizId = props.policyBizId
updatePolicyfollow
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
()
proxy
.
$message
.
success
(
'提交成功'
)
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: props.fnaFormBizId,
// type: 'edit'
// })
// 提交成功后,在获取详情信息,防止数据丢失
getPolicyDetail
()
}
})
}
else
{
// addfanForm(result).then(res => {
// if (res.code == 200) {
// proxy.$message.success('fnaForm新增成功')
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: res.data.fnaFormBizId,
// type: 'add'
// })
// }
// })
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
...
...
@@ -705,13 +511,11 @@ const submitForm = saveType => {
}
})
}
// 获取流程详情
function
getFanformInfo
(
fnaFormBizId
,
formData
)
{
getfanFormDetail
(
fnaFormBizId
).
then
(
async
res
=>
{
// 获取新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
getPolicyfollow
(
props
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
processedFanFormData
.
value
.
brokerList
=
res
.
data
.
brokerList
}
})
}
...
...
@@ -728,7 +532,7 @@ watch(
()
=>
props
.
activeName
,
newVal
=>
{
tempFanFormValue
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
tempFanFormData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
processedFanFormData
.
value
))
//
tempFanFormData.value = JSON.parse(JSON.stringify(processedFanFormData.value))
if
(
newVal
===
'policyMailing'
)
{
setTimeout
(()
=>
{
processFormData
()
...
...
@@ -736,7 +540,6 @@ watch(
}
}
)
processFormData
()
</
script
>
<
style
lang=
"scss"
scoped
>
.domEmpty
{
...
...
src/views/sign/underwritingMain/components/verifyPolicyInfo.vue
View file @
e480df9e
...
...
@@ -5,7 +5,7 @@
<el-col
:span=
"24"
>
<div
class=
"topBtn"
>
<el-button
v-if=
"props.
fnaForm
BizId"
v-if=
"props.
policy
BizId"
type=
"primary"
icon=
"EditPen"
@
click=
"handleEditStatus"
...
...
@@ -244,7 +244,7 @@ import {
getAllCompanys
,
getClientUser
}
from
'@/api/common'
import
{
updatePolicyfollow
}
from
'@/api/sign/underwritingMain'
import
{
updatePolicyfollow
,
getPolicyfollow
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
//获取字典数据
...
...
@@ -254,7 +254,8 @@ const props = defineProps({
fearthStatus
:
{
type
:
String
,
default
:
''
},
//父组件状态,新增、修改
policyBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
customerBizId
:
{
type
:
String
,
default
:
''
},
//提交状态,新增、修改
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
}
//多个字典值数据
dictTypeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
//多个字典值数据
verifyPolicyInfo
:
{
type
:
Object
,
default
:
()
=>
{}
}
//多个字典值数据
})
const
emit
=
defineEmits
([
'handleSuccess'
])
...
...
@@ -431,13 +432,6 @@ const processFormData = () => {
for
(
const
formKey
in
form
.
value
)
{
if
(
section
.
key
==
formKey
)
{
for
(
const
field
of
section
.
data
)
{
// 为下拉搜索框加options
if
(
field
.
domType
==
'SearchSelect'
)
{
if
(
field
.
key
==
'accountName'
)
{
searchOptions
.
value
[
field
.
key
]
=
dictStore
.
tenantUserList
}
}
if
(
field
.
dictType
)
{
// 获取字典数据
field
.
options
=
fetchDictData
(
field
.
dictType
)
...
...
@@ -452,7 +446,7 @@ const processFormData = () => {
{
required
:
true
,
message
:
`
${
field
.
label
}
不能为空`
,
trigger
:
'blur'
}
]
}
if
(
props
.
fnaForm
BizId
)
{
if
(
props
.
policy
BizId
)
{
field
.
disabled
=
true
}
else
{
field
.
disabled
=
false
...
...
@@ -462,23 +456,20 @@ const processFormData = () => {
}
}
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
}
if
(
tempFanFormData
.
value
.
length
>
0
)
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormData
.
value
)
)
}
else
{
processedFanFormData
.
value
=
oldFanFormData
.
value
=
processedData
}
if
(
props
.
policyBizId
)
{
form
.
value
.
verifyPolicyInfo
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
verifyPolicyInfo
))
form
.
value
.
policyBizId
=
props
.
policyBizId
editStatus
.
value
=
true
}
else
{
// tab切走在切回来时,表单会重置,所以这里需要把表单的值赋回去
editStatus
.
value
=
false
loading
.
value
=
false
}
if
(
Object
.
keys
(
tempFanFormValue
.
value
).
length
>
0
)
{
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFanFormValue
.
value
))
}
processedFanFormData
.
value
=
processedData
loading
.
value
=
false
console
.
log
(
'form'
,
form
.
value
)
}
// 添加表单子级dom
...
...
@@ -621,38 +612,7 @@ const handleFormValues = () => {
if
(
pattern
.
test
(
key2
)
&&
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
proxy
.
formatToDate
(
form
.
value
[
key1
][
key2
])
}
// 处理搜索下拉框数据需要返回的各种业务ID
if
((
key2
==
'insurer'
||
key2
===
'reconciliationCompany'
)
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureCompanyList
.
forEach
(
item
=>
{
if
(
item
.
deptBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
deptName
submitObj
[
key1
][
`
${
key2
}
BizId`
]
=
item
.
deptBizId
}
})
}
else
if
(
key2
==
'productName'
&&
form
.
value
[
key1
][
key2
])
{
dictStore
.
insureProductList
.
forEach
(
item
=>
{
if
(
item
.
productBizId
==
form
.
value
[
key1
][
key2
])
{
submitObj
[
key1
][
key2
]
=
item
.
productName
submitObj
[
key1
][
'productBizId'
]
=
item
.
productBizId
}
})
}
}
}
// 数组数据格式
if
(
isArray
(
form
.
value
[
key1
])
&&
form
.
value
[
key1
].
length
>
0
)
{
submitObj
[
key1
]
=
form
.
value
[
key1
].
map
(
item1
=>
{
if
(
item1
.
brokerName
)
{
dictStore
.
clientUserList
.
forEach
(
item
=>
{
if
(
item
.
clientUserBizId
==
item1
.
brokerName
)
{
item1
.
brokerName
=
item
.
name
item1
[
'brokerBizId'
]
=
item
.
clientUserBizId
}
})
}
delete
item1
.
id
return
item1
})
}
}
...
...
@@ -662,38 +622,17 @@ const handleFormValues = () => {
const
submitForm
=
saveType
=>
{
let
submitObj
=
handleFormValues
()
// return
proxy
.
$refs
[
'fanFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
console
.
log
(
'===================================='
)
console
.
log
(
' props.policyBizId'
,
submitObj
)
console
.
log
(
'===================================='
)
// return
if
(
props
.
policyBizId
)
{
// submitObj.PolicyFollowUpdateDto.policyBizId = props.policyBizId
updatePolicyfollow
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
()
proxy
.
$message
.
success
(
'提交成功'
)
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: props.fnaFormBizId,
// type: 'edit'
// })
// 提交成功后,在获取详情信息,防止数据丢失
getPolicyDetail
()
}
})
}
else
{
// addfanForm(result).then(res => {
// if (res.code == 200) {
// proxy.$message.success('fnaForm新增成功')
// emit('handleSuccess', {
// tab: 'fnaform',
// fnaFormBizId: res.data.fnaFormBizId,
// type: 'add'
// })
// }
// })
}
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
...
...
@@ -705,25 +644,15 @@ const submitForm = saveType => {
}
})
}
// 获取流程详情
function
getFanformInfo
(
fnaFormBizId
,
formData
)
{
getfanFormDetail
(
fnaFormBizId
).
then
(
async
res
=>
{
// 获取新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
getPolicyfollow
(
props
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// 回显值
setFormValue
(
res
.
data
,
formData
)
processedFanFormData
.
value
.
brokerList
=
res
.
data
.
brokerList
}
})
}
watch
(
fanFormRef
,
newVal
=>
{
if
(
newVal
)
{
for
(
const
key
in
rules
.
value
)
{
for
(
const
key2
in
rules
.
value
[
key
])
{
fanFormRef
.
value
.
clearValidate
(
key2
)
}
}
}
})
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
...
...
@@ -736,8 +665,6 @@ watch(
}
}
)
processFormData
()
</
script
>
<
style
lang=
"scss"
scoped
>
.domEmpty
{
...
...
src/views/sign/underwritingMain/followUpDetail.vue
View file @
e480df9e
...
...
@@ -35,13 +35,18 @@
</el-tabs>
</div>
</el-card>
-->
<AppointmentEdit
source=
'policyList'
:policyDetailInfo=
"route.query"
/>
<AppointmentEdit
source=
"policyList"
:policyId=
"route.query"
v-if=
"showTab"
:policyDetailInfo=
"policyInfo"
/>
</div>
</
template
>
<
script
setup
name=
"FollowUpDetail"
>
import
AppointmentEdit
from
'@/views/sign/appointment/appointmentEdit'
import
{
onUnmounted
}
from
'vue'
import
{
getPolicyfollow
,
getPolicy
Status
}
from
'@/api/sign/underwritingMain'
import
{
getPolicyfollow
,
getPolicy
Info
}
from
'@/api/sign/underwritingMain'
import
useUserStore
from
'@/store/modules/user'
import
useDictStore
from
'@/store/modules/dict'
import
{
addFna
,
getProcessDetail
,
updateProcess
,
getCustomerDetail
}
from
'@/api/sign/fna'
...
...
@@ -63,6 +68,7 @@ const { proxy } = getCurrentInstance()
const
route
=
useRoute
()
const
router
=
useRouter
()
const
activeName
=
ref
(
'status'
)
const
showTab
=
ref
(
false
)
const
processInfo
=
ref
({
fnaNo
:
'--'
,
status
:
'未保存'
,
...
...
@@ -204,22 +210,29 @@ const getDictsData = async () => {
'wj_question_first_category'
,
'wj_question_second_category'
,
'csf_ap_policy_transfer'
,
'md_bank'
'md_bank'
,
'bx_product_type'
,
'csf_policy_follow_mailing_method'
])
}
// 获取新单跟进详情数据
const
getPolicyDetail
=
()
=>
{
getPolicyfollow
(
route
.
query
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
'新单跟进详情'
,
res
)
policyInfo
.
value
=
res
.
data
// 使用 Promise.all 并行发送请求
Promise
.
all
([
getPolicyfollow
(
route
.
query
.
policyBizId
),
getPolicyInfo
(
route
.
query
.
policyBizId
)])
.
then
(([
followRes
,
infoRes
])
=>
{
// 只有当两个请求都成功时才执行后续操作
if
(
followRes
.
code
===
200
&&
infoRes
.
code
===
200
)
{
// 合并两个响应数据,infoRes.data 会覆盖 followRes.data 中的同名属性
policyInfo
.
value
=
{
...
followRes
.
data
,
...
infoRes
.
data
}
showTab
.
value
=
true
}
})
getPolicyStatus
(
route
.
query
.
policyBizId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
'新单跟进状态'
,
res
)
policyStatusList
.
value
=
res
.
data
}
.
catch
(
error
=>
{
// 统一错误处理(可选)
console
.
error
(
'请求失败:'
,
error
)
})
}
...
...
@@ -289,28 +302,7 @@ const beforeTabLeave = (activeTabName, oldTabName) => {
return
true
}
// 处理步骤点击
const
handleStep
=
item
=>
{
// 总览页可以直接切换
if
(
item
.
id
===
-
1
||
item
.
name
===
'customer'
)
{
activeName
.
value
=
item
.
name
return
}
// 检查前一项状态
const
prevTabIndex
=
tabsList
.
value
.
findIndex
(
tab
=>
tab
.
id
===
item
.
id
)
-
1
if
(
prevTabIndex
>=
0
)
{
const
prevTab
=
tabsList
.
value
[
prevTabIndex
]
// 如果前一项存在且未完成,阻止切换
if
(
prevTab
.
status
===
'0'
)
{
proxy
.
$modal
.
confirm
(
`请先填写
${
prevTab
.
label
}
`
,
{
showCancel
:
false
})
return
}
}
// 允许切换
activeName
.
value
=
item
.
name
}
const
handleBack
=
()
=>
{
router
.
go
(
-
1
)
}
...
...
src/views/sign/underwritingMain/index.vue
View file @
e480df9e
...
...
@@ -138,7 +138,11 @@
</el-table-column>
<el-table-column
prop=
"policyNo"
label=
"保单号"
width=
"150"
align=
"center"
sortable
/>
<el-table-column
prop=
"customerName"
label=
"客户名称"
width=
"100"
align=
"center"
sortable
/>
<el-table-column
prop=
"signDate"
label=
"签单日期"
width=
"150"
align=
"center"
sortable
/>
<el-table-column
prop=
"signDate"
label=
"签单日期"
width=
"150"
align=
"center"
sortable
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
signDate
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"signer"
label=
"签单人"
width=
"100"
align=
"center"
sortable
/>
<el-table-column
prop=
"paymentTerm"
label=
"供款年期"
width=
"100"
align=
"center"
sortable
/>
<el-table-column
prop=
"productName"
label=
"产品名称"
width=
"150"
align=
"center"
sortable
/>
...
...
@@ -592,13 +596,18 @@ const formatFileSize = bytes => {
}
// 新单跟进详情
const
handleStatus
=
row
=>
{
router
.
push
({
path
:
'/sign/underwritingMain/followUpDetail'
,
query
:
{
policyBizId
:
row
.
policyBizId
,
type
:
'edit'
,
source
:
'policyList'
,
embed
:
true
,
appointmentNo
:
row
.
appointmentNo
,
appointmentBizId
:
row
.
appointmentBizId
}
query
:
{
policyBizId
:
row
.
policyBizId
,
type
:
'edit'
,
source
:
'policyList'
,
embed
:
true
,
appointmentNo
:
row
.
appointmentNo
,
appointmentBizId
:
row
.
appointmentBizId
}
})
}
</
script
>
<
style
scoped
>
...
...
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