...
|
...
|
@@ -64,8 +64,9 @@ Page({ |
|
|
edit_state3: false,
|
|
|
coverage: '',
|
|
|
focus: false,
|
|
|
focus2: false,
|
|
|
sub_index: '',
|
|
|
birthday:''
|
|
|
birthday: ''
|
|
|
},
|
|
|
|
|
|
//回到顶部
|
...
|
...
|
@@ -210,11 +211,6 @@ Page({ |
|
|
// xielie: index
|
|
|
// })
|
|
|
|
|
|
if (type == 'fujiaxian') {
|
|
|
this.setData({
|
|
|
focus: true
|
|
|
})
|
|
|
}
|
|
|
// 已经添加的主险
|
|
|
let tempMain_list = Object.assign([], this.data.main_array)
|
|
|
this.data.inforid != 0 && this.data.inforid != undefined
|
...
|
...
|
@@ -347,8 +343,21 @@ Page({ |
|
|
|
|
|
//确认选择的推荐方案
|
|
|
confirmCase() {
|
|
|
let index = this.data.xulie;
|
|
|
let type = this.data.addType;
|
|
|
console.log(type)
|
|
|
if (type == 'fujiaxian') {
|
|
|
this.setData({
|
|
|
focus: true,
|
|
|
focus2:false
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
focus2: true,
|
|
|
focus: false
|
|
|
})
|
|
|
}
|
|
|
console.log(this.data.focus2, this.data.focus)
|
|
|
let index = this.data.xulie;
|
|
|
var that = this
|
|
|
var main_array = []
|
|
|
var projectlist = Object.assign([], this.data.showProjectlist)
|
...
|
...
|
@@ -531,13 +540,28 @@ Page({ |
|
|
addUnit2(e) {
|
|
|
var beneficiary_list = this.data.beneficiary_list;
|
|
|
var index = e.currentTarget.dataset.index
|
|
|
var num = 0
|
|
|
beneficiary_list[index].unit = e.detail.value;
|
|
|
if (beneficiary_list[index].unit > 100) {
|
|
|
wx.showToast({
|
|
|
title: '请重新输入收益比例',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
beneficiary_list[index].unit = 0
|
|
|
|
|
|
// if (beneficiary_list[index].unit > 100) {
|
|
|
// wx.showToast({
|
|
|
// title: '请重新输入收益比例',
|
|
|
// icon: 'none'
|
|
|
// })
|
|
|
// beneficiary_list[index].unit = 0
|
|
|
// }
|
|
|
|
|
|
|
|
|
for (var i = 0; i < beneficiary_list.length; i++) {
|
|
|
// num += beneficiary_list[i].unit
|
|
|
// if (num > 100) {
|
|
|
// wx.showToast({
|
|
|
// title: '请重新输入收益比例',
|
|
|
// icon: 'none'
|
|
|
// })
|
|
|
// } else {
|
|
|
// beneficiary_list[index].unit = 0
|
|
|
// }
|
|
|
}
|
|
|
this.setData({
|
|
|
beneficiary_list: beneficiary_list,
|
...
|
...
|
@@ -589,6 +613,7 @@ Page({ |
|
|
addPersons2(e) {
|
|
|
var list = this.data.beneficiary_list;
|
|
|
var len = list.length
|
|
|
var num = 0
|
|
|
if (list[len - 1].name == undefined) {
|
|
|
wx.showToast({
|
|
|
title: '请输入受益人',
|
...
|
...
|
@@ -600,12 +625,27 @@ Page({ |
|
|
icon: 'none'
|
|
|
})
|
|
|
} else {
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
|
num += list[i].unit
|
|
|
if (num > 100) {
|
|
|
console.log(list)
|
|
|
wx.showToast({
|
|
|
title: '请重新输入收益比例,收益比之和不得超过100',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
list[len - 1].unit = ''
|
|
|
} else {
|
|
|
list[len] = {
|
|
|
// name_array: this.data.insure,
|
|
|
name: '',
|
|
|
unit: ''
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setData({
|
|
|
beneficiary_list: list
|
|
|
})
|
...
|
...
|
@@ -635,7 +675,6 @@ Page({ |
|
|
let tempbenefict = this.data.beneficiary_list
|
|
|
let beneficiaryList = this.data.beneficiaryList
|
|
|
// 获取当前选项的受益人
|
|
|
// let person = tempbenefict[index].beneficiary_name;
|
|
|
let person = tempbenefict[index].name;
|
|
|
tempbenefict.splice(index, 1);
|
|
|
if (person) beneficiaryList.splice(beneficiaryList.indexOf(person), 1)
|
...
|
...
|
@@ -648,13 +687,11 @@ Page({ |
|
|
|
|
|
//添加附加险
|
|
|
addRisk() {
|
|
|
// var risk_list = Object.assign({}, this.data.risk_list);
|
|
|
var risk_list = this.data.risk_list;
|
|
|
var len = risk_list.length
|
|
|
risk_list[len] = {
|
|
|
name: '',
|
|
|
mo: [],
|
|
|
// project_time: '',
|
|
|
title: '',
|
|
|
num: ''
|
|
|
}
|
...
|
...
|
@@ -976,13 +1013,13 @@ Page({ |
|
|
selectUnit4(e) {
|
|
|
var unit = e.currentTarget.dataset.unit;
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
var focus=this.data.focus
|
|
|
var focus = this.data.focus
|
|
|
// let risk_list = Object.assign([], this.data.risk_list);
|
|
|
let risk_list = this.data.risk_list
|
|
|
risk_list[index].title = unit
|
|
|
if (risk_list[index].title == '终身') {
|
|
|
risk_list[index].num = ''
|
|
|
focus=true
|
|
|
focus = true
|
|
|
}
|
|
|
this.setData({
|
|
|
risk_list: risk_list,
|
...
|
...
|
@@ -1008,7 +1045,7 @@ Page({ |
|
|
this.setData({
|
|
|
insure: res.data.data.list,
|
|
|
recognizee: res.data.data.list,
|
|
|
birthday:res.data.data.list[0].birthday
|
|
|
birthday: res.data.data.list[0].birthday
|
|
|
// beneficiary_list: beneficiary_list,
|
|
|
})
|
|
|
}
|
...
|
...
|
|