Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mongo-ui
Commits
adae88d6
Commit
adae88d6
authored
Aug 07, 2020
by
郭志伟
Committed by
郝聪敏
Aug 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 保单晚上
parent
90023f66
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
362 additions
and
131 deletions
+362
-131
dev.config.js
src/config/dev.config.js
+1
-1
AIDetail.vue
src/views/Goods/Detail/AIDetail.vue
+36
-20
CIIDetail.vue
src/views/Goods/Detail/CIIDetail.vue
+23
-15
LIDetail.vue
src/views/Goods/Detail/LIDetail.vue
+29
-10
MIDetail.vue
src/views/Goods/Detail/MIDetail.vue
+66
-28
CalInsuredFee.vue
src/views/Goods/Detail/modules/CalInsuredFee.vue
+33
-21
InsurePersonForm.vue
src/views/Goods/Detail/modules/InsurePersonForm.vue
+34
-16
index.vue
src/views/Goods/Inform/index.vue
+36
-1
index.vue
src/views/Policy/Add/index.vue
+104
-19
No files found.
src/config/dev.config.js
View file @
adae88d6
export
default
{
basicHost
:
"
http://yapi.quantgroups.com/mock/329/
"
,
// basicHost: "http://192.168.29.
211:80
/",
// basicHost: "http://192.168.29.
100:8964
/",
wxAppId
:
"
wx514de17b23d53a20
"
};
src/views/Goods/Detail/AIDetail.vue
View file @
adae88d6
...
...
@@ -4,19 +4,19 @@
<detail-header
:det=
"headerInfo"
/>
<div
class=
"det-body"
>
<card
title=
"保险计划"
:option=
"['查看详情']"
@
option-click=
"openIframePupop(4)"
>
<cr-radio-btn
v-model=
"formData.
planValue
"
:radio-data=
"planOptions"
/>
<cr-radio-btn
v-model=
"formData.
amountInsured
"
:radio-data=
"planOptions"
/>
<compactCellGroup
:cell-data=
"planCellData"
:text-bold=
"true"
/>
<plan-tip
:tip-list=
"planTipOptions"
/>
</card>
<div
id=
"det_insure"
>
<insure-person-form
v-model=
"formData"
:radio-options=
"personFormOptions"
/>
<auto-deduct
v-model=
"formData.auto"
v-model=
"formData.auto
RenewPolicy
"
:cell-data=
"autoCellInfo"
@
cell-click=
"openIframePupop"
/>
<protocol-read
v-model=
"formData.
autoRenewPolicy
"
v-model=
"formData.
read
"
:cell-data=
"noticeCellData"
:protocol-data=
"protocolData"
@
cell-click=
"openIframePupop"
...
...
@@ -130,10 +130,10 @@ export default {
idNo
:
""
,
socialSecurity
:
"
1
"
,
relation
:
"
0
"
,
t
ype
:
"
1
"
,
planValue
:
"
1
0
"
,
auto
:
false
,
autoRenewPolicy
:
true
payT
ype
:
"
1
"
,
amountInsured
:
"
100000
0
"
,
auto
RenewPolicy
:
false
,
read
:
true
},
goInsureState
:
false
};
...
...
@@ -154,11 +154,11 @@ export default {
if
(
this
.
calTimer
)
{
clearTimeout
(
this
.
calTimer
);
}
const
{
name
,
idNo
}
=
val
;
const
{
name
:
oldName
,
idNo
:
oldNo
}
=
oldVal
;
if
(
name
===
oldName
&&
idNo
===
oldNo
)
return
;
const
{
idNo
}
=
val
;
const
{
idNo
:
oldNo
}
=
oldVal
;
if
(
idNo
===
oldNo
)
return
;
this
.
calTimer
=
setTimeout
(()
=>
{
this
.
calFee
(
{
name
,
idNo
}
);
this
.
calFee
();
},
600
);
}
}
...
...
@@ -170,13 +170,13 @@ export default {
},
planCellData
()
{
const
{
planCellInfo
}
=
this
;
const
{
planValue
}
=
this
.
formData
;
return
planCellInfo
[
planValue
];
const
{
amountInsured
}
=
this
.
formData
;
return
planCellInfo
[
amountInsured
];
},
noticeCellData
()
{
const
{
noticeCellInfo
}
=
this
;
const
{
planValue
}
=
this
.
formData
;
return
noticeCellInfo
[
planValue
];
const
{
amountInsured
}
=
this
.
formData
;
return
noticeCellInfo
[
amountInsured
];
},
personFormOptions
()
{
const
{
insuredOptions
,
paywayOptions
}
=
this
;
...
...
@@ -203,7 +203,10 @@ export default {
},
onSubmit
()
{
this
.
goInsureState
=
true
;
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
this
.
formData
));
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
Object
.
assign
(
this
.
formData
,
{
productNo
:
this
.
goodId
}))
);
},
onFailed
(
errorInfo
)
{
const
{
errors
}
=
errorInfo
;
...
...
@@ -221,18 +224,31 @@ export default {
const
res
=
await
list
();
if
(
res
)
{
res
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
goodId
)
{
if
(
item
.
productNo
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
item
.
downPayPrice
;
this
.
headerInfo
.
insuredNum
=
item
.
sellCount
;
}
});
}
},
async
calFee
(
{
name
,
idNo
}
)
{
async
calFee
()
{
let
{
price
}
=
this
.
headerInfo
;
const
res
=
await
trail
({
name
,
idNo
,
productNo
:
this
.
goodId
});
const
{
idNo
,
amountInsured
}
=
this
.
formData
;
if
(
!
idNo
||
!
amountInsured
)
return
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
idNo
},
productItem
:
{
amountInsured
}
}
};
const
res
=
await
trail
(
_param
);
if
(
res
)
{
price
[
0
]
=
res
.
regular
Price
;
price
[
0
]
=
res
.
downPay
Price
;
this
.
goodActionInfo
=
{
title
:
price
};
...
...
src/views/Goods/Detail/CIIDetail.vue
View file @
adae88d6
...
...
@@ -11,12 +11,12 @@
<div
id=
"det_insure"
>
<insure-person-form
v-model=
"formData"
:radio-options=
"personFormOptions"
/>
<auto-deduct
v-model=
"formData.auto"
v-model=
"formData.auto
RenewPolicy
"
:cell-data=
"autoCellInfo"
@
cell-click=
"openIframePupop"
/>
<protocol-read
v-model=
"formData.
autoRenewPolicy
"
v-model=
"formData.
read
"
:cell-data=
"noticeCellData"
@
cell-click=
"openIframePupop"
/>
...
...
@@ -128,8 +128,8 @@ export default {
relation
:
"
0
"
,
payType
:
"
1
"
,
amountInsured
:
"
300000
"
,
auto
:
false
,
autoRenewPolicy
:
true
auto
RenewPolicy
:
false
,
read
:
true
},
goInsureState
:
false
};
...
...
@@ -205,7 +205,10 @@ export default {
},
onSubmit
()
{
this
.
goInsureState
=
true
;
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
this
.
formData
));
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
Object
.
assign
(
this
.
formData
,
{
productNo
:
this
.
goodId
}))
);
},
onFailed
(
errorInfo
)
{
const
{
errors
}
=
errorInfo
;
...
...
@@ -219,9 +222,9 @@ export default {
const
res
=
await
list
();
if
(
res
)
{
res
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
res
.
downPayPrice
;
this
.
headerInfo
.
subPrice
[
0
]
=
res
.
regularPrice
;
if
(
item
.
productNo
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
item
.
downPayPrice
;
this
.
headerInfo
.
subPrice
[
0
]
=
item
.
regularPrice
;
this
.
headerInfo
.
insuredNum
=
item
.
sellCount
;
}
});
...
...
@@ -229,18 +232,23 @@ export default {
},
async
calFee
()
{
let
{
price
,
subPrice
}
=
this
.
headerInfo
;
const
{
idNo
,
socialSecurity
,
payType
,
amountInsured
}
=
this
.
formData
;
const
{
idNo
,
socialSecurity
,
payType
,
amountInsured
,
userInfoSecId
}
=
this
.
formData
;
if
(
!
idNo
||
!
socialSecurity
||
!
payType
)
return
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
idNo
,
socialSecurity
,
payType
},
productItem
:
{
amountInsured
userInfo
:
{
idNo
,
socialSecurity
:
!!
Number
(
socialSecurity
),
userInfoSecId
:
userInfoSecId
??
null
},
productItem
:
{
payType
,
amountInsured
}
}
};
const
res
=
await
trail
(
_param
);
if
(
res
)
{
price
[
0
]
=
res
.
downPayPrice
;
...
...
src/views/Goods/Detail/LIDetail.vue
View file @
adae88d6
...
...
@@ -46,7 +46,7 @@
title=
"理赔须知"
:options=
"[]"
:text-bold=
"true"
v-model=
"formData.
autoRenewPolicy
"
v-model=
"formData.
read
"
:cell-data=
"noticeCellInfo"
@
cell-click=
"openIframePupop"
>
...
...
@@ -139,7 +139,7 @@ export default {
popupShow
:
false
,
currentPupopIndex
:
null
,
formData
:
{
autoRenewPolicy
:
false
read
:
false
},
showLayer
:
false
};
...
...
@@ -162,9 +162,9 @@ export default {
if
(
this
.
calTimer
)
{
clearTimeout
(
this
.
calTimer
);
}
const
{
autoRenewPolicy
}
=
val
;
const
{
autoRenewPolicy
:
oldAutoRenewPolicy
}
=
oldVal
;
if
(
autoRenewPolicy
!==
oldAutoRenewPolicy
)
return
;
const
{
read
}
=
val
;
const
{
read
:
oldread
}
=
oldVal
;
if
(
read
!==
oldread
)
return
;
this
.
calTimer
=
setTimeout
(()
=>
{
this
.
calFee
();
},
600
);
...
...
@@ -181,7 +181,7 @@ export default {
}
},
mounted
()
{
//
this.getDetail();
this
.
getDetail
();
},
methods
:
{
openIframePupop
(
index
)
{
...
...
@@ -193,7 +193,10 @@ export default {
this
.
popupShow
=
true
;
},
onSubmit
()
{
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
this
.
formData
));
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
Object
.
assign
(
this
.
formData
,
{
productNo
:
this
.
goodId
}))
);
this
.
nextStep
();
},
onFailed
(
errorInfo
)
{
...
...
@@ -208,8 +211,8 @@ export default {
const
res
=
await
list
();
if
(
res
)
{
res
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
res
.
downPayPrice
;
if
(
item
.
productNo
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
item
.
downPayPrice
;
this
.
headerInfo
.
insuredNum
=
item
.
sellCount
;
}
});
...
...
@@ -217,7 +220,23 @@ export default {
},
async
calFee
()
{
let
{
price
}
=
this
.
headerInfo
;
const
res
=
await
trail
(
Object
.
assign
(
this
.
formData
,
{
productNo
:
this
.
goodId
}));
const
{
birth
,
gender
,
amountInsured
,
policyPeriod
,
payPeriod
,
payType
}
=
this
.
formData
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
birth
,
gender
},
productItem
:
{
amountInsured
,
policyPeriod
,
payPeriod
,
payType
}
}
};
const
res
=
await
trail
(
_param
);
if
(
res
)
{
price
[
0
]
=
res
.
regularPrice
;
this
.
goodActionInfo
=
{
title
:
price
};
...
...
src/views/Goods/Detail/MIDetail.vue
View file @
adae88d6
...
...
@@ -10,12 +10,12 @@
<div
id=
"det_insure"
>
<insure-person-form
v-model=
"formData"
:radio-options=
"personFormOptions"
/>
<auto-deduct
v-model=
"formData.auto"
v-model=
"formData.auto
RenewPolicy
"
:cell-data=
"autoCellInfo"
@
cell-click=
"openIframePupop"
/>
<protocol-read
v-model=
"formData.
autoRenewPolicy
"
v-model=
"formData.
read
"
:cell-data=
"noticeCellInfo"
@
cell-click=
"openIframePupop"
/>
...
...
@@ -128,10 +128,10 @@ export default {
idNo
:
""
,
socialSecurity
:
"
1
"
,
relation
:
"
0
"
,
t
ype
:
"
1
"
,
payT
ype
:
"
1
"
,
planValue
:
"
3
"
,
auto
:
false
,
autoRenewPolicy
:
true
auto
RenewPolicy
:
false
,
read
:
true
},
goInsureState
:
false
};
...
...
@@ -158,22 +158,11 @@ export default {
if
(
this
.
calTimer
)
{
clearTimeout
(
this
.
calTimer
);
}
const
{
name
,
idNo
,
socialSecurity
,
type
}
=
val
;
const
{
name
:
oldName
,
idNo
:
oldNo
,
socialSecurity
:
oldSocialSecurity
,
type
:
oldType
}
=
oldVal
;
if
(
name
===
oldName
&&
idNo
===
oldNo
&&
socialSecurity
===
oldSocialSecurity
&&
type
===
oldType
)
return
;
const
{
idNo
,
socialSecurity
,
payType
}
=
val
;
const
{
idNo
:
oldNo
,
socialSecurity
:
oldSocialSecurity
,
payType
:
oldType
}
=
oldVal
;
if
(
idNo
===
oldNo
&&
socialSecurity
===
oldSocialSecurity
&&
payType
===
oldType
)
return
;
this
.
calTimer
=
setTimeout
(()
=>
{
this
.
calFee
(
{
name
,
idNo
,
socialSecurity
,
type
}
);
this
.
calFee
();
},
600
);
}
}
...
...
@@ -196,7 +185,7 @@ export default {
}
},
mounted
()
{
//
this.getDetail();
this
.
getDetail
();
},
methods
:
{
openIframePupop
(
index
)
{
...
...
@@ -220,26 +209,75 @@ export default {
this
.
generateOrder
();
},
generateFormData
()
{
this
.
subFromData
=
{};
const
{
userInfoSecId
,
name
,
idNo
,
relation
,
socialSecurity
,
// selfSocialSecurity,
selfName
,
selfIdNo
,
selfPhone
,
selfSecId
,
payType
,
autoRenewPolicy
}
=
this
.
formData
;
this
.
subFromData
=
{
insuredUserInfo
:
{
userInfoSecId
:
userInfoSecId
??
null
,
name
,
idNo
,
relation
,
socialSecurity
:
!!
Number
(
socialSecurity
)
},
productNo
:
this
.
goodId
,
holderUserInfo
:
{
phoneNo
:
selfPhone
,
userInfoSecId
:
selfSecId
??
null
,
name
:
selfName
,
idNo
:
selfIdNo
// socialSecurity: selfSocialSecurity ? !!Number(selfSocialSecurity) : null
},
productItem
:
{
payType
},
autoRenewPolicy
:
autoRenewPolicy
};
},
async
getDetail
()
{
this
.
goodId
=
this
.
$route
.
query
.
id
;
const
res
=
await
list
();
if
(
res
)
{
res
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
res
.
downPayPrice
;
this
.
headerInfo
.
subPrice
[
0
]
=
res
.
regularPrice
;
if
(
item
.
productNo
===
this
.
goodId
)
{
this
.
headerInfo
.
price
[
0
]
=
item
.
downPayPrice
;
this
.
headerInfo
.
subPrice
[
0
]
=
item
.
regularPrice
;
this
.
headerInfo
.
insuredNum
=
item
.
sellCount
;
}
});
}
},
async
calFee
(
{
name
,
idNo
,
socialSecurity
,
type
}
)
{
async
calFee
()
{
let
{
price
,
subPrice
}
=
this
.
headerInfo
;
const
res
=
await
trail
({
name
,
idNo
,
socialSecurity
,
type
});
const
{
idNo
,
socialSecurity
,
payType
,
userInfoSecId
}
=
this
.
formData
;
if
(
!
idNo
||
!
socialSecurity
||
!
payType
)
return
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
idNo
,
socialSecurity
:
!!
Number
(
socialSecurity
),
userInfoSecId
:
userInfoSecId
??
null
},
productItem
:
{
payType
}
}
};
const
res
=
await
trail
(
_param
);
if
(
res
)
{
price
[
0
]
=
res
.
first
Price
;
price
[
0
]
=
res
.
downPay
Price
;
subPrice
[
0
]
=
res
.
regularPrice
;
this
.
goodActionInfo
=
{
title
:
price
,
...
...
src/views/Goods/Detail/modules/CalInsuredFee.vue
View file @
adae88d6
...
...
@@ -2,38 +2,50 @@
<cr-form
ref=
"calFeeForm"
class=
"policy-form"
@
submit=
"onFormSubmit"
>
<cr-cell-group
title=
"被保人年龄需满足18周岁~60周岁"
>
<cr-field
v-model=
"formData.birth
day
"
name=
"birth
day
"
v-model=
"formData.birth"
name=
"birth"
label=
"出生日期"
:rules=
"[
{ required: true, message: 'required' }]"
>
<template
#input
>
<popup-date-picker
v-model=
"formData.birth
day
"
placeholder=
"请选择被保人出生日期"
/>
<popup-date-picker
v-model=
"formData.birth"
placeholder=
"请选择被保人出生日期"
/>
</
template
>
</cr-field>
<cr-field
name=
"price"
label=
"保障额度"
:rules=
"[{ required: true, message: 'required' }]"
>
<cr-field
name=
"amountInsured"
label=
"保障额度"
:rules=
"[{ required: true, message: 'required' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.
price
"
:radio-data=
"countOptions"
/>
<cr-radio-btn
v-model=
"formData.
amountInsured
"
:radio-data=
"countOptions"
/>
</
template
>
</cr-field>
<cr-field
name=
"term"
label=
"保险期限"
:rules=
"[{ required: true, message: 'required' }]"
>
<cr-field
name=
"policyPeriod"
label=
"保险期限"
:rules=
"[{ required: true, message: 'required' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.
term
"
:radio-data=
"termOptions"
/>
<cr-radio-btn
v-model=
"formData.
policyPeriod
"
:radio-data=
"termOptions"
/>
</
template
>
</cr-field>
<cr-field
name=
"range"
label=
"交费年限"
:rules=
"[{ required: true, message: 'required' }]"
>
<cr-field
name=
"payPeriod"
label=
"交费年限"
:rules=
"[{ required: true, message: 'required' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.
range
"
:radio-data=
"benefitOptions"
/>
<cr-radio-btn
v-model=
"formData.
payPeriod
"
:radio-data=
"benefitOptions"
/>
</
template
>
</cr-field>
<cr-field
name=
"
sex
"
label=
"性别"
:rules=
"[{ required: true, message: 'required' }]"
>
<cr-field
name=
"
gender
"
label=
"性别"
:rules=
"[{ required: true, message: 'required' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.
sex
"
:radio-data=
"sexOptions"
/>
<cr-radio-btn
v-model=
"formData.
gender
"
:radio-data=
"sexOptions"
/>
</
template
>
</cr-field>
<cr-field
name=
"
t
ype"
label=
"交费方式"
:rules=
"[{ required: true, message: 'required' }]"
>
<cr-field
name=
"
payT
ype"
label=
"交费方式"
:rules=
"[{ required: true, message: 'required' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.
t
ype"
:radio-data=
"paywayOptions"
/>
<cr-radio-btn
v-model=
"formData.
payT
ype"
:radio-data=
"paywayOptions"
/>
</
template
>
</cr-field>
</cr-cell-group>
...
...
@@ -63,16 +75,16 @@ export default {
return
{
formData
:
{},
sexOptions
:
[
{
label
:
"
男
"
,
value
:
"
1
"
},
{
label
:
"
女
"
,
value
:
"
2
"
}
{
label
:
"
男
"
,
value
:
"
0
"
},
{
label
:
"
女
"
,
value
:
"
1
"
}
],
countOptions
:
[
{
label
:
"
100万
"
,
value
:
"
1
"
},
{
label
:
"
150万
"
,
value
:
"
2
"
},
{
label
:
"
200万
"
,
value
:
"
3
"
},
{
label
:
"
250万
"
,
value
:
"
4
"
},
{
label
:
"
300万
"
,
value
:
"
5
"
},
{
label
:
"
350万
"
,
value
:
"
6
"
}
{
label
:
"
100万
"
,
value
:
"
1
000000
"
},
{
label
:
"
150万
"
,
value
:
"
15000000
"
},
{
label
:
"
200万
"
,
value
:
"
2000000
"
},
{
label
:
"
250万
"
,
value
:
"
2500000
"
},
{
label
:
"
300万
"
,
value
:
"
3000000
"
},
{
label
:
"
350万
"
,
value
:
"
3500000
"
}
],
termOptions
:
[
{
label
:
"
10年
"
,
value
:
"
1
"
},
...
...
src/views/Goods/Detail/modules/InsurePersonForm.vue
View file @
adae88d6
...
...
@@ -86,6 +86,7 @@
<
script
>
import
Card
from
"
@/components/Card
"
;
import
{
mapState
,
mapActions
}
from
"
vuex
"
;
import
{
getFamilyList
}
from
"
@/api/user
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
CrRadioBtn
from
"
@/components/CrRadioBtn
"
;
const
DATA_CHANGE_EVENT
=
"
input
"
;
...
...
@@ -112,6 +113,7 @@ export default {
data
()
{
return
{
formData
:
{},
familyList
:
[],
mongoToken
:
localStorage
.
get
(
"
mongoToken
"
),
xyqbAuthState
:
localStorage
.
get
(
"
xyqbAuthState
"
)
};
...
...
@@ -150,34 +152,50 @@ export default {
}
},
computed
:
{
...
mapState
([
"
showAuthXyqb
"
]),
...
mapState
(
"
user
"
,
[
"
familyList
"
])
...
mapState
([
"
showAuthXyqb
"
])
},
mounted
()
{
this
.
s
etFamilyList
();
this
.
g
etFamilyList
();
},
methods
:
{
...
mapActions
([
"
setAuthXyqb
"
]),
...
mapActions
(
"
user
"
,
[
"
setFamilyList
"
]),
inputClick
()
{
if
(
this
.
showAuthXyqb
===
1
)
{
this
.
setAuthXyqb
(
2
);
}
},
relationChange
(
relation
=
this
.
formData
.
relation
)
{
const
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
if
(
userArray
.
length
>
0
)
{
this
.
formData
.
name
=
userArray
[
0
].
nameMask
;
this
.
formData
.
idNo
=
userArray
[
0
].
idNoMask
;
this
.
formData
.
socialSecurity
=
userArray
[
0
].
socialSecurity
?
"
1
"
:
"
0
"
;
if
(
relation
===
"
0
"
)
{
this
.
formData
.
selfName
=
userArray
[
0
].
nameMask
;
this
.
formData
.
selfIdNo
=
userArray
[
0
].
idNoMask
;
this
.
familyList
.
forEach
(
item
=>
{
const
{
relation
,
nameMask
:
selfName
,
idNoMask
:
selfIdNo
,
userInfoSecId
:
selfSecId
,
socialSecurity
}
=
item
;
if
(
relation
===
0
)
{
this
.
formData
=
{
...
this
.
formData
,
...{
selfName
,
selfIdNo
,
selfSecId
,
selfSocialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
}
}
else
{
this
.
formData
.
name
=
""
;
this
.
formData
.
idNo
=
""
;
this
.
formData
.
socialSecurity
=
"
0
"
;
});
const
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
"
0
"
];
if
(
userArray
.
length
)
{
let
{
nameMask
,
idNoMask
,
userInfoSecId
:
id
,
socialSecurity
:
ss
}
=
userArray
[
0
];
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
nameMask
,
idNoMask
,
id
,
ss
];
}
this
.
formData
=
{
...
this
.
formData
,
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
},
async
getFamilyList
()
{
const
res
=
await
getFamilyList
();
if
(
res
)
{
this
.
familyList
=
res
;
this
.
showAuthXyqb
&&
this
.
relationChange
();
}
}
}
...
...
src/views/Goods/Inform/index.vue
View file @
adae88d6
...
...
@@ -43,7 +43,42 @@ export default {
this
.
generateOrder
();
},
generateFormData
()
{
this
.
subFromData
=
{};
const
{
productNo
,
userInfoSecId
,
name
,
idNo
,
relation
,
// socialSecurity,
// selfSocialSecurity,
selfName
,
selfIdNo
,
selfPhone
,
selfSecId
,
payType
,
autoRenewPolicy
}
=
this
.
formData
;
this
.
subFromData
=
{
insuredUserInfo
:
{
userInfoSecId
:
userInfoSecId
??
null
,
name
,
idNo
,
relation
// socialSecurity: socialSecurity ? !!Number(socialSecurity) : null
},
productNo
,
holderUserInfo
:
{
phoneNo
:
selfPhone
,
userInfoSecId
:
selfSecId
,
name
:
selfName
,
idNo
:
selfIdNo
// socialSecurity: selfSocialSecurity ? !!Number(selfSocialSecurity) : null
},
productItem
:
{
payType
:
payType
?
payType
:
null
},
autoRenewPolicy
:
autoRenewPolicy
};
}
}
};
...
...
src/views/Policy/Add/index.vue
View file @
adae88d6
...
...
@@ -17,6 +17,7 @@
label=
"姓名"
placeholder=
"请输入投保人姓名"
:rules=
"[
{ require: true, message: '请输入投保人姓名' }]"
@click.native="inputClick"
/>
<cr-field
v-model=
"formData.holderUserInfo.idNo"
...
...
@@ -24,6 +25,7 @@
label=
"身份证号"
placeholder=
"请填写投保人身份证号"
:rules=
"[
{ require: true, message: '请填写投保人身份证号' }]"
@click.native="inputClick"
/>
<cr-field
v-model=
"formData.holderUserInfo.phoneNo"
...
...
@@ -32,6 +34,7 @@
label=
"手机号"
placeholder=
"请填写投保人手机号"
:rules=
"[
{ require: true, message: '请填写投保人手机号' }]"
@click.native="inputClick"
/>
<cr-field
v-model=
"formData.holderUserInfo.email"
...
...
@@ -119,6 +122,7 @@
<
template
#input
>
<cr-radio-btn
v-model=
"formData.insuredUserInfo.relation"
@
input=
"relationChange"
:radio-data=
"insuredOptions"
/>
</
template
>
...
...
@@ -277,7 +281,7 @@
:rules=
"[{ require: true, message: '请选择交费方式' }]"
>
<
template
#input
>
<cr-radio-btn
v-model=
"formData.p
ayPeriod
"
:radio-data=
"paywayOptions"
/>
<cr-radio-btn
v-model=
"formData.p
roductItem.payType
"
:radio-data=
"paywayOptions"
/>
</
template
>
</cr-field>
<cr-field
...
...
@@ -349,8 +353,11 @@ import Stepper from "@/components/Stepper";
import
GoInsureDialog
from
"
@/views/Goods/Detail/modules/GoInsureDialog
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
{
mapState
,
mapActions
}
from
"
vuex
"
;
import
Detail
from
"
@/api/detail.huagui.shouxian
"
;
import
{
detail
,
trail
}
from
"
@/api/product
"
;
import
{
list
,
trail
}
from
"
@/api/product
"
;
import
{
getFamilyList
}
from
"
@/api/user
"
;
const
{
headerInfo
,
popupArray
}
=
Detail
;
export
default
{
name
:
"
AddPolicy
"
,
...
...
@@ -372,13 +379,17 @@ export default {
goInsureState
:
false
,
goodActionInfo
:
{},
goodBuyModalInfo
:
[],
policyFormData
:
JSON
.
parse
(
sessionStorage
.
getItem
(
"
policyFormData
"
)
||
"
{}
"
),
formData
:
{
insuredUserInfo
:
{},
insuredUserInfo
:
{
relation
:
"
0
"
},
holderUserInfo
:
{},
productItem
:
{
insuredAmount
:
"
50
万
"
insuredAmount
:
"
50
0000
"
}
},
familyList
:
[],
formMaskData
:
{},
idCardInvaildOptions
:
[
{
label
:
"
非长期
"
,
value
:
"
1
"
},
...
...
@@ -451,17 +462,38 @@ export default {
});
},
600
);
}
},
showAuthXyqb
:
{
immediate
:
true
,
handler
(
val
)
{
if
(
val
===
4
)
{
const
xyqbUserInfo
=
localStorage
.
get
(
"
xyqbUserInfo
"
);
this
.
formData
.
holderUserInfo
.
name
=
xyqbUserInfo
.
nameMask
;
this
.
formData
.
holderUserInfo
.
idNo
=
xyqbUserInfo
.
idNoMask
;
this
.
formData
.
holderUserInfo
.
phoneNo
=
xyqbUserInfo
.
phoneNoMask
;
this
.
$forceUpdate
();
}
}
}
},
computed
:
{
...
mapState
([
"
showAuthXyqb
"
]),
formDataCpu
()
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
formData
));
}
},
mounted
()
{
this
.
getParamFromSession
();
this
.
getDetail
();
this
.
getFamilyList
();
},
methods
:
{
...
mapActions
([
"
setAuthXyqb
"
]),
inputClick
()
{
if
(
this
.
showAuthXyqb
===
1
)
{
this
.
setAuthXyqb
(
2
);
}
},
onFormSubmit
()
{
this
.
goInsureState
=
true
;
},
...
...
@@ -470,33 +502,86 @@ export default {
this
.
$notify
({
type
:
"
warning
"
,
message
:
errors
[
0
].
message
});
},
nextStep
()
{
this
.
generateFormData
();
this
.
generateOrder
();
},
generateFormData
()
{
this
.
subFromData
=
{};
relationChange
(
relation
=
this
.
formData
.
insuredUserInfo
.
relation
)
{
this
.
familyList
.
forEach
(
item
=>
{
const
{
relation
,
nameMask
:
name
,
idNoMask
:
idNo
,
userInfoSecId
,
socialSecurity
}
=
item
;
if
(
relation
===
0
)
{
this
.
formData
.
holderUserInfo
=
{
...
this
.
formData
.
holderUserInfo
,
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
}
});
const
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
"
0
"
];
if
(
userArray
.
length
)
{
let
{
nameMask
,
idNoMask
,
userInfoSecId
:
id
,
socialSecurity
:
ss
}
=
userArray
[
0
];
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
nameMask
,
idNoMask
,
id
,
ss
];
}
this
.
formData
.
insuredUserInfo
=
{
...
this
.
formData
.
insuredUserInfo
,
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
},
getParamFromSession
()
{
const
{
amountInsured
:
insuredAmount
,
policyPeriod
,
payPeriod
:
paymentPeriod
,
payType
,
productNo
}
=
this
.
policyFormData
;
this
.
formData
.
productNo
=
productNo
;
this
.
formData
.
insuredUserInfo
=
{
...
this
.
formData
.
insuredUserInfo
,
...{
insuredAmount
,
policyPeriod
,
paymentPeriod
,
payType
}
};
this
.
$forceUpdate
();
},
async
getDetail
()
{
this
.
goodId
=
this
.
$route
.
query
.
id
;
const
res
=
await
detail
({
productNo
:
this
.
goodId
});
const
res
=
await
list
();
if
(
res
)
{
this
.
headerInfo
.
price
[
0
]
=
res
.
firstMonthPrice
;
this
.
headerInfo
.
subPrice
[
0
]
=
res
.
price
;
res
.
forEach
(
item
=>
{
if
(
item
.
productNo
===
this
.
formData
.
productNo
)
{
this
.
headerInfo
.
price
[
0
]
=
item
.
downPayPrice
;
}
});
}
},
async
getFamilyList
()
{
const
res
=
await
getFamilyList
();
if
(
res
)
{
this
.
familyList
=
res
;
this
.
showAuthXyqb
&&
this
.
relationChange
();
}
},
async
calFee
()
{
let
{
price
,
subPrice
}
=
this
.
headerInfo
;
const
res
=
await
trail
(
this
.
formData
);
let
{
price
}
=
this
.
headerInfo
;
const
{
birth
,
gender
,
insuredAmount
,
policyPeriod
,
paymentPeriod
,
payType
}
=
this
.
formData
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
birth
,
gender
},
productItem
:
{
amountInsured
:
insuredAmount
,
policyPeriod
,
payPeriod
:
paymentPeriod
,
payType
}
}
};
const
res
=
await
trail
(
_param
);
if
(
res
)
{
price
[
0
]
=
res
.
firstPrice
;
subPrice
[
0
]
=
res
.
regularPrice
;
price
[
0
]
=
res
.
downPayPrice
;
this
.
goodActionInfo
=
{
title
:
price
};
this
.
goodBuyModalInfo
=
[
{
title
:
`
${
price
[
2
]}
保费`
,
value
:
`
${
price
[
0
]}${
price
[
1
]}
`
},
{
title
:
`
${
subPrice
[
2
]}
保费`
,
value
:
`
${
subPrice
[
0
]}${
subPrice
[
1
]}${
subPrice
[
3
]}
`
}
];
this
.
goodBuyModalInfo
=
[{
title
:
`
${
price
[
2
]}
保费`
,
value
:
`
${
price
[
0
]}${
price
[
1
]}
`
}];
}
}
}
...
...
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