mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-06 21:16:44 +08:00
Compare commits
50 Commits
release/【2
...
hotfix/【20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f59c203b9 | ||
|
|
f971318e4c | ||
|
|
56e0a315ed | ||
|
|
af60e7ee49 | ||
|
|
a240169c58 | ||
|
|
93c7c991d8 | ||
|
|
839cd16311 | ||
|
|
5514f65996 | ||
|
|
c41d705394 | ||
|
|
4483280f99 | ||
|
|
157eed1f23 | ||
|
|
3a52e5ed8a | ||
|
|
e8fbcc33c0 | ||
|
|
fb15fc8cd4 | ||
|
|
527a687fee | ||
|
|
71e63645f7 | ||
|
|
7e21178f48 | ||
|
|
5fb321351a | ||
|
|
bec1215624 | ||
|
|
77f1d12543 | ||
|
|
84fb85b58b | ||
|
|
f2dc1d7ee8 | ||
|
|
36f03597cb | ||
|
|
45cf78cf3e | ||
|
|
27218226de | ||
|
|
2c48e0c927 | ||
|
|
13276d9c7f | ||
|
|
96eca99a4e | ||
|
|
3758be49b6 | ||
|
|
e43f9e9881 | ||
|
|
cc73fb4ebb | ||
|
|
f5aec4972b | ||
|
|
bd61c5b8c0 | ||
|
|
9aaa7ad106 | ||
|
|
0de31877e7 | ||
|
|
7c2fcb7993 | ||
|
|
01c5e3acc3 | ||
|
|
23278094ea | ||
|
|
f4fdc05f95 | ||
|
|
49df5e8176 | ||
|
|
33350a4a5b | ||
|
|
0ae0de8e51 | ||
|
|
3d2bca3228 | ||
|
|
5d04db24a7 | ||
|
|
7684831fdc | ||
|
|
47c68db32d | ||
|
|
e6e5c7b375 | ||
|
|
3167d58990 | ||
|
|
09d6f63ab9 | ||
|
|
e782eb1065 |
BIN
src/assets/images/erweima.png
Normal file
BIN
src/assets/images/erweima.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -12,7 +12,17 @@ export default {
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (endage - 5 < 16) {
|
||||
return startDate = String(Number(endDate.slice(0,4)) - 5) + endDate.slice(4,11)
|
||||
let date2_29 = endDate.slice(5, 11)
|
||||
if(date2_29 == '02-29'){
|
||||
let thisyear = Number(endDate.slice(0, 4)) - 5
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return startDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return startDate = thisyear + '-02-28'
|
||||
}
|
||||
}else{
|
||||
return startDate = String(Number(endDate.slice(0, 4)) - 5) + startDate.slice(4, 11)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
@@ -23,7 +33,17 @@ export default {
|
||||
startDate = String(Number(endDate.slice(0,4)) - 10) + endDate.slice(4,11)
|
||||
startage = utilsAge.getAge(birthday, new Date(startDate))
|
||||
if(startage >= 16 && startage <= 25){
|
||||
return startDate
|
||||
let date2_29 = endDate.slice(5, 11)
|
||||
if(date2_29 == '02-29') {
|
||||
let thisyear = Number(endDate.slice(0, 4)) - 10
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return startDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return startDate = thisyear + '-02-28'
|
||||
}
|
||||
} else {
|
||||
return startDate
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -35,7 +55,17 @@ export default {
|
||||
startDate = String(Number(endDate.slice(0,4)) - 20) + endDate.slice(4,11)
|
||||
startage = utilsAge.getAge(birthday, new Date(startDate))
|
||||
if(startage >= 26 && startage <= 45){
|
||||
return startDate
|
||||
let date2_29 = endDate.slice(5, 11)
|
||||
if(date2_29 == '02-29') {
|
||||
let thisyear = Number(endDate.slice(0, 4)) - 20
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return startDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return startDate = thisyear + '-02-28'
|
||||
}
|
||||
} else {
|
||||
return startDate
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -58,7 +88,17 @@ export default {
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (startage < 16) {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 5) + startDate.slice(4, 11)
|
||||
let date2_29 = startDate.slice(5, 11)
|
||||
if(date2_29 == '02-29') {
|
||||
let thisyear = Number(startDate.slice(0, 4)) + 5
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return endDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return endDate = thisyear + '-02-28'
|
||||
}
|
||||
} else {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 5) + startDate.slice(4, 11)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
@@ -66,7 +106,17 @@ export default {
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
else if (startage >= 16 && startage <= 25) {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 10) + startDate.slice(4, 11)
|
||||
let date2_29 = startDate.slice(5, 11)
|
||||
if(date2_29 == '02-29') {
|
||||
let thisyear = Number(startDate.slice(0, 4)) + 10
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return endDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return endDate = thisyear + '-02-28'
|
||||
}
|
||||
} else {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 10) + startDate.slice(4, 11)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
@@ -74,7 +124,17 @@ export default {
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
else if (startage >= 26 && startage <= 45) {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 20) + startDate.slice(4, 11)
|
||||
let date2_29 = startDate.slice(5, 11)
|
||||
if(date2_29 == '02-29') {
|
||||
let thisyear = Number(startDate.slice(0, 4)) + 20
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return endDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return endDate = thisyear + '-02-28'
|
||||
}
|
||||
} else {
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 20) + startDate.slice(4, 11)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
@@ -84,5 +144,21 @@ export default {
|
||||
else if (startage > 65) {
|
||||
return endDate
|
||||
}
|
||||
},
|
||||
|
||||
//计算户口本截止日期
|
||||
getEndDate2: function(birthday, startDate) {
|
||||
let endDate = ''
|
||||
let date2_29 = startDate.slice(5, 11)
|
||||
if(date2_29 == '02-29'){
|
||||
let thisyear = Number(startDate.slice(0, 4)) + 16
|
||||
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
|
||||
return endDate = thisyear + '-02-29'
|
||||
} else {
|
||||
return endDate = thisyear + '-02-28'
|
||||
}
|
||||
}else{
|
||||
return endDate = String(Number(startDate.slice(0, 4)) + 16) + startDate.slice(4, 11)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -965,10 +965,10 @@ export default {
|
||||
id: 2,
|
||||
text: '户口本'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: '出生证'
|
||||
},
|
||||
// {
|
||||
// id: 3,
|
||||
// text: '出生证'
|
||||
// },
|
||||
{
|
||||
id: 4,
|
||||
text: '外国人护照'
|
||||
@@ -1059,6 +1059,36 @@ export default {
|
||||
text: '户口本'
|
||||
}
|
||||
],
|
||||
// 新市民身份
|
||||
isNewPeopleFlag: [
|
||||
{
|
||||
id: 1,
|
||||
text: '是'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
text: '否'
|
||||
}
|
||||
],
|
||||
// 新市民类型 创业、就业、子女上学、投奔子女
|
||||
npType: [
|
||||
{
|
||||
id: 1,
|
||||
text: '创业'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: '就业'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: '子女上学'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: '投奔子女'
|
||||
}
|
||||
],
|
||||
//出生证明
|
||||
birthType: [
|
||||
{
|
||||
@@ -3727,36 +3757,36 @@ export default {
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "AppntModerateOrMinorDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
code: "AppntModerateOrMinorDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "AppntDeathOrTotalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
code: "AppntDeathOrTotalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "InsuredCriticalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
code: "InsuredCriticalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "InsuredModerateOrMinorDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
code: "InsuredModerateOrMinorDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "InsuredDeathOrTotalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
code: "InsuredDeathOrTotalDiseaseExemptionPremiumC",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "transport_G",
|
||||
label: "元"
|
||||
code: "transport_G",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "transport_H",
|
||||
label: "元"
|
||||
code: "transport_H",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "transport_J",
|
||||
label: "元"
|
||||
code: "transport_J",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "firstMajorDiseaseInsurance",
|
||||
@@ -3778,6 +3808,14 @@ export default {
|
||||
code: "GFRS_M0073__cashValue",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "specMajorDiseaseInsurance",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "expireSurvivalInsurance",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "currentBonus_L",
|
||||
label: "元"
|
||||
@@ -3814,9 +3852,21 @@ export default {
|
||||
code: "supplementarySpecificDiseaseInsurance",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "deductible",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "deductible",
|
||||
label: "免赔额"
|
||||
},
|
||||
{
|
||||
code: "accidentalDeductible",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "accidentalLimit",
|
||||
label: "%"
|
||||
}
|
||||
],
|
||||
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,24 +3,24 @@
|
||||
<!-- 基本信息 -->
|
||||
<p class="title pl10 pv12 mt10">基本信息</p>
|
||||
<van-field
|
||||
v-model="userInfo.customerName"
|
||||
required
|
||||
clearable
|
||||
label="姓名"
|
||||
name="姓名"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|name'"
|
||||
v-model="userInfo.customerName"
|
||||
required
|
||||
clearable
|
||||
label="姓名"
|
||||
name="姓名"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|name'"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.customerPhone"
|
||||
required
|
||||
clearable
|
||||
label="移动电话"
|
||||
name="移动电话"
|
||||
placeholder="请输入"
|
||||
maxlength="11"
|
||||
type="tel"
|
||||
v-validate="'required|mobile'"
|
||||
v-model="userInfo.customerPhone"
|
||||
required
|
||||
clearable
|
||||
label="移动电话"
|
||||
name="移动电话"
|
||||
placeholder="请输入"
|
||||
maxlength="11"
|
||||
type="tel"
|
||||
v-validate="'required|mobile'"
|
||||
/>
|
||||
<form-block :userInfo="userInfo" ref="formBlock"></form-block>
|
||||
<van-button type="danger" class="bottom-btn" @click="save" v-no-more-click="1000">保存</van-button>
|
||||
@@ -28,303 +28,307 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Field, CellGroup, Cell } from 'vant'
|
||||
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||
import { Field, CellGroup, Cell, RadioGroup, Radio, } from 'vant'
|
||||
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||
|
||||
export default {
|
||||
name: 'addCustomer',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Cell.name]: Cell,
|
||||
[formBlock.name]: formBlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
customerName: '', //姓名
|
||||
customerPhone: '', // 手机号
|
||||
customerSex: '0', //性别
|
||||
nativeplace: '1', //国家地区
|
||||
province: '', //户籍省
|
||||
city: '', //户籍市
|
||||
birthday: '', //出生日期
|
||||
idType: '1', //证件类型
|
||||
customerIdNumber: '', //证件号码
|
||||
certificateValidate: '', //证件起始日期
|
||||
certiexpiredate: '', //证件到期时间
|
||||
effectiveDateType: false, //是否长期
|
||||
email: '', //电子邮箱
|
||||
stature: '', //身高
|
||||
weight: '', //体重,
|
||||
customerType: '0', //客户类别
|
||||
customerSource: '-1', //客户来源
|
||||
degree: '', //文化程度
|
||||
socialSecurity: '0', //有无社保
|
||||
taxIdentity: '1', //税收居民身份
|
||||
occupationCode: '', //职业类别
|
||||
occupationName: '',
|
||||
lifeGrade: '', //寿险等级
|
||||
healthGrade: '', //健康等级
|
||||
averageYearlyIncome: '', //平均年收入
|
||||
liabilitiesMoney: '', //负债金额
|
||||
workUnits: '', //工作单位
|
||||
workCondition: '', //在职情况
|
||||
companyProvince: '', //单位省
|
||||
companyCity: '', //单位市
|
||||
companyArea: '', //单位区
|
||||
companyAddress: '', //单位详细地址
|
||||
companyZip: '', //单位邮编
|
||||
companyPhone: '', //单位电话
|
||||
marriage: '', //婚姻状况
|
||||
familyAnnualIncome: '', //家庭年收入
|
||||
homeProvince: '', //家庭省
|
||||
homeCity: '', //家庭市
|
||||
homeArea: '', //家庭区
|
||||
homeAddress: '', //家庭详细地址
|
||||
homeZip: '', //家庭邮编
|
||||
homePhone: '' //家庭电话
|
||||
export default {
|
||||
name: 'addCustomer',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Cell.name]: Cell,
|
||||
[formBlock.name]: formBlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
customerName: '', //姓名
|
||||
customerPhone: '', // 手机号
|
||||
customerSex: '0', //性别
|
||||
nativeplace: '1', //国家地区
|
||||
province: '', //户籍省
|
||||
city: '', //户籍市
|
||||
birthday: '', //出生日期
|
||||
idType: '1', //证件类型
|
||||
customerIdNumber: '', //证件号码
|
||||
certificateValidate: '', //证件起始日期
|
||||
certiexpiredate: '', //证件到期时间
|
||||
effectiveDateType: false, //是否长期
|
||||
email: '', //电子邮箱
|
||||
stature: '', //身高
|
||||
weight: '', //体重,
|
||||
customerType: '0', //客户类别
|
||||
customerSource: '-1', //客户来源
|
||||
degree: '', //文化程度
|
||||
socialSecurity: '0', //有无社保
|
||||
taxIdentity: '1', //税收居民身份
|
||||
occupationCode: '', //职业类别
|
||||
occupationName: '',
|
||||
lifeGrade: '', //寿险等级
|
||||
healthGrade: '', //健康等级
|
||||
averageYearlyIncome: '', //平均年收入
|
||||
liabilitiesMoney: '', //负债金额
|
||||
workUnits: '', //工作单位
|
||||
workCondition: '', //在职情况
|
||||
companyProvince: '', //单位省
|
||||
companyCity: '', //单位市
|
||||
companyArea: '', //单位区
|
||||
companyAddress: '', //单位详细地址
|
||||
companyZip: '', //单位邮编
|
||||
companyPhone: '', //单位电话
|
||||
marriage: '', //婚姻状况
|
||||
familyAnnualIncome: '', //家庭年收入
|
||||
homeProvince: '', //家庭省
|
||||
homeCity: '', //家庭市
|
||||
homeArea: '', //家庭区
|
||||
homeAddress: '', //家庭详细地址
|
||||
homeZip: '', //家庭邮编
|
||||
homePhone: '', //家庭电话
|
||||
isNewPeopleFlag: '', //新市民身份
|
||||
npType: '', //新市民类型
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.filterBtn() //按钮初始化
|
||||
//window.appCallBack = this.appCallBack //app回调
|
||||
},
|
||||
methods: {
|
||||
// filterBtn() {
|
||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
// btns: [
|
||||
// {
|
||||
// // img:"@/assets/images/u12045.png",
|
||||
// title: '保存'
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// },
|
||||
// appCallBack(data) {
|
||||
// if (data.trigger == 'right_button_click') {
|
||||
// if (data.index == 0 && this.loading) {
|
||||
// this.$validator.validate().then(valid => {
|
||||
// if (true === valid) {
|
||||
// this.updateCustomerInfo()
|
||||
// } else {
|
||||
// this.$toast(this.$validator.errors.all()[0])
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
save() {
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
let vf1 = this.$refs.formBlock.validateForm()
|
||||
Promise.all([vf1]).then(result => {
|
||||
if (result.indexOf(false) > -1) {
|
||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||
return
|
||||
} else if (this.userInfo.customerIdNumber) {
|
||||
this.$refs.formBlock.validateIdType()
|
||||
} else if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
this.$refs.formBlock.validateMarr()
|
||||
} else {
|
||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
},
|
||||
mounted() {
|
||||
//this.filterBtn() //按钮初始化
|
||||
//window.appCallBack = this.appCallBack //app回调
|
||||
},
|
||||
methods: {
|
||||
// filterBtn() {
|
||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
// btns: [
|
||||
// {
|
||||
// // img:"@/assets/images/u12045.png",
|
||||
// title: '保存'
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// },
|
||||
// appCallBack(data) {
|
||||
// if (data.trigger == 'right_button_click') {
|
||||
// if (data.index == 0 && this.loading) {
|
||||
// this.$validator.validate().then(valid => {
|
||||
// if (true === valid) {
|
||||
// this.updateCustomerInfo()
|
||||
// } else {
|
||||
// this.$toast(this.$validator.errors.all()[0])
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
save() {
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
let vf1 = this.$refs.formBlock.validateForm()
|
||||
Promise.all([vf1]).then(result => {
|
||||
if (result.indexOf(false) > -1) {
|
||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||
return
|
||||
} else if (this.userInfo.customerIdNumber) {
|
||||
this.$refs.formBlock.validateIdType()
|
||||
} else if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
this.$refs.formBlock.validateMarr()
|
||||
} else {
|
||||
this.updateCustomerInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
updateCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
agentCustomerInfoDTO: {
|
||||
customerNumber: '',
|
||||
customerName: $this.userInfo.customerName,
|
||||
customerPhone: $this.userInfo.customerPhone,
|
||||
customerSex: $this.userInfo.customerSex,
|
||||
country: $this.userInfo.nativeplace,
|
||||
//rgtaddress: $this.userInfo.census,
|
||||
birthday: $this.userInfo.birthday,
|
||||
customerIdType: $this.userInfo.idType,
|
||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||
idEffectEndDate: $this.userInfo.certiexpiredate,
|
||||
email: $this.userInfo.email,
|
||||
height: $this.userInfo.stature,
|
||||
weight: $this.userInfo.weight,
|
||||
customerType: $this.userInfo.customerType,
|
||||
customerSource: $this.userInfo.customerSource,
|
||||
educationLevel: $this.userInfo.degree,
|
||||
socialSecurity: $this.userInfo.socialSecurity,
|
||||
residentStatus: $this.userInfo.taxIdentity,
|
||||
occupationCode: $this.userInfo.occupationCode,
|
||||
occupationName: $this.userInfo.occupationName,
|
||||
lifeGrade: $this.userInfo.lifeGrade,
|
||||
healthGrade: $this.userInfo.healthGrade,
|
||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||
workUnits: $this.userInfo.workUnits,
|
||||
jobStatus: $this.userInfo.workCondition,
|
||||
companyProvince: $this.userInfo.companyProvince,
|
||||
companyCity: $this.userInfo.companyCity,
|
||||
companyArea: $this.userInfo.companyArea,
|
||||
companyAddress: $this.userInfo.companyAddress,
|
||||
companyZip: $this.userInfo.companyZip,
|
||||
companyPhone: $this.userInfo.companyPhone,
|
||||
marryStatus: $this.userInfo.marriage,
|
||||
homeProvince: $this.userInfo.homeProvince,
|
||||
homeCity: $this.userInfo.homeCity,
|
||||
homeArea: $this.userInfo.homeArea,
|
||||
homeAddress: $this.userInfo.homeAddress,
|
||||
homeZip: $this.userInfo.homeZip,
|
||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||
province: $this.userInfo.province,
|
||||
city: $this.userInfo.city,
|
||||
homePhone: $this.userInfo.homePhone
|
||||
}
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||
break
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||
break
|
||||
}
|
||||
updateCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
refresh: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/customerList'
|
||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
this.$refs.formBlock.validateMarr()
|
||||
} else {
|
||||
this.updateCustomerInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$this.$toast(res.resultMessage)
|
||||
this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
})
|
||||
.catch(err => {})
|
||||
},
|
||||
updateCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
agentCustomerInfoDTO: {
|
||||
customerNumber: '',
|
||||
customerName: $this.userInfo.customerName,
|
||||
customerPhone: $this.userInfo.customerPhone,
|
||||
customerSex: $this.userInfo.customerSex,
|
||||
country: $this.userInfo.nativeplace,
|
||||
//rgtaddress: $this.userInfo.census,
|
||||
birthday: $this.userInfo.birthday,
|
||||
customerIdType: $this.userInfo.idType,
|
||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||
idEffectEndDate: $this.userInfo.certiexpiredate,
|
||||
email: $this.userInfo.email,
|
||||
height: $this.userInfo.stature,
|
||||
weight: $this.userInfo.weight,
|
||||
customerType: $this.userInfo.customerType,
|
||||
customerSource: $this.userInfo.customerSource,
|
||||
educationLevel: $this.userInfo.degree,
|
||||
socialSecurity: $this.userInfo.socialSecurity,
|
||||
residentStatus: $this.userInfo.taxIdentity,
|
||||
occupationCode: $this.userInfo.occupationCode,
|
||||
occupationName: $this.userInfo.occupationName,
|
||||
lifeGrade: $this.userInfo.lifeGrade,
|
||||
healthGrade: $this.userInfo.healthGrade,
|
||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||
workUnits: $this.userInfo.workUnits,
|
||||
jobStatus: $this.userInfo.workCondition,
|
||||
companyProvince: $this.userInfo.companyProvince,
|
||||
companyCity: $this.userInfo.companyCity,
|
||||
companyArea: $this.userInfo.companyArea,
|
||||
companyAddress: $this.userInfo.companyAddress,
|
||||
companyZip: $this.userInfo.companyZip,
|
||||
companyPhone: $this.userInfo.companyPhone,
|
||||
marryStatus: $this.userInfo.marriage,
|
||||
homeProvince: $this.userInfo.homeProvince,
|
||||
homeCity: $this.userInfo.homeCity,
|
||||
homeArea: $this.userInfo.homeArea,
|
||||
homeAddress: $this.userInfo.homeAddress,
|
||||
homeZip: $this.userInfo.homeZip,
|
||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||
province: $this.userInfo.province,
|
||||
city: $this.userInfo.city,
|
||||
homePhone: $this.userInfo.homePhone,
|
||||
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
||||
npType: $this.userInfo.npType,
|
||||
}
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||
break
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||
break
|
||||
}
|
||||
updateCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
refresh: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/customerList'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
.catch(err => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.van-index-anchor {
|
||||
background: #fff;
|
||||
}
|
||||
.container {
|
||||
padding-bottom: 45px;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 10px;
|
||||
}
|
||||
.title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
.van-index-anchor {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
.sex-radio {
|
||||
.radio-area {
|
||||
display: -webkit-flex;
|
||||
.container {
|
||||
padding-bottom: 45px;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.item {
|
||||
width: 70px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #ea5b50;
|
||||
border-radius: 20px;
|
||||
text-align: center;
|
||||
color: #ea5b50;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.active {
|
||||
background: #ea5b50;
|
||||
color: #fff;
|
||||
justify-content: flex-end;
|
||||
padding: 10px;
|
||||
}
|
||||
.title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
.sex-radio {
|
||||
.radio-area {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.item {
|
||||
width: 70px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #ea5b50;
|
||||
border-radius: 20px;
|
||||
text-align: center;
|
||||
color: #ea5b50;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.active {
|
||||
background: #ea5b50;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
<p class="title pl10 pv12 mt10">基本信息</p>
|
||||
<div v-if="source == 'app'">
|
||||
<van-field
|
||||
v-model="userInfo.customerName"
|
||||
required
|
||||
clearable
|
||||
label="姓名"
|
||||
name="姓名"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|name'"
|
||||
v-model="userInfo.customerName"
|
||||
required
|
||||
clearable
|
||||
label="姓名"
|
||||
name="姓名"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|name'"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.customerPhone"
|
||||
required
|
||||
clearable
|
||||
label="移动电话"
|
||||
name="移动电话"
|
||||
placeholder="请输入"
|
||||
maxlength="11"
|
||||
type="tel"
|
||||
v-validate="'required|mobile'"
|
||||
v-model="userInfo.customerPhone"
|
||||
required
|
||||
clearable
|
||||
label="移动电话"
|
||||
name="移动电话"
|
||||
placeholder="请输入"
|
||||
maxlength="11"
|
||||
type="tel"
|
||||
v-validate="'required|mobile'"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -34,456 +34,462 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Field, CellGroup, Cell } from 'vant'
|
||||
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||
import { constants } from 'crypto'
|
||||
import { Field, CellGroup, Cell } from 'vant'
|
||||
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||
import { constants } from 'crypto'
|
||||
|
||||
export default {
|
||||
name: 'editCustomer',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Cell.name]: Cell,
|
||||
[formBlock.name]: formBlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
source: this.$route.query.from,
|
||||
appName: this.$route.query.name,
|
||||
appPhone: this.$route.query.tel,
|
||||
customerNumber: localStorage.getItem('customerNumber'),
|
||||
userInfo: {
|
||||
customerName: '', //姓名
|
||||
customerPhone: '', // 手机号
|
||||
customerSex: '0', //性别
|
||||
nativeplace: '1', //国家地区
|
||||
province: '', //户籍省
|
||||
city: '', //户籍市
|
||||
birthday: '', //出生日期
|
||||
idType: '1', //证件类型
|
||||
customerIdNumber: '', //证件号码
|
||||
certificateValidate: '', //证件起始日期
|
||||
certiexpiredate: '', //证件到期时间
|
||||
effectiveDateType: false, //是否长期
|
||||
email: '', //电子邮箱
|
||||
stature: '', //身高
|
||||
weight: '', //体重,
|
||||
customerType: '0', //客户类别
|
||||
customerSource: '-1', //客户来源
|
||||
degree: '', //文化程度
|
||||
socialSecurity: '0', //有无社保
|
||||
taxIdentity: '1', //税收居民身份
|
||||
occupationCode: '', //职业类别
|
||||
occupationName: '',
|
||||
lifeGrade: '', //寿险等级
|
||||
healthGrade: '', //健康等级
|
||||
averageYearlyIncome: '', //平均年收入
|
||||
liabilitiesMoney: '', //负债金额
|
||||
workUnits: '', //工作单位
|
||||
workCondition: '', //在职情况
|
||||
companyProvince: '', //单位省
|
||||
companyCity: '', //单位市
|
||||
companyArea: '', //单位区
|
||||
companyAddress: '', //单位详细地址
|
||||
companyZip: '', //单位邮编
|
||||
companyPhone: '', //单位电话
|
||||
marriage: '', //婚姻状况
|
||||
familyAnnualIncome: '', //家庭年收入
|
||||
homeProvince: '', //家庭省
|
||||
homeCity: '', //家庭市
|
||||
homeArea: '', //家庭区
|
||||
homeAddress: '', //家庭详细地址
|
||||
homeZip: '', //家庭邮编
|
||||
homePhone: '' //家庭电话
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.filterBtn() //按钮初始化
|
||||
//window.appCallBack = this.appCallBack //app回调
|
||||
//数据回显
|
||||
if (this.source == 'app') {
|
||||
this.userInfo.customerName = this.appName
|
||||
this.userInfo.customerPhone = this.appPhone
|
||||
this.customerNumber = ''
|
||||
} else {
|
||||
this.getCustomerInfo() //获取客户信息
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// filterBtn() {
|
||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
// btns: [
|
||||
// {
|
||||
// img:"@/assets/images/u12045.png",
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// },
|
||||
// appCallBack(data) {
|
||||
// if (data.trigger == 'right_button_click') {
|
||||
// if (data.index == 0 && this.loading) {
|
||||
// this.updateCustomerInfo() //保存信息
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
getCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
customerNumber: $this.customerNumber
|
||||
}
|
||||
getAgentCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
let result = res.content
|
||||
$this.userInfo.nativeplace = result.country
|
||||
$this.userInfo.idType = result.customerIdType
|
||||
$this.userInfo.degree = result.educationLevel
|
||||
$this.userInfo.taxIdentity = result.residentStatus
|
||||
$this.userInfo.marriage = result.marryStatus
|
||||
$this.userInfo.socialSecurity = result.socialSecurity
|
||||
$this.userInfo.customerName = result.customerName
|
||||
$this.userInfo.customerPhone = result.customerPhone
|
||||
$this.userInfo.customerSex = result.customerSex
|
||||
$this.userInfo.birthday = result.birthday
|
||||
$this.userInfo.customerIdNumber = result.customerIdNumber
|
||||
$this.userInfo.certificateValidate = result.idEffectStartDate
|
||||
$this.userInfo.certiexpiredate = result.idEffectEndDate
|
||||
$this.userInfo.email = result.email
|
||||
$this.userInfo.stature = result.height
|
||||
$this.userInfo.weight = result.weight
|
||||
$this.userInfo.customerType = result.customerType
|
||||
$this.userInfo.customerSource = result.customerSource
|
||||
$this.userInfo.occupationName = result.occupationName
|
||||
$this.userInfo.occupationCode = result.occupationCode
|
||||
$this.userInfo.lifeGrade = result.lifeGrade
|
||||
$this.userInfo.healthGrade = result.healthGrade
|
||||
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
|
||||
$this.userInfo.workUnits = result.workUnits
|
||||
$this.userInfo.province = result.province
|
||||
$this.userInfo.city = result.city
|
||||
$this.userInfo.homeAddress = result.homeAddress
|
||||
$this.userInfo.homeZip = result.homeZip
|
||||
$this.userInfo.homePhone = result.homePhone
|
||||
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
|
||||
$this.userInfo.workCondition = result.jobStatus
|
||||
$this.userInfo.companyAddress = result.companyAddress
|
||||
$this.userInfo.companyZip = result.companyZip
|
||||
$this.userInfo.companyPhone = result.companyPhone
|
||||
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
|
||||
$this.userInfo.companyProvince = result.companyProvince
|
||||
$this.userInfo.companyCity = result.companyCity
|
||||
$this.userInfo.companyArea = result.companyArea
|
||||
$this.userInfo.homeProvince = result.homeProvince
|
||||
$this.userInfo.homeCity = result.homeCity
|
||||
$this.userInfo.homeArea = result.homeArea
|
||||
sessionStorage.setItem('birthday', result.birthday)
|
||||
sessionStorage.setItem('idType', result.customerIdType)
|
||||
|
||||
switch ($this.userInfo.companyArea) {
|
||||
case '500229':
|
||||
$this.userInfo.companyArea = '500129'
|
||||
break
|
||||
case '500230':
|
||||
$this.userInfo.companyArea = '500130'
|
||||
break
|
||||
case '500231':
|
||||
$this.userInfo.companyArea = '500131'
|
||||
break
|
||||
case '500233':
|
||||
$this.userInfo.companyArea = '500133'
|
||||
break
|
||||
case '500235':
|
||||
$this.userInfo.companyArea = '500135'
|
||||
break
|
||||
case '500236':
|
||||
$this.userInfo.companyArea = '500136'
|
||||
break
|
||||
case '500237':
|
||||
$this.userInfo.companyArea = '500137'
|
||||
break
|
||||
case '500238':
|
||||
$this.userInfo.companyArea = '500138'
|
||||
break
|
||||
case '500240':
|
||||
$this.userInfo.companyArea = '500140'
|
||||
break
|
||||
case '500241':
|
||||
$this.userInfo.companyArea = '500141'
|
||||
break
|
||||
case '500242':
|
||||
$this.userInfo.companyArea = '500142'
|
||||
break
|
||||
case '500243':
|
||||
$this.userInfo.companyArea = '500143'
|
||||
break
|
||||
}
|
||||
switch ($this.userInfo.homeArea) {
|
||||
case '500229':
|
||||
$this.userInfo.homeArea = '500129'
|
||||
break
|
||||
case '500230':
|
||||
$this.userInfo.homeArea = '500130'
|
||||
break
|
||||
case '500231':
|
||||
$this.userInfo.homeArea = '500131'
|
||||
break
|
||||
case '500233':
|
||||
$this.userInfo.homeArea = '500133'
|
||||
break
|
||||
case '500235':
|
||||
$this.userInfo.homeArea = '500135'
|
||||
break
|
||||
case '500236':
|
||||
$this.userInfo.homeArea = '500136'
|
||||
break
|
||||
case '500237':
|
||||
$this.userInfo.homeArea = '500137'
|
||||
break
|
||||
case '500238':
|
||||
$this.userInfo.homeArea = '500138'
|
||||
break
|
||||
case '500240':
|
||||
$this.userInfo.homeArea = '500140'
|
||||
break
|
||||
case '500241':
|
||||
$this.userInfo.homeArea = '500141'
|
||||
break
|
||||
case '500242':
|
||||
$this.userInfo.homeArea = '500142'
|
||||
break
|
||||
case '500243':
|
||||
$this.userInfo.homeArea = '500143'
|
||||
break
|
||||
}
|
||||
this.$refs.formBlock.isEndFlag()
|
||||
//查询职业名称
|
||||
// occupationList.forEach(first => {
|
||||
// first.subs.forEach(second => {
|
||||
// second.subs.forEach(third => {
|
||||
// if (third.code == result.occupationCode) {
|
||||
// $this.userInfo.occupationName = third.name
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
}
|
||||
})
|
||||
.catch(err => {})
|
||||
export default {
|
||||
name: 'editCustomer',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Cell.name]: Cell,
|
||||
[formBlock.name]: formBlock
|
||||
},
|
||||
save() {
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
let vf1 = this.$refs.formBlock.validateForm()
|
||||
Promise.all([vf1]).then(result => {
|
||||
if (result.indexOf(false) > -1) {
|
||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||
return
|
||||
} else if (this.userInfo.customerIdNumber) {
|
||||
this.$refs.formBlock.validateIdType()
|
||||
} else {
|
||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
this.$refs.formBlock.validateMarr()
|
||||
data() {
|
||||
return {
|
||||
source: this.$route.query.from,
|
||||
appName: this.$route.query.name,
|
||||
appPhone: this.$route.query.tel,
|
||||
customerNumber: localStorage.getItem('customerNumber'),
|
||||
userInfo: {
|
||||
customerName: '', //姓名
|
||||
customerPhone: '', // 手机号
|
||||
customerSex: '0', //性别
|
||||
nativeplace: '1', //国家地区
|
||||
province: '', //户籍省
|
||||
city: '', //户籍市
|
||||
birthday: '', //出生日期
|
||||
idType: '1', //证件类型
|
||||
customerIdNumber: '', //证件号码
|
||||
certificateValidate: '', //证件起始日期
|
||||
certiexpiredate: '', //证件到期时间
|
||||
effectiveDateType: false, //是否长期
|
||||
email: '', //电子邮箱
|
||||
stature: '', //身高
|
||||
weight: '', //体重,
|
||||
customerType: '0', //客户类别
|
||||
customerSource: '-1', //客户来源
|
||||
degree: '', //文化程度
|
||||
socialSecurity: '0', //有无社保
|
||||
taxIdentity: '1', //税收居民身份
|
||||
occupationCode: '', //职业类别
|
||||
occupationName: '',
|
||||
lifeGrade: '', //寿险等级
|
||||
healthGrade: '', //健康等级
|
||||
averageYearlyIncome: '', //平均年收入
|
||||
liabilitiesMoney: '', //负债金额
|
||||
workUnits: '', //工作单位
|
||||
workCondition: '', //在职情况
|
||||
companyProvince: '', //单位省
|
||||
companyCity: '', //单位市
|
||||
companyArea: '', //单位区
|
||||
companyAddress: '', //单位详细地址
|
||||
companyZip: '', //单位邮编
|
||||
companyPhone: '', //单位电话
|
||||
marriage: '', //婚姻状况
|
||||
familyAnnualIncome: '', //家庭年收入
|
||||
homeProvince: '', //家庭省
|
||||
homeCity: '', //家庭市
|
||||
homeArea: '', //家庭区
|
||||
homeAddress: '', //家庭详细地址
|
||||
homeZip: '', //家庭邮编
|
||||
homePhone: '', //家庭电话
|
||||
isNewPeopleFlag: '', //新市民身份
|
||||
npType: '', //新市民类型
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.filterBtn() //按钮初始化
|
||||
//window.appCallBack = this.appCallBack //app回调
|
||||
//数据回显
|
||||
if (this.source == 'app') {
|
||||
this.userInfo.customerName = this.appName
|
||||
this.userInfo.customerPhone = this.appPhone
|
||||
this.customerNumber = ''
|
||||
} else {
|
||||
this.getCustomerInfo() //获取客户信息
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// filterBtn() {
|
||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
// btns: [
|
||||
// {
|
||||
// img:"@/assets/images/u12045.png",
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// },
|
||||
// appCallBack(data) {
|
||||
// if (data.trigger == 'right_button_click') {
|
||||
// if (data.index == 0 && this.loading) {
|
||||
// this.updateCustomerInfo() //保存信息
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
getCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
customerNumber: $this.customerNumber
|
||||
}
|
||||
getAgentCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
let result = res.content
|
||||
$this.userInfo.nativeplace = result.country
|
||||
$this.userInfo.idType = result.customerIdType
|
||||
$this.userInfo.degree = result.educationLevel
|
||||
$this.userInfo.taxIdentity = result.residentStatus
|
||||
$this.userInfo.marriage = result.marryStatus
|
||||
$this.userInfo.socialSecurity = result.socialSecurity
|
||||
$this.userInfo.customerName = result.customerName
|
||||
$this.userInfo.customerPhone = result.customerPhone
|
||||
$this.userInfo.customerSex = result.customerSex
|
||||
$this.userInfo.birthday = result.birthday
|
||||
$this.userInfo.customerIdNumber = result.customerIdNumber
|
||||
$this.userInfo.certificateValidate = result.idEffectStartDate
|
||||
$this.userInfo.certiexpiredate = result.idEffectEndDate
|
||||
$this.userInfo.email = result.email
|
||||
$this.userInfo.stature = result.height
|
||||
$this.userInfo.weight = result.weight
|
||||
$this.userInfo.customerType = result.customerType
|
||||
$this.userInfo.customerSource = result.customerSource
|
||||
$this.userInfo.occupationName = result.occupationName
|
||||
$this.userInfo.occupationCode = result.occupationCode
|
||||
$this.userInfo.lifeGrade = result.lifeGrade
|
||||
$this.userInfo.healthGrade = result.healthGrade
|
||||
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
|
||||
$this.userInfo.workUnits = result.workUnits
|
||||
$this.userInfo.province = result.province
|
||||
$this.userInfo.city = result.city
|
||||
$this.userInfo.homeAddress = result.homeAddress
|
||||
$this.userInfo.homeZip = result.homeZip
|
||||
$this.userInfo.homePhone = result.homePhone
|
||||
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
|
||||
$this.userInfo.workCondition = result.jobStatus
|
||||
$this.userInfo.companyAddress = result.companyAddress
|
||||
$this.userInfo.companyZip = result.companyZip
|
||||
$this.userInfo.companyPhone = result.companyPhone
|
||||
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
|
||||
$this.userInfo.companyProvince = result.companyProvince
|
||||
$this.userInfo.companyCity = result.companyCity
|
||||
$this.userInfo.companyArea = result.companyArea
|
||||
$this.userInfo.homeProvince = result.homeProvince
|
||||
$this.userInfo.homeCity = result.homeCity
|
||||
$this.userInfo.homeArea = result.homeArea
|
||||
$this.userInfo.isNewPeopleFlag = result.isNewPeopleFlag
|
||||
$this.userInfo.npType = result.npType
|
||||
sessionStorage.setItem('birthday', result.birthday)
|
||||
sessionStorage.setItem('idType', result.customerIdType)
|
||||
|
||||
switch ($this.userInfo.companyArea) {
|
||||
case '500229':
|
||||
$this.userInfo.companyArea = '500129'
|
||||
break
|
||||
case '500230':
|
||||
$this.userInfo.companyArea = '500130'
|
||||
break
|
||||
case '500231':
|
||||
$this.userInfo.companyArea = '500131'
|
||||
break
|
||||
case '500233':
|
||||
$this.userInfo.companyArea = '500133'
|
||||
break
|
||||
case '500235':
|
||||
$this.userInfo.companyArea = '500135'
|
||||
break
|
||||
case '500236':
|
||||
$this.userInfo.companyArea = '500136'
|
||||
break
|
||||
case '500237':
|
||||
$this.userInfo.companyArea = '500137'
|
||||
break
|
||||
case '500238':
|
||||
$this.userInfo.companyArea = '500138'
|
||||
break
|
||||
case '500240':
|
||||
$this.userInfo.companyArea = '500140'
|
||||
break
|
||||
case '500241':
|
||||
$this.userInfo.companyArea = '500141'
|
||||
break
|
||||
case '500242':
|
||||
$this.userInfo.companyArea = '500142'
|
||||
break
|
||||
case '500243':
|
||||
$this.userInfo.companyArea = '500143'
|
||||
break
|
||||
}
|
||||
switch ($this.userInfo.homeArea) {
|
||||
case '500229':
|
||||
$this.userInfo.homeArea = '500129'
|
||||
break
|
||||
case '500230':
|
||||
$this.userInfo.homeArea = '500130'
|
||||
break
|
||||
case '500231':
|
||||
$this.userInfo.homeArea = '500131'
|
||||
break
|
||||
case '500233':
|
||||
$this.userInfo.homeArea = '500133'
|
||||
break
|
||||
case '500235':
|
||||
$this.userInfo.homeArea = '500135'
|
||||
break
|
||||
case '500236':
|
||||
$this.userInfo.homeArea = '500136'
|
||||
break
|
||||
case '500237':
|
||||
$this.userInfo.homeArea = '500137'
|
||||
break
|
||||
case '500238':
|
||||
$this.userInfo.homeArea = '500138'
|
||||
break
|
||||
case '500240':
|
||||
$this.userInfo.homeArea = '500140'
|
||||
break
|
||||
case '500241':
|
||||
$this.userInfo.homeArea = '500141'
|
||||
break
|
||||
case '500242':
|
||||
$this.userInfo.homeArea = '500142'
|
||||
break
|
||||
case '500243':
|
||||
$this.userInfo.homeArea = '500143'
|
||||
break
|
||||
}
|
||||
this.$refs.formBlock.isEndFlag()
|
||||
//查询职业名称
|
||||
// occupationList.forEach(first => {
|
||||
// first.subs.forEach(second => {
|
||||
// second.subs.forEach(third => {
|
||||
// if (third.code == result.occupationCode) {
|
||||
// $this.userInfo.occupationName = third.name
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
}
|
||||
})
|
||||
.catch(err => {})
|
||||
},
|
||||
save() {
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
let vf1 = this.$refs.formBlock.validateForm()
|
||||
Promise.all([vf1]).then(result => {
|
||||
if (result.indexOf(false) > -1) {
|
||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||
return
|
||||
} else if (this.userInfo.customerIdNumber) {
|
||||
this.$refs.formBlock.validateIdType()
|
||||
} else {
|
||||
this.updateCustomerInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
updateCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
agentCustomerInfoDTO: {
|
||||
customerNumber: $this.customerNumber,
|
||||
customerName: $this.userInfo.customerName,
|
||||
customerPhone: $this.userInfo.customerPhone,
|
||||
customerSex: $this.userInfo.customerSex,
|
||||
country: $this.userInfo.nativeplace,
|
||||
//rgtaddress: $this.userInfo.census,
|
||||
birthday: $this.userInfo.birthday,
|
||||
customerIdType: $this.userInfo.idType,
|
||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
|
||||
email: $this.userInfo.email,
|
||||
height: $this.userInfo.stature,
|
||||
weight: $this.userInfo.weight,
|
||||
customerType: $this.userInfo.customerType,
|
||||
customerSource: $this.userInfo.customerSource,
|
||||
educationLevel: $this.userInfo.degree,
|
||||
socialSecurity: $this.userInfo.socialSecurity,
|
||||
residentStatus: $this.userInfo.taxIdentity,
|
||||
occupationCode: $this.userInfo.occupationCode,
|
||||
occupationName: $this.userInfo.occupationName,
|
||||
lifeGrade: $this.userInfo.lifeGrade,
|
||||
healthGrade: $this.userInfo.healthGrade,
|
||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||
workUnits: $this.userInfo.workUnits,
|
||||
jobStatus: $this.userInfo.workCondition,
|
||||
companyProvince: $this.userInfo.companyProvince,
|
||||
companyCity: $this.userInfo.companyCity,
|
||||
companyArea: $this.userInfo.companyArea,
|
||||
companyAddress: $this.userInfo.companyAddress,
|
||||
companyZip: $this.userInfo.companyZip,
|
||||
companyPhone: $this.userInfo.companyPhone,
|
||||
marryStatus: $this.userInfo.marriage,
|
||||
homeProvince: $this.userInfo.homeProvince,
|
||||
homeCity: $this.userInfo.homeCity,
|
||||
homeArea: $this.userInfo.homeArea,
|
||||
homeAddress: $this.userInfo.homeAddress,
|
||||
homeZip: $this.userInfo.homeZip,
|
||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||
province: $this.userInfo.province,
|
||||
city: $this.userInfo.city,
|
||||
homePhone: $this.userInfo.homePhone
|
||||
}
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||
break
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||
break
|
||||
}
|
||||
updateCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
// EWebBridge.webCallAppInJs("bridge",{
|
||||
// "flag":"webview_toast",
|
||||
// "extra":{"content":res.resultMessage}
|
||||
// })
|
||||
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
refresh: '1',
|
||||
index: this.$route.query.from == 2 ? '-2' : '-1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/customerList'
|
||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||
this.$refs.formBlock.validateMarr()
|
||||
} else {
|
||||
this.updateCustomerInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$this.$toast(res.resultMessage)
|
||||
// EWebBridge.webCallAppInJs("bridge",{
|
||||
// "flag":"webview_toast",
|
||||
// "extra":{"content":res.resultMessage}
|
||||
// })
|
||||
this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
go(path) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/customer/' + path
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/' + path
|
||||
},
|
||||
updateCustomerInfo() {
|
||||
let $this = this
|
||||
let data = {
|
||||
agentCustomerInfoDTO: {
|
||||
customerNumber: $this.customerNumber,
|
||||
customerName: $this.userInfo.customerName,
|
||||
customerPhone: $this.userInfo.customerPhone,
|
||||
customerSex: $this.userInfo.customerSex,
|
||||
country: $this.userInfo.nativeplace,
|
||||
//rgtaddress: $this.userInfo.census,
|
||||
birthday: $this.userInfo.birthday,
|
||||
customerIdType: $this.userInfo.idType,
|
||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
|
||||
email: $this.userInfo.email,
|
||||
height: $this.userInfo.stature,
|
||||
weight: $this.userInfo.weight,
|
||||
customerType: $this.userInfo.customerType,
|
||||
customerSource: $this.userInfo.customerSource,
|
||||
educationLevel: $this.userInfo.degree,
|
||||
socialSecurity: $this.userInfo.socialSecurity,
|
||||
residentStatus: $this.userInfo.taxIdentity,
|
||||
occupationCode: $this.userInfo.occupationCode,
|
||||
occupationName: $this.userInfo.occupationName,
|
||||
lifeGrade: $this.userInfo.lifeGrade,
|
||||
healthGrade: $this.userInfo.healthGrade,
|
||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||
workUnits: $this.userInfo.workUnits,
|
||||
jobStatus: $this.userInfo.workCondition,
|
||||
companyProvince: $this.userInfo.companyProvince,
|
||||
companyCity: $this.userInfo.companyCity,
|
||||
companyArea: $this.userInfo.companyArea,
|
||||
companyAddress: $this.userInfo.companyAddress,
|
||||
companyZip: $this.userInfo.companyZip,
|
||||
companyPhone: $this.userInfo.companyPhone,
|
||||
marryStatus: $this.userInfo.marriage,
|
||||
homeProvince: $this.userInfo.homeProvince,
|
||||
homeCity: $this.userInfo.homeCity,
|
||||
homeArea: $this.userInfo.homeArea,
|
||||
homeAddress: $this.userInfo.homeAddress,
|
||||
homeZip: $this.userInfo.homeZip,
|
||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||
province: $this.userInfo.province,
|
||||
city: $this.userInfo.city,
|
||||
homePhone: $this.userInfo.homePhone,
|
||||
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
||||
npType: $this.userInfo.npType,
|
||||
}
|
||||
}
|
||||
})
|
||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||
break
|
||||
}
|
||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||
case '500129':
|
||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||
break
|
||||
case '500130':
|
||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||
break
|
||||
case '500131':
|
||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||
break
|
||||
case '500133':
|
||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||
break
|
||||
case '500135':
|
||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||
break
|
||||
case '500136':
|
||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||
break
|
||||
case '500137':
|
||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||
break
|
||||
case '500138':
|
||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||
break
|
||||
case '500140':
|
||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||
break
|
||||
case '500141':
|
||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||
break
|
||||
case '500142':
|
||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||
break
|
||||
case '500143':
|
||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||
break
|
||||
}
|
||||
updateCustomerInfo(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
// EWebBridge.webCallAppInJs("bridge",{
|
||||
// "flag":"webview_toast",
|
||||
// "extra":{"content":res.resultMessage}
|
||||
// })
|
||||
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
refresh: '1',
|
||||
index: this.$route.query.from == 2 ? '-2' : '-1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/customerList'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$this.$toast(res.resultMessage)
|
||||
// EWebBridge.webCallAppInJs("bridge",{
|
||||
// "flag":"webview_toast",
|
||||
// "extra":{"content":res.resultMessage}
|
||||
// })
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
go(path) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/customer/' + path
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/customer/' + path
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.van-index-anchor {
|
||||
background: #fff;
|
||||
}
|
||||
.container {
|
||||
padding-bottom: 45px;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 10px;
|
||||
}
|
||||
.title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
.van-index-anchor {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
}
|
||||
.bd {
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.container {
|
||||
padding-bottom: 45px;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 10px;
|
||||
}
|
||||
.title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
}
|
||||
.bd {
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -338,7 +338,7 @@ export default {
|
||||
}
|
||||
|
||||
submit(data).then(res => {
|
||||
if (res.reslut == '0') {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('submitStatus', res.result)
|
||||
this.$jump({
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required label="银行卡账户" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<div @click="test('fileListBank', '3', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListBank"
|
||||
v-model="fileListBank"
|
||||
@@ -36,7 +36,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdFront', '1', saleInsuredInfo.appntId, saleInsuredInfo.idType)" class="flex align-items-e">
|
||||
<div @click="test('fileListIdFront', '1', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)" class="flex align-items-e">
|
||||
<van-uploader
|
||||
name="fileListIdFront"
|
||||
v-model="fileListIdFront"
|
||||
@@ -50,7 +50,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdBack', '2', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<div @click="test('fileListIdBack', '2', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListIdBack"
|
||||
v-model="fileListIdBack"
|
||||
@@ -66,7 +66,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="`${item.text}头像面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileLIstImg', '8', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<div @click="test('fileLIstImg', '8', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileLIstImg"
|
||||
v-model="fileLIstImg"
|
||||
@@ -83,7 +83,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required label="银行卡正面" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<div @click="test('fileListBank', '3', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListBank"
|
||||
v-model="fileListBank"
|
||||
@@ -97,7 +97,7 @@
|
||||
<van-cell-group v-if="isNotify">
|
||||
<van-field label="健康告知异常类资料" disabled />
|
||||
</van-cell-group>
|
||||
<div v-if="isNotify" @click="test('fileListNotify', '24', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<div v-if="isNotify" @click="test('fileListNotify', '24', '0', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListNotify"
|
||||
v-model="fileListNotify"
|
||||
@@ -125,7 +125,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdFrontInsured', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<div @click="test('fileListIdFrontInsured', '1', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListIdFrontInsured"
|
||||
v-model="fileListIdFrontInsured"
|
||||
@@ -139,7 +139,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdBackInsured', '2', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<div @click="test('fileListIdBackInsured', '2', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListIdBackInsured"
|
||||
v-model="fileListIdBackInsured"
|
||||
@@ -155,7 +155,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="`${item.text}头像页`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileLIstImgInsured', '8', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<div @click="test('fileLIstImgInsured', '8', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileLIstImgInsured"
|
||||
v-model="fileLIstImgInsured"
|
||||
@@ -172,7 +172,7 @@
|
||||
<van-cell-group v-if="isNotifyInsured">
|
||||
<van-field label="健康告知异常类资料" disabled />
|
||||
</van-cell-group>
|
||||
<div v-if="isNotifyInsured" @click="test('fileListNotifyInsured', '24', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<div v-if="isNotifyInsured" @click="test('fileListNotifyInsured', '24', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||
<van-uploader
|
||||
name="fileListNotifyInsured"
|
||||
v-model="fileListNotifyInsured"
|
||||
@@ -200,7 +200,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}户主页` : `${item01.name}+${item.text}正面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdFrontBeneficiary', '1', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<div @click="test('fileListIdFrontBeneficiary', '1', '3', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<van-uploader
|
||||
:name="'fileListIdFrontBeneficiary'+index01"
|
||||
v-model="bnfInfo[index01].fileListIdFrontBeneficiary"
|
||||
@@ -214,7 +214,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}本人页` : `${item01.name}+${item.text}反面`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileListIdBackBeneficiary', '2', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<div @click="test('fileListIdBackBeneficiary', '2', '3', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<van-uploader
|
||||
:name="'fileListIdBackBeneficiary'+index01"
|
||||
v-model="bnfInfo[index01].fileListIdBackBeneficiary"
|
||||
@@ -230,7 +230,7 @@
|
||||
<van-cell-group>
|
||||
<van-field required :label="`${item01.name}+${item.text}头像页`" disabled />
|
||||
</van-cell-group>
|
||||
<div @click="test('fileLIstImgBeneficiary', '8', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<div @click="test('fileLIstImgBeneficiary', '8', '3', item01.bnfId, item01.idType, item01.bnfId)">
|
||||
<van-uploader
|
||||
:name="'fileLIstImgBeneficiary'+index01"
|
||||
v-model="bnfInfo[index01].fileLIstImgBeneficiary"
|
||||
@@ -265,6 +265,12 @@
|
||||
>下一步</van-button
|
||||
>
|
||||
</div>
|
||||
<van-dialog v-model="thisdialogshow" title="提示" confirmButtonText="返回修改">
|
||||
<div style="padding: 20px;font-size: 14px;">
|
||||
<div style="margin-bottom: 10px;letter-spacing: 1px;color: #E9332E;">校验失败原因:</div>
|
||||
<div v-for="(item,index) in thisdialogcontent" style="margin-bottom: 10px;letter-spacing: 1px;">{{index+1}}:{{item}}</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -280,6 +286,8 @@ import utils from '../../../assets/js/business-common'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
thisdialogshow: false,
|
||||
thisdialogcontent: '',
|
||||
isNotify: false, //是否有异常的健康告知
|
||||
isNotifyInsured: false,
|
||||
// 订单号
|
||||
@@ -352,7 +360,8 @@ export default {
|
||||
changeCard: localStorage.changeCard,
|
||||
salePageFlag: '9',
|
||||
imageType: '',
|
||||
subBusinessNo: ''
|
||||
subBusinessNo: '',
|
||||
subBusinessType: '',
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@@ -750,8 +759,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
test(name, type, subBusinessNo, id, bnfId) {
|
||||
test(name, type, subBusinessType, subBusinessNo, id, bnfId) {
|
||||
this.imageType = type
|
||||
this.subBusinessType = subBusinessType
|
||||
this.bnfId = bnfId
|
||||
this.id = id
|
||||
this.type = name
|
||||
@@ -829,7 +839,7 @@ export default {
|
||||
businessType: '',
|
||||
imageInfoType: that.imageType,
|
||||
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
|
||||
subBusinessType: '0',
|
||||
subBusinessType: that.subBusinessType,
|
||||
subBusinessNo: that.subBusinessNo,
|
||||
fileName: that.imgName,
|
||||
}
|
||||
@@ -1015,13 +1025,18 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 点击下一步
|
||||
next() {
|
||||
let that = this
|
||||
that.list.map((i) => {
|
||||
delete i.name
|
||||
})
|
||||
let nowTime = new Date().getTime()
|
||||
let localTime = window.localStorage.getItem('serrorTime')
|
||||
if(nowTime - localTime < 20000){
|
||||
this.$toast('您操作过于频繁,请20S后再试!')
|
||||
return false
|
||||
}
|
||||
let data = {
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
@@ -1066,12 +1081,21 @@ export default {
|
||||
},
|
||||
})
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: res.resultMessage,
|
||||
confirmButtonColor:'#FF0000',
|
||||
showCancelButton:false
|
||||
})
|
||||
let thisTime = new Date().getTime()
|
||||
window.localStorage.setItem('serrorTime',thisTime)
|
||||
if (res.resultMessage.indexOf('Engine') != -1) {
|
||||
this.thisdialogshow = true
|
||||
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦~请确认并重新录入,如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为:本人、配偶、子女、父母,人工审核中,请您耐心等待哦~'
|
||||
this.thisdialogcontent = res.resultMessage.split('【Engine】')
|
||||
this.thisdialogcontent.splice(0, 1)
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: res.resultMessage,
|
||||
confirmButtonColor: '#FF0000',
|
||||
showCancelButton: false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -1293,4 +1317,7 @@ export default {
|
||||
.redRadioCheckbox {
|
||||
overflow: hidden;
|
||||
}
|
||||
/deep/ .van-field__label{
|
||||
width: 50vw;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,7 @@ import { Cell, CellGroup, RadioGroup, Radio, Dialog } from 'vant'
|
||||
import { acceptInsurance, getBankCardSignState,payFlag, underWrite, getOrderDetail,signConfirm} from '@/api/ebiz/sale/sale'
|
||||
import Loading from '@/components/ebiz/Loading'
|
||||
import config from '@/config'
|
||||
import { wxShare } from '@/api/ebiz/common/common.js'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
@@ -202,6 +203,25 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOpenid(){
|
||||
wxShare({ url: location.href }).then(response => {
|
||||
if (response.result == '0') {
|
||||
let orderNo = this.$route.query.orderNo
|
||||
let code = this.getUrlParam('code')
|
||||
if(!code){
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + response.content.appid + '&redirect_uri=' + encodeURIComponent(location.href + '?orderNo=' + orderNo) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
}else{
|
||||
window.location.href = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' + response.content.appid + '&secret=' + response.content.appsecret + '&code=' + code + '&grant_type=authorization_code'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取地址上的参数
|
||||
getUrlParam(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]); return null;
|
||||
},
|
||||
async payMentWx(orderNo){
|
||||
const res = await payFlag({ orderNo: orderNo })
|
||||
console.dir(res)
|
||||
@@ -225,6 +245,9 @@ export default {
|
||||
orderNo: this.orderNo,
|
||||
payType: this.radio
|
||||
}
|
||||
if(that.isWeixin){
|
||||
data.payType = 'WXJSAPI'
|
||||
}
|
||||
acceptInsurance(data).then(res => {
|
||||
console.log('----取支付参数结果:', JSON.stringify(res))
|
||||
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
|
||||
@@ -432,7 +455,7 @@ export default {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: `国富人寿电子投保单(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
content: '投保单号:'+ localStorage.orderNo + '\n' + '支付金额:' + this.underWriteData.orderAmount + '元',
|
||||
url: location.origin + '/#/sale/payMent?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
|
||||
@@ -21,13 +21,21 @@
|
||||
<!-- <div v-if="payStatus != '2' && payStatus != '1'" class=" p10 pb250 bg-white">
|
||||
<span class="pt150 fs14"> 如有相关问题,请联系信息技术部运维人员</span>
|
||||
</div> -->
|
||||
<div v-if="payStatus == '1'" class=" p10 pb250 bg-white">
|
||||
<span class="pt150 fs14"> 核心承保中,请您稍后查看</span>
|
||||
<div class="mt15" v-if="this.manageComCode == '45'">
|
||||
<span class="pt150 fs14 green fwb">
|
||||
温馨提示:为维护您的合法权益,广西保险行业协会将向您发送满意度调查短信,欢迎回复短信对我们的销售和服务进行监督。
|
||||
</span>
|
||||
<!-- <div v-if="payStatus == '1'" class=" p10 pb250 bg-white">-->
|
||||
<!-- <span class="pt150 fs14"> 核心承保中,请您稍后查看</span>-->
|
||||
<!-- <div class="mt15" v-if="this.manageComCode == '45'">-->
|
||||
<!-- <span class="pt150 fs14 green fwb">-->
|
||||
<!-- 温馨提示:为维护您的合法权益,广西保险行业协会将向您发送满意度调查短信,欢迎回复短信对我们的销售和服务进行监督。-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="payStatus == '1'" class="p10 pb250 bg-white" style="text-align: center;padding-top: 50px!important;">
|
||||
<p style="text-align: center;font-weight: bold;">温馨提示</p>
|
||||
<p style="text-align: center;">您可识别下方官方微信"国富人寿"二维码关注公众号,查询您的保单信息和服务</p>
|
||||
<div style="padding: 20px;">
|
||||
<img :src="erweima" style="width: 60vw;"/>
|
||||
</div>
|
||||
<p style="text-align: center;font-weight: bold;">长按识别二维码</p>
|
||||
</div>
|
||||
<div v-if="payStatus == '2' || payStatus == '4' || payStatus == '8'" class=" p10 pb250 bg-white">
|
||||
<span v-html="resMessage"></span>
|
||||
@@ -51,161 +59,162 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Cell, CellGroup } from 'vant'
|
||||
import { getPayState } from '@/api/ebiz/sale/sale'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
isWeixin,
|
||||
// 保融收银台返回的支付流水号
|
||||
paySeqNo: '',
|
||||
// 接口返回数据前,不做页面渲染
|
||||
isReady: true,
|
||||
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
|
||||
isReloaded: false,
|
||||
// 结果原因
|
||||
resMessage: '',
|
||||
// 支付结果
|
||||
payStatus: '',
|
||||
// 支付信息
|
||||
payInfo: {
|
||||
appntName: '', // 投保人
|
||||
prtNo: '', // 投保单号
|
||||
amnt: '' // 支付金额
|
||||
import { Cell, CellGroup } from 'vant'
|
||||
import { getPayState } from '@/api/ebiz/sale/sale'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
import erweima from '@/assets/images/erweima.png'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
isWeixin,
|
||||
// 保融收银台返回的支付流水号
|
||||
paySeqNo: '',
|
||||
// 接口返回数据前,不做页面渲染
|
||||
isReady: true,
|
||||
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
|
||||
isReloaded: false,
|
||||
// 结果原因
|
||||
resMessage: '',
|
||||
// 支付结果
|
||||
payStatus: '',
|
||||
// 支付信息
|
||||
payInfo: {
|
||||
appntName: '', // 投保人
|
||||
prtNo: '', // 投保单号
|
||||
amnt: '' // 支付金额
|
||||
},
|
||||
// 图片
|
||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||
srcPending: this.$assetsUrl + 'images/pending.png',
|
||||
srcFail: this.$assetsUrl + 'images/fail.png',
|
||||
erweima,
|
||||
manageComCode:''//代理人管理机构 52贵州 45广西
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
next() {
|
||||
if(this.isWeixin){
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
}else{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/list'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/list'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 图片
|
||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||
srcPending: this.$assetsUrl + 'images/pending.png',
|
||||
srcFail: this.$assetsUrl + 'images/fail.png',
|
||||
manageComCode:''//代理人管理机构 52贵州 45广西
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
next() {
|
||||
if(this.isWeixin){
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
}else{
|
||||
// 查询支付状态
|
||||
queryPayState() {
|
||||
this.$toast.clear()
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = { orderNo: this.paySeqNo }
|
||||
getPayState(data).then(res => {
|
||||
this.$toast.clear()
|
||||
this.isReady = true
|
||||
console.log('----支付结果查询', JSON.stringify(res))
|
||||
if (res.result == '0') {
|
||||
this.payStatus = res.payStatus
|
||||
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
|
||||
this.resMessage = res.message
|
||||
// 如果是支付中,2秒后,重新获取一次支付状态
|
||||
if (this.payStatus == '4' && !this.isReloaded) {
|
||||
this.isReloaded = true
|
||||
setTimeout(() => {
|
||||
this.queryPayState()
|
||||
}, 2000)
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重新支付
|
||||
rePayMent() {
|
||||
// localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
// 再次支付 salelist为 0
|
||||
localStorage.salelist = '0'
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/list'
|
||||
url: location.origin + '/#/sale/payMent'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/list'
|
||||
path: '/sale/payMent'
|
||||
}
|
||||
})
|
||||
},
|
||||
//更换卡号
|
||||
changeCard() {
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询支付状态
|
||||
queryPayState() {
|
||||
this.$toast.clear()
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = { orderNo: this.paySeqNo }
|
||||
getPayState(data).then(res => {
|
||||
this.$toast.clear()
|
||||
this.isReady = true
|
||||
console.log('----支付结果查询', JSON.stringify(res))
|
||||
if (res.result == '0') {
|
||||
this.payStatus = res.payStatus
|
||||
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
|
||||
this.resMessage = res.message
|
||||
// 如果是支付中,2秒后,重新获取一次支付状态
|
||||
if (this.payStatus == '4' && !this.isReloaded) {
|
||||
this.isReloaded = true
|
||||
setTimeout(() => {
|
||||
this.queryPayState()
|
||||
}, 2000)
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
created() {
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
},
|
||||
// 重新支付
|
||||
rePayMent() {
|
||||
// localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
// 再次支付 salelist为 0
|
||||
localStorage.salelist = '0'
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/payMent'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/payMent'
|
||||
}
|
||||
})
|
||||
},
|
||||
//更换卡号
|
||||
changeCard() {
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
},
|
||||
async mounted() {
|
||||
let that = this
|
||||
// document.body.style.backgroundColor = '#fff'
|
||||
that.payStatus = window.localStorage.getItem('payStatus')
|
||||
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
|
||||
if (window.localStorage.getItem('resMessage') != null) {
|
||||
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
|
||||
}
|
||||
async mounted() {
|
||||
let that = this
|
||||
// document.body.style.backgroundColor = '#fff'
|
||||
that.payStatus = window.localStorage.getItem('payStatus')
|
||||
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
|
||||
if (window.localStorage.getItem('resMessage') != null) {
|
||||
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
|
||||
}
|
||||
|
||||
this.paySeqNo = this.$route.query.RdSeq
|
||||
if (!this.paySeqNo) {
|
||||
this.$toast({ message: '参数错误,缺少支付流水号‘RdSeq’查询参数', duration: 5000 })
|
||||
} else {
|
||||
this.queryPayState()
|
||||
this.paySeqNo = this.$route.query.RdSeq
|
||||
if (!this.paySeqNo) {
|
||||
this.$toast({ message: '参数错误,缺少支付流水号‘RdSeq’查询参数', duration: 5000 })
|
||||
} else {
|
||||
this.queryPayState()
|
||||
}
|
||||
//获取代理人管理机构 52贵州 45广西
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
}
|
||||
//获取代理人管理机构 52贵州 45广西
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.payResult-container {
|
||||
.payResult-header {
|
||||
width: 345px;
|
||||
// height: 143px;
|
||||
.payResult-img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
.payResult-container {
|
||||
.payResult-header {
|
||||
width: 345px;
|
||||
// height: 143px;
|
||||
.payResult-img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// /deep/ .van-cell__value {
|
||||
// text-align: left;
|
||||
// }
|
||||
// /deep/ .van-cell__value {
|
||||
// text-align: left;
|
||||
// }
|
||||
</style>
|
||||
|
||||
@@ -226,6 +226,12 @@
|
||||
}}</van-button>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<van-dialog v-model="thisnewpeopledialogshow" title="提示" confirmButtonText="确定">
|
||||
<div style="padding: 20px;font-size: 14px;padding-top: 0px;">
|
||||
<div style="line-height: 25px;letter-spacing: 1px;">尊敬的客户您好!</div>
|
||||
<div style="line-height: 25px;letter-spacing: 1px;text-indent: 2em;">感谢您投保我公司“爱心保/安心保”产品,在本保险合同生效后被保险人将获得一份专属的健康管理服务,详情请登录公司官方微信公众号“国富人寿保险”>发现国富>新市民专区 查询或拨打公司客服热线400-694-6688咨询,本服务为无偿提供。</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -253,6 +259,7 @@ export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
thisnewpeopledialogshow: false,
|
||||
isInsuYearFlag: false, //是否为长期险
|
||||
isVideo: false, //是否已阅读视频
|
||||
isVideoNext: false,
|
||||
@@ -1477,28 +1484,28 @@ export default {
|
||||
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保险人关系赋值给页面
|
||||
|
||||
that.recmd = res.orderDTO.recmdDTO
|
||||
that.orderInfo = res.orderDTO.orderInfoDTO
|
||||
that.insured = res.orderDTO.insuredDTOs
|
||||
// 初始化RID状态
|
||||
this.realPeopleRidInfo.appntRidFlag = res.orderDTO.appntDTO.ridStatus
|
||||
this.realPeopleRidInfo.insureRidFlag = res.orderDTO.insuredDTOs[0].ridStatus
|
||||
//存code区分万能型产品
|
||||
let productCode, riskName
|
||||
let isDoubleMailRisk = that.orderInfo.isDoubleMailRisk
|
||||
if (isDoubleMailRisk == '1') {
|
||||
productCode = 'GFRS_M0017'
|
||||
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[1].riskName
|
||||
} else {
|
||||
productCode = that.insured[0].riskDTOLst[0].mainRiskCode
|
||||
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
|
||||
}
|
||||
if (that.orderInfo && that.orderInfo.activeType) {
|
||||
that.$CacheUtils.setLocItem('activeType',that.orderInfo.activeType)
|
||||
}
|
||||
localStorage.setItem('productCode', productCode)
|
||||
this.riskName = riskName
|
||||
localStorage.setItem('riskName', riskName)
|
||||
that.recmd = res.orderDTO.recmdDTO
|
||||
that.orderInfo = res.orderDTO.orderInfoDTO
|
||||
that.insured = res.orderDTO.insuredDTOs
|
||||
// 初始化RID状态
|
||||
this.realPeopleRidInfo.appntRidFlag = res.orderDTO.appntDTO.ridStatus
|
||||
this.realPeopleRidInfo.insureRidFlag = res.orderDTO.insuredDTOs[0].ridStatus
|
||||
//存code区分万能型产品
|
||||
let productCode, riskName
|
||||
let isDoubleMailRisk = that.orderInfo.isDoubleMailRisk
|
||||
if (isDoubleMailRisk == '1') {
|
||||
productCode = 'GFRS_M0017'
|
||||
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[1].riskName
|
||||
} else {
|
||||
productCode = that.insured[0].riskDTOLst[0].mainRiskCode
|
||||
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
|
||||
}
|
||||
if (that.orderInfo && that.orderInfo.activeType) {
|
||||
that.$CacheUtils.setLocItem('activeType',that.orderInfo.activeType)
|
||||
}
|
||||
localStorage.setItem('productCode', productCode)
|
||||
this.riskName = riskName
|
||||
localStorage.setItem('riskName', riskName)
|
||||
|
||||
if (this.relationToAppnt != '1') {
|
||||
this.activeNames.push(res.orderDTO.insuredDTOs.length + 1)
|
||||
@@ -1569,6 +1576,9 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
if(res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0076' || res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0077') {
|
||||
that.thisnewpeopledialogshow = true
|
||||
}
|
||||
resolve('success')
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
|
||||
@@ -373,7 +373,7 @@ export default {
|
||||
}
|
||||
|
||||
submit(data).then(res => {
|
||||
if (res.reslut == '0') {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('submitStatus', res.result)
|
||||
this.$jump({
|
||||
|
||||
@@ -343,7 +343,7 @@ export default {
|
||||
}
|
||||
|
||||
submit(data).then(res => {
|
||||
if (res.reslut == '0') {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('submitStatus', res.result)
|
||||
this.$jump({
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<van-cell title="证件类型" :value="appntDTO.idTypeText" />
|
||||
<van-cell title="证件号码" :value="appntDTO.idNo" />
|
||||
<van-cell title="联系电话" :value="appntDTO.mobileStar" />
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="appntDTO.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="appntDTO.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="appntDTO.npTypeTypeText" />-->
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
|
||||
@@ -33,6 +35,8 @@
|
||||
<van-cell title="证件类型" :value="item.idTypeText" />
|
||||
<van-cell title="证件号码" :value="item.idNo" />
|
||||
<van-cell title="联系电话" :value="item.mobile" />
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="item.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="item.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="item.npTypeText" />-->
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
<div v-for="(itm, i) in item.bnfDTOs" :key="i" class="pb10">
|
||||
@@ -85,7 +89,7 @@
|
||||
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" />
|
||||
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{
|
||||
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
|
||||
}}</van-button>
|
||||
}}</van-button>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<!-- 2019-09-27 版上线不含“回执签收” marked by panglizong on 2019-09-26 -->
|
||||
@@ -96,355 +100,366 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
|
||||
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
|
||||
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false, // 获取短信验证码
|
||||
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||
timeId: null, // 计时器ID
|
||||
countDown: 60, // 倒计时
|
||||
authCode: '', // 验证码
|
||||
smsAuthNum: 3,
|
||||
operaFlag: null,
|
||||
encyCustomerMobile: null,
|
||||
customerMobile: null,
|
||||
sid: null,
|
||||
//人脸识别认证次数
|
||||
faceAuthCount: {
|
||||
appnt: 0,
|
||||
insured: 0,
|
||||
weixin: 0
|
||||
},
|
||||
// 折叠面板
|
||||
activeNames: ['1'],
|
||||
// 保单基本信息
|
||||
OrderInfoDTO: {},
|
||||
// 投保人信息
|
||||
appntDTO: {},
|
||||
// 被保险人信息
|
||||
insuredDTOs: [],
|
||||
// 保单号
|
||||
contNo: '',
|
||||
|
||||
list: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
// 右上角的显示
|
||||
window.EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/share@3x.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack
|
||||
// 获取保单详情
|
||||
this.getPolicyDetail()
|
||||
},
|
||||
components: {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Button.name]: Button,
|
||||
[Field.name]: Field,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
methods: {
|
||||
// 获取短信验证码
|
||||
getAuthCode() {
|
||||
this.codeDisabled = true
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
}
|
||||
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
|
||||
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
|
||||
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false, // 获取短信验证码
|
||||
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||
timeId: null, // 计时器ID
|
||||
countDown: 60, // 倒计时
|
||||
authCode: '', // 验证码
|
||||
smsAuthNum: 3,
|
||||
operaFlag: null,
|
||||
encyCustomerMobile: null,
|
||||
customerMobile: null,
|
||||
sid: null,
|
||||
//人脸识别认证次数
|
||||
faceAuthCount: {
|
||||
appnt: 0,
|
||||
insured: 0,
|
||||
weixin: 0
|
||||
},
|
||||
// 折叠面板
|
||||
activeNames: ['1'],
|
||||
// 保单基本信息
|
||||
OrderInfoDTO: {},
|
||||
// 投保人信息
|
||||
appntDTO: {},
|
||||
// 被保险人信息
|
||||
insuredDTOs: [],
|
||||
// 保单号
|
||||
contNo: '',
|
||||
manageComCode:'',//代理人管理机构 52贵州 45广西
|
||||
list: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
// 右上角的显示
|
||||
window.EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/share@3x.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 1000)
|
||||
getAuthCode({
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.customerMobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
window['appCallBack'] = this.appCallBack
|
||||
// 获取保单详情
|
||||
this.getPolicyDetail()
|
||||
},
|
||||
async mounted() {
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
components: {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Button.name]: Button,
|
||||
[Field.name]: Field,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
methods: {
|
||||
// 获取短信验证码
|
||||
getAuthCode() {
|
||||
this.codeDisabled = true
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
}
|
||||
}, 1000)
|
||||
getAuthCode({
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.customerMobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
this.sid = res.sessionId
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 验证码确认事件
|
||||
async authConfirm() {
|
||||
//清理计时器
|
||||
this.clearTimer()
|
||||
this.changeSubmit()
|
||||
},
|
||||
// 清理计时器
|
||||
clearTimer() {
|
||||
window.clearInterval(this.timeId)
|
||||
this.timeId = null
|
||||
this.countDown = 60
|
||||
this.codeDisabled = false
|
||||
},
|
||||
//提交变更申请
|
||||
async changeSubmit() {
|
||||
if (null == this.sid) {
|
||||
this.$toast('请先进行发送短信验证码')
|
||||
return
|
||||
}
|
||||
let res = await autchCodeCheck({
|
||||
smsId: this.sid,
|
||||
code: this.authCode
|
||||
})
|
||||
if (res.result == 0) {
|
||||
this.sid = res.sessionId
|
||||
this.toNextPage()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 验证码确认事件
|
||||
async authConfirm() {
|
||||
//清理计时器
|
||||
this.clearTimer()
|
||||
this.changeSubmit()
|
||||
},
|
||||
// 清理计时器
|
||||
clearTimer() {
|
||||
window.clearInterval(this.timeId)
|
||||
this.timeId = null
|
||||
this.countDown = 60
|
||||
this.codeDisabled = false
|
||||
},
|
||||
//提交变更申请
|
||||
async changeSubmit() {
|
||||
if (null == this.sid) {
|
||||
this.$toast('请先进行发送短信验证码')
|
||||
return
|
||||
}
|
||||
let res = await autchCodeCheck({
|
||||
smsId: this.sid,
|
||||
code: this.authCode
|
||||
})
|
||||
if (res.result == 0) {
|
||||
this.toNextPage()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
realPeopelCheck() {
|
||||
this.$toast.loading({
|
||||
// 持续展示 toast
|
||||
duration: 0,
|
||||
// 禁用背景点击s
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = {
|
||||
name: this.appntDTO.name,
|
||||
idType: this.appntDTO.idType,
|
||||
idNo: this.appntDTO.idNo,
|
||||
mobile: this.appntDTO.mobile
|
||||
}
|
||||
this.customerMobile = this.appntDTO.mobile
|
||||
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
this.authCode = null
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
return new Promise((resolve, reject) => {
|
||||
checkPhone(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
console.log(res)
|
||||
this.show = true
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '抱歉,您预留的手机号非您本人的手机号!',
|
||||
showCancelButton: false
|
||||
})
|
||||
}
|
||||
},
|
||||
realPeopelCheck() {
|
||||
this.$toast.loading({
|
||||
// 持续展示 toast
|
||||
duration: 0,
|
||||
// 禁用背景点击s
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取保单详情
|
||||
getPolicyDetail() {
|
||||
let that = this
|
||||
let data = {
|
||||
policyNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
|
||||
getPolicyDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
let appntDTO = res.content.appntDTO
|
||||
let orderInfoDTO = res.content.orderInfoDTO
|
||||
// 保单信息
|
||||
if (orderInfoDTO.orderStatus == '0') {
|
||||
orderInfoDTO.orderStatusText = '未签收'
|
||||
} else if (orderInfoDTO.orderStatus == '1') {
|
||||
orderInfoDTO.orderStatusText = '已签收'
|
||||
} else {
|
||||
orderInfoDTO.orderStatusText = ''
|
||||
}
|
||||
//团险渠道 查看团单号
|
||||
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
|
||||
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
|
||||
}
|
||||
// 测试用
|
||||
// orderInfoDTO.orderStatus = '0'
|
||||
that.OrderInfoDTO = orderInfoDTO
|
||||
// 投保人信息
|
||||
this.filterData(dataDictionary.sex, 'sex', appntDTO)
|
||||
this.filterData(dataDictionary.idType, 'idType', appntDTO)
|
||||
that.appntDTO = appntDTO
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
// 被保险人信息
|
||||
res.content.insuredDTOs.map(insured => {
|
||||
insured.riskDTOLst.map(risk => {
|
||||
Number(risk.payIntv)
|
||||
switch (risk.payIntv) {
|
||||
case -1:
|
||||
risk.payIntv = '不定期交'
|
||||
break
|
||||
case 0:
|
||||
risk.payIntv = '一次交清'
|
||||
break
|
||||
case 1:
|
||||
risk.payIntv = '月交'
|
||||
break
|
||||
case 3:
|
||||
risk.payIntv = '季交'
|
||||
break
|
||||
case 6:
|
||||
risk.payIntv = '半年交'
|
||||
break
|
||||
case 12:
|
||||
risk.payIntv = '年交'
|
||||
break
|
||||
}
|
||||
if (risk.insuYear == '70') {
|
||||
risk.insuYear = '至70周岁'
|
||||
} else if (risk.insuYear == '75') {
|
||||
risk.insuYear = '至75周岁'
|
||||
} else if (risk.insuYear == '80') {
|
||||
risk.insuYear = '至80周岁'
|
||||
} else if (risk.insuYear == '106') {
|
||||
risk.insuYear = '终身'
|
||||
} else {
|
||||
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}天` : `${risk.insuYear}年`
|
||||
}
|
||||
})
|
||||
this.filterData(dataDictionary.sex, 'sex', insured)
|
||||
this.filterData(dataDictionary.idType, 'idType', insured)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
|
||||
insured.bnfDTOs.map(bnf => {
|
||||
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
|
||||
this.filterData(dataDictionary.sex, 'sex', bnf)
|
||||
this.filterData(dataDictionary.idType, 'idType', bnf)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
|
||||
})
|
||||
})
|
||||
|
||||
that.insuredDTOs = res.content.insuredDTOs
|
||||
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
let data = {
|
||||
name: this.appntDTO.name,
|
||||
idType: this.appntDTO.idType,
|
||||
idNo: this.appntDTO.idNo,
|
||||
mobile: this.appntDTO.mobile
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '国富人寿保单回执签字',
|
||||
content: '国富人寿保单回执签收',
|
||||
url:
|
||||
location.origin +
|
||||
'/#/serve/airSign?policyNo=' +
|
||||
localStorage.policyNo +
|
||||
'&token=' +
|
||||
localStorage.token +
|
||||
'&saleInsuredInfo=' +
|
||||
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
|
||||
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据数据字典 将后端返回的数据渲染到页面中
|
||||
filterData(dictionary, key, pageData) {
|
||||
dictionary.forEach(item => {
|
||||
if (pageData[key] == item.id) {
|
||||
pageData[key + 'Text'] = item.text //渲染页面使用的字段
|
||||
}
|
||||
})
|
||||
},
|
||||
// 回执签收
|
||||
next() {
|
||||
this.toNextPage()
|
||||
// let that = this
|
||||
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||
// if (this.appntDTO.idType == '1') {
|
||||
// //证件类型为身份证时,进行人脸识别
|
||||
// EWebBridge.webCallAppInJs('face_auth', {
|
||||
// number: this.appntDTO.idNo, //身份证号码
|
||||
// name: this.appntDTO.name //姓名
|
||||
// }).then(data => {
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// this.$toast.clear()
|
||||
// if (JSON.parse(data).state == '1') {
|
||||
// this.toNextPage()
|
||||
// } else {
|
||||
// that.faceAuthCount.appnt++
|
||||
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.toNextPage()
|
||||
// }
|
||||
// } else {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
},
|
||||
toNextPage() {
|
||||
let params = {
|
||||
contNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
getReceiptSign(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
|
||||
window.localStorage.setItem('detailJump', '1')
|
||||
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
|
||||
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
|
||||
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/signatureOfElectronic',
|
||||
forbidSwipeBack: '1',
|
||||
title: '保险合同签收回执电子确认书签名'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/signatureOfElectronic'
|
||||
this.customerMobile = this.appntDTO.mobile
|
||||
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
this.authCode = null
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
return new Promise((resolve, reject) => {
|
||||
checkPhone(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
console.log(res)
|
||||
this.show = true
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '抱歉,您预留的手机号非您本人的手机号!',
|
||||
showCancelButton: false
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
})
|
||||
},
|
||||
// 获取保单详情
|
||||
getPolicyDetail() {
|
||||
let that = this
|
||||
let data = {
|
||||
policyNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
})
|
||||
|
||||
getPolicyDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
let appntDTO = res.content.appntDTO
|
||||
let orderInfoDTO = res.content.orderInfoDTO
|
||||
// 保单信息
|
||||
if (orderInfoDTO.orderStatus == '0') {
|
||||
orderInfoDTO.orderStatusText = '未签收'
|
||||
} else if (orderInfoDTO.orderStatus == '1') {
|
||||
orderInfoDTO.orderStatusText = '已签收'
|
||||
} else {
|
||||
orderInfoDTO.orderStatusText = ''
|
||||
}
|
||||
//团险渠道 查看团单号
|
||||
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
|
||||
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
|
||||
}
|
||||
// 测试用
|
||||
// orderInfoDTO.orderStatus = '0'
|
||||
that.OrderInfoDTO = orderInfoDTO
|
||||
// 投保人信息
|
||||
this.filterData(dataDictionary.sex, 'sex', appntDTO)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.npType, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.idType, 'idType', appntDTO)
|
||||
that.appntDTO = appntDTO
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
// 被保险人信息
|
||||
res.content.insuredDTOs.map(insured => {
|
||||
insured.riskDTOLst.map(risk => {
|
||||
Number(risk.payIntv)
|
||||
switch (risk.payIntv) {
|
||||
case -1:
|
||||
risk.payIntv = '不定期交'
|
||||
break
|
||||
case 0:
|
||||
risk.payIntv = '一次交清'
|
||||
break
|
||||
case 1:
|
||||
risk.payIntv = '月交'
|
||||
break
|
||||
case 3:
|
||||
risk.payIntv = '季交'
|
||||
break
|
||||
case 6:
|
||||
risk.payIntv = '半年交'
|
||||
break
|
||||
case 12:
|
||||
risk.payIntv = '年交'
|
||||
break
|
||||
}
|
||||
if (risk.insuYear == '70') {
|
||||
risk.insuYear = '至70周岁'
|
||||
} else if (risk.insuYear == '75') {
|
||||
risk.insuYear = '至75周岁'
|
||||
} else if (risk.insuYear == '80') {
|
||||
risk.insuYear = '至80周岁'
|
||||
} else if (risk.insuYear == '106') {
|
||||
risk.insuYear = '终身'
|
||||
} else {
|
||||
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}天` : `${risk.insuYear}年`
|
||||
}
|
||||
})
|
||||
this.filterData(dataDictionary.sex, 'sex', insured)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', insured)
|
||||
this.filterData(dataDictionary.npType, 'npType', insured)
|
||||
this.filterData(dataDictionary.idType, 'idType', insured)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
|
||||
insured.bnfDTOs.map(bnf => {
|
||||
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
|
||||
this.filterData(dataDictionary.sex, 'sex', bnf)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', bnf)
|
||||
this.filterData(dataDictionary.npType, 'npType', bnf)
|
||||
this.filterData(dataDictionary.idType, 'idType', bnf)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
|
||||
})
|
||||
})
|
||||
|
||||
that.insuredDTOs = res.content.insuredDTOs
|
||||
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '国富人寿保单回执签字',
|
||||
content: '国富人寿保单回执签收',
|
||||
url:
|
||||
location.origin +
|
||||
'/#/serve/airSign?policyNo=' +
|
||||
localStorage.policyNo +
|
||||
'&token=' +
|
||||
localStorage.token +
|
||||
'&saleInsuredInfo=' +
|
||||
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
|
||||
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据数据字典 将后端返回的数据渲染到页面中
|
||||
filterData(dictionary, key, pageData) {
|
||||
dictionary.forEach(item => {
|
||||
if (pageData[key] == item.id) {
|
||||
pageData[key + 'Text'] = item.text //渲染页面使用的字段
|
||||
}
|
||||
})
|
||||
},
|
||||
// 回执签收
|
||||
next() {
|
||||
this.toNextPage()
|
||||
// let that = this
|
||||
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||
// if (this.appntDTO.idType == '1') {
|
||||
// //证件类型为身份证时,进行人脸识别
|
||||
// EWebBridge.webCallAppInJs('face_auth', {
|
||||
// number: this.appntDTO.idNo, //身份证号码
|
||||
// name: this.appntDTO.name //姓名
|
||||
// }).then(data => {
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// this.$toast.clear()
|
||||
// if (JSON.parse(data).state == '1') {
|
||||
// this.toNextPage()
|
||||
// } else {
|
||||
// that.faceAuthCount.appnt++
|
||||
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.toNextPage()
|
||||
// }
|
||||
// } else {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
},
|
||||
toNextPage() {
|
||||
let params = {
|
||||
contNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
getReceiptSign(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
|
||||
window.localStorage.setItem('detailJump', '1')
|
||||
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
|
||||
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
|
||||
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/signatureOfElectronic',
|
||||
forbidSwipeBack: '1',
|
||||
title: '保险合同签收回执电子确认书签名'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/signatureOfElectronic'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-container {
|
||||
.van-hairline--top-bottom::after {
|
||||
border: none;
|
||||
.detail-container {
|
||||
.van-hairline--top-bottom::after {
|
||||
border: none;
|
||||
}
|
||||
/deep/ .van-collapse-item__content {
|
||||
padding-top: 0;
|
||||
}
|
||||
/deep/.van-collapse-item__title {
|
||||
padding-left: 30px;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
/deep/ .van-collapse-item__content {
|
||||
padding-top: 0;
|
||||
}
|
||||
/deep/.van-collapse-item__title {
|
||||
padding-left: 30px;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user